diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-13 09:34:56 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-13 09:34:56 +0000 |
commit | d90b839ad378031602d5dbdf846c58994d451403 (patch) | |
tree | 013c72c390c7a7e4e9cb76f03a6c9eb29c7d68a2 /ash/shell.h | |
parent | 7bc8299dccc300184e850e1a76db110a85234db1 (diff) | |
download | chromium_src-d90b839ad378031602d5dbdf846c58994d451403.zip chromium_src-d90b839ad378031602d5dbdf846c58994d451403.tar.gz chromium_src-d90b839ad378031602d5dbdf846c58994d451403.tar.bz2 |
Reland r141871.
Add RootWindowController that keeps per root window state.
Cleanup Shell::Init(). Separated initialization that are specific to shell, root window and primary display.
I also did small cleanup in detor. I'll do more cleanups when I have a chance.
BUG=123160
TEST=no functional change. all tests should pass.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=141871
Review URL: https://chromiumcodereview.appspot.com/10546024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.h')
-rw-r--r-- | ash/shell.h | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/ash/shell.h b/ash/shell.h index c178cbf..daa17f0 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -80,7 +80,6 @@ class ActivationController; class AppListController; class CaptureController; class DragDropController; -class EventClientImpl; class FocusCycler; class KeyRewriterEventFilter; class MagnificationController; @@ -88,8 +87,8 @@ class MonitorController; class PanelLayoutManager; class PartialScreenshotEventFilter; class ResizeShadowController; +class RootWindowController; class RootWindowLayoutManager; -class ScreenDimmer; class ShadowController; class ShelfLayoutManager; class ShellContextMenu; @@ -144,6 +143,9 @@ class ASH_EXPORT Shell : aura::CursorDelegate { static void DeleteInstance(); + // Returns the root window controller for the primary root window. + static internal::RootWindowController* GetPrimaryRootWindowController(); + // Gets the primary RootWindow. The primary RootWindow is the one // that has a launcher. static aura::RootWindow* GetPrimaryRootWindow(); @@ -170,10 +172,6 @@ class ASH_EXPORT Shell : aura::CursorDelegate { active_root_window_ = active_root_window; } - internal::RootWindowLayoutManager* root_window_layout() const { - return root_window_layout_; - } - // Adds or removes |filter| from the aura::Env's CompoundEventFilter. void AddEnvEventFilter(aura::EventFilter* filter); void RemoveEnvEventFilter(aura::EventFilter* filter); @@ -283,10 +281,6 @@ class ASH_EXPORT Shell : aura::CursorDelegate { return magnification_controller_.get(); } - internal::ScreenDimmer* screen_dimmer() { - return screen_dimmer_.get(); - } - Launcher* launcher() { return launcher_.get(); } const ScreenAsh* screen() { return screen_; } @@ -301,6 +295,9 @@ class ASH_EXPORT Shell : aura::CursorDelegate { void SetShelfAlignment(ShelfAlignment alignment); ShelfAlignment GetShelfAlignment(); + // Dims or undims the screen. + void SetDimming(bool should_dim); + // TODO(sky): don't expose this! internal::ShelfLayoutManager* shelf() const { return shelf_; } @@ -315,9 +312,6 @@ class ASH_EXPORT Shell : aura::CursorDelegate { // Returns the size of the grid. int GetGridSize() const; - // Returns true if in maximized or fullscreen mode. - bool IsInMaximizedMode() const; - static void set_initially_hide_cursor(bool hide) { initially_hide_cursor_ = hide; } @@ -348,6 +342,7 @@ class ASH_EXPORT Shell : aura::CursorDelegate { private: FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); + friend class internal::RootWindowController; typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; @@ -356,8 +351,13 @@ class ASH_EXPORT Shell : aura::CursorDelegate { void Init(); - // Initializes the layout managers and event filters. - void InitLayoutManagers(); + // Initiailze the root window so that it can host browser windows. + void InitRootWindow(aura::RootWindow* root); + + // Initializes the layout managers and event filters specific for + // primary display. + void InitLayoutManagersForPrimaryDisplay( + internal::RootWindowController* root_window_controller); // Disables the workspace grid layout. void DisableWorkspaceGridLayout(); @@ -372,7 +372,7 @@ class ASH_EXPORT Shell : aura::CursorDelegate { // when the screen is initially created. static bool initially_hide_cursor_; - scoped_ptr<aura::RootWindow> root_window_; + scoped_ptr<internal::RootWindowController> root_window_controller_; ScreenAsh* screen_; // Active root window. Never become NULL. @@ -402,7 +402,6 @@ class ASH_EXPORT Shell : aura::CursorDelegate { scoped_ptr<internal::CaptureController> capture_controller_; scoped_ptr<internal::WindowModalityController> window_modality_controller_; scoped_ptr<internal::DragDropController> drag_drop_controller_; - scoped_ptr<internal::WorkspaceController> workspace_controller_; scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; scoped_ptr<internal::ShadowController> shadow_controller_; scoped_ptr<internal::TooltipController> tooltip_controller_; @@ -413,11 +412,9 @@ class ASH_EXPORT Shell : aura::CursorDelegate { scoped_ptr<VideoDetector> video_detector_; scoped_ptr<WindowCycleController> window_cycle_controller_; scoped_ptr<internal::FocusCycler> focus_cycler_; - scoped_ptr<internal::EventClientImpl> event_client_; scoped_ptr<internal::MonitorController> monitor_controller_; scoped_ptr<HighContrastController> high_contrast_controller_; scoped_ptr<internal::MagnificationController> magnification_controller_; - scoped_ptr<internal::ScreenDimmer> screen_dimmer_; scoped_ptr<aura::FocusManager> focus_manager_; scoped_ptr<aura::client::UserActionClient> user_action_client_; @@ -462,9 +459,6 @@ class ASH_EXPORT Shell : aura::CursorDelegate { ObserverList<ShellObserver> observers_; - // Owned by aura::RootWindow, cached here for type safety. - internal::RootWindowLayoutManager* root_window_layout_; - // Widget containing system tray. internal::StatusAreaWidget* status_area_widget_; |