OLD | NEW |
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 <map> | 8 #include <map> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Creates and Initialize the RootWindowController for primary display. | 83 // Creates and Initialize the RootWindowController for primary display. |
84 static void CreateForPrimaryDisplay(aura::RootWindow* root_window); | 84 static void CreateForPrimaryDisplay(aura::RootWindow* root_window); |
85 | 85 |
86 // Creates and Initialize the RootWindowController for secondary displays. | 86 // Creates and Initialize the RootWindowController for secondary displays. |
87 static void CreateForSecondaryDisplay(aura::RootWindow* root_window); | 87 static void CreateForSecondaryDisplay(aura::RootWindow* root_window); |
88 | 88 |
89 // Creates and Initialize the RootWindowController for virtual | 89 // Creates and Initialize the RootWindowController for virtual |
90 // keyboard displays. | 90 // keyboard displays. |
91 static void CreateForVirtualKeyboardDisplay(aura::RootWindow* root_window); | 91 static void CreateForVirtualKeyboardDisplay(aura::RootWindow* root_window); |
92 | 92 |
93 // Returns a RootWindowController that has a launcher for given | 93 // Returns a RootWindowController that has a shelf for given |
94 // |window|. This returns the RootWindowController for the |window|'s | 94 // |window|. This returns the RootWindowController for the |window|'s |
95 // root window when multiple launcher mode is enabled, or the primary | 95 // root window when multiple shelf mode is enabled, or the primary |
96 // RootWindowController otherwise. | 96 // RootWindowController otherwise. |
97 static RootWindowController* ForLauncher(aura::Window* window); | 97 static RootWindowController* ForShelf(aura::Window* window); |
98 | 98 |
99 // Returns a RootWindowController of the window's root window. | 99 // Returns a RootWindowController of the window's root window. |
100 static RootWindowController* ForWindow(const aura::Window* window); | 100 static RootWindowController* ForWindow(const aura::Window* window); |
101 | 101 |
102 // Returns the RootWindowController of the target root window. | 102 // Returns the RootWindowController of the target root window. |
103 static internal::RootWindowController* ForTargetRootWindow(); | 103 static internal::RootWindowController* ForTargetRootWindow(); |
104 | 104 |
105 // Returns container which contains a given |window|. | 105 // Returns container which contains a given |window|. |
106 static aura::Window* GetContainerForWindow(aura::Window* window); | 106 static aura::Window* GetContainerForWindow(aura::Window* window); |
107 | 107 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 SoloWindowTracker* solo_window_tracker() { | 157 SoloWindowTracker* solo_window_tracker() { |
158 return solo_window_tracker_.get(); | 158 return solo_window_tracker_.get(); |
159 } | 159 } |
160 | 160 |
161 // Access the shelf layout manager associated with this root | 161 // Access the shelf layout manager associated with this root |
162 // window controller, NULL if no such shelf exists. | 162 // window controller, NULL if no such shelf exists. |
163 ShelfLayoutManager* GetShelfLayoutManager(); | 163 ShelfLayoutManager* GetShelfLayoutManager(); |
164 | 164 |
165 // Returns the system tray on this root window. Note that | 165 // Returns the system tray on this root window. Note that |
166 // calling this on the root window that doesn't have a launcher will | 166 // calling this on the root window that doesn't have a shelf will |
167 // lead to a crash. | 167 // lead to a crash. |
168 SystemTray* GetSystemTray(); | 168 SystemTray* GetSystemTray(); |
169 | 169 |
170 // Shows context menu at the |location_in_screen|. This uses | 170 // Shows context menu at the |location_in_screen|. This uses |
171 // |ShellDelegate::CreateContextMenu| to define the content of the menu. | 171 // |ShellDelegate::CreateContextMenu| to define the content of the menu. |
172 void ShowContextMenu(const gfx::Point& location_in_screen, | 172 void ShowContextMenu(const gfx::Point& location_in_screen, |
173 ui::MenuSourceType source_type); | 173 ui::MenuSourceType source_type); |
174 | 174 |
175 // Returns the layout-manager for the appropriate modal-container. If the | 175 // Returns the layout-manager for the appropriate modal-container. If the |
176 // window is inside the lockscreen modal container, then the layout manager | 176 // window is inside the lockscreen modal container, then the layout manager |
177 // for that is returned. Otherwise the layout manager for the default modal | 177 // for that is returned. Otherwise the layout manager for the default modal |
178 // container is returned. | 178 // container is returned. |
179 // If no window is specified (i.e. |window| is NULL), then the lockscreen | 179 // If no window is specified (i.e. |window| is NULL), then the lockscreen |
180 // modal container is used if the screen is currently locked. Otherwise, the | 180 // modal container is used if the screen is currently locked. Otherwise, the |
181 // default modal container is used. | 181 // default modal container is used. |
182 SystemModalContainerLayoutManager* GetSystemModalLayoutManager( | 182 SystemModalContainerLayoutManager* GetSystemModalLayoutManager( |
183 aura::Window* window); | 183 aura::Window* window); |
184 | 184 |
185 aura::Window* GetContainer(int container_id); | 185 aura::Window* GetContainer(int container_id); |
186 const aura::Window* GetContainer(int container_id) const; | 186 const aura::Window* GetContainer(int container_id) const; |
187 | 187 |
188 // Show launcher view if it was created hidden (before session has started). | 188 // Show shelf view if it was created hidden (before session has started). |
189 void ShowLauncher(); | 189 void ShowShelf(); |
190 | 190 |
191 // Called when the launcher associated with this root window is created. | 191 // Called when the shelf associated with this root window is created. |
192 void OnLauncherCreated(); | 192 void OnShelfCreated(); |
193 | 193 |
194 // Called when the login status changes after login (such as lock/unlock). | 194 // Called when the login status changes after login (such as lock/unlock). |
195 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. | 195 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. |
196 void UpdateAfterLoginStatusChange(user::LoginStatus status); | 196 void UpdateAfterLoginStatusChange(user::LoginStatus status); |
197 | 197 |
198 // Called when the brightness/grayscale animation from white to the login | 198 // Called when the brightness/grayscale animation from white to the login |
199 // desktop background image has started. Starts |boot_splash_screen_|'s | 199 // desktop background image has started. Starts |boot_splash_screen_|'s |
200 // hiding animation (if the screen is non-NULL). | 200 // hiding animation (if the screen is non-NULL). |
201 void HandleInitialDesktopBackgroundAnimationStarted(); | 201 void HandleInitialDesktopBackgroundAnimationStarted(); |
202 | 202 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 // Overridden from ShellObserver. | 266 // Overridden from ShellObserver. |
267 virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE; | 267 virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE; |
268 virtual void OnTouchHudProjectionToggled(bool enabled) OVERRIDE; | 268 virtual void OnTouchHudProjectionToggled(bool enabled) OVERRIDE; |
269 | 269 |
270 scoped_ptr<aura::RootWindow> root_window_; | 270 scoped_ptr<aura::RootWindow> root_window_; |
271 RootWindowLayoutManager* root_window_layout_; | 271 RootWindowLayoutManager* root_window_layout_; |
272 | 272 |
273 scoped_ptr<StackingController> stacking_controller_; | 273 scoped_ptr<StackingController> stacking_controller_; |
274 | 274 |
275 // The shelf for managing the launcher and the status widget. | 275 // The shelf for managing the shelf and the status widget. |
276 scoped_ptr<ShelfWidget> shelf_; | 276 scoped_ptr<ShelfWidget> shelf_; |
277 | 277 |
278 // An invisible/empty window used as a event target for | 278 // An invisible/empty window used as a event target for |
279 // |MouseCursorEventFilter| before a user logs in. | 279 // |MouseCursorEventFilter| before a user logs in. |
280 // (crbug.com/266987) | 280 // (crbug.com/266987) |
281 // Its container is |LockScreenBackgroundContainer| and | 281 // Its container is |LockScreenBackgroundContainer| and |
282 // this must be deleted before the container is deleted. | 282 // this must be deleted before the container is deleted. |
283 scoped_ptr<aura::Window> mouse_event_target_; | 283 scoped_ptr<aura::Window> mouse_event_target_; |
284 | 284 |
285 // Manages layout of docked windows. Owned by DockedContainer. | 285 // Manages layout of docked windows. Owned by DockedContainer. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 | 321 |
322 // Gets the RootWindowController for |root_window|. | 322 // Gets the RootWindowController for |root_window|. |
323 ASH_EXPORT RootWindowController* GetRootWindowController( | 323 ASH_EXPORT RootWindowController* GetRootWindowController( |
324 const aura::Window* root_window); | 324 const aura::Window* root_window); |
325 | 325 |
326 } // namespace internal | 326 } // namespace internal |
327 } // ash | 327 } // ash |
328 | 328 |
329 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ | 329 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |
OLD | NEW |