#ifndef APPS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_
#define APPS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "ui/aura/window_tree_host_observer.h"
#include "ui/gfx/geometry/size.h"
#if defined(OS_CHROMEOS)
#include "ui/display/chromeos/output_configurator.h"
#endif
namespace aura {
class TestScreen;
class WindowTreeHost;
}
namespace content {
class BrowserContext;
}
namespace wm {
class WMTestHelper;
}
namespace apps {
class ShellAppWindow;
class ShellDesktopController
#if defined(OS_CHROMEOS)
: public ui::OutputConfigurator::Observer
#endif
{
public:
ShellDesktopController();
virtual ~ShellDesktopController();
static ShellDesktopController* instance();
ShellAppWindow* CreateAppWindow(content::BrowserContext* context);
void CloseAppWindow();
aura::WindowTreeHost* GetWindowTreeHost();
#if defined(OS_CHROMEOS)
virtual void OnDisplayModeChanged(
const std::vector<ui::OutputConfigurator::DisplayState>& outputs)
OVERRIDE;
#endif
private:
void CreateRootWindow();
void DestroyRootWindow();
gfx::Size GetPrimaryDisplaySize();
#if defined(OS_CHROMEOS)
scoped_ptr<ui::OutputConfigurator> output_configurator_;
#endif
scoped_ptr<wm::WMTestHelper> wm_test_helper_;
scoped_ptr<aura::TestScreen> test_screen_;
scoped_ptr<ShellAppWindow> app_window_;
DISALLOW_COPY_AND_ASSIGN(ShellDesktopController);
};
}
#endif