blob: 429d7c22d3554ffe016dc140233e984dd4d4b11a [file] [log] [blame]
[email protected]e0d22e82012-01-04 00:46:571// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]87b0d82e2011-10-07 21:02:592// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]b65bdda2011-12-23 23:35:315#ifndef ASH_SHELL_H_
6#define ASH_SHELL_H_
[email protected]87b0d82e2011-10-07 21:02:597
dchenga94547472016-04-08 08:41:118#include <memory>
[email protected]cac10fc62011-10-07 23:22:569#include <utility>
10#include <vector>
11
[email protected]b65bdda2011-12-23 23:35:3112#include "ash/ash_export.h"
[email protected]5d2ea362013-12-13 08:10:1813#include "ash/metrics/user_metrics_recorder.h"
jamescookd4649fa2016-09-30 17:50:0914#include "ash/public/cpp/shelf_types.h"
Xiyuan Xia22b1a6c2017-04-18 22:46:0115#include "ash/session/session_observer.h"
[email protected]c0ce80e2012-10-05 23:28:2716#include "ash/wm/system_modal_container_event_filter_delegate.h"
[email protected]b0639282011-12-22 21:12:2717#include "base/gtest_prod_util.h"
avidb567a8a2015-12-20 17:07:2418#include "base/macros.h"
[email protected]6f67df52013-10-29 01:07:1519#include "base/memory/weak_ptr.h"
[email protected]1a2145b2012-03-13 21:09:1720#include "base/observer_list.h"
[email protected]c9390bd2013-11-08 20:33:1321#include "ui/aura/window.h"
oshimaf84b0da722016-04-27 19:47:1922#include "ui/display/screen.h"
[email protected]86ccbd42013-09-18 18:11:5423#include "ui/events/event_target.h"
[email protected]ee3ed10772014-03-11 22:02:0124#include "ui/wm/core/cursor_manager.h"
sky27344382017-03-08 21:30:3225#include "ui/wm/public/activation_change_observer.h"
[email protected]87b0d82e2011-10-07 21:02:5926
wychene120c2fd2017-05-10 07:37:0727#if defined(OS_CHROMEOS)
28#include "ash/wm/cursor_manager_chromeos.h"
29#endif // defined(OS_CHROMEOS)
30
afakhrye4fae852017-05-09 18:49:0631class PrefRegistrySimple;
tibellb93c729b2017-03-30 00:45:0932class PrefService;
33
[email protected]87b0d82e2011-10-07 21:02:5934namespace aura {
[email protected]35304ce2011-12-14 23:21:0135class RootWindow;
derat94887a22017-01-20 18:17:2536class UserActivityForwarder;
[email protected]87b0d82e2011-10-07 21:02:5937class Window;
skya8b222f2017-01-12 15:47:1338class WindowManagerClient;
sky00f98a372017-01-11 06:03:4939class WindowTreeClient;
[email protected]c28853612012-05-31 22:43:4440namespace client {
[email protected]39718b52012-12-03 17:24:5641class ActivationClient;
[email protected]c28853612012-05-31 22:43:4442}
[email protected]87b0d82e2011-10-07 21:02:5943}
[email protected]fa4a45832012-04-12 21:32:4844
sky07a24d42017-03-09 23:57:3045namespace base {
46class SequencedWorkerPool;
47}
48
warx533c8f62016-04-12 01:19:4349namespace chromeos {
50class AudioA11yController;
51}
52
sky7db5ccf2017-03-14 21:52:2953namespace app_list {
54class AppList;
55}
56
rjkroege72f8154f2016-10-29 00:49:0257namespace display {
kylecharf2e4e412016-12-04 04:21:3558class DisplayChangeObserver;
kylechar7a067ec2017-01-07 01:16:2859class DisplayConfigurator;
rjkroege72f8154f2016-10-29 00:49:0260class DisplayManager;
61}
62
[email protected]2b99f8c2011-10-11 19:42:2463namespace gfx {
sky4ec2be82017-01-06 17:38:3264class Insets;
[email protected]cac10fc62011-10-07 23:22:5665}
[email protected]b6ba05d902013-10-04 21:38:4566
[email protected]a8bd1cb2012-02-17 23:05:5467namespace ui {
derat2d4e62d2015-01-09 16:09:1768class UserActivityDetector;
[email protected]b0fa7012014-04-16 12:50:5769class UserActivityPowerManagerNotifier;
sky07a24d42017-03-09 23:57:3070namespace devtools {
71class UiDevToolsServer;
72}
[email protected]a8bd1cb2012-02-17 23:05:5473}
kylechar7a067ec2017-01-07 01:16:2874
[email protected]57b8bb352012-01-11 05:11:4675namespace views {
76class NonClientFrameView;
77class Widget;
[email protected]4a59e4e2012-11-12 21:15:4078namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1479class TooltipController;
80}
81}
82
83namespace wm {
[email protected]60d677d2014-05-30 13:07:0284class AcceleratorFilter;
[email protected]4a59e4e2012-11-12 21:15:4085class CompoundEventFilter;
sky27344382017-03-08 21:30:3286class FocusController;
[email protected]86f2b5e2012-11-14 20:37:0087class ShadowController;
[email protected]b5756e22012-11-30 01:32:0288class VisibilityController;
[email protected]0c2dc012012-12-02 00:00:2389class WindowModalityController;
[email protected]4a59e4e2012-11-12 21:15:4090}
[email protected]87b0d82e2011-10-07 21:02:5991
[email protected]55f593352011-12-24 05:42:4692namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5993
sky81a2d792017-03-17 19:14:3994class AcceleratorController;
sky07a24d42017-03-09 23:57:3095class AccessibilityDelegate;
sky15ef0aa2017-01-20 18:55:5996class AppListDelegateImpl;
[email protected]c0ff0342013-02-27 00:41:2997class AshNativeCursorManager;
sky07a24d42017-03-09 23:57:3098class AshTouchTransformController;
[email protected]55398d22013-10-10 19:49:2099class AutoclickController;
[email protected]b3142722014-03-04 06:59:50100class BluetoothNotificationController;
sky79fa34712017-03-20 23:46:47101class BrightnessControlDelegate;
102class CastConfigController;
robert.bradfordab052492015-05-06 11:09:56103class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:12104class DisplayConfigurationController;
[email protected]18b21b2e2013-03-01 20:56:23105class DisplayErrorObserver;
[email protected]084b6bb2011-11-17 05:18:16106class DragDropController;
[email protected]e67291f12012-10-10 05:52:38107class EventClientImpl;
[email protected]682990f2013-01-10 06:49:11108class EventTransformationHandler;
[email protected]093b8d642014-04-03 20:59:28109class FirstRunHelper;
sky79fa34712017-03-20 23:46:47110class FocusCycler;
[email protected]093b8d642014-04-03 20:59:28111class GPUSupport;
112class HighContrastController;
sky5ab16472017-03-21 19:35:08113class ImmersiveContextAsh;
skyb7b54092016-08-19 16:00:09114class ImmersiveHandlerFactoryAsh;
sky79fa34712017-03-20 23:46:47115class KeyboardBrightnessControlDelegate;
116class KeyboardUI;
sammiequon203ae022016-09-18 17:23:42117class LaserPointerController;
yusukes1168eda2016-04-27 07:52:08118class LinkHandlerModelFactory;
sky79fa34712017-03-20 23:46:47119class LocaleNotificationController;
[email protected]093b8d642014-04-03 20:59:28120class LockStateController;
sky79fa34712017-03-20 23:46:47121class LogoutConfirmationController;
xiaoyinh2bbdd102017-05-18 23:29:42122class LockScreenController;
[email protected]093b8d642014-04-03 20:59:28123class MagnificationController;
sky5ab16472017-03-21 19:35:08124class MaximizeModeController;
125class MediaController;
[email protected]78d96302012-06-22 00:58:07126class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08127class MruWindowTracker;
128class NewWindowController;
afakhrye4fae852017-05-09 18:49:06129class NightLightController;
[email protected]9ae32df2012-07-26 03:25:18130class OverlayEventFilter;
sky07a24d42017-03-09 23:57:30131class PaletteDelegate;
[email protected]093b8d642014-04-03 20:59:28132class PartialMagnificationController;
133class PowerButtonController;
[email protected]51625052013-10-10 01:40:16134class PowerEventObserver;
[email protected]72bce522014-02-10 21:11:26135class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57136class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44137class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56138class RootWindowController;
sky11cf8db92017-04-10 23:38:08139class ShellPort;
sky6624a7af2016-05-27 18:47:49140class ScopedOverviewAnimationSettingsFactoryAura;
jamescookac6724332017-03-21 02:54:43141class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46142class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27143class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23144class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06145class ScreenPositionController;
sky5ad143a2017-03-22 04:31:23146class SessionController;
[email protected]093b8d642014-04-03 20:59:28147class SessionStateDelegate;
sky5ad143a2017-03-22 04:31:23148class ShelfController;
sky5ad143a2017-03-22 04:31:23149class ShelfModel;
150class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16151class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23152struct ShellInitParams;
sky00c813f2017-03-08 22:48:55153class ShellObserver;
sky5b45ed82017-03-27 02:54:23154class ShutdownController;
kylechar98748a52016-12-03 01:33:22155class ShutdownObserver;
yiyix90cfee22017-02-16 05:38:18156class SmsObserver;
[email protected]093b8d642014-04-03 20:59:28157class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18158class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27159class SystemModalContainerEventFilter;
[email protected]093b8d642014-04-03 20:59:28160class SystemTray;
sky79fa34712017-03-20 23:46:47161class SystemTrayController;
162class SystemTrayDelegate;
sky5b45ed82017-03-27 02:54:23163class SystemTrayNotifier;
[email protected]093b8d642014-04-03 20:59:28164class ToplevelWindowEventHandler;
sky07a24d42017-03-09 23:57:30165class ToastManager;
tbarzicc78da1ff92017-05-08 20:46:15166class TrayAction;
jamescookac6724332017-03-21 02:54:43167class TrayBluetoothHelper;
bsheeaae09a2014-09-22 23:16:52168class VirtualKeyboardController;
[email protected]ded58fd2013-10-09 07:56:55169class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28170class VideoDetector;
sky5b45ed82017-03-27 02:54:23171class VpnList;
sky07a24d42017-03-09 23:57:30172class WallpaperController;
skyb073203a2017-03-13 16:59:16173class WallpaperDelegate;
[email protected]093b8d642014-04-03 20:59:28174class WebNotificationTray;
sky5b45ed82017-03-27 02:54:23175class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28176class WindowPositioner;
sky5b45ed82017-03-27 02:54:23177class WindowSelectorController;
msw607227f82016-08-30 17:22:39178class WindowTreeHostManager;
sky80556bc42016-06-07 22:46:13179class WmWindow;
[email protected]2b99f8c2011-10-11 19:42:24180
sky494c6cbd2017-03-27 20:57:48181enum class Config;
182enum class LoginStatus;
183
[email protected]0af58042012-12-13 03:21:35184namespace shell {
185class WindowWatcher;
186}
187
[email protected]0c68e892012-12-08 16:54:53188namespace test {
189class ShellTestApi;
yiyix90cfee22017-02-16 05:38:18190class SmsObserverTest;
[email protected]0c68e892012-12-08 16:54:53191}
192
[email protected]87b0d82e2011-10-07 21:02:59193// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59194// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38195//
196// Upon creation, the Shell sets itself as the RootWindow's delegate, which
197// takes ownership of the Shell.
Xiyuan Xia22b1a6c2017-04-18 22:46:01198class ASH_EXPORT Shell : public SessionObserver,
sky5ad143a2017-03-22 04:31:23199 public SystemModalContainerEventFilterDelegate,
sky27344382017-03-08 21:30:32200 public ui::EventTarget,
201 public aura::client::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59202 public:
[email protected]093b8d642014-04-03 20:59:28203 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23204
[email protected]3266c2b92011-11-14 00:06:08205 // A shell must be explicitly created so that it can call |Init()| with the
206 // delegate set. |delegate| can be NULL (if not required for initialization).
[email protected]09464c72013-04-26 07:31:28207 // Takes ownership of |delegate|.
[email protected]1b4c7472014-05-15 18:32:23208 static Shell* CreateInstance(const ShellInitParams& init_params);
[email protected]3266c2b92011-11-14 00:06:08209
210 // Should never be called before |CreateInstance()|.
skyb073203a2017-03-13 16:59:16211 static Shell* Get();
[email protected]3266c2b92011-11-14 00:06:08212
[email protected]b3b7bcd2012-03-06 19:35:45213 // Returns true if the ash shell has been instantiated.
214 static bool HasInstance();
215
[email protected]ef589af2011-12-03 01:07:15216 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56217
[email protected]d90b8392012-06-13 09:34:56218 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09219 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28220 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56221
thanhphc90f49ca2017-03-03 17:48:53222 // Returns the RootWindowController for the given display id. If there
223 // is no display for |display_id|, null is returned.
224 static RootWindowController* GetRootWindowControllerWithDisplayId(
225 int64_t display_id);
226
[email protected]cf1c70e2012-08-30 01:13:02227 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09228 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23229 static RootWindowControllerList GetAllRootWindowControllers();
230
[email protected]bf9cdb362013-10-25 19:22:45231 // Returns the primary root Window. The primary root Window is the one that
232 // has a launcher.
233 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34234
sky27344382017-03-08 21:30:32235 // Returns the root window that newly created windows should be added to.
236 // Value can be temporarily overridden using ScopedRootWindowForNewWindows.
237 // NOTE: this returns the root, newly created window should be added to the
238 // appropriate container in the returned window.
239 static aura::Window* GetRootWindowForNewWindows();
mfomitcheva1a8aa62016-05-03 16:23:26240
[email protected]cf1c70e2012-08-30 01:13:02241 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13242 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23243
[email protected]bf9cdb362013-10-25 19:22:45244 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39245 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45246 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38247 int container_id);
[email protected]7b0f7502012-06-11 00:12:39248
skya8b222f2017-01-12 15:47:13249 // TODO(sky): move this and WindowManagerClient into ShellMash that is owned
250 // by Shell. Doing the move is gated on having mash create Shell.
sky00f98a372017-01-11 06:03:49251 static void set_window_tree_client(aura::WindowTreeClient* client) {
252 window_tree_client_ = client;
253 }
254
255 static aura::WindowTreeClient* window_tree_client() {
256 return window_tree_client_;
257 }
258
skya8b222f2017-01-12 15:47:13259 static void set_window_manager_client(aura::WindowManagerClient* client) {
260 window_manager_client_ = client;
261 }
262 static aura::WindowManagerClient* window_manager_client() {
263 return window_manager_client_;
264 }
265
jamescook0dfe5632017-04-05 18:49:02266 static Config GetAshConfig();
moshayedic229a522017-05-05 18:14:26267 static bool ShouldUseIMEService();
sky494c6cbd2017-03-27 20:57:48268
afakhrye4fae852017-05-09 18:49:06269 // Registers all ash related prefs to the given |registry|.
270 static void RegisterPrefs(PrefRegistrySimple* registry);
271
[email protected]57b8bb352012-01-11 05:11:46272 // Creates a default views::NonClientFrameView for use by windows in the
273 // Ash environment.
274 views::NonClientFrameView* CreateDefaultNonClientFrameView(
275 views::Widget* widget);
276
mswad28b252016-08-09 02:42:07277 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47278 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44279 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17280
[email protected]58868abf2014-01-17 23:45:33281 // Called when a casting session is started or stopped.
282 void OnCastingSessionStartedOrStopped(bool started);
283
[email protected]0e3e7cb2014-04-12 05:18:25284 // Called when a root window is created.
sky80556bc42016-06-07 22:46:13285 void OnRootWindowAdded(WmWindow* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25286
[email protected]e1b299b2014-01-29 23:53:41287 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
288 // exists.
[email protected]51f438112013-11-18 19:32:50289 void CreateKeyboard();
290
[email protected]e1b299b2014-01-29 23:53:41291 // Deactivates the virtual keyboard.
292 void DeactivateKeyboard();
293
[email protected]da285852014-05-27 19:53:43294 // Test if MaximizeModeWindowManager is not enabled, and if
295 // MaximizeModeController is not currently setting a display rotation. Or if
296 // the |resolution_notification_controller_| is not showing its confirmation
297 // dialog. If true then changes to display settings can be saved.
298 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43299
sky81a2d792017-03-17 19:14:39300 AcceleratorController* accelerator_controller() {
301 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58302 }
sky07a24d42017-03-09 23:57:30303 AccessibilityDelegate* accessibility_delegate() {
304 return accessibility_delegate_.get();
305 }
sky7db5ccf2017-03-14 21:52:29306 app_list::AppList* app_list() { return app_list_.get(); }
sky07a24d42017-03-09 23:57:30307 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool() {
308 return blocking_pool_;
309 }
sky79fa34712017-03-20 23:46:47310 BrightnessControlDelegate* brightness_control_delegate() {
311 return brightness_control_delegate_.get();
312 }
313 CastConfigController* cast_config() { return cast_config_.get(); }
rjkroege72f8154f2016-10-29 00:49:02314 display::DisplayManager* display_manager() { return display_manager_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12315 DisplayConfigurationController* display_configuration_controller() {
316 return display_configuration_controller_.get();
317 }
jamescookb8dcef522016-06-25 14:42:55318 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
sky79fa34712017-03-20 23:46:47319 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
320 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
321 return keyboard_brightness_control_delegate_.get();
322 }
323 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
324 LocaleNotificationController* locale_notification_controller() {
325 return locale_notification_controller_.get();
326 }
327 LogoutConfirmationController* logout_confirmation_controller() {
328 return logout_confirmation_controller_.get();
329 }
xiaoyinh2bbdd102017-05-18 23:29:42330 LockScreenController* lock_screen_controller() {
331 return lock_screen_controller_.get();
332 }
sky5ab16472017-03-21 19:35:08333 MaximizeModeController* maximize_mode_controller() {
334 return maximize_mode_controller_.get();
335 }
336 MediaController* media_controller() { return media_controller_.get(); }
337 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
338 NewWindowController* new_window_controller() {
339 return new_window_controller_.get();
340 }
afakhrye4fae852017-05-09 18:49:06341 NightLightController* night_light_controller() {
342 return night_light_controller_.get();
343 }
sky5ad143a2017-03-22 04:31:23344 SessionController* session_controller() { return session_controller_.get(); }
345 ShelfController* shelf_controller() { return shelf_controller_.get(); }
sky5ad143a2017-03-22 04:31:23346 ShelfModel* shelf_model();
sky5b45ed82017-03-27 02:54:23347 ShutdownController* shutdown_controller() {
348 return shutdown_controller_.get();
349 }
sky79fa34712017-03-20 23:46:47350 SystemTrayController* system_tray_controller() {
351 return system_tray_controller_.get();
352 }
353 SystemTrayDelegate* system_tray_delegate() {
354 return system_tray_delegate_.get();
355 }
sky5b45ed82017-03-27 02:54:23356 SystemTrayNotifier* system_tray_notifier() {
357 return system_tray_notifier_.get();
358 }
[email protected]a1b7a822013-02-23 19:08:04359 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33360 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11361 }
tbarzicc78da1ff92017-05-08 20:46:15362 TrayAction* tray_action() { return tray_action_.get(); }
sky5b45ed82017-03-27 02:54:23363 VpnList* vpn_list() { return vpn_list_.get(); }
364 WindowCycleController* window_cycle_controller() {
365 return window_cycle_controller_.get();
366 }
367 WindowSelectorController* window_selector_controller() {
368 return window_selector_controller_.get();
369 }
[email protected]093b8d642014-04-03 20:59:28370 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
yusukes1168eda2016-04-27 07:52:08371 LinkHandlerModelFactory* link_handler_model_factory() {
372 return link_handler_model_factory_;
373 }
374 void set_link_handler_model_factory(
375 LinkHandlerModelFactory* link_handler_model_factory) {
376 link_handler_model_factory_ = link_handler_model_factory;
377 }
[email protected]e0d22e82012-01-04 00:46:57378 PowerButtonController* power_button_controller() {
379 return power_button_controller_.get();
380 }
[email protected]ab4f8c92013-05-30 19:07:47381 LockStateController* lock_state_controller() {
382 return lock_state_controller_.get();
[email protected]222f40c2012-10-18 08:58:13383 }
sky07a24d42017-03-09 23:57:30384 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); }
skyb073203a2017-03-13 16:59:16385 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
jamescookb8dcef522016-06-25 14:42:55386 VideoDetector* video_detector() { return video_detector_.get(); }
sky07a24d42017-03-09 23:57:30387 WallpaperController* wallpaper_controller() {
388 return wallpaper_controller_.get();
389 }
skyb073203a2017-03-13 16:59:16390 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); }
oshimae2818922015-07-28 01:18:52391 WindowTreeHostManager* window_tree_host_manager() {
392 return window_tree_host_manager_.get();
[email protected]3e1cdd312012-06-07 03:48:41393 }
chirantan40e4cd82015-02-19 01:08:19394 PowerEventObserver* power_event_observer() {
395 return power_event_observer_.get();
396 }
kylechar55f0eaf22017-01-11 22:57:37397 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49398 return touch_transformer_controller_.get();
399 }
sammiequon203ae022016-09-18 17:23:42400 LaserPointerController* laser_pointer_controller() {
401 return laser_pointer_controller_.get();
402 }
403 PartialMagnificationController* partial_magnification_controller() {
404 return partial_magnification_controller_.get();
405 }
oshima5a296e82016-04-29 01:32:27406 ScreenshotController* screenshot_controller() {
407 return screenshot_controller_.get();
mukai19274bdd2015-02-24 22:37:48408 }
[email protected]093b8d642014-04-03 20:59:28409 MouseCursorEventFilter* mouse_cursor_filter() {
[email protected]8b7ba87b2012-09-01 00:40:40410 return mouse_cursor_filter_.get();
411 }
[email protected]093b8d642014-04-03 20:59:28412 EventTransformationHandler* event_transformation_handler() {
[email protected]682990f2013-01-10 06:49:11413 return event_transformation_handler_.get();
414 }
sadrul7a8785e2016-02-12 21:54:35415 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
[email protected]4a229e902011-12-01 21:21:11416
[email protected]fcb123d2013-04-17 15:58:49417 SessionStateDelegate* session_state_delegate() {
418 return session_state_delegate_.get();
419 }
420
[email protected]f48075d2012-05-24 11:06:51421 HighContrastController* high_contrast_controller() {
422 return high_contrast_controller_.get();
423 }
424
[email protected]77f7c132012-11-15 06:52:54425 MagnificationController* magnification_controller() {
[email protected]c1c670172012-04-26 04:20:26426 return magnification_controller_.get();
427 }
[email protected]f48075d2012-05-24 11:06:51428
[email protected]55398d22013-10-10 19:49:20429 AutoclickController* autoclick_controller() {
430 return autoclick_controller_.get();
431 }
432
sky07a24d42017-03-09 23:57:30433 ToastManager* toast_manager() { return toast_manager_.get(); }
434
sky27344382017-03-08 21:30:32435 aura::client::ActivationClient* activation_client();
[email protected]77f7c132012-11-15 06:52:54436
[email protected]c758fbf2012-03-25 22:53:59437 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01438 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59439 void UpdateShelfVisibility();
440
afakhry15eb9282017-04-27 04:03:31441 // Gets the current active user pref service.
442 // In classic ash, it will be null if there's no active user.
443 // In the case of mash, it can be null if it failed to or hasn't yet
444 // connected to the pref service.
445 //
446 // NOTE: Users of this pref service MUST listen to
447 // ash::SessionObserver::OnActiveUserSessionChanged() and recall this function
448 // to get the newly activated user's pref service, and use it to re-read the
449 // desired stored settings.
450 PrefService* GetActiveUserPrefService() const;
451
[email protected]88d71122012-10-18 07:11:01452 // Returns WebNotificationTray on the primary root window.
453 WebNotificationTray* GetWebNotificationTray();
[email protected]6d6546e2012-05-30 23:12:02454
[email protected]a0afeb12012-12-10 22:57:09455 // Does the primary display have status area?
456 bool HasPrimaryStatusArea();
457
458 // Returns the system tray on primary display.
459 SystemTray* GetPrimarySystemTray();
[email protected]bfb411312012-02-27 20:59:27460
[email protected]9488d4d2012-02-29 18:32:37461 static void set_initially_hide_cursor(bool hide) {
462 initially_hide_cursor_ = hide;
463 }
464
[email protected]093b8d642014-04-03 20:59:28465 ResizeShadowController* resize_shadow_controller() {
[email protected]e4a181cc2012-03-17 02:20:57466 return resize_shadow_controller_.get();
467 }
468
[email protected]a54e65b2011-11-21 22:03:34469 // Made available for tests.
[email protected]e319c7e2014-03-14 19:56:14470 ::wm::ShadowController* shadow_controller() {
[email protected]a54e65b2011-11-21 22:03:34471 return shadow_controller_.get();
472 }
473
[email protected]f9466702012-09-17 16:35:27474 // Starts the animation that occurs on first login.
475 void DoInitialWorkspaceAnimation();
476
oshimae2818922015-07-28 01:18:52477 // TODO(oshima): Move these objects to WindowTreeHostManager.
kylechar7a067ec2017-01-07 01:16:28478 display::DisplayConfigurator* display_configurator() {
[email protected]1e31cbd2014-04-07 20:06:11479 return display_configurator_.get();
[email protected]70b3e7d52012-06-02 22:12:25480 }
[email protected]093b8d642014-04-03 20:59:28481 DisplayErrorObserver* display_error_observer() {
[email protected]18b21b2e2013-03-01 20:56:23482 return display_error_observer_.get();
483 }
[email protected]70b3e7d52012-06-02 22:12:25484
yiyixa68ade512016-09-01 17:38:13485 ScreenLayoutObserver* screen_layout_observer() {
486 return screen_layout_observer_.get();
487 }
488
[email protected]093b8d642014-04-03 20:59:28489 ResolutionNotificationController* resolution_notification_controller() {
[email protected]6ef71d72013-08-10 18:13:44490 return resolution_notification_controller_.get();
491 }
[email protected]0dc85512014-03-13 13:26:41492
jonross0af45212015-01-13 18:55:46493 ScreenOrientationController* screen_orientation_controller() {
494 return screen_orientation_controller_.get();
jonrossf21fea12014-11-13 01:22:51495 }
496
jamescookac6724332017-03-21 02:54:43497 TrayBluetoothHelper* tray_bluetooth_helper() {
498 return tray_bluetooth_helper_.get();
499 }
500
rsadamc727b6a2014-10-31 18:59:33501 VirtualKeyboardController* virtual_keyboard_controller() {
502 return virtual_keyboard_controller_.get();
503 }
warx533c8f62016-04-12 01:19:43504
505 chromeos::AudioA11yController* audio_a11y_controller() {
506 return audio_a11y_controller_.get();
507 }
[email protected]6ef71d72013-08-10 18:13:44508
jamescookb8dcef522016-06-25 14:42:55509 WindowPositioner* window_positioner() { return window_positioner_.get(); }
[email protected]e9a71312013-10-04 03:20:01510
jamescookb8dcef522016-06-25 14:42:55511 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
[email protected]5d2ea362013-12-13 08:10:18512
[email protected]2b8a9bb2013-07-01 22:43:40513 void SetTouchHudProjectionEnabled(bool enabled);
514
515 bool is_touch_hud_projection_enabled() const {
516 return is_touch_hud_projection_enabled_;
517 }
518
sky27344382017-03-08 21:30:32519 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily.
mswad3d9552017-05-18 21:23:36520 void set_root_window_for_new_windows(aura::Window* root) {
sky27344382017-03-08 21:30:32521 root_window_for_new_windows_ = root;
522 }
523
[email protected]59ccade2013-10-17 17:56:40524 // Creates instance of FirstRunHelper. Caller is responsible for deleting
525 // returned object.
526 ash::FirstRunHelper* CreateFirstRunHelper();
[email protected]f94c6aa2013-11-08 01:18:54527
yawanodc5533b32017-02-23 11:04:38528 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
529
[email protected]87ec2202014-02-06 06:24:27530 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
531 // compositing is enabled, and vice versa.
532 void SetCursorCompositingEnabled(bool enabled);
533
[email protected]08bdabed2013-12-20 07:52:28534 StickyKeysController* sticky_keys_controller() {
535 return sticky_keys_controller_.get();
[email protected]f94c6aa2013-11-08 01:18:54536 }
hidehiko6821ca42016-06-18 11:12:23537
hidehiko6821ca42016-06-18 11:12:23538 ScreenPinningController* screen_pinning_controller() {
539 return screen_pinning_controller_.get();
540 }
541
[email protected]1d2a7212014-01-16 06:09:48542 GPUSupport* gpu_support() { return gpu_support_.get(); }
[email protected]1d2a7212014-01-16 06:09:48543
sky00c813f2017-03-08 22:48:55544 void AddShellObserver(ShellObserver* observer);
545 void RemoveShellObserver(ShellObserver* observer);
546
sky7db5ccf2017-03-14 21:52:29547 // Shows the app list on the active root window.
548 void ShowAppList();
549
550 // Dismisses the app list.
551 void DismissAppList();
552
553 // Shows the app list if it's not visible. Dismisses it otherwise.
554 void ToggleAppList();
555
556 // Returns app list actual visibility. This might differ from
557 // GetAppListTargetVisibility() when hiding animation is still in flight.
558 bool IsAppListVisible() const;
559
560 // Returns app list target visibility.
561 bool GetAppListTargetVisibility() const;
562
sky5ad143a2017-03-22 04:31:23563 // Called when the login status changes.
564 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
565 void UpdateAfterLoginStatusChange(LoginStatus status);
566
sky00c813f2017-03-08 22:48:55567 // Notifies observers that maximize mode has started, windows might still
568 // animate.
569 void NotifyMaximizeModeStarted();
570
571 // Notifies observers that maximize mode is about to end.
572 void NotifyMaximizeModeEnding();
573
574 // Notifies observers that maximize mode has ended, windows might still be
575 // returning to their original position.
576 void NotifyMaximizeModeEnded();
577
578 // Notifies observers that overview mode is about to be started (before the
579 // windows get re-arranged).
580 void NotifyOverviewModeStarting();
581
582 // Notifies observers that overview mode has ended.
583 void NotifyOverviewModeEnded();
584
585 // Notifies observers that fullscreen mode has changed for |root_window|.
586 void NotifyFullscreenStateChanged(bool is_fullscreen, WmWindow* root_window);
587
588 // Notifies observers that |pinned_window| changed its pinned window state.
589 void NotifyPinnedStateChanged(WmWindow* pinned_window);
590
591 // Notifies observers that the virtual keyboard has been
xiyuan38160182017-03-14 22:50:13592 // activated/deactivated for |root_window|.
sky97f9a7432017-05-09 05:14:31593 void NotifyVirtualKeyboardActivated(bool activated,
594 aura::Window* root_window);
sky00c813f2017-03-08 22:48:55595
596 // Notifies observers that the shelf was created for |root_window|.
597 // TODO(jamescook): Move to Shelf.
598 void NotifyShelfCreatedForRootWindow(WmWindow* root_window);
599
600 // Notifies observers that |root_window|'s shelf changed alignment.
601 // TODO(jamescook): Move to Shelf.
602 void NotifyShelfAlignmentChanged(WmWindow* root_window);
603
604 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
605 // TODO(jamescook): Move to Shelf.
606 void NotifyShelfAutoHideBehaviorChanged(WmWindow* root_window);
607
jamescook518dccbd2017-05-18 04:57:07608 // Used to provide better error messages for Shell::Get() under mash.
609 static void SetIsBrowserProcessWithMash();
610
[email protected]2b4cd302012-02-24 20:21:13611 private:
[email protected]c39be8f2012-06-15 22:58:36612 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09613 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
614 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47615 friend class AcceleratorControllerTest;
[email protected]093b8d642014-04-03 20:59:28616 friend class RootWindowController;
sky27344382017-03-08 21:30:32617 friend class ScopedRootWindowForNewWindows;
618 friend class SmsObserverTest;
[email protected]0c68e892012-12-08 16:54:53619 friend class test::ShellTestApi;
[email protected]0af58042012-12-13 03:21:35620 friend class shell::WindowWatcher;
[email protected]ad0c8722012-03-02 20:17:45621
skyb073203a2017-03-13 16:59:16622 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
sky11cf8db92017-04-10 23:38:08623 std::unique_ptr<ShellPort> shell_port);
dcheng1f4538e2014-10-27 23:57:05624 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08625
[email protected]1b4c7472014-05-15 18:32:23626 void Init(const ShellInitParams& init_params);
[email protected]b0639282011-12-22 21:12:27627
[email protected]51f438112013-11-18 19:32:50628 // Initializes virtual keyboard controller.
629 void InitKeyboard();
[email protected]b6ba05d902013-10-04 21:38:45630
[email protected]a273d33a2013-10-17 12:41:21631 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26632 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56633
sky79fa34712017-03-20 23:46:47634 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
635 void DeleteSystemTrayDelegate();
636
skyabcae812017-01-18 17:01:34637 // Destroys all child windows including widgets across all roots.
638 void CloseAllRootWindowChildWindows();
639
hariank0dd03dd2016-07-14 23:47:33640 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05641 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27642
[email protected]5097e692012-10-30 22:08:41643 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05644 bool CanAcceptEvent(const ui::Event& event) override;
645 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11646 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05647 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e692012-10-30 22:08:41648
sky27344382017-03-08 21:30:32649 // aura::client::ActivationChangeObserver:
650 void OnWindowActivated(ActivationReason reason,
651 aura::Window* gained_active,
652 aura::Window* lost_active) override;
653
Xiyuan Xia22b1a6c2017-04-18 22:46:01654 // SessionObserver:
Xiyuan Xiab64fd0a2017-04-13 17:53:14655 void OnSessionStateChanged(session_manager::SessionState state) override;
656 void OnLoginStatusChanged(LoginStatus login_status) override;
657 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23658
jamescook788b4fc2017-05-18 16:16:06659 // Finalizes the shelf state. Called after the user session is active and
660 // the profile is available.
661 void InitializeShelf();
662
tibellb93c729b2017-03-30 00:45:09663 // Callback for prefs::ConnectToPrefService.
664 void OnPrefServiceInitialized(std::unique_ptr<::PrefService> pref_service);
665
[email protected]cac10fc62011-10-07 23:22:56666 static Shell* instance_;
667
sky00f98a372017-01-11 06:03:49668 // Only valid in mash, for classic ash this is null.
669 static aura::WindowTreeClient* window_tree_client_;
skya8b222f2017-01-12 15:47:13670 static aura::WindowManagerClient* window_manager_client_;
sky00f98a372017-01-11 06:03:49671
[email protected]9488d4d2012-02-29 18:32:37672 // If set before the Shell is initialized, the mouse cursor will be hidden
673 // when the screen is initially created.
674 static bool initially_hide_cursor_;
675
sky6624a7af2016-05-27 18:47:49676 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura>
677 scoped_overview_animation_settings_factory_;
sky11cf8db92017-04-10 23:38:08678 std::unique_ptr<ShellPort> shell_port_;
sky984c1892016-04-20 00:00:34679
[email protected]1aad3322012-06-06 06:37:09680 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11681 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14682
dchenga94547472016-04-08 08:41:11683 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11684 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
dchenga94547472016-04-08 08:41:11685 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24686
sky81a2d792017-03-17 19:14:39687 std::unique_ptr<AcceleratorController> accelerator_controller_;
sky07a24d42017-03-09 23:57:30688 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
sky79fa34712017-03-20 23:46:47689 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
690 std::unique_ptr<CastConfigController> cast_config_;
dchenga94547472016-04-08 08:41:11691 std::unique_ptr<DragDropController> drag_drop_controller_;
sky79fa34712017-03-20 23:46:47692 std::unique_ptr<FocusCycler> focus_cycler_;
sky5ab16472017-03-21 19:35:08693 std::unique_ptr<ImmersiveContextAsh> immersive_context_;
sky79fa34712017-03-20 23:46:47694 std::unique_ptr<KeyboardBrightnessControlDelegate>
695 keyboard_brightness_control_delegate_;
696 std::unique_ptr<KeyboardUI> keyboard_ui_;
697 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
xiaoyinh2bbdd102017-05-18 23:29:42698 std::unique_ptr<LockScreenController> lock_screen_controller_;
sky79fa34712017-03-20 23:46:47699 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
sky5ab16472017-03-21 19:35:08700 std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
701 std::unique_ptr<MediaController> media_controller_;
702 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
703 std::unique_ptr<NewWindowController> new_window_controller_;
sky79fa34712017-03-20 23:46:47704 std::unique_ptr<PaletteDelegate> palette_delegate_;
dchenga94547472016-04-08 08:41:11705 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
sky5ad143a2017-03-22 04:31:23706 std::unique_ptr<SessionController> session_controller_;
afakhrye4fae852017-05-09 18:49:06707 std::unique_ptr<NightLightController> night_light_controller_;
sky5ad143a2017-03-22 04:31:23708 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23709 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16710 std::unique_ptr<ShellDelegate> shell_delegate_;
sky5b45ed82017-03-27 02:54:23711 std::unique_ptr<ShutdownController> shutdown_controller_;
sky79fa34712017-03-20 23:46:47712 std::unique_ptr<SystemTrayController> system_tray_controller_;
713 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
sky5b45ed82017-03-27 02:54:23714 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
sky07a24d42017-03-09 23:57:30715 std::unique_ptr<ToastManager> toast_manager_;
tbarzicc78da1ff92017-05-08 20:46:15716 std::unique_ptr<TrayAction> tray_action_;
sky5b45ed82017-03-27 02:54:23717 std::unique_ptr<VpnList> vpn_list_;
sky07a24d42017-03-09 23:57:30718 std::unique_ptr<WallpaperController> wallpaper_controller_;
skyb073203a2017-03-13 16:59:16719 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
sky5b45ed82017-03-27 02:54:23720 std::unique_ptr<WindowCycleController> window_cycle_controller_;
721 std::unique_ptr<WindowSelectorController> window_selector_controller_;
dchenga94547472016-04-08 08:41:11722 std::unique_ptr<::wm::ShadowController> shadow_controller_;
723 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
724 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
sky7db5ccf2017-03-14 21:52:29725 std::unique_ptr<app_list::AppList> app_list_;
tibellb93c729b2017-03-30 00:45:09726 std::unique_ptr<::PrefService> pref_service_;
sky07a24d42017-03-09 23:57:30727 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_;
dchenga94547472016-04-08 08:41:11728 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
yusukes1168eda2016-04-27 07:52:08729 LinkHandlerModelFactory* link_handler_model_factory_;
dchenga94547472016-04-08 08:41:11730 std::unique_ptr<PowerButtonController> power_button_controller_;
731 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11732 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
733 std::unique_ptr<VideoDetector> video_detector_;
dchenga94547472016-04-08 08:41:11734 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
735 std::unique_ptr<HighContrastController> high_contrast_controller_;
736 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11737 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32738 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34739
oshima5a296e82016-04-29 01:32:27740 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45741
dchenga94547472016-04-08 08:41:11742 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
743 std::unique_ptr<ScreenPositionController> screen_position_controller_;
744 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
745 std::unique_ptr<EventClientImpl> event_client_;
746 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13747
[email protected]0b0b0742012-02-16 13:23:45748 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26749 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11750 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45751
[email protected]3537d472014-01-15 05:45:31752 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11753 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31754
[email protected]435b212e2012-04-05 19:43:37755 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11756 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37757
[email protected]745816be2011-11-22 05:08:30758 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11759 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30760
rjkroege72f8154f2016-10-29 00:49:02761 std::unique_ptr<display::DisplayManager> display_manager_;
dchenga94547472016-04-08 08:41:11762 std::unique_ptr<DisplayConfigurationController>
763 display_configuration_controller_;
[email protected]6bdf7952012-11-14 10:10:58764
hidehiko6821ca42016-06-18 11:12:23765 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56766
derat94887a22017-01-20 18:17:25767 // Forwards user activity ui::mojom::UserActivityMonitor to
768 // |user_activity_detector_|. Only initialized for mash.
769 std::unique_ptr<aura::UserActivityForwarder> user_activity_forwarder_;
770
dchenga94547472016-04-08 08:41:11771 std::unique_ptr<PowerEventObserver> power_event_observer_;
772 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
773 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
774 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
775 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34776 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11777 std::unique_ptr<BluetoothNotificationController>
[email protected]b3142722014-03-04 06:59:50778 bluetooth_notification_controller_;
jamescookac6724332017-03-21 02:54:43779 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
dchenga94547472016-04-08 08:41:11780 std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_;
warx533c8f62016-04-12 01:19:43781 std::unique_ptr<chromeos::AudioA11yController> audio_a11y_controller_;
[email protected]70b3e7d52012-06-02 22:12:25782 // Controls video output device state.
kylechar7a067ec2017-01-07 01:16:28783 std::unique_ptr<display::DisplayConfigurator> display_configurator_;
dchenga94547472016-04-08 08:41:11784 std::unique_ptr<DisplayColorManager> display_color_manager_;
785 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
786 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58787
[email protected]c1234a42013-08-20 09:35:40788 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35789 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2ef2014-02-09 22:50:39790
kylechar98748a52016-12-03 01:33:22791 // Listens for shutdown and updates DisplayConfigurator.
792 std::unique_ptr<ShutdownObserver> shutdown_observer_;
793
yiyix90cfee22017-02-16 05:38:18794 // Listens for new sms messages and shows notifications.
795 std::unique_ptr<SmsObserver> sms_observer_;
796
derat94887a22017-01-20 18:17:25797 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11798 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13799 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51800
kylechar55f0eaf22017-01-11 22:57:37801 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39802
dchenga94547472016-04-08 08:41:11803 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
804 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42805 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
806 std::unique_ptr<PartialMagnificationController>
807 partial_magnification_controller_;
[email protected]70b3e7d52012-06-02 22:12:25808
[email protected]c0ff0342013-02-27 00:41:29809 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
810 // pointer to vend to test code.
811 AshNativeCursorManager* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03812
derat94887a22017-01-20 18:17:25813 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35814 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11815 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19816
[email protected]852a55d2012-10-17 13:30:30817 // For testing only: simulate that a modal window is open
818 bool simulate_modal_window_open_for_testing_;
819
[email protected]2b8a9bb2013-07-01 22:43:40820 bool is_touch_hud_projection_enabled_;
821
mswad3d9552017-05-18 21:23:36822 // See comment for GetRootWindowForNewWindows().
823 aura::Window* root_window_for_new_windows_ = nullptr;
824 aura::Window* scoped_root_window_for_new_windows_ = nullptr;
sky27344382017-03-08 21:30:32825
[email protected]1d2a7212014-01-16 06:09:48826 // Injected content::GPUDataManager support.
dchenga94547472016-04-08 08:41:11827 std::unique_ptr<GPUSupport> gpu_support_;
[email protected]1d2a7212014-01-16 06:09:48828
skyb7b54092016-08-19 16:00:09829 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_;
830
sky15ef0aa2017-01-20 18:55:59831 std::unique_ptr<AppListDelegateImpl> app_list_delegate_impl_;
832
sky00c813f2017-03-08 22:48:55833 base::ObserverList<ShellObserver> shell_observers_;
834
sky07a24d42017-03-09 23:57:30835 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
836
[email protected]87b0d82e2011-10-07 21:02:59837 DISALLOW_COPY_AND_ASSIGN(Shell);
838};
839
[email protected]55f593352011-12-24 05:42:46840} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59841
[email protected]b65bdda2011-12-23 23:35:31842#endif // ASH_SHELL_H_