Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: ash/root_window_controller.h

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_
6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/shelf_types.h" 9 #include "ash/wm/shelf_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 30 matching lines...) Expand all
41 // This class maintains the per root window state for ash. This class 41 // This class maintains the per root window state for ash. This class
42 // owns the root window and other dependent objects that should be 42 // owns the root window and other dependent objects that should be
43 // deleted upon the deletion of the root window. The RootWindowController 43 // deleted upon the deletion of the root window. The RootWindowController
44 // for particular root window is stored as a property and can be obtained 44 // for particular root window is stored as a property and can be obtained
45 // using |GetRootWindowController(aura::RootWindow*)| function. 45 // using |GetRootWindowController(aura::RootWindow*)| function.
46 class ASH_EXPORT RootWindowController { 46 class ASH_EXPORT RootWindowController {
47 public: 47 public:
48 explicit RootWindowController(aura::RootWindow* root_window); 48 explicit RootWindowController(aura::RootWindow* root_window);
49 ~RootWindowController(); 49 ~RootWindowController();
50 50
51 // Returns a RootWindowController that has a launcher for given
52 // |window|. This returns the RootWindowController for the |window|'s
53 // root window when multiple launcher mode is enabled, or the primary
54 // RootWindowController otherwise.
55 static RootWindowController* ForLauncher(aura::Window* window);
56
51 aura::RootWindow* root_window() { return root_window_.get(); } 57 aura::RootWindow* root_window() { return root_window_.get(); }
52 58
53 RootWindowLayoutManager* root_window_layout() { return root_window_layout_; } 59 RootWindowLayoutManager* root_window_layout() { return root_window_layout_; }
54 60
55 WorkspaceController* workspace_controller() { 61 WorkspaceController* workspace_controller() {
56 return workspace_controller_.get(); 62 return workspace_controller_.get();
57 } 63 }
58 64
59 ScreenDimmer* screen_dimmer() { return screen_dimmer_.get(); } 65 ScreenDimmer* screen_dimmer() { return screen_dimmer_.get(); }
60 66
61 Launcher* launcher() { return launcher_.get(); } 67 Launcher* launcher() { return launcher_.get(); }
62 68
63 // TODO(sky): don't expose this! 69 ShelfLayoutManager* shelf() const { return shelf_; }
64 internal::ShelfLayoutManager* shelf() const { return shelf_; }
65 70
66 internal::StatusAreaWidget* status_area_widget() const { 71 StatusAreaWidget* status_area_widget() const {
67 return status_area_widget_; 72 return status_area_widget_;
68 } 73 }
69 74
70 // Returns the layout-manager for the appropriate modal-container. If the 75 // Returns the layout-manager for the appropriate modal-container. If the
71 // window is inside the lockscreen modal container, then the layout manager 76 // window is inside the lockscreen modal container, then the layout manager
72 // for that is returned. Otherwise the layout manager for the default modal 77 // for that is returned. Otherwise the layout manager for the default modal
73 // container is returned. 78 // container is returned.
74 // If no window is specified (i.e. |window| is NULL), then the lockscreen 79 // If no window is specified (i.e. |window| is NULL), then the lockscreen
75 // modal container is used if the screen is currently locked. Otherwise, the 80 // modal container is used if the screen is currently locked. Otherwise, the
76 // default modal container is used. 81 // default modal container is used.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 132
128 private: 133 private:
129 // Creates each of the special window containers that holds windows of various 134 // Creates each of the special window containers that holds windows of various
130 // types in the shell UI. 135 // types in the shell UI.
131 void CreateContainersInRootWindow(aura::RootWindow* root_window); 136 void CreateContainersInRootWindow(aura::RootWindow* root_window);
132 137
133 scoped_ptr<aura::RootWindow> root_window_; 138 scoped_ptr<aura::RootWindow> root_window_;
134 RootWindowLayoutManager* root_window_layout_; 139 RootWindowLayoutManager* root_window_layout_;
135 140
136 // Widget containing system tray. 141 // Widget containing system tray.
137 internal::StatusAreaWidget* status_area_widget_; 142 StatusAreaWidget* status_area_widget_;
138 143
139 // The shelf for managing the launcher and the status widget. 144 // The shelf for managing the launcher and the status widget.
140 // RootWindowController does not own the shelf. Instead, it is owned 145 // RootWindowController does not own the shelf. Instead, it is owned
141 // by container of the status area. 146 // by container of the status area.
142 internal::ShelfLayoutManager* shelf_; 147 ShelfLayoutManager* shelf_;
143 148
144 // Manages layout of panels. Owned by PanelContainer. 149 // Manages layout of panels. Owned by PanelContainer.
145 internal::PanelLayoutManager* panel_layout_manager_; 150 PanelLayoutManager* panel_layout_manager_;
146 151
147 scoped_ptr<Launcher> launcher_; 152 scoped_ptr<Launcher> launcher_;
148 153
149 // A background layer that's displayed beneath all other layers. Without 154 // A background layer that's displayed beneath all other layers. Without
150 // this, portions of the root window that aren't covered by layers will be 155 // this, portions of the root window that aren't covered by layers will be
151 // painted white; this can show up if e.g. it takes a long time to decode the 156 // painted white; this can show up if e.g. it takes a long time to decode the
152 // desktop background image when displaying the login screen. 157 // desktop background image when displaying the login screen.
153 scoped_ptr<ColoredWindowController> background_; 158 scoped_ptr<ColoredWindowController> background_;
154 159
155 scoped_ptr<ScreenDimmer> screen_dimmer_; 160 scoped_ptr<ScreenDimmer> screen_dimmer_;
156 scoped_ptr<WorkspaceController> workspace_controller_; 161 scoped_ptr<WorkspaceController> workspace_controller_;
157 162
158 // We need to own event handlers for various containers. 163 // We need to own event handlers for various containers.
159 scoped_ptr<ToplevelWindowEventHandler> default_container_handler_; 164 scoped_ptr<ToplevelWindowEventHandler> default_container_handler_;
160 scoped_ptr<ToplevelWindowEventHandler> always_on_top_container_handler_; 165 scoped_ptr<ToplevelWindowEventHandler> always_on_top_container_handler_;
161 scoped_ptr<ToplevelWindowEventHandler> modal_container_handler_; 166 scoped_ptr<ToplevelWindowEventHandler> modal_container_handler_;
162 scoped_ptr<ToplevelWindowEventHandler> lock_modal_container_handler_; 167 scoped_ptr<ToplevelWindowEventHandler> lock_modal_container_handler_;
163 168
164 DISALLOW_COPY_AND_ASSIGN(RootWindowController); 169 DISALLOW_COPY_AND_ASSIGN(RootWindowController);
165 }; 170 };
166 171
167 } // namespace internal 172 } // namespace internal
168 } // ash 173 } // ash
169 174
170 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ 175 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698