| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace ash { | 51 namespace ash { |
| 52 class AshWindowTreeHost; | 52 class AshWindowTreeHost; |
| 53 class AlwaysOnTopController; | 53 class AlwaysOnTopController; |
| 54 class AnimatingWallpaperWidgetController; | 54 class AnimatingWallpaperWidgetController; |
| 55 class DockedWindowLayoutManager; | 55 class DockedWindowLayoutManager; |
| 56 enum class LoginStatus; | 56 enum class LoginStatus; |
| 57 class PanelLayoutManager; | 57 class PanelLayoutManager; |
| 58 class ShelfLayoutManager; | 58 class ShelfLayoutManager; |
| 59 class ShelfWidget; | |
| 60 class StackingController; | 59 class StackingController; |
| 61 class StatusAreaWidget; | 60 class StatusAreaWidget; |
| 62 class SystemModalContainerLayoutManager; | 61 class SystemModalContainerLayoutManager; |
| 63 class SystemTray; | 62 class SystemTray; |
| 64 class SystemWallpaperController; | 63 class SystemWallpaperController; |
| 65 class TouchHudDebug; | 64 class TouchHudDebug; |
| 66 class TouchHudProjection; | 65 class TouchHudProjection; |
| 67 class WallpaperWidgetController; | 66 class WallpaperWidgetController; |
| 68 class WmRootWindowControllerAura; | 67 class WmRootWindowControllerAura; |
| 69 class WmShelfAura; | 68 class WmShelfAura; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const aura::Window* GetRootWindow() const; | 110 const aura::Window* GetRootWindow() const; |
| 112 | 111 |
| 113 WorkspaceController* workspace_controller(); | 112 WorkspaceController* workspace_controller(); |
| 114 | 113 |
| 115 AlwaysOnTopController* always_on_top_controller() { | 114 AlwaysOnTopController* always_on_top_controller() { |
| 116 return always_on_top_controller_.get(); | 115 return always_on_top_controller_.get(); |
| 117 } | 116 } |
| 118 | 117 |
| 119 WmShelfAura* wm_shelf_aura() const { return wm_shelf_aura_.get(); } | 118 WmShelfAura* wm_shelf_aura() const { return wm_shelf_aura_.get(); } |
| 120 | 119 |
| 121 // Access the shelf widget associated with this root window controller, | |
| 122 // NULL if no such shelf exists. | |
| 123 // DEPRECATED: Prefer GetShelf()->shelf_widget(). | |
| 124 ShelfWidget* shelf_widget() { return shelf_widget_.get(); } | |
| 125 | |
| 126 // Get touch HUDs associated with this root window controller. | 120 // Get touch HUDs associated with this root window controller. |
| 127 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; } | 121 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; } |
| 128 TouchHudProjection* touch_hud_projection() const { | 122 TouchHudProjection* touch_hud_projection() const { |
| 129 return touch_hud_projection_; | 123 return touch_hud_projection_; |
| 130 } | 124 } |
| 131 | 125 |
| 132 // Set touch HUDs for this root window controller. The root window controller | 126 // Set touch HUDs for this root window controller. The root window controller |
| 133 // will not own the HUDs; their lifetimes are managed by themselves. Whenever | 127 // will not own the HUDs; their lifetimes are managed by themselves. Whenever |
| 134 // the widget showing a HUD is being destroyed (e.g. because of detaching a | 128 // the widget showing a HUD is being destroyed (e.g. because of detaching a |
| 135 // display), the HUD deletes itself. | 129 // display), the HUD deletes itself. |
| 136 void set_touch_hud_debug(TouchHudDebug* hud) { touch_hud_debug_ = hud; } | 130 void set_touch_hud_debug(TouchHudDebug* hud) { touch_hud_debug_ = hud; } |
| 137 void set_touch_hud_projection(TouchHudProjection* hud) { | 131 void set_touch_hud_projection(TouchHudProjection* hud) { |
| 138 touch_hud_projection_ = hud; | 132 touch_hud_projection_ = hud; |
| 139 } | 133 } |
| 140 | 134 |
| 141 WallpaperWidgetController* wallpaper_widget_controller() { | 135 WallpaperWidgetController* wallpaper_widget_controller() { |
| 142 return wallpaper_widget_controller_.get(); | 136 return wallpaper_widget_controller_.get(); |
| 143 } | 137 } |
| 144 void SetWallpaperWidgetController(WallpaperWidgetController* controller); | 138 void SetWallpaperWidgetController(WallpaperWidgetController* controller); |
| 145 AnimatingWallpaperWidgetController* animating_wallpaper_widget_controller() { | 139 AnimatingWallpaperWidgetController* animating_wallpaper_widget_controller() { |
| 146 return animating_wallpaper_widget_controller_.get(); | 140 return animating_wallpaper_widget_controller_.get(); |
| 147 } | 141 } |
| 148 void SetAnimatingWallpaperWidgetController( | 142 void SetAnimatingWallpaperWidgetController( |
| 149 AnimatingWallpaperWidgetController* controller); | 143 AnimatingWallpaperWidgetController* controller); |
| 150 | 144 |
| 151 // Access the shelf layout manager associated with this root | 145 // Access the shelf layout manager associated with this root |
| 152 // window controller, NULL if no such shelf exists. | 146 // window controller, NULL if no such shelf exists. |
| 153 ShelfLayoutManager* GetShelfLayoutManager(); | 147 ShelfLayoutManager* GetShelfLayoutManager(); |
| 154 | 148 |
| 149 // May return null, for example for a secondary monitor at the login screen. |
| 150 StatusAreaWidget* GetStatusAreaWidget(); |
| 151 |
| 155 // Returns the system tray on this root window. Note that | 152 // Returns the system tray on this root window. Note that |
| 156 // calling this on the root window that doesn't have a shelf will | 153 // calling this on the root window that doesn't have a shelf will |
| 157 // lead to a crash. | 154 // lead to a crash. |
| 158 SystemTray* GetSystemTray(); | 155 SystemTray* GetSystemTray(); |
| 159 | 156 |
| 160 // Shows context menu at the |location_in_screen|. This uses | 157 // Shows context menu at the |location_in_screen|. This uses |
| 161 // |ShellDelegate::CreateContextMenu| to define the content of the menu. | 158 // |ShellDelegate::CreateContextMenu| to define the content of the menu. |
| 162 void ShowContextMenu(const gfx::Point& location_in_screen, | 159 void ShowContextMenu(const gfx::Point& location_in_screen, |
| 163 ui::MenuSourceType source_type); | 160 ui::MenuSourceType source_type); |
| 164 | 161 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // Owned by the root window. | 265 // Owned by the root window. |
| 269 WmRootWindowControllerAura* wm_root_window_controller_ = nullptr; | 266 WmRootWindowControllerAura* wm_root_window_controller_ = nullptr; |
| 270 | 267 |
| 271 std::unique_ptr<StackingController> stacking_controller_; | 268 std::unique_ptr<StackingController> stacking_controller_; |
| 272 | 269 |
| 273 // The shelf controller for this root window. Exists for the entire lifetime | 270 // The shelf controller for this root window. Exists for the entire lifetime |
| 274 // of the RootWindowController so that it is safe for observers to be added | 271 // of the RootWindowController so that it is safe for observers to be added |
| 275 // to it during construction of the shelf widget and status tray. | 272 // to it during construction of the shelf widget and status tray. |
| 276 std::unique_ptr<WmShelfAura> wm_shelf_aura_; | 273 std::unique_ptr<WmShelfAura> wm_shelf_aura_; |
| 277 | 274 |
| 278 // The shelf widget for this root window. | |
| 279 // TODO(jamescook): Move ownership to WmShelf. | |
| 280 std::unique_ptr<ShelfWidget> shelf_widget_; | |
| 281 | |
| 282 // An invisible/empty window used as a event target for | 275 // An invisible/empty window used as a event target for |
| 283 // |MouseCursorEventFilter| before a user logs in. | 276 // |MouseCursorEventFilter| before a user logs in. |
| 284 // (crbug.com/266987) | 277 // (crbug.com/266987) |
| 285 // Its container is |LockScreenWallpaperContainer| and | 278 // Its container is |LockScreenWallpaperContainer| and |
| 286 // this must be deleted before the container is deleted. | 279 // this must be deleted before the container is deleted. |
| 287 std::unique_ptr<aura::Window> mouse_event_target_; | 280 std::unique_ptr<aura::Window> mouse_event_target_; |
| 288 | 281 |
| 289 // Manages layout of docked windows. Owned by DockedContainer. | 282 // Manages layout of docked windows. Owned by DockedContainer. |
| 290 DockedWindowLayoutManager* docked_layout_manager_; | 283 DockedWindowLayoutManager* docked_layout_manager_; |
| 291 | 284 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 319 |
| 327 // On classic ash, returns the RootWindowController for the given |root_window|. | 320 // On classic ash, returns the RootWindowController for the given |root_window|. |
| 328 // On mus ash, returns the RootWindowController for the primary display. | 321 // On mus ash, returns the RootWindowController for the primary display. |
| 329 // See RootWindowController class comment above. | 322 // See RootWindowController class comment above. |
| 330 ASH_EXPORT RootWindowController* GetRootWindowController( | 323 ASH_EXPORT RootWindowController* GetRootWindowController( |
| 331 const aura::Window* root_window); | 324 const aura::Window* root_window); |
| 332 | 325 |
| 333 } // namespace ash | 326 } // namespace ash |
| 334 | 327 |
| 335 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ | 328 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |