blob: 8a2f8cf541b3afff4e939b46f86bbe591f019db8 [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"
Steven Bennetts38e9bde22019-01-03 17:31:1021#include "chromeos/constants/chromeos_switches.h"
[email protected]c9390bd2013-11-08 20:33:1322#include "ui/aura/window.h"
James Cookfa4838e2018-08-08 16:30:1523#include "ui/base/ui_base_types.h"
oshimaf84b0da722016-04-27 19:47:1924#include "ui/display/screen.h"
[email protected]86ccbd42013-09-18 18:11:5425#include "ui/events/event_target.h"
[email protected]ee3ed10772014-03-11 22:02:0126#include "ui/wm/core/cursor_manager.h"
sky27344382017-03-08 21:30:3227#include "ui/wm/public/activation_change_observer.h"
[email protected]87b0d82e2011-10-07 21:02:5928
afakhrye4fae852017-05-09 18:49:0629class PrefRegistrySimple;
tibellb93c729b2017-03-30 00:45:0930class PrefService;
31
[email protected]87b0d82e2011-10-07 21:02:5932namespace aura {
Scott Violetac410622018-08-11 18:33:2233class Env;
[email protected]35304ce2011-12-14 23:21:0134class RootWindow;
[email protected]87b0d82e2011-10-07 21:02:5935class Window;
Alex Newcomer8fdcb9342017-08-08 18:48:4436} // namespace aura
[email protected]fa4a45832012-04-12 21:32:4837
rjkroege72f8154f2016-10-29 00:49:0238namespace display {
kylecharf2e4e412016-12-04 04:21:3539class DisplayChangeObserver;
kylechar7a067ec2017-01-07 01:16:2840class DisplayConfigurator;
rjkroege72f8154f2016-10-29 00:49:0241class DisplayManager;
Alex Newcomer8fdcb9342017-08-08 18:48:4442} // namespace display
rjkroege72f8154f2016-10-29 00:49:0243
Scott Violet737fb752018-04-11 15:35:2244namespace exo {
45class FileHelper;
Scott Violet737fb752018-04-11 15:35:2246} // namespace exo
47
[email protected]2b99f8c2011-10-11 19:42:2448namespace gfx {
sky4ec2be82017-01-06 17:38:3249class Insets;
James Cookfa4838e2018-08-08 16:30:1550class Point;
Weidong Guo242bf92b2019-01-26 01:19:2351} // namespace gfx
[email protected]b6ba05d902013-10-04 21:38:4552
Jun Mukaif2357792018-12-20 19:58:0053namespace keyboard {
54class KeyboardUIFactory;
55}
56
Scott Violet6c0eb6962018-06-20 01:31:2657namespace service_manager {
58class Connector;
59}
60
[email protected]a8bd1cb2012-02-17 23:05:5461namespace ui {
Scott Violetc8a1c6c2017-11-29 23:17:3662class ContextFactory;
63class ContextFactoryPrivate;
derat2d4e62d2015-01-09 16:09:1764class UserActivityDetector;
[email protected]b0fa7012014-04-16 12:50:5765class UserActivityPowerManagerNotifier;
Alex Newcomer8fdcb9342017-08-08 18:48:4466} // namespace ui
thanhph3f3968512017-06-21 00:37:2367
[email protected]57b8bb352012-01-11 05:11:4668namespace views {
69class NonClientFrameView;
70class Widget;
[email protected]4a59e4e92012-11-12 21:15:4071namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1472class TooltipController;
73}
Alex Newcomer8fdcb9342017-08-08 18:48:4474} // namespace views
[email protected]e319c7e2014-03-14 19:56:1475
76namespace wm {
[email protected]60d677d2014-05-30 13:07:0277class AcceleratorFilter;
Thiago Farina3b086a02017-05-30 22:32:5078class ActivationClient;
[email protected]4a59e4e92012-11-12 21:15:4079class CompoundEventFilter;
sky27344382017-03-08 21:30:3280class FocusController;
Scott Violet7dbdaeb2018-12-11 22:39:0281class FocusRules;
[email protected]86f2b5e2012-11-14 20:37:0082class ShadowController;
[email protected]b5756e22012-11-30 01:32:0283class VisibilityController;
[email protected]0c2dc012012-12-02 00:00:2384class WindowModalityController;
Alex Newcomer8fdcb9342017-08-08 18:48:4485} // namespace wm
[email protected]87b0d82e2011-10-07 21:02:5986
Scott Violet7e33efc2018-08-29 22:30:1587namespace ws {
88class GpuInterfaceProvider;
89}
90
[email protected]55f593352011-12-24 05:42:4691namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5992
sky81a2d792017-03-17 19:14:3993class AcceleratorController;
James Cookec144952017-09-01 00:05:1694class AccessibilityController;
sky07a24d42017-03-09 23:57:3095class AccessibilityDelegate;
Qiang Xua9591002018-03-15 22:29:3196class AccessibilityFocusRingController;
Ryo Hashimotobac835a2019-02-26 03:04:2897class ArcCustomTabController;
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;
Scott Violetbed23cb2018-08-22 19:56:12110class DisplayOutputProtection;
Steven Bennetts2a9b4382018-04-26 23:41:19111class CrosDisplayConfig;
Ahmed Fakhryc77ce402019-02-13 02:32:00112class DesksController;
Toni Barzicd6238312018-03-02 18:26:13113class DetachableBaseHandler;
Toni Barzic550419f2018-03-08 03:56:21114class DetachableBaseNotificationController;
robert.bradfordab052492015-05-06 11:09:56115class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:12116class DisplayConfigurationController;
Steven Bennetts9b21fa32018-04-13 23:45:55117class DisplayConfigurationObserver;
[email protected]18b21b2e2013-03-01 20:56:23118class DisplayErrorObserver;
Steven Bennetts3688c6032018-04-13 01:14:23119class DisplayPrefs;
Steven Bennetts7683e342018-01-02 21:29:52120class DisplayShutdownObserver;
Tetsui Ohkubo01421b32018-05-30 16:54:59121class DisplaySpeakerController;
Ahmed Fakhry4bf3f742018-02-06 17:33:36122class DockedMagnifierController;
[email protected]084b6bb2011-11-17 05:18:16123class DragDropController;
[email protected]e67291f12012-10-10 05:52:38124class EventClientImpl;
Mike Wassermanefbf3402018-04-26 00:41:32125class EventRewriterController;
[email protected]682990f2013-01-10 06:49:11126class EventTransformationHandler;
James Cookf5398842018-04-16 20:15:24127class FirstRunHelper;
sky79fa34712017-03-20 23:46:47128class FocusCycler;
[email protected]093b8d642014-04-03 20:59:28129class HighContrastController;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32130class HighlighterController;
James Cookbb026732017-06-09 23:01:55131class ImeController;
Xiyuan Xia5f1046e2018-06-01 16:04:44132class ImeFocusHandler;
Evan Stade1467204e2018-10-11 02:03:50133class ImmersiveContext;
David Tseng6792dc82018-05-04 19:18:41134class KeyAccessibilityEnabler;
sky79fa34712017-03-20 23:46:47135class KeyboardBrightnessControlDelegate;
Lucas Tenório6ca0ed72019-03-01 13:57:41136class KioskNextShellController;
Steven Bennettsa0ea30942018-10-11 22:27:51137class AshKeyboardController;
sammiequon203ae022016-09-18 17:23:42138class LaserPointerController;
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31139class LocaleUpdateController;
[email protected]093b8d642014-04-03 20:59:28140class LockStateController;
sky79fa34712017-03-20 23:46:47141class LogoutConfirmationController;
Jacob Dufaultffd9b0d2017-11-15 23:07:16142class LoginScreenController;
[email protected]093b8d642014-04-03 20:59:28143class MagnificationController;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03144class TabletModeController;
sky5ab16472017-03-21 19:35:08145class MediaController;
Becca Hughesc6a0a062018-10-25 16:54:13146class MediaNotificationController;
Evan Stade2c43a87b32017-08-31 17:53:10147class MessageCenterController;
[email protected]78d9630c2012-06-22 00:58:07148class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08149class MruWindowTracker;
Kyle Horimoto9fc84fc22018-04-27 19:45:15150class MultiDeviceNotificationPresenter;
sky5ab16472017-03-21 19:35:08151class NewWindowController;
afakhrye4fae852017-05-09 18:49:06152class NightLightController;
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01153class NoteTakingController;
[email protected]9ae32df2012-07-26 03:25:18154class OverlayEventFilter;
[email protected]093b8d642014-04-03 20:59:28155class PartialMagnificationController;
Sammie Quon95c6a1c2017-09-12 19:16:55156class PeripheralBatteryNotifier;
Qiang Xud77a90c2018-02-20 19:43:29157class PersistentWindowController;
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;
Abhishek Bhardwaj62aeaad62019-02-28 08:49:34161class NotificationReporter;
Qiang Xu36234e532018-04-11 04:54:02162class PowerPrefs;
[email protected]72bce522014-02-10 21:11:26163class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57164class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44165class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56166class RootWindowController;
jamescookac6724332017-03-21 02:54:43167class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46168class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27169class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23170class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06171class ScreenPositionController;
Tetsui Ohkubo54d50222018-05-10 01:58:11172class ScreenSwitchCheckController;
sky5ad143a2017-03-22 04:31:23173class SessionController;
sky5ad143a2017-03-22 04:31:23174class ShelfController;
sky5ad143a2017-03-22 04:31:23175class ShelfModel;
176class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16177class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23178struct ShellInitParams;
sky00c813f2017-03-08 22:48:55179class ShellObserver;
James Cook40f7d752018-05-25 18:21:58180class ShellState;
sky5b45ed82017-03-27 02:54:23181class ShutdownController;
yiyix90cfee22017-02-16 05:38:18182class SmsObserver;
xdaid4913762017-07-06 00:17:22183class SplitViewController;
[email protected]093b8d642014-04-03 20:59:28184class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18185class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27186class SystemModalContainerEventFilter;
Tetsui Ohkubo269b5792018-04-26 01:06:32187class SystemNotificationController;
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;
[email protected]ded58fd2013-10-09 07:56:55196class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28197class VideoDetector;
Yue Lia33960a2017-11-01 22:06:07198class VoiceInteractionController;
sky5b45ed82017-03-27 02:54:23199class VpnList;
sky07a24d42017-03-09 23:57:30200class WallpaperController;
Scott Violet737fb752018-04-11 15:35:22201class WaylandServerController;
Scott Violetb7f4df22018-05-17 04:43:12202class WindowServiceOwner;
sky5b45ed82017-03-27 02:54:23203class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28204class WindowPositioner;
Sammie Quon80e82a12019-01-23 19:55:22205class OverviewController;
msw607227f82016-08-30 17:22:39206class WindowTreeHostManager;
[email protected]2b99f8c2011-10-11 19:42:24207
sky494c6cbd2017-03-27 20:57:48208enum class LoginStatus;
209
[email protected]87b0d82e2011-10-07 21:02:59210// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59211// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38212//
213// Upon creation, the Shell sets itself as the RootWindow's delegate, which
214// takes ownership of the Shell.
Xiyuan Xia22b1a6c2017-04-18 22:46:01215class ASH_EXPORT Shell : public SessionObserver,
sky5ad143a2017-03-22 04:31:23216 public SystemModalContainerEventFilterDelegate,
sky27344382017-03-08 21:30:32217 public ui::EventTarget,
Thiago Farina3b086a02017-05-30 22:32:50218 public ::wm::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59219 public:
[email protected]093b8d642014-04-03 20:59:28220 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23221
Scott Violetc8a1c6c2017-11-29 23:17:36222 // Creates the single Shell instance.
223 static Shell* CreateInstance(ShellInitParams init_params);
[email protected]3266c2b92011-11-14 00:06:08224
225 // Should never be called before |CreateInstance()|.
skyb073203a2017-03-13 16:59:16226 static Shell* Get();
[email protected]3266c2b92011-11-14 00:06:08227
[email protected]b3b7bcd2012-03-06 19:35:45228 // Returns true if the ash shell has been instantiated.
229 static bool HasInstance();
230
[email protected]ef589af2011-12-03 01:07:15231 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56232
[email protected]d90b8392012-06-13 09:34:56233 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09234 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28235 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56236
thanhphc90f49ca2017-03-03 17:48:53237 // Returns the RootWindowController for the given display id. If there
238 // is no display for |display_id|, null is returned.
239 static RootWindowController* GetRootWindowControllerWithDisplayId(
240 int64_t display_id);
241
Scott Violet596bb46342017-06-21 14:43:13242 // Returns the root Window for the given display id. If there is no display
243 // for |display_id| null is returned.
244 static aura::Window* GetRootWindowForDisplayId(int64_t display_id);
245
[email protected]cf1c70e2012-08-30 01:13:02246 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09247 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23248 static RootWindowControllerList GetAllRootWindowControllers();
249
[email protected]bf9cdb362013-10-25 19:22:45250 // Returns the primary root Window. The primary root Window is the one that
251 // has a launcher.
252 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34253
sky27344382017-03-08 21:30:32254 // Returns the root window that newly created windows should be added to.
255 // Value can be temporarily overridden using ScopedRootWindowForNewWindows.
256 // NOTE: this returns the root, newly created window should be added to the
257 // appropriate container in the returned window.
258 static aura::Window* GetRootWindowForNewWindows();
mfomitcheva1a8aa62016-05-03 16:23:26259
[email protected]cf1c70e2012-08-30 01:13:02260 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13261 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23262
[email protected]bf9cdb362013-10-25 19:22:45263 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39264 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45265 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38266 int container_id);
[email protected]7b0f7502012-06-11 00:12:39267
James Cook7b7c6a52018-01-04 23:40:03268 // If a system-modal dialog window is currently open, returns the ID of the
269 // system modal window container that contains the window.
270 // If no system-modal dialogs are open it returns -1.
271 static int GetOpenSystemModalWindowContainerId();
272
273 // Returns true if a system-modal dialog window is currently open.
274 static bool IsSystemModalWindowOpen();
275
Scott Violet25848c12018-12-14 18:29:15276 // Returns true if |window| is a proxy window. A proxy window is a window that
277 // was created by way of a WindowService client (e.g. the keyboard shortcut
278 // viewer app under classic ash, or a browser window under mash).
279 static bool IsProxyWindow(aura::Window* window);
James Cooka6066972018-07-31 19:34:07280
Wenzhao Zang56c292932017-08-02 04:58:34281 // Registers all ash related local state prefs to the given |registry|.
Steven Bennettsca108512018-05-02 11:05:03282 static void RegisterLocalStatePrefs(PrefRegistrySimple* registry,
283 bool for_test);
Wenzhao Zang56c292932017-08-02 04:58:34284
Qiang Xu36234e532018-04-11 04:54:02285 // Registers all ash related signin/user profile prefs to the given
286 // |registry|. Can be called before Shell is initialized. When |for_test| is
287 // true this registers foreign user profile prefs (e.g. chrome prefs) as if
288 // they are owned by ash. This allows test code to read the pref values.
289 static void RegisterSigninProfilePrefs(PrefRegistrySimple* registry,
290 bool for_test = false);
291 static void RegisterUserProfilePrefs(PrefRegistrySimple* registry,
292 bool for_test = false);
afakhrye4fae852017-05-09 18:49:06293
Scott Violet737fb752018-04-11 15:35:22294 // If necessary, initializes the Wayland server.
Xiyuan Xia36197372018-04-25 00:45:17295 void InitWaylandServer(std::unique_ptr<exo::FileHelper> file_helper);
Scott Violet737fb752018-04-11 15:35:22296 void DestroyWaylandServer();
297
[email protected]57b8bb352012-01-11 05:11:46298 // Creates a default views::NonClientFrameView for use by windows in the
299 // Ash environment.
300 views::NonClientFrameView* CreateDefaultNonClientFrameView(
301 views::Widget* widget);
302
mswad28b252016-08-09 02:42:07303 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47304 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44305 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17306
[email protected]58868abf2014-01-17 23:45:33307 // Called when a casting session is started or stopped.
308 void OnCastingSessionStartedOrStopped(bool started);
309
[email protected]0e3e7cb2014-04-12 05:18:25310 // Called when a root window is created.
varkhac71444e52017-05-25 22:51:34311 void OnRootWindowAdded(aura::Window* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25312
Zach Helfinsteinbbb6bad2018-05-02 18:21:51313 // Called when dictation is activated.
314 void OnDictationStarted();
315
316 // Called when dictation is ended.
317 void OnDictationEnded();
318
Darren Shenad5dc722018-05-28 00:14:45319 // Enables the keyboard and associate it with the primary root window
320 // controller.
Darren Shenf62db77a2018-06-07 06:22:44321 void EnableKeyboard();
[email protected]51f438112013-11-18 19:32:50322
Darren Shenad5dc722018-05-28 00:14:45323 // Hides and disables the virtual keyboard.
Darren Shenf62db77a2018-06-07 06:22:44324 void DisableKeyboard();
[email protected]e1b299b2014-01-29 23:53:41325
Mitsuru Oshima0e9b7a62017-07-19 18:23:03326 // Test if TabletModeWindowManager is not enabled, and if
327 // TabletModeController is not currently setting a display rotation. Or if
[email protected]da285852014-05-27 19:53:43328 // the |resolution_notification_controller_| is not showing its confirmation
329 // dialog. If true then changes to display settings can be saved.
330 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43331
sky81a2d792017-03-17 19:14:39332 AcceleratorController* accelerator_controller() {
333 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58334 }
James Cookec144952017-09-01 00:05:16335 AccessibilityController* accessibility_controller() {
336 return accessibility_controller_.get();
337 }
sky07a24d42017-03-09 23:57:30338 AccessibilityDelegate* accessibility_delegate() {
339 return accessibility_delegate_.get();
340 }
Qiang Xua9591002018-03-15 22:29:31341 AccessibilityFocusRingController* accessibility_focus_ring_controller() {
342 return accessibility_focus_ring_controller_.get();
343 }
Qiang Xuf1400a362017-09-14 02:28:30344 ::wm::ActivationClient* activation_client();
Jiaquan He4b48f912018-03-01 03:59:39345 AppListControllerImpl* app_list_controller() {
346 return app_list_controller_.get();
347 }
Ryo Hashimotobac835a2019-02-26 03:04:28348 ArcCustomTabController* arc_custom_tab_controller() {
349 return arc_custom_tab_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(); }
Scott Violet6c0eb6962018-06-20 01:31:26371 service_manager::Connector* connector() { return connector_; }
Steven Bennetts2a9b4382018-04-26 23:41:19372 CrosDisplayConfig* cros_display_config() {
373 return cros_display_config_.get();
374 }
Qiang Xuf1400a362017-09-14 02:28:30375 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
Ahmed Fakhryc77ce402019-02-13 02:32:00376 DesksController* desks_controller() { return desks_controller_.get(); }
Toni Barzicd6238312018-03-02 18:26:13377 DetachableBaseHandler* detachable_base_handler() {
378 return detachable_base_handler_.get();
379 }
380
rjkroege72f8154f2016-10-29 00:49:02381 display::DisplayManager* display_manager() { return display_manager_.get(); }
Steven Bennetts3688c6032018-04-13 01:14:23382 DisplayPrefs* display_prefs() { return display_prefs_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12383 DisplayConfigurationController* display_configuration_controller() {
384 return display_configuration_controller_.get();
385 }
Qiang Xuf1400a362017-09-14 02:28:30386
Joone Hur60b9fd32019-02-23 00:10:26387 display::DisplayConfigurator* display_configurator();
388
Ahmed Fakhry46357342018-04-27 00:46:11389 DisplayColorManager* display_color_manager() {
390 return display_color_manager_.get();
391 }
Qiang Xuf1400a362017-09-14 02:28:30392 DisplayErrorObserver* display_error_observer() {
393 return display_error_observer_.get();
394 }
Scott Violetbed23cb2018-08-22 19:56:12395 DisplayOutputProtection* display_output_protection() {
396 return display_output_protection_.get();
397 }
Qiang Xuf1400a362017-09-14 02:28:30398
Ahmed Fakhry4bf3f742018-02-06 17:33:36399 DockedMagnifierController* docked_magnifier_controller();
Scott Violetac410622018-08-11 18:33:22400 aura::Env* aura_env() { return aura_env_; }
jamescookb8dcef522016-06-25 14:42:55401 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
Mike Wassermanefbf3402018-04-26 00:41:32402 EventRewriterController* event_rewriter_controller() {
403 return event_rewriter_controller_.get();
404 }
Qiang Xuf1400a362017-09-14 02:28:30405 EventClientImpl* event_client() { return event_client_.get(); }
406 EventTransformationHandler* event_transformation_handler() {
407 return event_transformation_handler_.get();
408 }
James Cookf5398842018-04-16 20:15:24409 FirstRunHelper* first_run_helper() { return first_run_helper_.get(); }
Scott Violet319cfb52018-05-23 18:35:28410 ::wm::FocusController* focus_controller() { return focus_controller_.get(); }
Scott Violet7dbdaeb2018-12-11 22:39:02411 ::wm::FocusRules* focus_rules() { return focus_rules_; }
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(); }
Evan Stade1467204e2018-10-11 02:03:50420 ImmersiveContext* immersive_context() { return immersive_context_.get(); }
David Tseng6792dc82018-05-04 19:18:41421 KeyAccessibilityEnabler* key_accessibility_enabler() {
422 return key_accessibility_enabler_.get();
423 }
sky79fa34712017-03-20 23:46:47424 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
425 return keyboard_brightness_control_delegate_.get();
426 }
Lucas Tenório6ca0ed72019-03-01 13:57:41427 KioskNextShellController* kiosk_next_shell_controller() {
428 return kiosk_next_shell_controller_.get();
429 }
Steven Bennettsa0ea30942018-10-11 22:27:51430 AshKeyboardController* ash_keyboard_controller() {
431 return ash_keyboard_controller_.get();
Steven Bennettsa00d64cc82018-10-04 00:17:22432 }
Qiang Xuf1400a362017-09-14 02:28:30433 LaserPointerController* laser_pointer_controller() {
434 return laser_pointer_controller_.get();
435 }
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31436 LocaleUpdateController* locale_update_controller() {
437 return locale_update_controller_.get();
sky79fa34712017-03-20 23:46:47438 }
Jacob Dufaultffd9b0d2017-11-15 23:07:16439 LoginScreenController* login_screen_controller() {
440 return login_screen_controller_.get();
xiaoyinh2bbdd102017-05-18 23:29:42441 }
Qiang Xuf1400a362017-09-14 02:28:30442 LockStateController* lock_state_controller() {
443 return lock_state_controller_.get();
444 }
445 LogoutConfirmationController* logout_confirmation_controller() {
446 return logout_confirmation_controller_.get();
447 }
448 MagnificationController* magnification_controller() {
449 return magnification_controller_.get();
450 }
sky5ab16472017-03-21 19:35:08451 MediaController* media_controller() { return media_controller_.get(); }
Becca Hughesc6a0a062018-10-25 16:54:13452 MediaNotificationController* media_notification_controller() {
453 return media_notification_controller_.get();
454 }
Evan Stade04c18d02017-10-20 20:53:22455 MessageCenterController* message_center_controller() {
456 return message_center_controller_.get();
457 }
Qiang Xuf1400a362017-09-14 02:28:30458 MouseCursorEventFilter* mouse_cursor_filter() {
459 return mouse_cursor_filter_.get();
460 }
sky5ab16472017-03-21 19:35:08461 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
462 NewWindowController* new_window_controller() {
463 return new_window_controller_.get();
464 }
afakhry9e0a18b32017-06-05 19:23:14465 NightLightController* night_light_controller();
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01466 NoteTakingController* note_taking_controller() {
467 return note_taking_controller_.get();
468 }
Evan Stade523f7fc2019-03-02 19:20:51469 NotificationReporter* notification_reporter() {
470 return notification_reporter_.get();
471 }
Qiang Xuf1400a362017-09-14 02:28:30472 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30473 PartialMagnificationController* partial_magnification_controller() {
474 return partial_magnification_controller_.get();
475 }
Qiang Xud8e897e2018-05-24 20:07:57476 PolicyRecommendationRestorer* policy_recommendation_restorer() {
477 return policy_recommendation_restorer_.get();
478 }
Qiang Xuf1400a362017-09-14 02:28:30479 PowerButtonController* power_button_controller() {
480 return power_button_controller_.get();
481 }
482 PowerEventObserver* power_event_observer() {
483 return power_event_observer_.get();
484 }
485 ResizeShadowController* resize_shadow_controller() {
486 return resize_shadow_controller_.get();
487 }
488 ResolutionNotificationController* resolution_notification_controller() {
489 return resolution_notification_controller_.get();
490 }
491 ScreenshotController* screenshot_controller() {
492 return screenshot_controller_.get();
493 }
494 ScreenLayoutObserver* screen_layout_observer() {
495 return screen_layout_observer_.get();
496 }
497 ScreenOrientationController* screen_orientation_controller() {
498 return screen_orientation_controller_.get();
499 }
500 ScreenPinningController* screen_pinning_controller() {
501 return screen_pinning_controller_.get();
502 }
Tetsui Ohkubo54d50222018-05-10 01:58:11503 ScreenSwitchCheckController* screen_switch_check_controller() {
504 return screen_switch_check_controller_.get();
505 }
sky5ad143a2017-03-22 04:31:23506 SessionController* session_controller() { return session_controller_.get(); }
Sammie Quon557418662018-04-25 18:45:51507 ::wm::ShadowController* shadow_controller() {
508 return shadow_controller_.get();
509 }
sky5ad143a2017-03-22 04:31:23510 ShelfController* shelf_controller() { return shelf_controller_.get(); }
sky5ad143a2017-03-22 04:31:23511 ShelfModel* shelf_model();
Qiang Xuf1400a362017-09-14 02:28:30512 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
James Cook40f7d752018-05-25 18:21:58513 ShellState* shell_state() { return shell_state_.get(); }
sky5b45ed82017-03-27 02:54:23514 ShutdownController* shutdown_controller() {
515 return shutdown_controller_.get();
516 }
Qiang Xuf1400a362017-09-14 02:28:30517 SplitViewController* split_view_controller() {
518 return split_view_controller_.get();
519 }
520 StickyKeysController* sticky_keys_controller() {
521 return sticky_keys_controller_.get();
522 }
Steven Bennetts7fb8a992018-06-12 00:15:05523 SystemNotificationController* system_notification_controller() {
524 return system_notification_controller_.get();
525 }
Tetsui Ohkubo21722932018-03-02 02:56:56526 SystemTrayModel* system_tray_model() { return system_tray_model_.get(); }
sky5b45ed82017-03-27 02:54:23527 SystemTrayNotifier* system_tray_notifier() {
528 return system_tray_notifier_.get();
529 }
Sammie Quona6f96402017-08-24 01:08:37530 TabletModeController* tablet_mode_controller() {
531 return tablet_mode_controller_.get();
532 }
Scott Violet3c554ae2017-12-13 02:25:41533 TimeToFirstPresentRecorder* time_to_first_present_recorder() {
534 return time_to_first_present_recorder_.get();
535 }
Qiang Xuf1400a362017-09-14 02:28:30536 ToastManager* toast_manager() { return toast_manager_.get(); }
[email protected]a1b7a822013-02-23 19:08:04537 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33538 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11539 }
Qiang Xuf1400a362017-09-14 02:28:30540 TouchDevicesController* touch_devices_controller() {
541 return touch_devices_controller_.get();
chirantan40e4cd82015-02-19 01:08:19542 }
kylechar55f0eaf22017-01-11 22:57:37543 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49544 return touch_transformer_controller_.get();
545 }
Qiang Xuf1400a362017-09-14 02:28:30546 TrayAction* tray_action() { return tray_action_.get(); }
547 TrayBluetoothHelper* tray_bluetooth_helper() {
548 return tray_bluetooth_helper_.get();
sammiequon203ae022016-09-18 17:23:42549 }
Evan Stade04c18d02017-10-20 20:53:22550 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30551 VideoDetector* video_detector() { return video_detector_.get(); }
Yue Lia33960a2017-11-01 22:06:07552 VoiceInteractionController* voice_interaction_controller() {
553 return voice_interaction_controller_.get();
554 }
Qiang Xuf1400a362017-09-14 02:28:30555 VpnList* vpn_list() { return vpn_list_.get(); }
556 WallpaperController* wallpaper_controller() {
557 return wallpaper_controller_.get();
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32558 }
Qiang Xuf1400a362017-09-14 02:28:30559 WindowCycleController* window_cycle_controller() {
560 return window_cycle_controller_.get();
mukai19274bdd2015-02-24 22:37:48561 }
Qiang Xuf1400a362017-09-14 02:28:30562 WindowPositioner* window_positioner() { return window_positioner_.get(); }
Sammie Quon80e82a12019-01-23 19:55:22563 OverviewController* overview_controller() {
564 return overview_controller_.get();
[email protected]8b7ba87b2012-09-01 00:40:40565 }
Scott Violetb7f4df22018-05-17 04:43:12566 WindowServiceOwner* window_service_owner() {
567 return window_service_owner_.get();
Scott Violet7eb50d22018-05-04 17:12:18568 }
Qiang Xuf1400a362017-09-14 02:28:30569 WindowTreeHostManager* window_tree_host_manager() {
570 return window_tree_host_manager_.get();
[email protected]682990f2013-01-10 06:49:11571 }
[email protected]77f7c132012-11-15 06:52:54572
Mitsuru Oshima89e5c1352018-01-17 07:29:39573 ToplevelWindowEventHandler* toplevel_window_event_handler() {
574 return toplevel_window_event_handler_.get();
575 }
576
[email protected]c758fbf2012-03-25 22:53:59577 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01578 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59579 void UpdateShelfVisibility();
580
[email protected]a0afeb12012-12-10 22:57:09581 // Does the primary display have status area?
582 bool HasPrimaryStatusArea();
583
[email protected]f9466702012-09-17 16:35:27584 // Starts the animation that occurs on first login.
585 void DoInitialWorkspaceAnimation();
586
yawanodc5533b32017-02-23 11:04:38587 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
588
Weidong Guod07448f2017-10-18 03:35:18589 // Updates cursor compositing on/off. Native cursor is disabled when cursor
[email protected]87ec2202014-02-06 06:24:27590 // compositing is enabled, and vice versa.
Weidong Guod07448f2017-10-18 03:35:18591 void UpdateCursorCompositingEnabled();
[email protected]87ec2202014-02-06 06:24:27592
Weidong Guod07448f2017-10-18 03:35:18593 // Force setting compositing on/off without checking dependency.
594 void SetCursorCompositingEnabled(bool enabled);
xdaid4913762017-07-06 00:17:22595
596 // Returns true if split view mode is active.
597 bool IsSplitViewModeActive() const;
598
James Cookfa4838e2018-08-08 16:30:15599 // Shows the context menu for the wallpaper or shelf at |location_in_screen|.
600 void ShowContextMenu(const gfx::Point& location_in_screen,
601 ui::MenuSourceType source_type);
602
sky00c813f2017-03-08 22:48:55603 void AddShellObserver(ShellObserver* observer);
604 void RemoveShellObserver(ShellObserver* observer);
605
sky5ad143a2017-03-22 04:31:23606 // Called when the login status changes.
607 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
608 void UpdateAfterLoginStatusChange(LoginStatus status);
609
xdaid4913762017-07-06 00:17:22610 // Notifies observers that split view mode is about to be started (before the
611 // window gets snapped and activated).
612 void NotifySplitViewModeStarting();
613
Xiaoqian Daibf3771f2018-03-13 18:21:46614 // Notifies observers that split view mode has been started.
615 void NotifySplitViewModeStarted();
616
xdaid4913762017-07-06 00:17:22617 // Notifies observers that split view mode has ended.
618 void NotifySplitViewModeEnded();
619
sky00c813f2017-03-08 22:48:55620 // Notifies observers that fullscreen mode has changed for |root_window|.
varkhac71444e52017-05-25 22:51:34621 void NotifyFullscreenStateChanged(bool is_fullscreen,
622 aura::Window* root_window);
sky00c813f2017-03-08 22:48:55623
624 // Notifies observers that |pinned_window| changed its pinned window state.
varkha19d7e6c52017-05-25 21:15:30625 void NotifyPinnedStateChanged(aura::Window* pinned_window);
sky00c813f2017-03-08 22:48:55626
sky00c813f2017-03-08 22:48:55627 // Notifies observers that |root_window|'s shelf changed alignment.
628 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18629 void NotifyShelfAlignmentChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55630
631 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
632 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18633 void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55634
jamescook518dccbd2017-05-18 04:57:07635 // Used to provide better error messages for Shell::Get() under mash.
636 static void SetIsBrowserProcessWithMash();
637
[email protected]2b4cd302012-02-24 20:21:13638 private:
[email protected]c39be8f2012-06-15 22:58:36639 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09640 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
641 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47642 friend class AcceleratorControllerTest;
Sam McNallya853cd82017-08-30 01:55:10643 friend class AshTestHelper;
[email protected]093b8d642014-04-03 20:59:28644 friend class RootWindowController;
sky27344382017-03-08 21:30:32645 friend class ScopedRootWindowForNewWindows;
James Cook317781a02017-07-18 02:08:06646 friend class ShellTestApi;
sky27344382017-03-08 21:30:32647 friend class SmsObserverTest;
[email protected]ad0c8722012-03-02 20:17:45648
skyb073203a2017-03-13 16:59:16649 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
Scott Violete5c79f52018-07-31 00:10:17650 service_manager::Connector* connector);
dcheng1f4538e2014-10-27 23:57:05651 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08652
Scott Violet7e33efc2018-08-29 22:30:15653 void Init(ui::ContextFactory* context_factory,
654 ui::ContextFactoryPrivate* context_factory_private,
655 std::unique_ptr<base::Value> initial_display_prefs,
Jun Mukaif2357792018-12-20 19:58:00656 std::unique_ptr<ws::GpuInterfaceProvider> gpu_interface_provider,
657 std::unique_ptr<keyboard::KeyboardUIFactory> keyboard_ui_factory);
[email protected]b0639282011-12-22 21:12:27658
Steven Bennetts7683e342018-01-02 21:29:52659 // Initializes the display manager and related components.
660 void InitializeDisplayManager();
661
[email protected]a273d33a2013-10-17 12:41:21662 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26663 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56664
skyabcae812017-01-18 17:01:34665 // Destroys all child windows including widgets across all roots.
666 void CloseAllRootWindowChildWindows();
667
hariank0dd03dd2016-07-14 23:47:33668 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05669 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27670
[email protected]5097e69c2012-10-30 22:08:41671 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05672 bool CanAcceptEvent(const ui::Event& event) override;
673 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11674 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05675 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e69c2012-10-30 22:08:41676
Thiago Farina3b086a02017-05-30 22:32:50677 // wm::ActivationChangeObserver:
sky27344382017-03-08 21:30:32678 void OnWindowActivated(ActivationReason reason,
679 aura::Window* gained_active,
680 aura::Window* lost_active) override;
681
Xiyuan Xia22b1a6c2017-04-18 22:46:01682 // SessionObserver:
Steven Bennettsbadc3092018-05-24 21:26:01683 void OnFirstSessionStarted() override;
Xiyuan Xiab64fd0a2017-04-13 17:53:14684 void OnSessionStateChanged(session_manager::SessionState state) override;
685 void OnLoginStatusChanged(LoginStatus login_status) override;
686 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23687
Sam McNallyf4dab612017-08-16 03:06:33688 // Callback for prefs::ConnectToPrefService.
Sam McNallye36abbc2017-07-20 01:04:28689 void OnLocalStatePrefServiceInitialized(
690 std::unique_ptr<::PrefService> pref_service);
tibellb93c729b2017-03-30 00:45:09691
[email protected]cac10fc62011-10-07 23:22:56692 static Shell* instance_;
693
Scott Violetac410622018-08-11 18:33:22694 // |owned_aura_env_| is non-null if Shell created aura::Env. Shell creates
695 // aura::Env only in single-process-mash mode.
696 std::unique_ptr<aura::Env> owned_aura_env_;
697
698 // This is either |owned_aura_env_|, or Env::GetInstance().
699 aura::Env* aura_env_;
700
[email protected]1aad3322012-06-06 06:37:09701 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11702 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14703
Mike Wassermanefbf3402018-04-26 00:41:32704 std::unique_ptr<EventRewriterController> event_rewriter_controller_;
705
dchenga94547472016-04-08 08:41:11706 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11707 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24708
sky81a2d792017-03-17 19:14:39709 std::unique_ptr<AcceleratorController> accelerator_controller_;
James Cookec144952017-09-01 00:05:16710 std::unique_ptr<AccessibilityController> accessibility_controller_;
sky07a24d42017-03-09 23:57:30711 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
Qiang Xua9591002018-03-15 22:29:31712 std::unique_ptr<AccessibilityFocusRingController>
713 accessibility_focus_ring_controller_;
Jiaquan He4b48f912018-03-01 03:59:39714 std::unique_ptr<AppListControllerImpl> app_list_controller_;
Ryo Hashimotobac835a2019-02-26 03:04:28715 std::unique_ptr<ArcCustomTabController> arc_custom_tab_controller_;
Jeffrey Kardatzkef108f022018-04-17 17:52:35716 std::unique_ptr<AshDBusServices> ash_dbus_services_;
Scott Violetd64dac12017-06-02 21:50:08717 std::unique_ptr<AshDisplayController> ash_display_controller_;
David Black00fdce32018-05-10 20:59:14718 std::unique_ptr<AssistantController> assistant_controller_;
Toni Barzic9d0c82f42017-12-06 00:53:52719 std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_;
sky79fa34712017-03-20 23:46:47720 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
721 std::unique_ptr<CastConfigController> cast_config_;
Steven Bennetts2a9b4382018-04-26 23:41:19722 std::unique_ptr<CrosDisplayConfig> cros_display_config_;
Scott Violete5c79f52018-07-31 00:10:17723 service_manager::Connector* const connector_;
Ahmed Fakhryc77ce402019-02-13 02:32:00724 std::unique_ptr<DesksController> desks_controller_;
Toni Barzicd6238312018-03-02 18:26:13725 std::unique_ptr<DetachableBaseHandler> detachable_base_handler_;
Toni Barzic550419f2018-03-08 03:56:21726 std::unique_ptr<DetachableBaseNotificationController>
727 detachable_base_notification_controller_;
Tetsui Ohkubo01421b32018-05-30 16:54:59728 std::unique_ptr<DisplaySpeakerController> display_speaker_controller_;
dchenga94547472016-04-08 08:41:11729 std::unique_ptr<DragDropController> drag_drop_controller_;
James Cookf5398842018-04-16 20:15:24730 std::unique_ptr<FirstRunHelper> first_run_helper_;
sky79fa34712017-03-20 23:46:47731 std::unique_ptr<FocusCycler> focus_cycler_;
James Cookf0c78fc2017-06-15 14:42:55732 std::unique_ptr<ImeController> ime_controller_;
Xiyuan Xia5f1046e2018-06-01 16:04:44733 std::unique_ptr<ImeFocusHandler> ime_focus_handler_;
Evan Stade1467204e2018-10-11 02:03:50734 std::unique_ptr<ImmersiveContext> immersive_context_;
sky79fa34712017-03-20 23:46:47735 std::unique_ptr<KeyboardBrightnessControlDelegate>
736 keyboard_brightness_control_delegate_;
Lucas Tenório6ca0ed72019-03-01 13:57:41737 std::unique_ptr<KioskNextShellController> kiosk_next_shell_controller_;
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31738 std::unique_ptr<LocaleUpdateController> locale_update_controller_;
Jacob Dufaultffd9b0d2017-11-15 23:07:16739 std::unique_ptr<LoginScreenController> login_screen_controller_;
sky79fa34712017-03-20 23:46:47740 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03741 std::unique_ptr<TabletModeController> tablet_mode_controller_;
sky5ab16472017-03-21 19:35:08742 std::unique_ptr<MediaController> media_controller_;
Becca Hughesc6a0a062018-10-25 16:54:13743 std::unique_ptr<MediaNotificationController> media_notification_controller_;
sky5ab16472017-03-21 19:35:08744 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
Kyle Horimoto9fc84fc22018-04-27 19:45:15745 std::unique_ptr<MultiDeviceNotificationPresenter>
746 multidevice_notification_presenter_;
sky5ab16472017-03-21 19:35:08747 std::unique_ptr<NewWindowController> new_window_controller_;
dchenga94547472016-04-08 08:41:11748 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
sky5ad143a2017-03-22 04:31:23749 std::unique_ptr<SessionController> session_controller_;
afakhrye4fae852017-05-09 18:49:06750 std::unique_ptr<NightLightController> night_light_controller_;
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01751 std::unique_ptr<NoteTakingController> note_taking_controller_;
Qiang Xud8e897e2018-05-24 20:07:57752 std::unique_ptr<PolicyRecommendationRestorer> policy_recommendation_restorer_;
Tetsui Ohkubo54d50222018-05-10 01:58:11753 std::unique_ptr<ScreenSwitchCheckController> screen_switch_check_controller_;
sky5ad143a2017-03-22 04:31:23754 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23755 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16756 std::unique_ptr<ShellDelegate> shell_delegate_;
James Cook40f7d752018-05-25 18:21:58757 std::unique_ptr<ShellState> shell_state_;
sky5b45ed82017-03-27 02:54:23758 std::unique_ptr<ShutdownController> shutdown_controller_;
Tetsui Ohkubo269b5792018-04-26 01:06:32759 std::unique_ptr<SystemNotificationController> system_notification_controller_;
Tetsui Ohkubo21722932018-03-02 02:56:56760 std::unique_ptr<SystemTrayModel> system_tray_model_;
sky5b45ed82017-03-27 02:54:23761 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
sky07a24d42017-03-09 23:57:30762 std::unique_ptr<ToastManager> toast_manager_;
Qiang Xuf1400a362017-09-14 02:28:30763 std::unique_ptr<TouchDevicesController> touch_devices_controller_;
Scott Violet3c554ae2017-12-13 02:25:41764 std::unique_ptr<TimeToFirstPresentRecorder> time_to_first_present_recorder_;
tbarzicc78da1ff92017-05-08 20:46:15765 std::unique_ptr<TrayAction> tray_action_;
Yue Lia33960a2017-11-01 22:06:07766 std::unique_ptr<VoiceInteractionController> voice_interaction_controller_;
sky5b45ed82017-03-27 02:54:23767 std::unique_ptr<VpnList> vpn_list_;
sky07a24d42017-03-09 23:57:30768 std::unique_ptr<WallpaperController> wallpaper_controller_;
sky5b45ed82017-03-27 02:54:23769 std::unique_ptr<WindowCycleController> window_cycle_controller_;
Sammie Quon80e82a12019-01-23 19:55:22770 std::unique_ptr<OverviewController> overview_controller_;
Scott Violet7dbdaeb2018-12-11 22:39:02771 // Owned by |focus_controller_|.
772 ::wm::FocusRules* focus_rules_ = nullptr;
dchenga94547472016-04-08 08:41:11773 std::unique_ptr<::wm::ShadowController> shadow_controller_;
774 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
775 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
Sam McNallya853cd82017-08-30 01:55:10776 std::unique_ptr<PrefService> local_state_;
dchenga94547472016-04-08 08:41:11777 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
dchenga94547472016-04-08 08:41:11778 std::unique_ptr<PowerButtonController> power_button_controller_;
779 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11780 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
781 std::unique_ptr<VideoDetector> video_detector_;
Scott Violet737fb752018-04-11 15:35:22782 std::unique_ptr<WaylandServerController> wayland_server_controller_;
Scott Violetb7f4df22018-05-17 04:43:12783 std::unique_ptr<WindowServiceOwner> window_service_owner_;
dchenga94547472016-04-08 08:41:11784 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
Qiang Xud77a90c2018-02-20 19:43:29785 std::unique_ptr<PersistentWindowController> persistent_window_controller_;
dchenga94547472016-04-08 08:41:11786 std::unique_ptr<HighContrastController> high_contrast_controller_;
787 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11788 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32789 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34790
oshima5a296e82016-04-29 01:32:27791 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45792
dchenga94547472016-04-08 08:41:11793 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
794 std::unique_ptr<ScreenPositionController> screen_position_controller_;
795 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
796 std::unique_ptr<EventClientImpl> event_client_;
797 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13798
[email protected]0b0b0742012-02-16 13:23:45799 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26800 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11801 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45802
[email protected]3537d472014-01-15 05:45:31803 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11804 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31805
[email protected]435b212e2012-04-05 19:43:37806 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11807 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37808
[email protected]745816be2011-11-22 05:08:30809 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11810 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30811
rjkroege72f8154f2016-10-29 00:49:02812 std::unique_ptr<display::DisplayManager> display_manager_;
Steven Bennetts3688c6032018-04-13 01:14:23813 std::unique_ptr<DisplayPrefs> display_prefs_;
dchenga94547472016-04-08 08:41:11814 std::unique_ptr<DisplayConfigurationController>
815 display_configuration_controller_;
Steven Bennetts9b21fa32018-04-13 23:45:55816 std::unique_ptr<DisplayConfigurationObserver> display_configuration_observer_;
[email protected]6bdf7952012-11-14 10:10:58817
hidehiko6821ca42016-06-18 11:12:23818 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56819
Sammie Quon95c6a1c2017-09-12 19:16:55820 std::unique_ptr<PeripheralBatteryNotifier> peripheral_battery_notifier_;
dchenga94547472016-04-08 08:41:11821 std::unique_ptr<PowerEventObserver> power_event_observer_;
Qiang Xu36234e532018-04-11 04:54:02822 std::unique_ptr<PowerPrefs> power_prefs_;
dchenga94547472016-04-08 08:41:11823 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
824 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
825 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
826 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34827 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11828 std::unique_ptr<BluetoothNotificationController>
[email protected]b31427252014-03-04 06:59:50829 bluetooth_notification_controller_;
Sonny Sasaka55f69fc2017-08-28 21:29:37830 std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_;
jamescookac6724332017-03-21 02:54:43831 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
Steven Bennettsa0ea30942018-10-11 22:27:51832 std::unique_ptr<AshKeyboardController> ash_keyboard_controller_;
[email protected]70b3e7d52012-06-02 22:12:25833 // Controls video output device state.
Scott Violetbed23cb2018-08-22 19:56:12834 std::unique_ptr<DisplayOutputProtection> display_output_protection_;
dchenga94547472016-04-08 08:41:11835 std::unique_ptr<DisplayColorManager> display_color_manager_;
836 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
837 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58838
[email protected]c1234a42013-08-20 09:35:40839 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35840 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2efd2014-02-09 22:50:39841
kylechar98748a52016-12-03 01:33:22842 // Listens for shutdown and updates DisplayConfigurator.
Steven Bennetts7683e342018-01-02 21:29:52843 std::unique_ptr<DisplayShutdownObserver> display_shutdown_observer_;
kylechar98748a52016-12-03 01:33:22844
yiyix90cfee22017-02-16 05:38:18845 // Listens for new sms messages and shows notifications.
846 std::unique_ptr<SmsObserver> sms_observer_;
847
derat94887a22017-01-20 18:17:25848 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11849 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13850 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51851
kylechar55f0eaf22017-01-11 22:57:37852 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39853
dchenga94547472016-04-08 08:41:11854 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
855 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42856 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
857 std::unique_ptr<PartialMagnificationController>
858 partial_magnification_controller_;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32859 std::unique_ptr<HighlighterController> highlighter_controller_;
[email protected]70b3e7d52012-06-02 22:12:25860
Ahmed Fakhry4bf3f742018-02-06 17:33:36861 std::unique_ptr<DockedMagnifierController> docked_magnifier_controller_;
862
xdaid4913762017-07-06 00:17:22863 // The split view controller for Chrome OS in tablet mode.
864 std::unique_ptr<SplitViewController> split_view_controller_;
865
[email protected]c0ff0342013-02-27 00:41:29866 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
867 // pointer to vend to test code.
erg36cfb952017-06-21 19:41:45868 NativeCursorManagerAsh* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03869
derat94887a22017-01-20 18:17:25870 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35871 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11872 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19873
David Tseng6792dc82018-05-04 19:18:41874 // Enables spoken feedback accessibility based on a press and hold of both
875 // volume keys.
876 std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_;
877
[email protected]852a55d2012-10-17 13:30:30878 // For testing only: simulate that a modal window is open
James Cook7b7c6a52018-01-04 23:40:03879 bool simulate_modal_window_open_for_test_ = false;
[email protected]852a55d2012-10-17 13:30:30880
Evan Stade2c43a87b32017-08-31 17:53:10881 std::unique_ptr<MessageCenterController> message_center_controller_;
882
Abhishek Bhardwaj62aeaad62019-02-28 08:49:34883 std::unique_ptr<NotificationReporter> notification_reporter_;
884
Trent Apteda250ec3ab2018-08-19 08:52:19885 base::ObserverList<ShellObserver>::Unchecked shell_observers_;
sky00c813f2017-03-08 22:48:55886
Sam McNallye36abbc2017-07-20 01:04:28887 base::WeakPtrFactory<Shell> weak_factory_;
888
[email protected]87b0d82e2011-10-07 21:02:59889 DISALLOW_COPY_AND_ASSIGN(Shell);
890};
891
[email protected]55f593352011-12-24 05:42:46892} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59893
[email protected]b65bdda2011-12-23 23:35:31894#endif // ASH_SHELL_H_