From 1bca2284b9ec3f2338ca74dc7339a8cfc51a24c9 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Wed, 13 Jun 2012 09:15:06 +0000 Subject: Revert r141871 "Add RootWindowController that keeps per root window state." This reverts commit d696be73d92539286ad99338a26ceffe320be7cc. TBR=oshima@chromium.org BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10545154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141875 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell.h | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'ash/shell.h') diff --git a/ash/shell.h b/ash/shell.h index daa17f0..c178cbf 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -80,6 +80,7 @@ class ActivationController; class AppListController; class CaptureController; class DragDropController; +class EventClientImpl; class FocusCycler; class KeyRewriterEventFilter; class MagnificationController; @@ -87,8 +88,8 @@ class MonitorController; class PanelLayoutManager; class PartialScreenshotEventFilter; class ResizeShadowController; -class RootWindowController; class RootWindowLayoutManager; +class ScreenDimmer; class ShadowController; class ShelfLayoutManager; class ShellContextMenu; @@ -143,9 +144,6 @@ 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(); @@ -172,6 +170,10 @@ 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); @@ -281,6 +283,10 @@ 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_; } @@ -295,9 +301,6 @@ 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_; } @@ -312,6 +315,9 @@ 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; } @@ -342,7 +348,6 @@ 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 WindowAndBoundsPair; @@ -351,13 +356,8 @@ class ASH_EXPORT Shell : aura::CursorDelegate { void Init(); - // 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); + // Initializes the layout managers and event filters. + void InitLayoutManagers(); // 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 root_window_controller_; + scoped_ptr root_window_; ScreenAsh* screen_; // Active root window. Never become NULL. @@ -402,6 +402,7 @@ class ASH_EXPORT Shell : aura::CursorDelegate { scoped_ptr capture_controller_; scoped_ptr window_modality_controller_; scoped_ptr drag_drop_controller_; + scoped_ptr workspace_controller_; scoped_ptr resize_shadow_controller_; scoped_ptr shadow_controller_; scoped_ptr tooltip_controller_; @@ -412,9 +413,11 @@ class ASH_EXPORT Shell : aura::CursorDelegate { scoped_ptr video_detector_; scoped_ptr window_cycle_controller_; scoped_ptr focus_cycler_; + scoped_ptr event_client_; scoped_ptr monitor_controller_; scoped_ptr high_contrast_controller_; scoped_ptr magnification_controller_; + scoped_ptr screen_dimmer_; scoped_ptr focus_manager_; scoped_ptr user_action_client_; @@ -459,6 +462,9 @@ class ASH_EXPORT Shell : aura::CursorDelegate { ObserverList observers_; + // Owned by aura::RootWindow, cached here for type safety. + internal::RootWindowLayoutManager* root_window_layout_; + // Widget containing system tray. internal::StatusAreaWidget* status_area_widget_; -- cgit v1.1