[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_ |
| 6 | #define ASH_ROOT_WINDOW_CONTROLLER_H_ |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 7 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 8 | #include <map> |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 9 | #include <memory> |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 10 | |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 11 | #include "ash/ash_export.h" |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 12 | #include "ash/shelf/shelf_types.h" |
[email protected] | d141b92 | 2013-07-09 08:13:17 | [diff] [blame] | 13 | #include "ash/shell_observer.h" |
[email protected] | 16059276d | 2012-10-22 18:59:50 | [diff] [blame] | 14 | #include "ash/system/user/login_status.h" |
avi | db567a8a | 2015-12-20 17:07:24 | [diff] [blame] | 15 | #include "base/macros.h" |
[email protected] | f7c05b2 | 2013-11-12 21:07:24 | [diff] [blame] | 16 | #include "ui/aura/window.h" |
[email protected] | 2f262033 | 2014-02-28 10:07:38 | [diff] [blame] | 17 | #include "ui/aura/window_tree_host.h" |
[email protected] | 940fb1c | 2013-06-18 16:54:28 | [diff] [blame] | 18 | #include "ui/base/ui_base_types.h" |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 19 | |
| 20 | class SkBitmap; |
| 21 | |
| 22 | namespace aura { |
| 23 | class EventFilter; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 24 | class Window; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | namespace gfx { |
| 28 | class Point; |
| 29 | } |
| 30 | |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 31 | namespace keyboard { |
| 32 | class KeyboardController; |
| 33 | } |
| 34 | |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 35 | namespace ui { |
| 36 | class EventHandler; |
jonross | a90d898 | 2016-05-16 18:14:25 | [diff] [blame] | 37 | class MenuModel; |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 38 | } |
| 39 | |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 40 | namespace views { |
jonross | a90d898 | 2016-05-16 18:14:25 | [diff] [blame] | 41 | class MenuModelAdapter; |
| 42 | class MenuRunner; |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 43 | class Widget; |
| 44 | } |
| 45 | |
| 46 | namespace wm { |
| 47 | class InputMethodEventFilter; |
| 48 | class RootWindowEventFilter; |
| 49 | class ScopedCaptureClient; |
| 50 | } |
| 51 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 52 | namespace ash { |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 53 | class AshWindowTreeHost; |
[email protected] | 80549c15 | 2013-07-02 01:42:47 | [diff] [blame] | 54 | class AlwaysOnTopController; |
[email protected] | 0bf6173 | 2013-07-02 04:35:10 | [diff] [blame] | 55 | class AnimatingDesktopController; |
[email protected] | 0bf6173 | 2013-07-02 04:35:10 | [diff] [blame] | 56 | class DesktopBackgroundWidgetController; |
[email protected] | beb4e5c | 2013-06-18 15:37:07 | [diff] [blame] | 57 | class DockedWindowLayoutManager; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 58 | class PanelLayoutManager; |
sky | ee78dde | 2016-06-01 01:21:43 | [diff] [blame] | 59 | class RootWindowControllerCommon; |
jamescook | 6afad6d | 2016-06-01 00:35:01 | [diff] [blame] | 60 | class Shelf; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 61 | class ShelfLayoutManager; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 62 | class ShelfWidget; |
| 63 | class StackingController; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 64 | class StatusAreaWidget; |
| 65 | class SystemBackgroundController; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 66 | class SystemModalContainerLayoutManager; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 67 | class SystemTray; |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 68 | class TouchHudDebug; |
| 69 | class TouchHudProjection; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 70 | class WorkspaceController; |
| 71 | |
[email protected] | 438cbdf0 | 2013-10-07 23:41:09 | [diff] [blame] | 72 | #if defined(OS_CHROMEOS) |
[email protected] | 252eb23 | 2013-08-14 22:09:27 | [diff] [blame] | 73 | class BootSplashScreen; |
[email protected] | 7d48759 | 2014-07-24 03:54:50 | [diff] [blame] | 74 | class AshTouchExplorationManager; |
[email protected] | 252eb23 | 2013-08-14 22:09:27 | [diff] [blame] | 75 | #endif |
| 76 | |
sky | e782a26 | 2016-05-31 20:28:57 | [diff] [blame] | 77 | namespace wm { |
| 78 | class WmWindow; |
| 79 | } |
| 80 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 81 | // This class maintains the per root window state for ash. This class |
| 82 | // owns the root window and other dependent objects that should be |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 83 | // deleted upon the deletion of the root window. This object is |
oshima | e281892 | 2015-07-28 01:18:52 | [diff] [blame] | 84 | // indirectly owned and deleted by |WindowTreeHostManager|. |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 85 | // The RootWindowController for particular root window is stored in |
| 86 | // its property (RootWindowSettings) and can be obtained using |
[email protected] | 056ce05 | 2014-02-21 05:19:32 | [diff] [blame] | 87 | // |GetRootWindowController(aura::WindowEventDispatcher*)| function. |
jamescook | 2a5ffa21 | 2016-04-29 17:44:02 | [diff] [blame] | 88 | // |
| 89 | // NOTE: In classic ash there is one RootWindow per display, so every RootWindow |
| 90 | // has a RootWindowController. In mus/mash there is one RootWindow per top-level |
| 91 | // Widget, so not all RootWindows have a RootWindowController. |
[email protected] | d141b92 | 2013-07-09 08:13:17 | [diff] [blame] | 92 | class ASH_EXPORT RootWindowController : public ShellObserver { |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 93 | public: |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 94 | // Creates and Initialize the RootWindowController for primary display. |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 95 | static void CreateForPrimaryDisplay(AshWindowTreeHost* host); |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 96 | |
| 97 | // Creates and Initialize the RootWindowController for secondary displays. |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 98 | static void CreateForSecondaryDisplay(AshWindowTreeHost* host); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 99 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 100 | // Returns a RootWindowController of the window's root window. |
[email protected] | ccff3d7 | 2013-02-06 04:26:28 | [diff] [blame] | 101 | static RootWindowController* ForWindow(const aura::Window* window); |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 102 | |
[email protected] | d17642d | 2013-09-12 23:44:38 | [diff] [blame] | 103 | // Returns the RootWindowController of the target root window. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 104 | static RootWindowController* ForTargetRootWindow(); |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 105 | |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 106 | ~RootWindowController() override; |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 107 | |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 108 | AshWindowTreeHost* ash_host() { return ash_host_.get(); } |
| 109 | const AshWindowTreeHost* ash_host() const { return ash_host_.get(); } |
| 110 | |
| 111 | aura::WindowTreeHost* GetHost(); |
| 112 | const aura::WindowTreeHost* GetHost() const; |
| 113 | aura::Window* GetRootWindow(); |
| 114 | const aura::Window* GetRootWindow() const; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 115 | |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 116 | WorkspaceController* workspace_controller() { |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 117 | return workspace_controller_.get(); |
| 118 | } |
| 119 | |
[email protected] | 80549c15 | 2013-07-02 01:42:47 | [diff] [blame] | 120 | AlwaysOnTopController* always_on_top_controller() { |
| 121 | return always_on_top_controller_.get(); |
| 122 | } |
| 123 | |
jamescook | 612205f | 2016-05-26 06:02:11 | [diff] [blame] | 124 | // Access the shelf widget associated with this root window controller, |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 125 | // NULL if no such shelf exists. |
jamescook | 6afad6d | 2016-06-01 00:35:01 | [diff] [blame] | 126 | // DEPRECATED: Prefer GetShelf()->shelf_widget(). |
jamescook | 612205f | 2016-05-26 06:02:11 | [diff] [blame] | 127 | ShelfWidget* shelf_widget() { return shelf_widget_.get(); } |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 128 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 129 | // Get touch HUDs associated with this root window controller. |
| 130 | TouchHudDebug* touch_hud_debug() const { |
| 131 | return touch_hud_debug_; |
[email protected] | bff1755 | 2013-04-25 04:44:55 | [diff] [blame] | 132 | } |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 133 | TouchHudProjection* touch_hud_projection() const { |
| 134 | return touch_hud_projection_; |
| 135 | } |
| 136 | |
| 137 | // Set touch HUDs for this root window controller. The root window controller |
| 138 | // will not own the HUDs; their lifetimes are managed by themselves. Whenever |
| 139 | // the widget showing a HUD is being destroyed (e.g. because of detaching a |
| 140 | // display), the HUD deletes itself. |
| 141 | void set_touch_hud_debug(TouchHudDebug* hud) { |
| 142 | touch_hud_debug_ = hud; |
| 143 | } |
| 144 | void set_touch_hud_projection(TouchHudProjection* hud) { |
| 145 | touch_hud_projection_ = hud; |
| 146 | } |
| 147 | |
[email protected] | 0bf6173 | 2013-07-02 04:35:10 | [diff] [blame] | 148 | DesktopBackgroundWidgetController* wallpaper_controller() { |
| 149 | return wallpaper_controller_.get(); |
| 150 | } |
| 151 | void SetWallpaperController(DesktopBackgroundWidgetController* controller); |
| 152 | AnimatingDesktopController* animating_wallpaper_controller() { |
| 153 | return animating_wallpaper_controller_.get(); |
| 154 | } |
| 155 | void SetAnimatingWallpaperController(AnimatingDesktopController* controller); |
| 156 | |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 157 | // Access the shelf layout manager associated with this root |
| 158 | // window controller, NULL if no such shelf exists. |
| 159 | ShelfLayoutManager* GetShelfLayoutManager(); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 160 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 161 | // Returns the system tray on this root window. Note that |
[email protected] | 864b5855 | 2013-12-19 04:19:38 | [diff] [blame] | 162 | // calling this on the root window that doesn't have a shelf will |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 163 | // lead to a crash. |
| 164 | SystemTray* GetSystemTray(); |
| 165 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 166 | // Shows context menu at the |location_in_screen|. This uses |
| 167 | // |ShellDelegate::CreateContextMenu| to define the content of the menu. |
[email protected] | 940fb1c | 2013-06-18 16:54:28 | [diff] [blame] | 168 | void ShowContextMenu(const gfx::Point& location_in_screen, |
| 169 | ui::MenuSourceType source_type); |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 170 | |
[email protected] | 8674b31 | 2012-10-12 19:02:44 | [diff] [blame] | 171 | // Returns the layout-manager for the appropriate modal-container. If the |
| 172 | // window is inside the lockscreen modal container, then the layout manager |
| 173 | // for that is returned. Otherwise the layout manager for the default modal |
| 174 | // container is returned. |
| 175 | // If no window is specified (i.e. |window| is NULL), then the lockscreen |
| 176 | // modal container is used if the screen is currently locked. Otherwise, the |
| 177 | // default modal container is used. |
| 178 | SystemModalContainerLayoutManager* GetSystemModalLayoutManager( |
| 179 | aura::Window* window); |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 180 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 181 | aura::Window* GetContainer(int container_id); |
[email protected] | d8a2495 | 2013-08-05 20:05:05 | [diff] [blame] | 182 | const aura::Window* GetContainer(int container_id) const; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 183 | |
[email protected] | 864b5855 | 2013-12-19 04:19:38 | [diff] [blame] | 184 | // Show shelf view if it was created hidden (before session has started). |
jamescook | 6afad6d | 2016-06-01 00:35:01 | [diff] [blame] | 185 | // TODO(jamescook): Eliminate this and handle show via Shelf. |
[email protected] | 864b5855 | 2013-12-19 04:19:38 | [diff] [blame] | 186 | void ShowShelf(); |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 187 | |
jamescook | 6500ad13 | 2016-05-27 06:15:54 | [diff] [blame] | 188 | // Creates the shelf for this root window and notifies observers. |
| 189 | void CreateShelf(); |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 190 | |
jamescook | 6afad6d | 2016-06-01 00:35:01 | [diff] [blame] | 191 | // Returns the shelf controller for this root window. |
| 192 | Shelf* GetShelf() const; |
| 193 | |
[email protected] | 16059276d | 2012-10-22 18:59:50 | [diff] [blame] | 194 | // Called when the login status changes after login (such as lock/unlock). |
| 195 | // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. |
| 196 | void UpdateAfterLoginStatusChange(user::LoginStatus status); |
| 197 | |
[email protected] | bca9a7e | 2012-11-10 06:25:49 | [diff] [blame] | 198 | // Called when the brightness/grayscale animation from white to the login |
| 199 | // desktop background image has started. Starts |boot_splash_screen_|'s |
| 200 | // hiding animation (if the screen is non-NULL). |
| 201 | void HandleInitialDesktopBackgroundAnimationStarted(); |
| 202 | |
[email protected] | 0bf6173 | 2013-07-02 04:35:10 | [diff] [blame] | 203 | // Called when the wallpaper ainmation is finished. Updates |background_| |
| 204 | // to be black and drops |boot_splash_screen_| and moves the wallpaper |
| 205 | // controller into the root window controller. |widget| holds the wallpaper |
| 206 | // image, or NULL if the background is a solid color. |
| 207 | void OnWallpaperAnimationFinished(views::Widget* widget); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 208 | |
[email protected] | 6675e1c | 2012-09-11 09:15:45 | [diff] [blame] | 209 | // Deletes associated objects and clears the state, but doesn't delete |
| 210 | // the root window yet. This is used to delete a secondary displays' |
| 211 | // root window safely when the display disconnect signal is received, |
| 212 | // which may come while we're in the nested message loop. |
| 213 | void Shutdown(); |
| 214 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 215 | // Deletes all child windows and performs necessary cleanup. |
| 216 | void CloseChildWindows(); |
| 217 | |
[email protected] | f185312 | 2012-06-27 16:21:26 | [diff] [blame] | 218 | // Moves child windows to |dest|. |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 219 | void MoveWindowsTo(aura::Window* dest); |
[email protected] | f185312 | 2012-06-27 16:21:26 | [diff] [blame] | 220 | |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 221 | // Force the shelf to query for it's current visibility state. |
| 222 | void UpdateShelfVisibility(); |
| 223 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 224 | // Initialize touch HUDs if necessary. |
| 225 | void InitTouchHuds(); |
| 226 | |
[email protected] | 2c9171d2 | 2013-12-10 21:55:10 | [diff] [blame] | 227 | // Returns the topmost window or one of its transient parents, if any of them |
| 228 | // are in fullscreen mode. |
varkha | d99fa94f | 2015-06-29 22:35:46 | [diff] [blame] | 229 | aura::Window* GetWindowForFullscreenMode(); |
[email protected] | 2ee2f5d | 2013-01-10 23:37:16 | [diff] [blame] | 230 | |
[email protected] | b6ba05d90 | 2013-10-04 21:38:45 | [diff] [blame] | 231 | // Activate virtual keyboard on current root window controller. |
| 232 | void ActivateKeyboard(keyboard::KeyboardController* keyboard_controller); |
| 233 | |
| 234 | // Deactivate virtual keyboard on current root window controller. |
| 235 | void DeactivateKeyboard(keyboard::KeyboardController* keyboard_controller); |
| 236 | |
[email protected] | 602022b | 2014-03-31 17:07:31 | [diff] [blame] | 237 | // Tests if a window is associated with the virtual keyboard. |
| 238 | bool IsVirtualKeyboardWindow(aura::Window* window); |
| 239 | |
dmazzoni | ff86e347 | 2016-06-03 19:52:32 | [diff] [blame^] | 240 | // If touch exploration is enabled, update the touch exploration |
| 241 | // controller so that synthesized touch events are anchored at this point. |
| 242 | void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); |
| 243 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 244 | private: |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 245 | explicit RootWindowController(AshWindowTreeHost* host); |
[email protected] | 608de6c | 2013-10-29 00:14:28 | [diff] [blame] | 246 | enum RootWindowType { |
| 247 | PRIMARY, |
bshe | e1eb0a2 | 2014-09-23 21:18:38 | [diff] [blame] | 248 | SECONDARY |
[email protected] | 608de6c | 2013-10-29 00:14:28 | [diff] [blame] | 249 | }; |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 250 | |
| 251 | // Initializes the RootWindowController. |is_primary| is true if |
| 252 | // the controller is for primary display. |first_run_after_boot| is |
| 253 | // set to true only for primary root window after boot. |
[email protected] | 608de6c | 2013-10-29 00:14:28 | [diff] [blame] | 254 | void Init(RootWindowType root_window_type, bool first_run_after_boot); |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 255 | |
[email protected] | 756bda1 | 2013-07-03 08:17:06 | [diff] [blame] | 256 | void InitLayoutManagers(); |
| 257 | |
| 258 | // Initializes |system_background_| and possibly also |boot_splash_screen_|. |
| 259 | // |is_first_run_after_boot| determines the background's initial color. |
| 260 | void CreateSystemBackground(bool is_first_run_after_boot); |
| 261 | |
[email protected] | d141b92 | 2013-07-09 08:13:17 | [diff] [blame] | 262 | // Enables projection touch HUD. |
| 263 | void EnableTouchHudProjection(); |
| 264 | |
| 265 | // Disables projection touch HUD. |
| 266 | void DisableTouchHudProjection(); |
| 267 | |
jonross | a90d898 | 2016-05-16 18:14:25 | [diff] [blame] | 268 | // Callback for MenuModelAdapter. |
| 269 | void OnMenuClosed(); |
| 270 | |
[email protected] | d141b92 | 2013-07-09 08:13:17 | [diff] [blame] | 271 | // Overridden from ShellObserver. |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 272 | void OnLoginStateChanged(user::LoginStatus status) override; |
| 273 | void OnTouchHudProjectionToggled(bool enabled) override; |
[email protected] | d141b92 | 2013-07-09 08:13:17 | [diff] [blame] | 274 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 275 | std::unique_ptr<AshWindowTreeHost> ash_host_; |
sky | ee78dde | 2016-06-01 01:21:43 | [diff] [blame] | 276 | |
| 277 | std::unique_ptr<RootWindowControllerCommon> root_window_controller_common_; |
| 278 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 279 | std::unique_ptr<StackingController> stacking_controller_; |
[email protected] | 2a2caa0 | 2013-01-22 20:50:36 | [diff] [blame] | 280 | |
jamescook | 612205f | 2016-05-26 06:02:11 | [diff] [blame] | 281 | // The shelf widget for this root window. |
| 282 | std::unique_ptr<ShelfWidget> shelf_widget_; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 283 | |
[email protected] | cf6fea2 | 2013-08-07 14:24:01 | [diff] [blame] | 284 | // An invisible/empty window used as a event target for |
| 285 | // |MouseCursorEventFilter| before a user logs in. |
| 286 | // (crbug.com/266987) |
| 287 | // Its container is |LockScreenBackgroundContainer| and |
| 288 | // this must be deleted before the container is deleted. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 289 | std::unique_ptr<aura::Window> mouse_event_target_; |
[email protected] | cf6fea2 | 2013-08-07 14:24:01 | [diff] [blame] | 290 | |
[email protected] | beb4e5c | 2013-06-18 15:37:07 | [diff] [blame] | 291 | // Manages layout of docked windows. Owned by DockedContainer. |
| 292 | DockedWindowLayoutManager* docked_layout_manager_; |
| 293 | |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 294 | // Manages layout of panels. Owned by PanelContainer. |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [diff] [blame] | 295 | PanelLayoutManager* panel_layout_manager_; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 296 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 297 | std::unique_ptr<SystemBackgroundController> system_background_; |
[email protected] | a825e831 | 2014-05-05 22:05:01 | [diff] [blame] | 298 | |
[email protected] | 438cbdf0 | 2013-10-07 23:41:09 | [diff] [blame] | 299 | #if defined(OS_CHROMEOS) |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 300 | std::unique_ptr<BootSplashScreen> boot_splash_screen_; |
[email protected] | a825e831 | 2014-05-05 22:05:01 | [diff] [blame] | 301 | // Responsible for initializing TouchExplorationController when spoken |
| 302 | // feedback is on. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 303 | std::unique_ptr<AshTouchExplorationManager> touch_exploration_manager_; |
[email protected] | 252eb23 | 2013-08-14 22:09:27 | [diff] [blame] | 304 | #endif |
[email protected] | 697f04c | 2012-10-03 01:15:10 | [diff] [blame] | 305 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 306 | std::unique_ptr<WorkspaceController> workspace_controller_; |
| 307 | std::unique_ptr<AlwaysOnTopController> always_on_top_controller_; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 308 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 309 | // Heads-up displays for touch events. These HUDs are not owned by the root |
| 310 | // window controller and manage their own lifetimes. |
| 311 | TouchHudDebug* touch_hud_debug_; |
| 312 | TouchHudProjection* touch_hud_projection_; |
[email protected] | 5817504 | 2013-04-01 19:27:13 | [diff] [blame] | 313 | |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 314 | // Handles double clicks on the panel window header. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 315 | std::unique_ptr<ui::EventHandler> panel_container_handler_; |
[email protected] | a4cd6d3 | 2012-09-12 03:42:13 | [diff] [blame] | 316 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 317 | std::unique_ptr<DesktopBackgroundWidgetController> wallpaper_controller_; |
| 318 | std::unique_ptr<AnimatingDesktopController> animating_wallpaper_controller_; |
| 319 | std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; |
[email protected] | 0bf6173 | 2013-07-02 04:35:10 | [diff] [blame] | 320 | |
jonross | a90d898 | 2016-05-16 18:14:25 | [diff] [blame] | 321 | // Manages the context menu. |
| 322 | std::unique_ptr<ui::MenuModel> menu_model_; |
| 323 | std::unique_ptr<views::MenuModelAdapter> menu_model_adapter_; |
| 324 | std::unique_ptr<views::MenuRunner> menu_runner_; |
| 325 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 326 | DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
| 327 | }; |
| 328 | |
jamescook | 5d74ac0 | 2016-05-12 19:57:12 | [diff] [blame] | 329 | // On classic ash, returns the RootWindowController for the given |root_window|. |
| 330 | // On mus ash, returns the RootWindowController for the primary display. |
| 331 | // See RootWindowController class comment above. |
[email protected] | 6b2d4a0b | 2013-09-06 06:29:54 | [diff] [blame] | 332 | ASH_EXPORT RootWindowController* GetRootWindowController( |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 333 | const aura::Window* root_window); |
[email protected] | 6b2d4a0b | 2013-09-06 06:29:54 | [diff] [blame] | 334 | |
[email protected] | 76bc463 | 2014-06-16 19:07:46 | [diff] [blame] | 335 | } // namespace ash |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 336 | |
[email protected] | 76bc463 | 2014-06-16 19:07:46 | [diff] [blame] | 337 | #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |