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