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