[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> |
sky | abcae81 | 2017-01-18 17:01:34 | [diff] [blame] | 10 | #include <vector> |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 11 | |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 12 | #include "ash/ash_export.h" |
jamescook | d4649fa | 2016-09-30 17:50:09 | [diff] [blame] | 13 | #include "ash/public/cpp/shelf_types.h" |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 14 | #include "ash/wm/workspace/workspace_types.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] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 18 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 19 | namespace aura { |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 20 | class Window; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | namespace gfx { |
| 24 | class Point; |
| 25 | } |
| 26 | |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 27 | namespace ui { |
Alex Newcomer | 76f7dab6 | 2018-02-02 17:23:37 | [diff] [blame] | 28 | class SimpleMenuModel; |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 29 | class WindowTreeHost; |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 30 | } |
| 31 | |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 32 | namespace views { |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 33 | class MenuRunner; |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | namespace wm { |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 37 | class ScopedCaptureClient; |
| 38 | } |
| 39 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 40 | namespace ash { |
Aga Wronska | 0514fd6 | 2019-03-25 20:11:37 | [diff] [blame] | 41 | class AccessibilityPanelLayoutManager; |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 42 | class AlwaysOnTopController; |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 43 | class AshWindowTreeHost; |
Toni Barzic | 98c44eb | 2017-10-13 20:57:50 | [diff] [blame] | 44 | class LockScreenActionBackgroundController; |
msw | b241605 | 2016-06-24 21:23:45 | [diff] [blame] | 45 | enum class LoginStatus; |
James Cook | 840177e | 2017-05-25 02:20:01 | [diff] [blame] | 46 | class Shelf; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 47 | class ShelfLayoutManager; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 48 | class StackingController; |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 49 | class StatusAreaWidget; |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 50 | class SystemModalContainerLayoutManager; |
msw | 607227f8 | 2016-08-30 17:22:39 | [diff] [blame] | 51 | class SystemWallpaperController; |
James Cook | d333292 | 2018-03-09 15:54:13 | [diff] [blame] | 52 | class TouchExplorationManager; |
James Cook | ddb9a76 | 2018-08-14 20:44:57 | [diff] [blame] | 53 | class TouchObserverHUD; |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 54 | class WallpaperWidgetController; |
sky | 8a8ffd2 | 2017-01-19 15:55:29 | [diff] [blame] | 55 | class WindowManager; |
Scott Violet | 58ae95b | 2017-11-15 06:25:53 | [diff] [blame] | 56 | class WorkspaceController; |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 57 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 58 | namespace wm { |
| 59 | class RootWindowLayoutManager; |
| 60 | } |
| 61 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 62 | // This class maintains the per root window state for ash. This class |
| 63 | // owns the root window and other dependent objects that should be |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 64 | // deleted upon the deletion of the root window. This object is |
oshima | e281892 | 2015-07-28 01:18:52 | [diff] [blame] | 65 | // indirectly owned and deleted by |WindowTreeHostManager|. |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 66 | // The RootWindowController for particular root window is stored in |
| 67 | // its property (RootWindowSettings) and can be obtained using |
msw | 257a6a23 | 2017-06-01 01:46:30 | [diff] [blame] | 68 | // |RootWindowController::ForWindow(aura::Window*)| function. |
James Cook | bd0b779 | 2017-11-17 03:24:26 | [diff] [blame] | 69 | class ASH_EXPORT RootWindowController { |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 70 | public: |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 71 | // Enumerates the type of display. If there is only a single display then |
| 72 | // it is primary. In a multi-display environment one monitor is deemed the |
| 73 | // PRIMARY and all others SECONDARY. |
| 74 | enum class RootWindowType { PRIMARY, SECONDARY }; |
| 75 | |
James Cook | bd0b779 | 2017-11-17 03:24:26 | [diff] [blame] | 76 | ~RootWindowController(); |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 77 | |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 78 | // Creates and Initialize the RootWindowController for primary display. |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 79 | static void CreateForPrimaryDisplay(AshWindowTreeHost* host); |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 80 | |
| 81 | // Creates and Initialize the RootWindowController for secondary displays. |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 82 | static void CreateForSecondaryDisplay(AshWindowTreeHost* host); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 83 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 84 | // Returns a RootWindowController of the window's root window. |
[email protected] | ccff3d7 | 2013-02-06 04:26:28 | [diff] [blame] | 85 | static RootWindowController* ForWindow(const aura::Window* window); |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 86 | |
[email protected] | d17642d | 2013-09-12 23:44:38 | [diff] [blame] | 87 | // Returns the RootWindowController of the target root window. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 88 | static RootWindowController* ForTargetRootWindow(); |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 89 | |
sky | abcae81 | 2017-01-18 17:01:34 | [diff] [blame] | 90 | static std::vector<RootWindowController*> root_window_controllers() { |
| 91 | return root_window_controllers_ ? *root_window_controllers_ |
| 92 | : std::vector<RootWindowController*>(); |
| 93 | } |
| 94 | |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 95 | // TODO(sky): move these to a separate class or use AshWindowTreeHost in |
| 96 | // mash. http://crbug.com/671246. |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 97 | AshWindowTreeHost* ash_host() { return ash_host_.get(); } |
| 98 | const AshWindowTreeHost* ash_host() const { return ash_host_.get(); } |
| 99 | |
| 100 | aura::WindowTreeHost* GetHost(); |
| 101 | const aura::WindowTreeHost* GetHost() const; |
| 102 | aura::Window* GetRootWindow(); |
| 103 | const aura::Window* GetRootWindow() const; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 104 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 105 | WorkspaceController* workspace_controller() { |
| 106 | return workspace_controller_.get(); |
| 107 | } |
| 108 | |
| 109 | wm::WorkspaceWindowState GetWorkspaceWindowState(); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 110 | |
James Cook | 840177e | 2017-05-25 02:20:01 | [diff] [blame] | 111 | Shelf* shelf() const { return shelf_.get(); } |
jamescook | be6ed82 | 2016-06-06 20:08:55 | [diff] [blame] | 112 | |
James Cook | ddb9a76 | 2018-08-14 20:44:57 | [diff] [blame] | 113 | TouchObserverHUD* touch_observer_hud() const { return touch_observer_hud_; } |
| 114 | void set_touch_observer_hud(TouchObserverHUD* hud) { |
| 115 | touch_observer_hud_ = hud; |
| 116 | } |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 117 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 118 | wm::RootWindowLayoutManager* root_window_layout_manager() { |
| 119 | return root_window_layout_manager_; |
| 120 | } |
| 121 | |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 122 | // Access the shelf layout manager associated with this root |
| 123 | // window controller, NULL if no such shelf exists. |
| 124 | ShelfLayoutManager* GetShelfLayoutManager(); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 125 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 126 | // Returns the layout manager for the appropriate modal-container. If the |
| 127 | // window is inside the lockscreen modal container, then the layout manager |
| 128 | // for that is returned. Otherwise the layout manager for the default modal |
| 129 | // container is returned. |
| 130 | // If no window is specified (i.e. |window| is null), then the lockscreen |
| 131 | // modal container is used if the screen is currently locked. Otherwise, the |
| 132 | // default modal container is used. |
| 133 | SystemModalContainerLayoutManager* GetSystemModalLayoutManager( |
sky | 97f9a743 | 2017-05-09 05:14:31 | [diff] [blame] | 134 | aura::Window* window); |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 135 | |
| 136 | AlwaysOnTopController* always_on_top_controller() { |
| 137 | return always_on_top_controller_.get(); |
| 138 | } |
| 139 | |
jamescook | b551aba | 2016-09-01 01:00:16 | [diff] [blame] | 140 | // May return null, for example for a secondary monitor at the login screen. |
| 141 | StatusAreaWidget* GetStatusAreaWidget(); |
| 142 | |
Tetsui Ohkubo | 2c474b75 | 2018-06-28 01:35:41 | [diff] [blame] | 143 | // Returns if system tray and its widget is visible. |
| 144 | bool IsSystemTrayVisible(); |
| 145 | |
oshima | 9a61ecf | 2016-06-18 10:43:05 | [diff] [blame] | 146 | // True if the window can receive events on this root window. |
| 147 | bool CanWindowReceiveEvents(aura::Window* window); |
| 148 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 149 | // Returns the window events will be targeted at for the specified location |
| 150 | // (in screen coordinates). |
| 151 | // |
| 152 | // NOTE: the returned window may not contain the location as resize handles |
| 153 | // may extend outside the bounds of the window. |
sky | 4befdb0d | 2017-05-18 23:50:26 | [diff] [blame] | 154 | aura::Window* FindEventTarget(const gfx::Point& location_in_screen); |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 155 | |
| 156 | // Gets the last location seen in a mouse event in this root window's |
| 157 | // coordinates. This may return a point outside the root window's bounds. |
| 158 | gfx::Point GetLastMouseLocationInRoot(); |
| 159 | |
Aga Wronska | 0514fd6 | 2019-03-25 20:11:37 | [diff] [blame] | 160 | // Returns height of the accessibility panel for this root window. |
| 161 | int GetAccessibilityPanelHeight() const; |
| 162 | |
Aga Wronska | 5f0a7e07 | 2019-03-26 17:31:20 | [diff] [blame^] | 163 | // Returns height of the docked magnifier for this root window. |
| 164 | int GetDockedMagnifierHeight() const; |
| 165 | |
| 166 | // Sets height of the docked magnifier for this root window. Notifies shell |
| 167 | // observers that work area changed. |
| 168 | void SetDockedMagnifierHeight(int height); |
| 169 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 170 | aura::Window* GetContainer(int container_id); |
[email protected] | d8a2495 | 2013-08-05 20:05:05 | [diff] [blame] | 171 | const aura::Window* GetContainer(int container_id) const; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 172 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 173 | WallpaperWidgetController* wallpaper_widget_controller() { |
| 174 | return wallpaper_widget_controller_.get(); |
| 175 | } |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 176 | |
Toni Barzic | 98c44eb | 2017-10-13 20:57:50 | [diff] [blame] | 177 | LockScreenActionBackgroundController* |
| 178 | lock_screen_action_background_controller() { |
| 179 | return lock_screen_action_background_controller_.get(); |
| 180 | } |
| 181 | |
[email protected] | 6675e1c | 2012-09-11 09:15:45 | [diff] [blame] | 182 | // Deletes associated objects and clears the state, but doesn't delete |
| 183 | // the root window yet. This is used to delete a secondary displays' |
| 184 | // root window safely when the display disconnect signal is received, |
gab | 2998ee7 | 2017-05-05 16:23:50 | [diff] [blame] | 185 | // which may come while we're in the nested run loop. |
[email protected] | 6675e1c | 2012-09-11 09:15:45 | [diff] [blame] | 186 | void Shutdown(); |
| 187 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 188 | // Deletes all child windows and performs necessary cleanup. |
| 189 | void CloseChildWindows(); |
| 190 | |
[email protected] | f185312 | 2012-06-27 16:21:26 | [diff] [blame] | 191 | // Moves child windows to |dest|. |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 192 | void MoveWindowsTo(aura::Window* dest); |
[email protected] | f185312 | 2012-06-27 16:21:26 | [diff] [blame] | 193 | |
[email protected] | e74aaf0a | 2012-10-12 18:42:28 | [diff] [blame] | 194 | // Force the shelf to query for it's current visibility state. |
| 195 | void UpdateShelfVisibility(); |
| 196 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 197 | // Initialize touch HUDs if necessary. |
| 198 | void InitTouchHuds(); |
| 199 | |
[email protected] | 2c9171d2 | 2013-12-10 21:55:10 | [diff] [blame] | 200 | // Returns the topmost window or one of its transient parents, if any of them |
| 201 | // are in fullscreen mode. |
varkha | d99fa94f | 2015-06-29 22:35:46 | [diff] [blame] | 202 | aura::Window* GetWindowForFullscreenMode(); |
[email protected] | 2ee2f5d | 2013-01-10 23:37:16 | [diff] [blame] | 203 | |
dmazzoni | ff86e347 | 2016-06-03 19:52:32 | [diff] [blame] | 204 | // If touch exploration is enabled, update the touch exploration |
| 205 | // controller so that synthesized touch events are anchored at this point. |
| 206 | void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); |
| 207 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 208 | // Shows a context menu at the |location_in_screen|. |
| 209 | void ShowContextMenu(const gfx::Point& location_in_screen, |
| 210 | ui::MenuSourceType source_type); |
Sammie Quon | 646e263 | 2018-02-27 19:55:40 | [diff] [blame] | 211 | void HideContextMenu(); |
Weidong Guo | 053b929 | 2018-04-24 23:46:10 | [diff] [blame] | 212 | bool IsContextMenuShown() const; |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 213 | |
| 214 | // Called when the login status changes after login (such as lock/unlock). |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 215 | void UpdateAfterLoginStatusChange(LoginStatus status); |
| 216 | |
Aga Wronska | 0514fd6 | 2019-03-25 20:11:37 | [diff] [blame] | 217 | // Returns accessibility panel layout manager for this root window. |
| 218 | AccessibilityPanelLayoutManager* GetAccessibilityPanelLayoutManagerForTest(); |
| 219 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 220 | private: |
Sammie Quon | 646e263 | 2018-02-27 19:55:40 | [diff] [blame] | 221 | FRIEND_TEST_ALL_PREFIXES(RootWindowControllerTest, |
| 222 | ContextMenuDisappearsInTabletMode); |
| 223 | |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 224 | // TODO(sky): remove this. Temporary during ash-mus unification. |
| 225 | // http://crbug.com/671246. |
Scott Violet | 58ae95b | 2017-11-15 06:25:53 | [diff] [blame] | 226 | friend class WindowManager; |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 227 | |
| 228 | // Creates a new RootWindowController with the specified host. Only one of |
| 229 | // |ash_host| or |window_tree_host| should be specified. This takes ownership |
| 230 | // of the supplied arguments. |
| 231 | // TODO(sky): mash should create AshWindowTreeHost, http://crbug.com/671246. |
| 232 | RootWindowController(AshWindowTreeHost* ash_host, |
| 233 | aura::WindowTreeHost* window_tree_host); |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 234 | |
jamescook | fda15900 | 2016-10-21 18:48:57 | [diff] [blame] | 235 | // Initializes the RootWindowController based on |root_window_type|. |
| 236 | void Init(RootWindowType root_window_type); |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 237 | |
[email protected] | 756bda1 | 2013-07-03 08:17:06 | [diff] [blame] | 238 | void InitLayoutManagers(); |
| 239 | |
Aga Wronska | 0514fd6 | 2019-03-25 20:11:37 | [diff] [blame] | 240 | AccessibilityPanelLayoutManager* GetAccessibilityPanelLayoutManager() const; |
| 241 | |
Aga Wronska | e195ad2 | 2017-12-20 01:38:11 | [diff] [blame] | 242 | // Initializes the shelf for this root window and notifies observers. |
| 243 | void InitializeShelf(); |
| 244 | |
varkha | 515b4346 | 2017-05-26 23:21:27 | [diff] [blame] | 245 | // Creates the containers (aura::Windows) used by the shell. |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 246 | void CreateContainers(); |
| 247 | |
msw | 607227f8 | 2016-08-30 17:22:39 | [diff] [blame] | 248 | // Initializes |system_wallpaper_| and possibly also |boot_splash_screen_|. |
jamescook | fda15900 | 2016-10-21 18:48:57 | [diff] [blame] | 249 | // The initial color is determined by the |root_window_type| and whether or |
| 250 | // not this is the first boot. |
| 251 | void CreateSystemWallpaper(RootWindowType root_window_type); |
[email protected] | 756bda1 | 2013-07-03 08:17:06 | [diff] [blame] | 252 | |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 253 | // Resets Shell::GetRootWindowForNewWindows() if appropriate. This is called |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 254 | // during shutdown to make sure GetRootWindowForNewWindows() isn't referencing |
| 255 | // this. |
| 256 | void ResetRootForNewWindowsIfNecessary(); |
| 257 | |
Alexander Shabalin | 5c910fc | 2017-12-08 23:29:47 | [diff] [blame] | 258 | // Callback for MenuRunner. |
Alex Newcomer | 76f7dab6 | 2018-02-02 17:23:37 | [diff] [blame] | 259 | void OnMenuClosed(const base::TimeTicks desktop_context_menu_show_time); |
sky | 8d971a0a | 2016-09-21 23:37:57 | [diff] [blame] | 260 | |
Toni Barzic | 71239915 | 2018-02-15 17:38:40 | [diff] [blame] | 261 | // Passed as callback to |wallpaper_widget_controller_| - run when the |
| 262 | // wallpaper widget is first set. |
| 263 | void OnFirstWallpaperWidgetSet(); |
| 264 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 265 | std::unique_ptr<AshWindowTreeHost> ash_host_; |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 266 | std::unique_ptr<aura::WindowTreeHost> mus_window_tree_host_; |
| 267 | // This comes from |ash_host_| or |mus_window_tree_host_|. |
| 268 | aura::WindowTreeHost* window_tree_host_; |
sky | ee78dde | 2016-06-01 01:21:43 | [diff] [blame] | 269 | |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 270 | // LayoutManagers are owned by the window they are installed on. |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 271 | wm::RootWindowLayoutManager* root_window_layout_manager_ = nullptr; |
| 272 | |
| 273 | std::unique_ptr<WallpaperWidgetController> wallpaper_widget_controller_; |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 274 | std::unique_ptr<WorkspaceController> workspace_controller_; |
| 275 | |
| 276 | std::unique_ptr<AlwaysOnTopController> always_on_top_controller_; |
| 277 | |
| 278 | // Manages the context menu. |
Alex Newcomer | 76f7dab6 | 2018-02-02 17:23:37 | [diff] [blame] | 279 | std::unique_ptr<ui::SimpleMenuModel> menu_model_; |
sky | b664383 | 2017-01-11 22:08:45 | [diff] [blame] | 280 | std::unique_ptr<views::MenuRunner> menu_runner_; |
sky | ee78dde | 2016-06-01 01:21:43 | [diff] [blame] | 281 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 282 | std::unique_ptr<StackingController> stacking_controller_; |
[email protected] | 2a2caa0 | 2013-01-22 20:50:36 | [diff] [blame] | 283 | |
jamescook | be6ed82 | 2016-06-06 20:08:55 | [diff] [blame] | 284 | // The shelf controller for this root window. Exists for the entire lifetime |
| 285 | // of the RootWindowController so that it is safe for observers to be added |
| 286 | // to it during construction of the shelf widget and status tray. |
James Cook | 840177e | 2017-05-25 02:20:01 | [diff] [blame] | 287 | std::unique_ptr<Shelf> shelf_; |
jamescook | be6ed82 | 2016-06-06 20:08:55 | [diff] [blame] | 288 | |
jamescook | 788b4fc | 2017-05-18 16:16:06 | [diff] [blame] | 289 | // TODO(jamescook): Eliminate this. It is left over from legacy shelf code and |
| 290 | // doesn't mean anything in particular. |
| 291 | bool shelf_initialized_ = false; |
| 292 | |
msw | 607227f8 | 2016-08-30 17:22:39 | [diff] [blame] | 293 | std::unique_ptr<SystemWallpaperController> system_wallpaper_; |
[email protected] | a825e831 | 2014-05-05 22:05:01 | [diff] [blame] | 294 | |
[email protected] | a825e831 | 2014-05-05 22:05:01 | [diff] [blame] | 295 | // Responsible for initializing TouchExplorationController when spoken |
| 296 | // feedback is on. |
James Cook | d333292 | 2018-03-09 15:54:13 | [diff] [blame] | 297 | std::unique_ptr<TouchExplorationManager> touch_exploration_manager_; |
[email protected] | 697f04c | 2012-10-03 01:15:10 | [diff] [blame] | 298 | |
James Cook | 08ebee4 | 2018-08-07 04:06:42 | [diff] [blame] | 299 | // Heads-up displays for touch events for this root. Not owned. Manages its |
| 300 | // own lifetime. Whenever the widget showing a HUD is being destroyed (e.g. |
| 301 | // because of detaching a display), the HUD deletes itself. |
James Cook | ddb9a76 | 2018-08-14 20:44:57 | [diff] [blame] | 302 | TouchObserverHUD* touch_observer_hud_ = nullptr; |
[email protected] | 5817504 | 2013-04-01 19:27:13 | [diff] [blame] | 303 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 304 | std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; |
[email protected] | 0bf6173 | 2013-07-02 04:35:10 | [diff] [blame] | 305 | |
Toni Barzic | 98c44eb | 2017-10-13 20:57:50 | [diff] [blame] | 306 | std::unique_ptr<LockScreenActionBackgroundController> |
| 307 | lock_screen_action_background_controller_; |
| 308 | |
James Cook | ee2daef | 2018-03-10 01:48:10 | [diff] [blame] | 309 | // Whether child windows have been closed during shutdown. Exists to avoid |
| 310 | // calling related cleanup code more than once. |
| 311 | bool did_close_child_windows_ = false; |
| 312 | |
Aga Wronska | 5f0a7e07 | 2019-03-26 17:31:20 | [diff] [blame^] | 313 | int docked_magnifier_height_ = 0; |
| 314 | |
sky | abcae81 | 2017-01-18 17:01:34 | [diff] [blame] | 315 | static std::vector<RootWindowController*>* root_window_controllers_; |
| 316 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 317 | DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
| 318 | }; |
| 319 | |
[email protected] | 76bc463 | 2014-06-16 19:07:46 | [diff] [blame] | 320 | } // namespace ash |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 321 | |
[email protected] | 76bc463 | 2014-06-16 19:07:46 | [diff] [blame] | 322 | #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |