Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace wm { | 41 namespace wm { |
| 42 class InputMethodEventFilter; | 42 class InputMethodEventFilter; |
| 43 class RootWindowEventFilter; | 43 class RootWindowEventFilter; |
| 44 class ScopedCaptureClient; | 44 class ScopedCaptureClient; |
| 45 } | 45 } |
| 46 | 46 |
| 47 namespace ash { | 47 namespace ash { |
| 48 class AshWindowTreeHost; | 48 class AshWindowTreeHost; |
| 49 class AlwaysOnTopController; | |
| 50 class DockedWindowLayoutManager; | 49 class DockedWindowLayoutManager; |
| 51 enum class LoginStatus; | 50 enum class LoginStatus; |
| 52 class PanelLayoutManager; | 51 class PanelLayoutManager; |
| 53 class ShelfLayoutManager; | 52 class ShelfLayoutManager; |
| 54 class StackingController; | 53 class StackingController; |
| 55 class StatusAreaWidget; | 54 class StatusAreaWidget; |
| 56 class SystemModalContainerLayoutManager; | 55 class SystemModalContainerLayoutManager; |
| 57 class SystemTray; | 56 class SystemTray; |
| 58 class SystemWallpaperController; | 57 class SystemWallpaperController; |
| 59 class TouchHudDebug; | 58 class TouchHudDebug; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 AshWindowTreeHost* ash_host() { return ash_host_.get(); } | 97 AshWindowTreeHost* ash_host() { return ash_host_.get(); } |
| 99 const AshWindowTreeHost* ash_host() const { return ash_host_.get(); } | 98 const AshWindowTreeHost* ash_host() const { return ash_host_.get(); } |
| 100 | 99 |
| 101 aura::WindowTreeHost* GetHost(); | 100 aura::WindowTreeHost* GetHost(); |
| 102 const aura::WindowTreeHost* GetHost() const; | 101 const aura::WindowTreeHost* GetHost() const; |
| 103 aura::Window* GetRootWindow(); | 102 aura::Window* GetRootWindow(); |
| 104 const aura::Window* GetRootWindow() const; | 103 const aura::Window* GetRootWindow() const; |
| 105 | 104 |
| 106 WorkspaceController* workspace_controller(); | 105 WorkspaceController* workspace_controller(); |
| 107 | 106 |
| 108 AlwaysOnTopController* always_on_top_controller() { | 107 WmShelfAura* wm_shelf_aura() const { return wm_shelf_aura_.get(); } |
| 109 return always_on_top_controller_.get(); | 108 |
| 109 WmRootWindowControllerAura* wm_root_window_controller() { | |
| 110 return wm_root_window_controller_; | |
| 110 } | 111 } |
| 111 | 112 |
| 112 WmShelfAura* wm_shelf_aura() const { return wm_shelf_aura_.get(); } | |
| 113 | |
| 114 // Get touch HUDs associated with this root window controller. | 113 // Get touch HUDs associated with this root window controller. |
| 115 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; } | 114 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; } |
| 116 TouchHudProjection* touch_hud_projection() const { | 115 TouchHudProjection* touch_hud_projection() const { |
| 117 return touch_hud_projection_; | 116 return touch_hud_projection_; |
| 118 } | 117 } |
| 119 | 118 |
| 120 // Set touch HUDs for this root window controller. The root window controller | 119 // Set touch HUDs for this root window controller. The root window controller |
| 121 // will not own the HUDs; their lifetimes are managed by themselves. Whenever | 120 // will not own the HUDs; their lifetimes are managed by themselves. Whenever |
| 122 // the widget showing a HUD is being destroyed (e.g. because of detaching a | 121 // the widget showing a HUD is being destroyed (e.g. because of detaching a |
| 123 // display), the HUD deletes itself. | 122 // display), the HUD deletes itself. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 // Initializes |system_wallpaper_| and possibly also |boot_splash_screen_|. | 214 // Initializes |system_wallpaper_| and possibly also |boot_splash_screen_|. |
| 216 // |is_first_run_after_boot| determines the wallpaper's initial color. | 215 // |is_first_run_after_boot| determines the wallpaper's initial color. |
| 217 void CreateSystemWallpaper(bool is_first_run_after_boot); | 216 void CreateSystemWallpaper(bool is_first_run_after_boot); |
| 218 | 217 |
| 219 // Enables projection touch HUD. | 218 // Enables projection touch HUD. |
| 220 void EnableTouchHudProjection(); | 219 void EnableTouchHudProjection(); |
| 221 | 220 |
| 222 // Disables projection touch HUD. | 221 // Disables projection touch HUD. |
| 223 void DisableTouchHudProjection(); | 222 void DisableTouchHudProjection(); |
| 224 | 223 |
| 224 DockedWindowLayoutManager* docked_window_layout_manager(); | |
|
James Cook
2016/09/21 22:03:19
GetDockedWindowLayoutManager() and GetPanelLayoutM
sky
2016/09/21 22:47:49
Can you motivate that? The style guide says "Funct
James Cook
2016/09/21 22:56:11
I associate them with inline functions, but I agre
| |
| 225 PanelLayoutManager* panel_layout_manager(); | |
| 226 | |
| 225 // Overridden from ShellObserver. | 227 // Overridden from ShellObserver. |
| 226 void OnLoginStateChanged(LoginStatus status) override; | 228 void OnLoginStateChanged(LoginStatus status) override; |
| 227 void OnTouchHudProjectionToggled(bool enabled) override; | 229 void OnTouchHudProjectionToggled(bool enabled) override; |
| 228 | 230 |
| 229 std::unique_ptr<AshWindowTreeHost> ash_host_; | 231 std::unique_ptr<AshWindowTreeHost> ash_host_; |
| 230 | 232 |
| 231 // Owned by the root window. | 233 // Owned by the root window. |
| 232 WmRootWindowControllerAura* wm_root_window_controller_ = nullptr; | 234 WmRootWindowControllerAura* wm_root_window_controller_ = nullptr; |
| 233 | 235 |
| 234 std::unique_ptr<StackingController> stacking_controller_; | 236 std::unique_ptr<StackingController> stacking_controller_; |
| 235 | 237 |
| 236 // The shelf controller for this root window. Exists for the entire lifetime | 238 // The shelf controller for this root window. Exists for the entire lifetime |
| 237 // of the RootWindowController so that it is safe for observers to be added | 239 // of the RootWindowController so that it is safe for observers to be added |
| 238 // to it during construction of the shelf widget and status tray. | 240 // to it during construction of the shelf widget and status tray. |
| 239 std::unique_ptr<WmShelfAura> wm_shelf_aura_; | 241 std::unique_ptr<WmShelfAura> wm_shelf_aura_; |
| 240 | 242 |
| 241 // An invisible/empty window used as a event target for | 243 // An invisible/empty window used as a event target for |
| 242 // |MouseCursorEventFilter| before a user logs in. | 244 // |MouseCursorEventFilter| before a user logs in. |
| 243 // (crbug.com/266987) | 245 // (crbug.com/266987) |
| 244 // Its container is |LockScreenWallpaperContainer| and | 246 // Its container is |LockScreenWallpaperContainer| and |
| 245 // this must be deleted before the container is deleted. | 247 // this must be deleted before the container is deleted. |
| 246 std::unique_ptr<aura::Window> mouse_event_target_; | 248 std::unique_ptr<aura::Window> mouse_event_target_; |
| 247 | 249 |
| 248 // Manages layout of docked windows. Owned by DockedContainer. | |
| 249 DockedWindowLayoutManager* docked_layout_manager_; | |
| 250 | |
| 251 // Manages layout of panels. Owned by PanelContainer. | |
| 252 PanelLayoutManager* panel_layout_manager_; | |
| 253 | |
| 254 std::unique_ptr<SystemWallpaperController> system_wallpaper_; | 250 std::unique_ptr<SystemWallpaperController> system_wallpaper_; |
| 255 | 251 |
| 256 #if defined(OS_CHROMEOS) | 252 #if defined(OS_CHROMEOS) |
| 257 std::unique_ptr<BootSplashScreen> boot_splash_screen_; | 253 std::unique_ptr<BootSplashScreen> boot_splash_screen_; |
| 258 // Responsible for initializing TouchExplorationController when spoken | 254 // Responsible for initializing TouchExplorationController when spoken |
| 259 // feedback is on. | 255 // feedback is on. |
| 260 std::unique_ptr<AshTouchExplorationManager> touch_exploration_manager_; | 256 std::unique_ptr<AshTouchExplorationManager> touch_exploration_manager_; |
| 261 #endif | 257 #endif |
| 262 | 258 |
| 263 std::unique_ptr<AlwaysOnTopController> always_on_top_controller_; | |
| 264 | |
| 265 // Heads-up displays for touch events. These HUDs are not owned by the root | 259 // Heads-up displays for touch events. These HUDs are not owned by the root |
| 266 // window controller and manage their own lifetimes. | 260 // window controller and manage their own lifetimes. |
| 267 TouchHudDebug* touch_hud_debug_; | 261 TouchHudDebug* touch_hud_debug_; |
| 268 TouchHudProjection* touch_hud_projection_; | 262 TouchHudProjection* touch_hud_projection_; |
| 269 | 263 |
| 270 // Handles double clicks on the panel window header. | 264 // Handles double clicks on the panel window header. |
| 271 std::unique_ptr<ui::EventHandler> panel_container_handler_; | 265 std::unique_ptr<ui::EventHandler> panel_container_handler_; |
| 272 | 266 |
| 273 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; | 267 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; |
| 274 | 268 |
| 275 DISALLOW_COPY_AND_ASSIGN(RootWindowController); | 269 DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
| 276 }; | 270 }; |
| 277 | 271 |
| 278 // On classic ash, returns the RootWindowController for the given |root_window|. | 272 // On classic ash, returns the RootWindowController for the given |root_window|. |
| 279 // On mus ash, returns the RootWindowController for the primary display. | 273 // On mus ash, returns the RootWindowController for the primary display. |
| 280 // See RootWindowController class comment above. | 274 // See RootWindowController class comment above. |
| 281 ASH_EXPORT RootWindowController* GetRootWindowController( | 275 ASH_EXPORT RootWindowController* GetRootWindowController( |
| 282 const aura::Window* root_window); | 276 const aura::Window* root_window); |
| 283 | 277 |
| 284 } // namespace ash | 278 } // namespace ash |
| 285 | 279 |
| 286 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ | 280 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |