blob: 05cc777a1527b8a322f6e9df0c7ccddd20efb857 [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"
Jiaquan He20785d5e2018-04-30 21:30:1414#include "ash/public/cpp/app_list/app_list_constants.h"
jamescookd4649fa2016-09-30 17:50:0915#include "ash/public/cpp/shelf_types.h"
Xiyuan Xia22b1a6c2017-04-18 22:46:0116#include "ash/session/session_observer.h"
[email protected]c0ce80e2012-10-05 23:28:2717#include "ash/wm/system_modal_container_event_filter_delegate.h"
[email protected]b0639282011-12-22 21:12:2718#include "base/gtest_prod_util.h"
avidb567a8a2015-12-20 17:07:2419#include "base/macros.h"
[email protected]6f67df52013-10-29 01:07:1520#include "base/memory/weak_ptr.h"
[email protected]1a2145b2012-03-13 21:09:1721#include "base/observer_list.h"
David Blackb92487842018-03-29 18:45:2822#include "chromeos/chromeos_switches.h"
[email protected]c9390bd2013-11-08 20:33:1323#include "ui/aura/window.h"
James Cookfa4838e2018-08-08 16:30:1524#include "ui/base/ui_base_types.h"
oshimaf84b0da722016-04-27 19:47:1925#include "ui/display/screen.h"
[email protected]86ccbd42013-09-18 18:11:5426#include "ui/events/event_target.h"
[email protected]ee3ed10772014-03-11 22:02:0127#include "ui/wm/core/cursor_manager.h"
sky27344382017-03-08 21:30:3228#include "ui/wm/public/activation_change_observer.h"
[email protected]87b0d82e2011-10-07 21:02:5929
afakhrye4fae852017-05-09 18:49:0630class PrefRegistrySimple;
tibellb93c729b2017-03-30 00:45:0931class PrefService;
32
[email protected]87b0d82e2011-10-07 21:02:5933namespace aura {
Scott Violetac410622018-08-11 18:33:2234class Env;
[email protected]35304ce2011-12-14 23:21:0135class RootWindow;
[email protected]87b0d82e2011-10-07 21:02:5936class Window;
Alex Newcomer8fdcb9342017-08-08 18:48:4437} // namespace aura
[email protected]fa4a45832012-04-12 21:32:4838
rjkroege72f8154f2016-10-29 00:49:0239namespace display {
kylecharf2e4e412016-12-04 04:21:3540class DisplayChangeObserver;
kylechar7a067ec2017-01-07 01:16:2841class DisplayConfigurator;
rjkroege72f8154f2016-10-29 00:49:0242class DisplayManager;
Alex Newcomer8fdcb9342017-08-08 18:48:4443} // namespace display
rjkroege72f8154f2016-10-29 00:49:0244
Scott Violet737fb752018-04-11 15:35:2245namespace exo {
46class FileHelper;
Scott Violet737fb752018-04-11 15:35:2247} // namespace exo
48
[email protected]2b99f8c2011-10-11 19:42:2449namespace gfx {
sky4ec2be82017-01-06 17:38:3250class Insets;
James Cookfa4838e2018-08-08 16:30:1551class Point;
[email protected]cac10fc62011-10-07 23:22:5652}
[email protected]b6ba05d902013-10-04 21:38:4553
Darren Shenad5dc722018-05-28 00:14:4554namespace keyboard {
55class KeyboardController;
56} // namespace keyboard
57
Scott Violet6c0eb6962018-06-20 01:31:2658namespace service_manager {
59class Connector;
60}
61
[email protected]a8bd1cb2012-02-17 23:05:5462namespace ui {
Scott Violetc8a1c6c2017-11-29 23:17:3663class ContextFactory;
64class ContextFactoryPrivate;
derat2d4e62d2015-01-09 16:09:1765class UserActivityDetector;
[email protected]b0fa7012014-04-16 12:50:5766class UserActivityPowerManagerNotifier;
Scott Violetb7f4df22018-05-17 04:43:1267namespace ws2 {
Scott Violetae4c25d2018-06-19 15:50:1568class GpuInterfaceProvider;
Scott Violetb7f4df22018-05-17 04:43:1269}
Alex Newcomer8fdcb9342017-08-08 18:48:4470} // namespace ui
thanhph3f3968512017-06-21 00:37:2371
[email protected]57b8bb352012-01-11 05:11:4672namespace views {
73class NonClientFrameView;
James Cookfa4838e2018-08-08 16:30:1574class PointerWatcher;
75enum class PointerWatcherEventTypes;
[email protected]57b8bb352012-01-11 05:11:4676class Widget;
[email protected]4a59e4e92012-11-12 21:15:4077namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1478class TooltipController;
79}
Alex Newcomer8fdcb9342017-08-08 18:48:4480} // namespace views
[email protected]e319c7e2014-03-14 19:56:1481
82namespace wm {
[email protected]60d677d2014-05-30 13:07:0283class AcceleratorFilter;
Thiago Farina3b086a02017-05-30 22:32:5084class ActivationClient;
[email protected]4a59e4e92012-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;
Alex Newcomer8fdcb9342017-08-08 18:48:4490} // namespace wm
[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;
James Cookec144952017-09-01 00:05:1695class AccessibilityController;
sky07a24d42017-03-09 23:57:3096class AccessibilityDelegate;
Qiang Xua9591002018-03-15 22:29:3197class AccessibilityFocusRingController;
Jeffrey Kardatzkef108f022018-04-17 17:52:3598class AshDBusServices;
Scott Violetd64dac12017-06-02 21:50:0899class AshDisplayController;
Jiaquan He4b48f912018-03-01 03:59:39100class AppListControllerImpl;
erg36cfb952017-06-21 19:41:45101class NativeCursorManagerAsh;
sky07a24d42017-03-09 23:57:30102class AshTouchTransformController;
David Black00fdce32018-05-10 20:59:14103class AssistantController;
[email protected]55398d2c2013-10-10 19:49:20104class AutoclickController;
Toni Barzic9d0c82f42017-12-06 00:53:52105class BacklightsForcedOffSetter;
[email protected]b31427252014-03-04 06:59:50106class BluetoothNotificationController;
Sonny Sasaka55f69fc2017-08-28 21:29:37107class BluetoothPowerController;
sky79fa34712017-03-20 23:46:47108class BrightnessControlDelegate;
109class CastConfigController;
Evan Stadef3c89c602018-06-14 04:44:12110class ClientImageRegistry;
Steven Bennetts2a9b4382018-04-26 23:41:19111class CrosDisplayConfig;
Toni Barzicd6238312018-03-02 18:26:13112class DetachableBaseHandler;
Toni Barzic550419f2018-03-08 03:56:21113class DetachableBaseNotificationController;
robert.bradfordab052492015-05-06 11:09:56114class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:12115class DisplayConfigurationController;
Steven Bennetts9b21fa32018-04-13 23:45:55116class DisplayConfigurationObserver;
[email protected]18b21b2e2013-03-01 20:56:23117class DisplayErrorObserver;
Steven Bennetts3688c6032018-04-13 01:14:23118class DisplayPrefs;
Steven Bennetts7683e342018-01-02 21:29:52119class DisplayShutdownObserver;
Tetsui Ohkubo01421b32018-05-30 16:54:59120class DisplaySpeakerController;
Ahmed Fakhry4bf3f742018-02-06 17:33:36121class DockedMagnifierController;
[email protected]084b6bb2011-11-17 05:18:16122class DragDropController;
[email protected]e67291f12012-10-10 05:52:38123class EventClientImpl;
Mike Wassermanefbf3402018-04-26 00:41:32124class EventRewriterController;
[email protected]682990f2013-01-10 06:49:11125class EventTransformationHandler;
James Cookf5398842018-04-16 20:15:24126class FirstRunHelper;
sky79fa34712017-03-20 23:46:47127class FocusCycler;
[email protected]093b8d642014-04-03 20:59:28128class HighContrastController;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32129class HighlighterController;
James Cookbb026732017-06-09 23:01:55130class ImeController;
Xiyuan Xia5f1046e2018-06-01 16:04:44131class ImeFocusHandler;
sky5ab16472017-03-21 19:35:08132class ImmersiveContextAsh;
skyb7b54092016-08-19 16:00:09133class ImmersiveHandlerFactoryAsh;
David Tseng6792dc82018-05-04 19:18:41134class KeyAccessibilityEnabler;
sky79fa34712017-03-20 23:46:47135class KeyboardBrightnessControlDelegate;
136class KeyboardUI;
sammiequon203ae022016-09-18 17:23:42137class LaserPointerController;
sky79fa34712017-03-20 23:46:47138class LocaleNotificationController;
[email protected]093b8d642014-04-03 20:59:28139class LockStateController;
sky79fa34712017-03-20 23:46:47140class LogoutConfirmationController;
Jacob Dufaultffd9b0d2017-11-15 23:07:16141class LoginScreenController;
[email protected]093b8d642014-04-03 20:59:28142class MagnificationController;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03143class TabletModeController;
sky5ab16472017-03-21 19:35:08144class MediaController;
Evan Stade2c43a87b32017-08-31 17:53:10145class MessageCenterController;
[email protected]78d9630c2012-06-22 00:58:07146class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08147class MruWindowTracker;
Kyle Horimoto9fc84fc22018-04-27 19:45:15148class MultiDeviceNotificationPresenter;
sky5ab16472017-03-21 19:35:08149class NewWindowController;
afakhrye4fae852017-05-09 18:49:06150class NightLightController;
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01151class NoteTakingController;
Scott Violetb7f4df22018-05-17 04:43:12152class NotificationTray;
[email protected]9ae32df2012-07-26 03:25:18153class OverlayEventFilter;
[email protected]093b8d642014-04-03 20:59:28154class PartialMagnificationController;
Sammie Quon95c6a1c2017-09-12 19:16:55155class PeripheralBatteryNotifier;
Qiang Xud77a90c2018-02-20 19:43:29156class PersistentWindowController;
James Cook31bb3252018-08-08 20:06:44157class PointerWatcherAdapter;
Qiang Xud8e897e2018-05-24 20:07:57158class PolicyRecommendationRestorer;
[email protected]093b8d642014-04-03 20:59:28159class PowerButtonController;
[email protected]51625052013-10-10 01:40:16160class PowerEventObserver;
Qiang Xu36234e532018-04-11 04:54:02161class PowerPrefs;
[email protected]72bce522014-02-10 21:11:26162class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57163class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44164class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56165class RootWindowController;
jamescookac6724332017-03-21 02:54:43166class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46167class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27168class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23169class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06170class ScreenPositionController;
Tetsui Ohkubo54d50222018-05-10 01:58:11171class ScreenSwitchCheckController;
sky5ad143a2017-03-22 04:31:23172class SessionController;
sky5ad143a2017-03-22 04:31:23173class ShelfController;
sky5ad143a2017-03-22 04:31:23174class ShelfModel;
175class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16176class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23177struct ShellInitParams;
sky00c813f2017-03-08 22:48:55178class ShellObserver;
James Cook40f7d752018-05-25 18:21:58179class ShellState;
sky5b45ed82017-03-27 02:54:23180class ShutdownController;
yiyix90cfee22017-02-16 05:38:18181class SmsObserver;
xdaid4913762017-07-06 00:17:22182class SplitViewController;
[email protected]093b8d642014-04-03 20:59:28183class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18184class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27185class SystemModalContainerEventFilter;
Tetsui Ohkubo269b5792018-04-26 01:06:32186class SystemNotificationController;
[email protected]093b8d642014-04-03 20:59:28187class SystemTray;
Tetsui Ohkubo21722932018-03-02 02:56:56188class SystemTrayModel;
sky5b45ed82017-03-27 02:54:23189class SystemTrayNotifier;
Scott Violet3c554ae2017-12-13 02:25:41190class TimeToFirstPresentRecorder;
[email protected]093b8d642014-04-03 20:59:28191class ToplevelWindowEventHandler;
sky07a24d42017-03-09 23:57:30192class ToastManager;
Qiang Xuf1400a362017-09-14 02:28:30193class TouchDevicesController;
tbarzicc78da1ff92017-05-08 20:46:15194class TrayAction;
jamescookac6724332017-03-21 02:54:43195class TrayBluetoothHelper;
bsheeaae09a2014-09-22 23:16:52196class VirtualKeyboardController;
[email protected]ded58fd2013-10-09 07:56:55197class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28198class VideoDetector;
Yue Lia33960a2017-11-01 22:06:07199class VoiceInteractionController;
sky5b45ed82017-03-27 02:54:23200class VpnList;
sky07a24d42017-03-09 23:57:30201class WallpaperController;
Scott Violet737fb752018-04-11 15:35:22202class WaylandServerController;
Scott Violetb7f4df22018-05-17 04:43:12203class WindowServiceOwner;
sky5b45ed82017-03-27 02:54:23204class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28205class WindowPositioner;
sky5b45ed82017-03-27 02:54:23206class WindowSelectorController;
msw607227f82016-08-30 17:22:39207class WindowTreeHostManager;
[email protected]2b99f8c2011-10-11 19:42:24208
sky494c6cbd2017-03-27 20:57:48209enum class Config;
210enum class LoginStatus;
211
[email protected]87b0d82e2011-10-07 21:02:59212// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59213// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38214//
215// Upon creation, the Shell sets itself as the RootWindow's delegate, which
216// takes ownership of the Shell.
Xiyuan Xia22b1a6c2017-04-18 22:46:01217class ASH_EXPORT Shell : public SessionObserver,
sky5ad143a2017-03-22 04:31:23218 public SystemModalContainerEventFilterDelegate,
sky27344382017-03-08 21:30:32219 public ui::EventTarget,
Thiago Farina3b086a02017-05-30 22:32:50220 public ::wm::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59221 public:
[email protected]093b8d642014-04-03 20:59:28222 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23223
Scott Violetc8a1c6c2017-11-29 23:17:36224 // Creates the single Shell instance.
225 static Shell* CreateInstance(ShellInitParams init_params);
[email protected]3266c2b92011-11-14 00:06:08226
227 // Should never be called before |CreateInstance()|.
skyb073203a2017-03-13 16:59:16228 static Shell* Get();
[email protected]3266c2b92011-11-14 00:06:08229
[email protected]b3b7bcd2012-03-06 19:35:45230 // Returns true if the ash shell has been instantiated.
231 static bool HasInstance();
232
[email protected]ef589af2011-12-03 01:07:15233 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56234
[email protected]d90b8392012-06-13 09:34:56235 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09236 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28237 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56238
thanhphc90f49ca2017-03-03 17:48:53239 // Returns the RootWindowController for the given display id. If there
240 // is no display for |display_id|, null is returned.
241 static RootWindowController* GetRootWindowControllerWithDisplayId(
242 int64_t display_id);
243
Scott Violet596bb46342017-06-21 14:43:13244 // Returns the root Window for the given display id. If there is no display
245 // for |display_id| null is returned.
246 static aura::Window* GetRootWindowForDisplayId(int64_t display_id);
247
[email protected]cf1c70e2012-08-30 01:13:02248 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09249 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23250 static RootWindowControllerList GetAllRootWindowControllers();
251
[email protected]bf9cdb362013-10-25 19:22:45252 // Returns the primary root Window. The primary root Window is the one that
253 // has a launcher.
254 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34255
sky27344382017-03-08 21:30:32256 // Returns the root window that newly created windows should be added to.
257 // Value can be temporarily overridden using ScopedRootWindowForNewWindows.
258 // NOTE: this returns the root, newly created window should be added to the
259 // appropriate container in the returned window.
260 static aura::Window* GetRootWindowForNewWindows();
mfomitcheva1a8aa62016-05-03 16:23:26261
[email protected]cf1c70e2012-08-30 01:13:02262 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13263 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23264
[email protected]bf9cdb362013-10-25 19:22:45265 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39266 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45267 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38268 int container_id);
[email protected]7b0f7502012-06-11 00:12:39269
James Cook7b7c6a52018-01-04 23:40:03270 // If a system-modal dialog window is currently open, returns the ID of the
271 // system modal window container that contains the window.
272 // If no system-modal dialogs are open it returns -1.
273 static int GetOpenSystemModalWindowContainerId();
274
275 // Returns true if a system-modal dialog window is currently open.
276 static bool IsSystemModalWindowOpen();
277
James Cooka6066972018-07-31 19:34:07278 // Whether |window| hosts a remote client (e.g. the keyboard shortcut viewer
279 // app under classic ash, or a browser window under mash).
280 static bool HasRemoteClient(aura::Window* window);
281
jamescook0dfe5632017-04-05 18:49:02282 static Config GetAshConfig();
sky494c6cbd2017-03-27 20:57:48283
Wenzhao Zang56c292932017-08-02 04:58:34284 // Registers all ash related local state prefs to the given |registry|.
Steven Bennettsca108512018-05-02 11:05:03285 static void RegisterLocalStatePrefs(PrefRegistrySimple* registry,
286 bool for_test);
Wenzhao Zang56c292932017-08-02 04:58:34287
Qiang Xu36234e532018-04-11 04:54:02288 // Registers all ash related signin/user profile prefs to the given
289 // |registry|. Can be called before Shell is initialized. When |for_test| is
290 // true this registers foreign user profile prefs (e.g. chrome prefs) as if
291 // they are owned by ash. This allows test code to read the pref values.
292 static void RegisterSigninProfilePrefs(PrefRegistrySimple* registry,
293 bool for_test = false);
294 static void RegisterUserProfilePrefs(PrefRegistrySimple* registry,
295 bool for_test = false);
afakhrye4fae852017-05-09 18:49:06296
Scott Violet737fb752018-04-11 15:35:22297 // If necessary, initializes the Wayland server.
Xiyuan Xia36197372018-04-25 00:45:17298 void InitWaylandServer(std::unique_ptr<exo::FileHelper> file_helper);
Scott Violet737fb752018-04-11 15:35:22299 void DestroyWaylandServer();
300
[email protected]57b8bb352012-01-11 05:11:46301 // Creates a default views::NonClientFrameView for use by windows in the
302 // Ash environment.
303 views::NonClientFrameView* CreateDefaultNonClientFrameView(
304 views::Widget* widget);
305
mswad28b252016-08-09 02:42:07306 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47307 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44308 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17309
[email protected]58868abf2014-01-17 23:45:33310 // Called when a casting session is started or stopped.
311 void OnCastingSessionStartedOrStopped(bool started);
312
[email protected]0e3e7cb2014-04-12 05:18:25313 // Called when a root window is created.
varkhac71444e52017-05-25 22:51:34314 void OnRootWindowAdded(aura::Window* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25315
Zach Helfinsteinbbb6bad2018-05-02 18:21:51316 // Called when dictation is activated.
317 void OnDictationStarted();
318
319 // Called when dictation is ended.
320 void OnDictationEnded();
321
Darren Shenad5dc722018-05-28 00:14:45322 // Enables the keyboard and associate it with the primary root window
323 // controller.
Darren Shenf62db77a2018-06-07 06:22:44324 void EnableKeyboard();
[email protected]51f438112013-11-18 19:32:50325
Darren Shenad5dc722018-05-28 00:14:45326 // Hides and disables the virtual keyboard.
Darren Shenf62db77a2018-06-07 06:22:44327 void DisableKeyboard();
[email protected]e1b299b2014-01-29 23:53:41328
Mitsuru Oshima0e9b7a62017-07-19 18:23:03329 // Test if TabletModeWindowManager is not enabled, and if
330 // TabletModeController is not currently setting a display rotation. Or if
[email protected]da285852014-05-27 19:53:43331 // the |resolution_notification_controller_| is not showing its confirmation
332 // dialog. If true then changes to display settings can be saved.
333 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43334
sky81a2d792017-03-17 19:14:39335 AcceleratorController* accelerator_controller() {
336 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58337 }
James Cookec144952017-09-01 00:05:16338 AccessibilityController* accessibility_controller() {
339 return accessibility_controller_.get();
340 }
sky07a24d42017-03-09 23:57:30341 AccessibilityDelegate* accessibility_delegate() {
342 return accessibility_delegate_.get();
343 }
Qiang Xua9591002018-03-15 22:29:31344 AccessibilityFocusRingController* accessibility_focus_ring_controller() {
345 return accessibility_focus_ring_controller_.get();
346 }
Qiang Xuf1400a362017-09-14 02:28:30347 ::wm::ActivationClient* activation_client();
Jiaquan He4b48f912018-03-01 03:59:39348 AppListControllerImpl* app_list_controller() {
349 return app_list_controller_.get();
350 }
Scott Violetd64dac12017-06-02 21:50:08351 AshDisplayController* ash_display_controller() {
352 return ash_display_controller_.get();
353 }
David Black00fdce32018-05-10 20:59:14354 AssistantController* assistant_controller() {
355 DCHECK(chromeos::switches::IsAssistantEnabled());
356 return assistant_controller_.get();
357 }
Qiang Xuf1400a362017-09-14 02:28:30358 AutoclickController* autoclick_controller() {
359 return autoclick_controller_.get();
360 }
Daniel Erat477c56d2017-12-13 21:42:54361 BacklightsForcedOffSetter* backlights_forced_off_setter() {
362 return backlights_forced_off_setter_.get();
363 }
Qiang Xuf1400a362017-09-14 02:28:30364 BluetoothPowerController* bluetooth_power_controller() {
365 return bluetooth_power_controller_.get();
366 }
sky79fa34712017-03-20 23:46:47367 BrightnessControlDelegate* brightness_control_delegate() {
368 return brightness_control_delegate_.get();
369 }
370 CastConfigController* cast_config() { return cast_config_.get(); }
Evan Stadef3c89c602018-06-14 04:44:12371 ClientImageRegistry* client_image_registry() {
372 return client_image_registry_.get();
373 }
Scott Violet6c0eb6962018-06-20 01:31:26374 service_manager::Connector* connector() { return connector_; }
Steven Bennetts2a9b4382018-04-26 23:41:19375 CrosDisplayConfig* cros_display_config() {
376 return cros_display_config_.get();
377 }
Qiang Xuf1400a362017-09-14 02:28:30378 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
Toni Barzicd6238312018-03-02 18:26:13379 DetachableBaseHandler* detachable_base_handler() {
380 return detachable_base_handler_.get();
381 }
382
rjkroege72f8154f2016-10-29 00:49:02383 display::DisplayManager* display_manager() { return display_manager_.get(); }
Steven Bennetts3688c6032018-04-13 01:14:23384 DisplayPrefs* display_prefs() { return display_prefs_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12385 DisplayConfigurationController* display_configuration_controller() {
386 return display_configuration_controller_.get();
387 }
Qiang Xuf1400a362017-09-14 02:28:30388
389 // TODO(oshima): Move these objects to WindowTreeHostManager.
390 display::DisplayConfigurator* display_configurator() {
391 return display_configurator_.get();
392 }
Ahmed Fakhry46357342018-04-27 00:46:11393 DisplayColorManager* display_color_manager() {
394 return display_color_manager_.get();
395 }
Qiang Xuf1400a362017-09-14 02:28:30396 DisplayErrorObserver* display_error_observer() {
397 return display_error_observer_.get();
398 }
399
Ahmed Fakhry4bf3f742018-02-06 17:33:36400 DockedMagnifierController* docked_magnifier_controller();
Scott Violetac410622018-08-11 18:33:22401 aura::Env* aura_env() { return aura_env_; }
jamescookb8dcef522016-06-25 14:42:55402 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
Mike Wassermanefbf3402018-04-26 00:41:32403 EventRewriterController* event_rewriter_controller() {
404 return event_rewriter_controller_.get();
405 }
Qiang Xuf1400a362017-09-14 02:28:30406 EventClientImpl* event_client() { return event_client_.get(); }
407 EventTransformationHandler* event_transformation_handler() {
408 return event_transformation_handler_.get();
409 }
James Cookf5398842018-04-16 20:15:24410 FirstRunHelper* first_run_helper() { return first_run_helper_.get(); }
Scott Violet319cfb52018-05-23 18:35:28411 ::wm::FocusController* focus_controller() { return focus_controller_.get(); }
sky79fa34712017-03-20 23:46:47412 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30413 HighlighterController* highlighter_controller() {
414 return highlighter_controller_.get();
415 }
416 HighContrastController* high_contrast_controller() {
417 return high_contrast_controller_.get();
418 }
James Cookf0c78fc2017-06-15 14:42:55419 ImeController* ime_controller() { return ime_controller_.get(); }
David Tseng6792dc82018-05-04 19:18:41420 KeyAccessibilityEnabler* key_accessibility_enabler() {
421 return key_accessibility_enabler_.get();
422 }
sky79fa34712017-03-20 23:46:47423 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
424 return keyboard_brightness_control_delegate_.get();
425 }
426 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30427 LaserPointerController* laser_pointer_controller() {
428 return laser_pointer_controller_.get();
429 }
sky79fa34712017-03-20 23:46:47430 LocaleNotificationController* locale_notification_controller() {
431 return locale_notification_controller_.get();
432 }
Jacob Dufaultffd9b0d2017-11-15 23:07:16433 LoginScreenController* login_screen_controller() {
434 return login_screen_controller_.get();
xiaoyinh2bbdd102017-05-18 23:29:42435 }
Qiang Xuf1400a362017-09-14 02:28:30436 LockStateController* lock_state_controller() {
437 return lock_state_controller_.get();
438 }
439 LogoutConfirmationController* logout_confirmation_controller() {
440 return logout_confirmation_controller_.get();
441 }
442 MagnificationController* magnification_controller() {
443 return magnification_controller_.get();
444 }
sky5ab16472017-03-21 19:35:08445 MediaController* media_controller() { return media_controller_.get(); }
Evan Stade04c18d02017-10-20 20:53:22446 MessageCenterController* message_center_controller() {
447 return message_center_controller_.get();
448 }
Qiang Xuf1400a362017-09-14 02:28:30449 MouseCursorEventFilter* mouse_cursor_filter() {
450 return mouse_cursor_filter_.get();
451 }
sky5ab16472017-03-21 19:35:08452 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
453 NewWindowController* new_window_controller() {
454 return new_window_controller_.get();
455 }
afakhry9e0a18b32017-06-05 19:23:14456 NightLightController* night_light_controller();
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01457 NoteTakingController* note_taking_controller() {
458 return note_taking_controller_.get();
459 }
Qiang Xuf1400a362017-09-14 02:28:30460 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30461 PartialMagnificationController* partial_magnification_controller() {
462 return partial_magnification_controller_.get();
463 }
Qiang Xud8e897e2018-05-24 20:07:57464 PolicyRecommendationRestorer* policy_recommendation_restorer() {
465 return policy_recommendation_restorer_.get();
466 }
Qiang Xuf1400a362017-09-14 02:28:30467 PowerButtonController* power_button_controller() {
468 return power_button_controller_.get();
469 }
470 PowerEventObserver* power_event_observer() {
471 return power_event_observer_.get();
472 }
473 ResizeShadowController* resize_shadow_controller() {
474 return resize_shadow_controller_.get();
475 }
476 ResolutionNotificationController* resolution_notification_controller() {
477 return resolution_notification_controller_.get();
478 }
479 ScreenshotController* screenshot_controller() {
480 return screenshot_controller_.get();
481 }
482 ScreenLayoutObserver* screen_layout_observer() {
483 return screen_layout_observer_.get();
484 }
485 ScreenOrientationController* screen_orientation_controller() {
486 return screen_orientation_controller_.get();
487 }
488 ScreenPinningController* screen_pinning_controller() {
489 return screen_pinning_controller_.get();
490 }
Tetsui Ohkubo54d50222018-05-10 01:58:11491 ScreenSwitchCheckController* screen_switch_check_controller() {
492 return screen_switch_check_controller_.get();
493 }
sky5ad143a2017-03-22 04:31:23494 SessionController* session_controller() { return session_controller_.get(); }
Sammie Quon557418662018-04-25 18:45:51495 ::wm::ShadowController* shadow_controller() {
496 return shadow_controller_.get();
497 }
sky5ad143a2017-03-22 04:31:23498 ShelfController* shelf_controller() { return shelf_controller_.get(); }
sky5ad143a2017-03-22 04:31:23499 ShelfModel* shelf_model();
Qiang Xuf1400a362017-09-14 02:28:30500 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
James Cook40f7d752018-05-25 18:21:58501 ShellState* shell_state() { return shell_state_.get(); }
sky5b45ed82017-03-27 02:54:23502 ShutdownController* shutdown_controller() {
503 return shutdown_controller_.get();
504 }
Qiang Xuf1400a362017-09-14 02:28:30505 SplitViewController* split_view_controller() {
506 return split_view_controller_.get();
507 }
508 StickyKeysController* sticky_keys_controller() {
509 return sticky_keys_controller_.get();
510 }
Steven Bennetts7fb8a992018-06-12 00:15:05511 SystemNotificationController* system_notification_controller() {
512 return system_notification_controller_.get();
513 }
Tetsui Ohkubo21722932018-03-02 02:56:56514 SystemTrayModel* system_tray_model() { return system_tray_model_.get(); }
sky5b45ed82017-03-27 02:54:23515 SystemTrayNotifier* system_tray_notifier() {
516 return system_tray_notifier_.get();
517 }
Sammie Quona6f96402017-08-24 01:08:37518 TabletModeController* tablet_mode_controller() {
519 return tablet_mode_controller_.get();
520 }
Scott Violet3c554ae2017-12-13 02:25:41521 TimeToFirstPresentRecorder* time_to_first_present_recorder() {
522 return time_to_first_present_recorder_.get();
523 }
Qiang Xuf1400a362017-09-14 02:28:30524 ToastManager* toast_manager() { return toast_manager_.get(); }
[email protected]a1b7a822013-02-23 19:08:04525 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33526 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11527 }
Qiang Xuf1400a362017-09-14 02:28:30528 TouchDevicesController* touch_devices_controller() {
529 return touch_devices_controller_.get();
chirantan40e4cd82015-02-19 01:08:19530 }
kylechar55f0eaf22017-01-11 22:57:37531 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49532 return touch_transformer_controller_.get();
533 }
Qiang Xuf1400a362017-09-14 02:28:30534 TrayAction* tray_action() { return tray_action_.get(); }
535 TrayBluetoothHelper* tray_bluetooth_helper() {
536 return tray_bluetooth_helper_.get();
sammiequon203ae022016-09-18 17:23:42537 }
Evan Stade04c18d02017-10-20 20:53:22538 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30539 VideoDetector* video_detector() { return video_detector_.get(); }
540 VirtualKeyboardController* virtual_keyboard_controller() {
541 return virtual_keyboard_controller_.get();
sammiequon203ae022016-09-18 17:23:42542 }
Yue Lia33960a2017-11-01 22:06:07543 VoiceInteractionController* voice_interaction_controller() {
544 return voice_interaction_controller_.get();
545 }
Qiang Xuf1400a362017-09-14 02:28:30546 VpnList* vpn_list() { return vpn_list_.get(); }
547 WallpaperController* wallpaper_controller() {
548 return wallpaper_controller_.get();
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32549 }
Qiang Xuf1400a362017-09-14 02:28:30550 WindowCycleController* window_cycle_controller() {
551 return window_cycle_controller_.get();
mukai19274bdd2015-02-24 22:37:48552 }
Qiang Xuf1400a362017-09-14 02:28:30553 WindowPositioner* window_positioner() { return window_positioner_.get(); }
554 WindowSelectorController* window_selector_controller() {
555 return window_selector_controller_.get();
[email protected]8b7ba87b2012-09-01 00:40:40556 }
Scott Violetb7f4df22018-05-17 04:43:12557 WindowServiceOwner* window_service_owner() {
558 return window_service_owner_.get();
Scott Violet7eb50d22018-05-04 17:12:18559 }
Qiang Xuf1400a362017-09-14 02:28:30560 WindowTreeHostManager* window_tree_host_manager() {
561 return window_tree_host_manager_.get();
[email protected]682990f2013-01-10 06:49:11562 }
[email protected]77f7c132012-11-15 06:52:54563
Mitsuru Oshima89e5c1352018-01-17 07:29:39564 ToplevelWindowEventHandler* toplevel_window_event_handler() {
565 return toplevel_window_event_handler_.get();
566 }
567
[email protected]c758fbf2012-03-25 22:53:59568 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01569 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59570 void UpdateShelfVisibility();
571
Xiyuan Xia522710a2018-05-08 16:35:42572 // Returns NotificationTray on the primary root window.
573 NotificationTray* GetNotificationTray();
[email protected]6d6546e2012-05-30 23:12:02574
[email protected]a0afeb12012-12-10 22:57:09575 // Does the primary display have status area?
576 bool HasPrimaryStatusArea();
577
578 // Returns the system tray on primary display.
579 SystemTray* GetPrimarySystemTray();
[email protected]bfb411312012-02-27 20:59:27580
[email protected]f9466702012-09-17 16:35:27581 // Starts the animation that occurs on first login.
582 void DoInitialWorkspaceAnimation();
583
yawanodc5533b32017-02-23 11:04:38584 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
585
Weidong Guod07448f2017-10-18 03:35:18586 // Updates cursor compositing on/off. Native cursor is disabled when cursor
[email protected]87ec2202014-02-06 06:24:27587 // compositing is enabled, and vice versa.
Weidong Guod07448f2017-10-18 03:35:18588 void UpdateCursorCompositingEnabled();
[email protected]87ec2202014-02-06 06:24:27589
Weidong Guod07448f2017-10-18 03:35:18590 // Force setting compositing on/off without checking dependency.
591 void SetCursorCompositingEnabled(bool enabled);
xdaid4913762017-07-06 00:17:22592
593 // Returns true if split view mode is active.
594 bool IsSplitViewModeActive() const;
595
James Cookfa4838e2018-08-08 16:30:15596 // Shows the context menu for the wallpaper or shelf at |location_in_screen|.
597 void ShowContextMenu(const gfx::Point& location_in_screen,
598 ui::MenuSourceType source_type);
599
600 // If |events| is PointerWatcherEventTypes::MOVES,
601 // PointerWatcher::OnPointerEventObserved() is called for pointer move events.
602 // If |events| is PointerWatcherEventTypes::DRAGS,
603 // PointerWatcher::OnPointerEventObserved() is called for pointer drag events.
604 // Requesting pointer moves or drags may incur a performance hit and should be
605 // avoided if possible.
606 void AddPointerWatcher(views::PointerWatcher* watcher,
607 views::PointerWatcherEventTypes events);
608 void RemovePointerWatcher(views::PointerWatcher* watcher);
609
sky00c813f2017-03-08 22:48:55610 void AddShellObserver(ShellObserver* observer);
611 void RemoveShellObserver(ShellObserver* observer);
612
sky5ad143a2017-03-22 04:31:23613 // Called when the login status changes.
614 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
615 void UpdateAfterLoginStatusChange(LoginStatus status);
616
sky00c813f2017-03-08 22:48:55617 // Notifies observers that overview mode is about to be started (before the
618 // windows get re-arranged).
619 void NotifyOverviewModeStarting();
620
Xiaoqian Daifb4698ed2018-02-23 20:11:06621 // Notifies observers that overview mode is about to end (bofore the windows
622 // restore themselves).
623 void NotifyOverviewModeEnding();
624
sky00c813f2017-03-08 22:48:55625 // Notifies observers that overview mode has ended.
626 void NotifyOverviewModeEnded();
627
xdaid4913762017-07-06 00:17:22628 // Notifies observers that split view mode is about to be started (before the
629 // window gets snapped and activated).
630 void NotifySplitViewModeStarting();
631
Xiaoqian Daibf3771f2018-03-13 18:21:46632 // Notifies observers that split view mode has been started.
633 void NotifySplitViewModeStarted();
634
xdaid4913762017-07-06 00:17:22635 // Notifies observers that split view mode has ended.
636 void NotifySplitViewModeEnded();
637
sky00c813f2017-03-08 22:48:55638 // Notifies observers that fullscreen mode has changed for |root_window|.
varkhac71444e52017-05-25 22:51:34639 void NotifyFullscreenStateChanged(bool is_fullscreen,
640 aura::Window* root_window);
sky00c813f2017-03-08 22:48:55641
642 // Notifies observers that |pinned_window| changed its pinned window state.
varkha19d7e6c52017-05-25 21:15:30643 void NotifyPinnedStateChanged(aura::Window* pinned_window);
sky00c813f2017-03-08 22:48:55644
sky00c813f2017-03-08 22:48:55645 // Notifies observers that |root_window|'s shelf changed alignment.
646 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18647 void NotifyShelfAlignmentChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55648
649 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
650 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18651 void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55652
jamescook518dccbd2017-05-18 04:57:07653 // Used to provide better error messages for Shell::Get() under mash.
654 static void SetIsBrowserProcessWithMash();
655
muyuanlid766f2e2017-06-26 20:17:19656 void NotifyAppListVisibilityChanged(bool visible, aura::Window* root_window);
657
[email protected]2b4cd302012-02-24 20:21:13658 private:
[email protected]c39be8f2012-06-15 22:58:36659 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09660 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
661 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47662 friend class AcceleratorControllerTest;
Sam McNallya853cd82017-08-30 01:55:10663 friend class AshTestHelper;
[email protected]093b8d642014-04-03 20:59:28664 friend class RootWindowController;
sky27344382017-03-08 21:30:32665 friend class ScopedRootWindowForNewWindows;
James Cook317781a02017-07-18 02:08:06666 friend class ShellTestApi;
sky27344382017-03-08 21:30:32667 friend class SmsObserverTest;
[email protected]ad0c8722012-03-02 20:17:45668
skyb073203a2017-03-13 16:59:16669 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
Scott Violete5c79f52018-07-31 00:10:17670 service_manager::Connector* connector);
dcheng1f4538e2014-10-27 23:57:05671 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08672
Scott Violetae4c25d2018-06-19 15:50:15673 void Init(
674 ui::ContextFactory* context_factory,
675 ui::ContextFactoryPrivate* context_factory_private,
676 std::unique_ptr<base::Value> initial_display_prefs,
Scott Violete5c79f52018-07-31 00:10:17677 std::unique_ptr<ui::ws2::GpuInterfaceProvider> gpu_interface_provider);
[email protected]b0639282011-12-22 21:12:27678
Steven Bennetts7683e342018-01-02 21:29:52679 // Initializes the display manager and related components.
680 void InitializeDisplayManager();
681
[email protected]a273d33a2013-10-17 12:41:21682 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26683 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56684
skyabcae812017-01-18 17:01:34685 // Destroys all child windows including widgets across all roots.
686 void CloseAllRootWindowChildWindows();
687
hariank0dd03dd2016-07-14 23:47:33688 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05689 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27690
[email protected]5097e69c2012-10-30 22:08:41691 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05692 bool CanAcceptEvent(const ui::Event& event) override;
693 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11694 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05695 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e69c2012-10-30 22:08:41696
Thiago Farina3b086a02017-05-30 22:32:50697 // wm::ActivationChangeObserver:
sky27344382017-03-08 21:30:32698 void OnWindowActivated(ActivationReason reason,
699 aura::Window* gained_active,
700 aura::Window* lost_active) override;
701
Xiyuan Xia22b1a6c2017-04-18 22:46:01702 // SessionObserver:
Steven Bennettsbadc3092018-05-24 21:26:01703 void OnFirstSessionStarted() override;
Xiyuan Xiab64fd0a2017-04-13 17:53:14704 void OnSessionStateChanged(session_manager::SessionState state) override;
705 void OnLoginStatusChanged(LoginStatus login_status) override;
706 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23707
Sam McNallyf4dab612017-08-16 03:06:33708 // Callback for prefs::ConnectToPrefService.
Sam McNallye36abbc2017-07-20 01:04:28709 void OnLocalStatePrefServiceInitialized(
710 std::unique_ptr<::PrefService> pref_service);
tibellb93c729b2017-03-30 00:45:09711
[email protected]cac10fc62011-10-07 23:22:56712 static Shell* instance_;
713
Scott Violetac410622018-08-11 18:33:22714 // |owned_aura_env_| is non-null if Shell created aura::Env. Shell creates
715 // aura::Env only in single-process-mash mode.
716 std::unique_ptr<aura::Env> owned_aura_env_;
717
718 // This is either |owned_aura_env_|, or Env::GetInstance().
719 aura::Env* aura_env_;
720
[email protected]1aad3322012-06-06 06:37:09721 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11722 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14723
Mike Wassermanefbf3402018-04-26 00:41:32724 std::unique_ptr<EventRewriterController> event_rewriter_controller_;
725
dchenga94547472016-04-08 08:41:11726 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11727 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24728
sky81a2d792017-03-17 19:14:39729 std::unique_ptr<AcceleratorController> accelerator_controller_;
James Cookec144952017-09-01 00:05:16730 std::unique_ptr<AccessibilityController> accessibility_controller_;
sky07a24d42017-03-09 23:57:30731 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
Qiang Xua9591002018-03-15 22:29:31732 std::unique_ptr<AccessibilityFocusRingController>
733 accessibility_focus_ring_controller_;
Jiaquan He4b48f912018-03-01 03:59:39734 std::unique_ptr<AppListControllerImpl> app_list_controller_;
Jeffrey Kardatzkef108f022018-04-17 17:52:35735 std::unique_ptr<AshDBusServices> ash_dbus_services_;
Scott Violetd64dac12017-06-02 21:50:08736 std::unique_ptr<AshDisplayController> ash_display_controller_;
David Black00fdce32018-05-10 20:59:14737 std::unique_ptr<AssistantController> assistant_controller_;
Toni Barzic9d0c82f42017-12-06 00:53:52738 std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_;
sky79fa34712017-03-20 23:46:47739 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
740 std::unique_ptr<CastConfigController> cast_config_;
Evan Stadef3c89c602018-06-14 04:44:12741 std::unique_ptr<ClientImageRegistry> client_image_registry_;
Steven Bennetts2a9b4382018-04-26 23:41:19742 std::unique_ptr<CrosDisplayConfig> cros_display_config_;
Scott Violete5c79f52018-07-31 00:10:17743 service_manager::Connector* const connector_;
Toni Barzicd6238312018-03-02 18:26:13744 std::unique_ptr<DetachableBaseHandler> detachable_base_handler_;
Toni Barzic550419f2018-03-08 03:56:21745 std::unique_ptr<DetachableBaseNotificationController>
746 detachable_base_notification_controller_;
Tetsui Ohkubo01421b32018-05-30 16:54:59747 std::unique_ptr<DisplaySpeakerController> display_speaker_controller_;
dchenga94547472016-04-08 08:41:11748 std::unique_ptr<DragDropController> drag_drop_controller_;
James Cookf5398842018-04-16 20:15:24749 std::unique_ptr<FirstRunHelper> first_run_helper_;
sky79fa34712017-03-20 23:46:47750 std::unique_ptr<FocusCycler> focus_cycler_;
James Cookf0c78fc2017-06-15 14:42:55751 std::unique_ptr<ImeController> ime_controller_;
Xiyuan Xia5f1046e2018-06-01 16:04:44752 std::unique_ptr<ImeFocusHandler> ime_focus_handler_;
sky5ab16472017-03-21 19:35:08753 std::unique_ptr<ImmersiveContextAsh> immersive_context_;
sky79fa34712017-03-20 23:46:47754 std::unique_ptr<KeyboardBrightnessControlDelegate>
755 keyboard_brightness_control_delegate_;
756 std::unique_ptr<KeyboardUI> keyboard_ui_;
Darren Shenad5dc722018-05-28 00:14:45757 std::unique_ptr<keyboard::KeyboardController> keyboard_controller_;
sky79fa34712017-03-20 23:46:47758 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
Jacob Dufaultffd9b0d2017-11-15 23:07:16759 std::unique_ptr<LoginScreenController> login_screen_controller_;
sky79fa34712017-03-20 23:46:47760 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03761 std::unique_ptr<TabletModeController> tablet_mode_controller_;
sky5ab16472017-03-21 19:35:08762 std::unique_ptr<MediaController> media_controller_;
763 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
Kyle Horimoto9fc84fc22018-04-27 19:45:15764 std::unique_ptr<MultiDeviceNotificationPresenter>
765 multidevice_notification_presenter_;
sky5ab16472017-03-21 19:35:08766 std::unique_ptr<NewWindowController> new_window_controller_;
James Cook31bb3252018-08-08 20:06:44767 std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter_;
dchenga94547472016-04-08 08:41:11768 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
sky5ad143a2017-03-22 04:31:23769 std::unique_ptr<SessionController> session_controller_;
afakhrye4fae852017-05-09 18:49:06770 std::unique_ptr<NightLightController> night_light_controller_;
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01771 std::unique_ptr<NoteTakingController> note_taking_controller_;
Qiang Xud8e897e2018-05-24 20:07:57772 std::unique_ptr<PolicyRecommendationRestorer> policy_recommendation_restorer_;
Tetsui Ohkubo54d50222018-05-10 01:58:11773 std::unique_ptr<ScreenSwitchCheckController> screen_switch_check_controller_;
sky5ad143a2017-03-22 04:31:23774 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23775 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16776 std::unique_ptr<ShellDelegate> shell_delegate_;
James Cook40f7d752018-05-25 18:21:58777 std::unique_ptr<ShellState> shell_state_;
sky5b45ed82017-03-27 02:54:23778 std::unique_ptr<ShutdownController> shutdown_controller_;
Tetsui Ohkubo269b5792018-04-26 01:06:32779 std::unique_ptr<SystemNotificationController> system_notification_controller_;
Tetsui Ohkubo21722932018-03-02 02:56:56780 std::unique_ptr<SystemTrayModel> system_tray_model_;
sky5b45ed82017-03-27 02:54:23781 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
sky07a24d42017-03-09 23:57:30782 std::unique_ptr<ToastManager> toast_manager_;
Qiang Xuf1400a362017-09-14 02:28:30783 std::unique_ptr<TouchDevicesController> touch_devices_controller_;
Scott Violet3c554ae2017-12-13 02:25:41784 std::unique_ptr<TimeToFirstPresentRecorder> time_to_first_present_recorder_;
tbarzicc78da1ff92017-05-08 20:46:15785 std::unique_ptr<TrayAction> tray_action_;
Yue Lia33960a2017-11-01 22:06:07786 std::unique_ptr<VoiceInteractionController> voice_interaction_controller_;
sky5b45ed82017-03-27 02:54:23787 std::unique_ptr<VpnList> vpn_list_;
sky07a24d42017-03-09 23:57:30788 std::unique_ptr<WallpaperController> wallpaper_controller_;
sky5b45ed82017-03-27 02:54:23789 std::unique_ptr<WindowCycleController> window_cycle_controller_;
790 std::unique_ptr<WindowSelectorController> window_selector_controller_;
dchenga94547472016-04-08 08:41:11791 std::unique_ptr<::wm::ShadowController> shadow_controller_;
792 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
793 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
Sam McNallya853cd82017-08-30 01:55:10794 std::unique_ptr<PrefService> local_state_;
dchenga94547472016-04-08 08:41:11795 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
dchenga94547472016-04-08 08:41:11796 std::unique_ptr<PowerButtonController> power_button_controller_;
797 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11798 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
799 std::unique_ptr<VideoDetector> video_detector_;
Scott Violet737fb752018-04-11 15:35:22800 std::unique_ptr<WaylandServerController> wayland_server_controller_;
Scott Violetb7f4df22018-05-17 04:43:12801 std::unique_ptr<WindowServiceOwner> window_service_owner_;
dchenga94547472016-04-08 08:41:11802 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
Qiang Xud77a90c2018-02-20 19:43:29803 std::unique_ptr<PersistentWindowController> persistent_window_controller_;
dchenga94547472016-04-08 08:41:11804 std::unique_ptr<HighContrastController> high_contrast_controller_;
805 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11806 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32807 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34808
oshima5a296e82016-04-29 01:32:27809 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45810
dchenga94547472016-04-08 08:41:11811 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
812 std::unique_ptr<ScreenPositionController> screen_position_controller_;
813 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
814 std::unique_ptr<EventClientImpl> event_client_;
815 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13816
[email protected]0b0b0742012-02-16 13:23:45817 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26818 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11819 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45820
[email protected]3537d472014-01-15 05:45:31821 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11822 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31823
[email protected]435b212e2012-04-05 19:43:37824 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11825 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37826
[email protected]745816be2011-11-22 05:08:30827 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11828 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30829
rjkroege72f8154f2016-10-29 00:49:02830 std::unique_ptr<display::DisplayManager> display_manager_;
Steven Bennetts3688c6032018-04-13 01:14:23831 std::unique_ptr<DisplayPrefs> display_prefs_;
dchenga94547472016-04-08 08:41:11832 std::unique_ptr<DisplayConfigurationController>
833 display_configuration_controller_;
Steven Bennetts9b21fa32018-04-13 23:45:55834 std::unique_ptr<DisplayConfigurationObserver> display_configuration_observer_;
[email protected]6bdf7952012-11-14 10:10:58835
hidehiko6821ca42016-06-18 11:12:23836 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56837
Sammie Quon95c6a1c2017-09-12 19:16:55838 std::unique_ptr<PeripheralBatteryNotifier> peripheral_battery_notifier_;
dchenga94547472016-04-08 08:41:11839 std::unique_ptr<PowerEventObserver> power_event_observer_;
Qiang Xu36234e532018-04-11 04:54:02840 std::unique_ptr<PowerPrefs> power_prefs_;
dchenga94547472016-04-08 08:41:11841 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
842 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
843 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
844 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34845 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11846 std::unique_ptr<BluetoothNotificationController>
[email protected]b31427252014-03-04 06:59:50847 bluetooth_notification_controller_;
Sonny Sasaka55f69fc2017-08-28 21:29:37848 std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_;
jamescookac6724332017-03-21 02:54:43849 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
dchenga94547472016-04-08 08:41:11850 std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_;
[email protected]70b3e7d52012-06-02 22:12:25851 // Controls video output device state.
kylechar7a067ec2017-01-07 01:16:28852 std::unique_ptr<display::DisplayConfigurator> display_configurator_;
dchenga94547472016-04-08 08:41:11853 std::unique_ptr<DisplayColorManager> display_color_manager_;
854 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
855 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58856
[email protected]c1234a42013-08-20 09:35:40857 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35858 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2efd2014-02-09 22:50:39859
kylechar98748a52016-12-03 01:33:22860 // Listens for shutdown and updates DisplayConfigurator.
Steven Bennetts7683e342018-01-02 21:29:52861 std::unique_ptr<DisplayShutdownObserver> display_shutdown_observer_;
kylechar98748a52016-12-03 01:33:22862
yiyix90cfee22017-02-16 05:38:18863 // Listens for new sms messages and shows notifications.
864 std::unique_ptr<SmsObserver> sms_observer_;
865
derat94887a22017-01-20 18:17:25866 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11867 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13868 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51869
kylechar55f0eaf22017-01-11 22:57:37870 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39871
dchenga94547472016-04-08 08:41:11872 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
873 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42874 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
875 std::unique_ptr<PartialMagnificationController>
876 partial_magnification_controller_;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32877 std::unique_ptr<HighlighterController> highlighter_controller_;
[email protected]70b3e7d52012-06-02 22:12:25878
Ahmed Fakhry4bf3f742018-02-06 17:33:36879 std::unique_ptr<DockedMagnifierController> docked_magnifier_controller_;
880
xdaid4913762017-07-06 00:17:22881 // The split view controller for Chrome OS in tablet mode.
882 std::unique_ptr<SplitViewController> split_view_controller_;
883
[email protected]c0ff0342013-02-27 00:41:29884 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
885 // pointer to vend to test code.
erg36cfb952017-06-21 19:41:45886 NativeCursorManagerAsh* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03887
derat94887a22017-01-20 18:17:25888 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35889 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11890 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19891
David Tseng6792dc82018-05-04 19:18:41892 // Enables spoken feedback accessibility based on a press and hold of both
893 // volume keys.
894 std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_;
895
[email protected]852a55d2012-10-17 13:30:30896 // For testing only: simulate that a modal window is open
James Cook7b7c6a52018-01-04 23:40:03897 bool simulate_modal_window_open_for_test_ = false;
[email protected]852a55d2012-10-17 13:30:30898
skyb7b54092016-08-19 16:00:09899 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_;
900
Evan Stade2c43a87b32017-08-31 17:53:10901 std::unique_ptr<MessageCenterController> message_center_controller_;
902
sky00c813f2017-03-08 22:48:55903 base::ObserverList<ShellObserver> shell_observers_;
904
Sam McNallye36abbc2017-07-20 01:04:28905 base::WeakPtrFactory<Shell> weak_factory_;
906
[email protected]87b0d82e2011-10-07 21:02:59907 DISALLOW_COPY_AND_ASSIGN(Shell);
908};
909
[email protected]55f593352011-12-24 05:42:46910} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59911
[email protected]b65bdda2011-12-23 23:35:31912#endif // ASH_SHELL_H_