blob: f3f29391fd49ff2b813eec96c8997d9d4f8883c3 [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;
[email protected]86f2b5e2012-11-14 20:37:0081class ShadowController;
[email protected]b5756e22012-11-30 01:32:0282class VisibilityController;
[email protected]0c2dc012012-12-02 00:00:2383class WindowModalityController;
Alex Newcomer8fdcb9342017-08-08 18:48:4484} // namespace wm
[email protected]87b0d82e2011-10-07 21:02:5985
Scott Violet7e33efc2018-08-29 22:30:1586namespace ws {
87class GpuInterfaceProvider;
88}
89
[email protected]55f593352011-12-24 05:42:4690namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5991
sky81a2d792017-03-17 19:14:3992class AcceleratorController;
James Cookec144952017-09-01 00:05:1693class AccessibilityController;
sky07a24d42017-03-09 23:57:3094class AccessibilityDelegate;
Qiang Xua9591002018-03-15 22:29:3195class AccessibilityFocusRingController;
Ryo Hashimotobac835a2019-02-26 03:04:2896class ArcCustomTabController;
Jeffrey Kardatzkef108f022018-04-17 17:52:3597class AshDBusServices;
Scott Violetd64dac12017-06-02 21:50:0898class AshDisplayController;
James Cooka8963fb2019-03-09 01:00:4099class AshFocusRules;
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;
Michael Giuffrida2d922de2019-03-08 00:53:14131class HomeScreenController;
James Cookbb026732017-06-09 23:01:55132class ImeController;
Shu Chene21541f02019-03-28 01:25:07133class ImeEngineFactoryRegistry;
Xiyuan Xia5f1046e2018-06-01 16:04:44134class ImeFocusHandler;
Evan Stade1467204e2018-10-11 02:03:50135class ImmersiveContext;
David Tseng6792dc82018-05-04 19:18:41136class KeyAccessibilityEnabler;
sky79fa34712017-03-20 23:46:47137class KeyboardBrightnessControlDelegate;
Lucas Tenório6ca0ed72019-03-01 13:57:41138class KioskNextShellController;
Steven Bennettsa0ea30942018-10-11 22:27:51139class AshKeyboardController;
sammiequon203ae022016-09-18 17:23:42140class LaserPointerController;
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31141class LocaleUpdateController;
[email protected]093b8d642014-04-03 20:59:28142class LockStateController;
sky79fa34712017-03-20 23:46:47143class LogoutConfirmationController;
Jacob Dufaultffd9b0d2017-11-15 23:07:16144class LoginScreenController;
[email protected]093b8d642014-04-03 20:59:28145class MagnificationController;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03146class TabletModeController;
sky5ab16472017-03-21 19:35:08147class MediaController;
Becca Hughesc6a0a062018-10-25 16:54:13148class MediaNotificationController;
Evan Stade2c43a87b32017-08-31 17:53:10149class MessageCenterController;
[email protected]78d9630c2012-06-22 00:58:07150class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08151class MruWindowTracker;
Kyle Horimoto9fc84fc22018-04-27 19:45:15152class MultiDeviceNotificationPresenter;
sky5ab16472017-03-21 19:35:08153class NewWindowController;
afakhrye4fae852017-05-09 18:49:06154class NightLightController;
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01155class NoteTakingController;
[email protected]9ae32df2012-07-26 03:25:18156class OverlayEventFilter;
[email protected]093b8d642014-04-03 20:59:28157class PartialMagnificationController;
Sammie Quon95c6a1c2017-09-12 19:16:55158class PeripheralBatteryNotifier;
Qiang Xud77a90c2018-02-20 19:43:29159class PersistentWindowController;
Qiang Xud8e897e2018-05-24 20:07:57160class PolicyRecommendationRestorer;
[email protected]093b8d642014-04-03 20:59:28161class PowerButtonController;
[email protected]51625052013-10-10 01:40:16162class PowerEventObserver;
Abhishek Bhardwaj62aeaad62019-02-28 08:49:34163class NotificationReporter;
Qiang Xu36234e532018-04-11 04:54:02164class PowerPrefs;
[email protected]72bce522014-02-10 21:11:26165class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57166class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44167class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56168class RootWindowController;
jamescookac6724332017-03-21 02:54:43169class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46170class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27171class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23172class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06173class ScreenPositionController;
Tetsui Ohkubo54d50222018-05-10 01:58:11174class ScreenSwitchCheckController;
sky5ad143a2017-03-22 04:31:23175class SessionController;
sky5ad143a2017-03-22 04:31:23176class ShelfController;
sky5ad143a2017-03-22 04:31:23177class ShelfModel;
178class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16179class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23180struct ShellInitParams;
sky00c813f2017-03-08 22:48:55181class ShellObserver;
James Cook40f7d752018-05-25 18:21:58182class ShellState;
sky5b45ed82017-03-27 02:54:23183class ShutdownController;
yiyix90cfee22017-02-16 05:38:18184class SmsObserver;
xdaid4913762017-07-06 00:17:22185class SplitViewController;
[email protected]093b8d642014-04-03 20:59:28186class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18187class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27188class SystemModalContainerEventFilter;
Tetsui Ohkubo269b5792018-04-26 01:06:32189class SystemNotificationController;
Tetsui Ohkubo21722932018-03-02 02:56:56190class SystemTrayModel;
sky5b45ed82017-03-27 02:54:23191class SystemTrayNotifier;
Scott Violet3c554ae2017-12-13 02:25:41192class TimeToFirstPresentRecorder;
[email protected]093b8d642014-04-03 20:59:28193class ToplevelWindowEventHandler;
sky07a24d42017-03-09 23:57:30194class ToastManager;
Qiang Xuf1400a362017-09-14 02:28:30195class TouchDevicesController;
tbarzicc78da1ff92017-05-08 20:46:15196class TrayAction;
jamescookac6724332017-03-21 02:54:43197class TrayBluetoothHelper;
[email protected]ded58fd2013-10-09 07:56:55198class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28199class VideoDetector;
Yue Lia33960a2017-11-01 22:06:07200class VoiceInteractionController;
sky5b45ed82017-03-27 02:54:23201class VpnList;
sky07a24d42017-03-09 23:57:30202class WallpaperController;
Scott Violet737fb752018-04-11 15:35:22203class WaylandServerController;
Scott Violetb7f4df22018-05-17 04:43:12204class WindowServiceOwner;
sky5b45ed82017-03-27 02:54:23205class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28206class WindowPositioner;
Sammie Quon80e82a12019-01-23 19:55:22207class OverviewController;
msw607227f82016-08-30 17:22:39208class WindowTreeHostManager;
[email protected]2b99f8c2011-10-11 19:42:24209
sky494c6cbd2017-03-27 20:57:48210enum 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
Scott Violet25848c12018-12-14 18:29:15278 // Returns true if |window| is a proxy window. A proxy window is a window that
279 // was created by way of a WindowService client (e.g. the keyboard shortcut
280 // viewer app under classic ash, or a browser window under mash).
281 static bool IsProxyWindow(aura::Window* window);
James Cooka6066972018-07-31 19:34:07282
Wenzhao Zang56c292932017-08-02 04:58:34283 // Registers all ash related local state prefs to the given |registry|.
Steven Bennettsca108512018-05-02 11:05:03284 static void RegisterLocalStatePrefs(PrefRegistrySimple* registry,
285 bool for_test);
Wenzhao Zang56c292932017-08-02 04:58:34286
Qiang Xu36234e532018-04-11 04:54:02287 // Registers all ash related signin/user profile prefs to the given
288 // |registry|. Can be called before Shell is initialized. When |for_test| is
289 // true this registers foreign user profile prefs (e.g. chrome prefs) as if
290 // they are owned by ash. This allows test code to read the pref values.
291 static void RegisterSigninProfilePrefs(PrefRegistrySimple* registry,
292 bool for_test = false);
293 static void RegisterUserProfilePrefs(PrefRegistrySimple* registry,
294 bool for_test = false);
afakhrye4fae852017-05-09 18:49:06295
Scott Violet737fb752018-04-11 15:35:22296 // If necessary, initializes the Wayland server.
Xiyuan Xia36197372018-04-25 00:45:17297 void InitWaylandServer(std::unique_ptr<exo::FileHelper> file_helper);
Scott Violet737fb752018-04-11 15:35:22298 void DestroyWaylandServer();
299
[email protected]57b8bb352012-01-11 05:11:46300 // Creates a default views::NonClientFrameView for use by windows in the
301 // Ash environment.
302 views::NonClientFrameView* CreateDefaultNonClientFrameView(
303 views::Widget* widget);
304
mswad28b252016-08-09 02:42:07305 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47306 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44307 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17308
[email protected]58868abf2014-01-17 23:45:33309 // Called when a casting session is started or stopped.
310 void OnCastingSessionStartedOrStopped(bool started);
311
[email protected]0e3e7cb2014-04-12 05:18:25312 // Called when a root window is created.
varkhac71444e52017-05-25 22:51:34313 void OnRootWindowAdded(aura::Window* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25314
Zach Helfinsteinbbb6bad2018-05-02 18:21:51315 // Called when dictation is activated.
316 void OnDictationStarted();
317
318 // Called when dictation is ended.
319 void OnDictationEnded();
320
Mitsuru Oshima0e9b7a62017-07-19 18:23:03321 // Test if TabletModeWindowManager is not enabled, and if
322 // TabletModeController is not currently setting a display rotation. Or if
[email protected]da285852014-05-27 19:53:43323 // the |resolution_notification_controller_| is not showing its confirmation
324 // dialog. If true then changes to display settings can be saved.
325 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43326
sky81a2d792017-03-17 19:14:39327 AcceleratorController* accelerator_controller() {
328 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58329 }
James Cookec144952017-09-01 00:05:16330 AccessibilityController* accessibility_controller() {
331 return accessibility_controller_.get();
332 }
sky07a24d42017-03-09 23:57:30333 AccessibilityDelegate* accessibility_delegate() {
334 return accessibility_delegate_.get();
335 }
Qiang Xua9591002018-03-15 22:29:31336 AccessibilityFocusRingController* accessibility_focus_ring_controller() {
337 return accessibility_focus_ring_controller_.get();
338 }
Qiang Xuf1400a362017-09-14 02:28:30339 ::wm::ActivationClient* activation_client();
Jiaquan He4b48f912018-03-01 03:59:39340 AppListControllerImpl* app_list_controller() {
341 return app_list_controller_.get();
342 }
Ryo Hashimotobac835a2019-02-26 03:04:28343 ArcCustomTabController* arc_custom_tab_controller() {
344 return arc_custom_tab_controller_.get();
345 }
Scott Violetd64dac12017-06-02 21:50:08346 AshDisplayController* ash_display_controller() {
347 return ash_display_controller_.get();
348 }
David Black00fdce32018-05-10 20:59:14349 AssistantController* assistant_controller() {
350 DCHECK(chromeos::switches::IsAssistantEnabled());
351 return assistant_controller_.get();
352 }
Qiang Xuf1400a362017-09-14 02:28:30353 AutoclickController* autoclick_controller() {
354 return autoclick_controller_.get();
355 }
Daniel Erat477c56d2017-12-13 21:42:54356 BacklightsForcedOffSetter* backlights_forced_off_setter() {
357 return backlights_forced_off_setter_.get();
358 }
Qiang Xuf1400a362017-09-14 02:28:30359 BluetoothPowerController* bluetooth_power_controller() {
360 return bluetooth_power_controller_.get();
361 }
sky79fa34712017-03-20 23:46:47362 BrightnessControlDelegate* brightness_control_delegate() {
363 return brightness_control_delegate_.get();
364 }
365 CastConfigController* cast_config() { return cast_config_.get(); }
Scott Violet6c0eb6962018-06-20 01:31:26366 service_manager::Connector* connector() { return connector_; }
Steven Bennetts2a9b4382018-04-26 23:41:19367 CrosDisplayConfig* cros_display_config() {
368 return cros_display_config_.get();
369 }
Qiang Xuf1400a362017-09-14 02:28:30370 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
Ahmed Fakhryc77ce402019-02-13 02:32:00371 DesksController* desks_controller() { return desks_controller_.get(); }
Toni Barzicd6238312018-03-02 18:26:13372 DetachableBaseHandler* detachable_base_handler() {
373 return detachable_base_handler_.get();
374 }
375
rjkroege72f8154f2016-10-29 00:49:02376 display::DisplayManager* display_manager() { return display_manager_.get(); }
Steven Bennetts3688c6032018-04-13 01:14:23377 DisplayPrefs* display_prefs() { return display_prefs_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12378 DisplayConfigurationController* display_configuration_controller() {
379 return display_configuration_controller_.get();
380 }
Qiang Xuf1400a362017-09-14 02:28:30381
Joone Hur60b9fd32019-02-23 00:10:26382 display::DisplayConfigurator* display_configurator();
383
Ahmed Fakhry46357342018-04-27 00:46:11384 DisplayColorManager* display_color_manager() {
385 return display_color_manager_.get();
386 }
Qiang Xuf1400a362017-09-14 02:28:30387 DisplayErrorObserver* display_error_observer() {
388 return display_error_observer_.get();
389 }
Scott Violetbed23cb2018-08-22 19:56:12390 DisplayOutputProtection* display_output_protection() {
391 return display_output_protection_.get();
392 }
Qiang Xuf1400a362017-09-14 02:28:30393
Ahmed Fakhry4bf3f742018-02-06 17:33:36394 DockedMagnifierController* docked_magnifier_controller();
Scott Violetac410622018-08-11 18:33:22395 aura::Env* aura_env() { return aura_env_; }
jamescookb8dcef522016-06-25 14:42:55396 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
Mike Wassermanefbf3402018-04-26 00:41:32397 EventRewriterController* event_rewriter_controller() {
398 return event_rewriter_controller_.get();
399 }
Qiang Xuf1400a362017-09-14 02:28:30400 EventClientImpl* event_client() { return event_client_.get(); }
401 EventTransformationHandler* event_transformation_handler() {
402 return event_transformation_handler_.get();
403 }
Michael Giuffrida2d922de2019-03-08 00:53:14404 HomeScreenController* home_screen_controller() {
405 return home_screen_controller_.get();
406 }
James Cookf5398842018-04-16 20:15:24407 FirstRunHelper* first_run_helper() { return first_run_helper_.get(); }
Scott Violet319cfb52018-05-23 18:35:28408 ::wm::FocusController* focus_controller() { return focus_controller_.get(); }
James Cooka8963fb2019-03-09 01:00:40409 AshFocusRules* focus_rules() { return focus_rules_; }
sky79fa34712017-03-20 23:46:47410 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30411 HighlighterController* highlighter_controller() {
412 return highlighter_controller_.get();
413 }
414 HighContrastController* high_contrast_controller() {
415 return high_contrast_controller_.get();
416 }
James Cookf0c78fc2017-06-15 14:42:55417 ImeController* ime_controller() { return ime_controller_.get(); }
Shu Chene21541f02019-03-28 01:25:07418 ImeEngineFactoryRegistry* ime_engine_factory_registry() {
419 return ime_engine_factory_registry_.get();
420 }
Evan Stade1467204e2018-10-11 02:03:50421 ImmersiveContext* immersive_context() { return immersive_context_.get(); }
David Tseng6792dc82018-05-04 19:18:41422 KeyAccessibilityEnabler* key_accessibility_enabler() {
423 return key_accessibility_enabler_.get();
424 }
sky79fa34712017-03-20 23:46:47425 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
426 return keyboard_brightness_control_delegate_.get();
427 }
Lucas Tenório6ca0ed72019-03-01 13:57:41428 KioskNextShellController* kiosk_next_shell_controller() {
429 return kiosk_next_shell_controller_.get();
430 }
Steven Bennettsa0ea30942018-10-11 22:27:51431 AshKeyboardController* ash_keyboard_controller() {
432 return ash_keyboard_controller_.get();
Steven Bennettsa00d64cc82018-10-04 00:17:22433 }
Qiang Xuf1400a362017-09-14 02:28:30434 LaserPointerController* laser_pointer_controller() {
435 return laser_pointer_controller_.get();
436 }
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31437 LocaleUpdateController* locale_update_controller() {
438 return locale_update_controller_.get();
sky79fa34712017-03-20 23:46:47439 }
Jacob Dufaultffd9b0d2017-11-15 23:07:16440 LoginScreenController* login_screen_controller() {
441 return login_screen_controller_.get();
xiaoyinh2bbdd102017-05-18 23:29:42442 }
Qiang Xuf1400a362017-09-14 02:28:30443 LockStateController* lock_state_controller() {
444 return lock_state_controller_.get();
445 }
446 LogoutConfirmationController* logout_confirmation_controller() {
447 return logout_confirmation_controller_.get();
448 }
449 MagnificationController* magnification_controller() {
450 return magnification_controller_.get();
451 }
sky5ab16472017-03-21 19:35:08452 MediaController* media_controller() { return media_controller_.get(); }
Becca Hughesc6a0a062018-10-25 16:54:13453 MediaNotificationController* media_notification_controller() {
454 return media_notification_controller_.get();
455 }
Evan Stade04c18d02017-10-20 20:53:22456 MessageCenterController* message_center_controller() {
457 return message_center_controller_.get();
458 }
Qiang Xuf1400a362017-09-14 02:28:30459 MouseCursorEventFilter* mouse_cursor_filter() {
460 return mouse_cursor_filter_.get();
461 }
sky5ab16472017-03-21 19:35:08462 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
463 NewWindowController* new_window_controller() {
464 return new_window_controller_.get();
465 }
afakhry9e0a18b32017-06-05 19:23:14466 NightLightController* night_light_controller();
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01467 NoteTakingController* note_taking_controller() {
468 return note_taking_controller_.get();
469 }
Evan Stade523f7fc2019-03-02 19:20:51470 NotificationReporter* notification_reporter() {
471 return notification_reporter_.get();
472 }
Qiang Xuf1400a362017-09-14 02:28:30473 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30474 PartialMagnificationController* partial_magnification_controller() {
475 return partial_magnification_controller_.get();
476 }
Qiang Xud8e897e2018-05-24 20:07:57477 PolicyRecommendationRestorer* policy_recommendation_restorer() {
478 return policy_recommendation_restorer_.get();
479 }
Qiang Xuf1400a362017-09-14 02:28:30480 PowerButtonController* power_button_controller() {
481 return power_button_controller_.get();
482 }
483 PowerEventObserver* power_event_observer() {
484 return power_event_observer_.get();
485 }
486 ResizeShadowController* resize_shadow_controller() {
487 return resize_shadow_controller_.get();
488 }
489 ResolutionNotificationController* resolution_notification_controller() {
490 return resolution_notification_controller_.get();
491 }
492 ScreenshotController* screenshot_controller() {
493 return screenshot_controller_.get();
494 }
495 ScreenLayoutObserver* screen_layout_observer() {
496 return screen_layout_observer_.get();
497 }
498 ScreenOrientationController* screen_orientation_controller() {
499 return screen_orientation_controller_.get();
500 }
501 ScreenPinningController* screen_pinning_controller() {
502 return screen_pinning_controller_.get();
503 }
Tetsui Ohkubo54d50222018-05-10 01:58:11504 ScreenSwitchCheckController* screen_switch_check_controller() {
505 return screen_switch_check_controller_.get();
506 }
sky5ad143a2017-03-22 04:31:23507 SessionController* session_controller() { return session_controller_.get(); }
Sammie Quon557418662018-04-25 18:45:51508 ::wm::ShadowController* shadow_controller() {
509 return shadow_controller_.get();
510 }
sky5ad143a2017-03-22 04:31:23511 ShelfController* shelf_controller() { return shelf_controller_.get(); }
sky5ad143a2017-03-22 04:31:23512 ShelfModel* shelf_model();
Qiang Xuf1400a362017-09-14 02:28:30513 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
James Cook40f7d752018-05-25 18:21:58514 ShellState* shell_state() { return shell_state_.get(); }
sky5b45ed82017-03-27 02:54:23515 ShutdownController* shutdown_controller() {
516 return shutdown_controller_.get();
517 }
Qiang Xuf1400a362017-09-14 02:28:30518 SplitViewController* split_view_controller() {
519 return split_view_controller_.get();
520 }
521 StickyKeysController* sticky_keys_controller() {
522 return sticky_keys_controller_.get();
523 }
Steven Bennetts7fb8a992018-06-12 00:15:05524 SystemNotificationController* system_notification_controller() {
525 return system_notification_controller_.get();
526 }
Tetsui Ohkubo21722932018-03-02 02:56:56527 SystemTrayModel* system_tray_model() { return system_tray_model_.get(); }
sky5b45ed82017-03-27 02:54:23528 SystemTrayNotifier* system_tray_notifier() {
529 return system_tray_notifier_.get();
530 }
Sammie Quona6f96402017-08-24 01:08:37531 TabletModeController* tablet_mode_controller() {
532 return tablet_mode_controller_.get();
533 }
Scott Violet3c554ae2017-12-13 02:25:41534 TimeToFirstPresentRecorder* time_to_first_present_recorder() {
535 return time_to_first_present_recorder_.get();
536 }
Qiang Xuf1400a362017-09-14 02:28:30537 ToastManager* toast_manager() { return toast_manager_.get(); }
[email protected]a1b7a822013-02-23 19:08:04538 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33539 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11540 }
Qiang Xuf1400a362017-09-14 02:28:30541 TouchDevicesController* touch_devices_controller() {
542 return touch_devices_controller_.get();
chirantan40e4cd82015-02-19 01:08:19543 }
kylechar55f0eaf22017-01-11 22:57:37544 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49545 return touch_transformer_controller_.get();
546 }
Qiang Xuf1400a362017-09-14 02:28:30547 TrayAction* tray_action() { return tray_action_.get(); }
548 TrayBluetoothHelper* tray_bluetooth_helper() {
549 return tray_bluetooth_helper_.get();
sammiequon203ae022016-09-18 17:23:42550 }
Evan Stade04c18d02017-10-20 20:53:22551 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30552 VideoDetector* video_detector() { return video_detector_.get(); }
Yue Lia33960a2017-11-01 22:06:07553 VoiceInteractionController* voice_interaction_controller() {
554 return voice_interaction_controller_.get();
555 }
Qiang Xuf1400a362017-09-14 02:28:30556 VpnList* vpn_list() { return vpn_list_.get(); }
557 WallpaperController* wallpaper_controller() {
558 return wallpaper_controller_.get();
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32559 }
Qiang Xuf1400a362017-09-14 02:28:30560 WindowCycleController* window_cycle_controller() {
561 return window_cycle_controller_.get();
mukai19274bdd2015-02-24 22:37:48562 }
Qiang Xuf1400a362017-09-14 02:28:30563 WindowPositioner* window_positioner() { return window_positioner_.get(); }
Sammie Quon80e82a12019-01-23 19:55:22564 OverviewController* overview_controller() {
565 return overview_controller_.get();
[email protected]8b7ba87b2012-09-01 00:40:40566 }
Scott Violetb7f4df22018-05-17 04:43:12567 WindowServiceOwner* window_service_owner() {
568 return window_service_owner_.get();
Scott Violet7eb50d22018-05-04 17:12:18569 }
Qiang Xuf1400a362017-09-14 02:28:30570 WindowTreeHostManager* window_tree_host_manager() {
571 return window_tree_host_manager_.get();
[email protected]682990f2013-01-10 06:49:11572 }
[email protected]77f7c132012-11-15 06:52:54573
Mitsuru Oshima89e5c1352018-01-17 07:29:39574 ToplevelWindowEventHandler* toplevel_window_event_handler() {
575 return toplevel_window_event_handler_.get();
576 }
577
[email protected]c758fbf2012-03-25 22:53:59578 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01579 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59580 void UpdateShelfVisibility();
581
[email protected]a0afeb12012-12-10 22:57:09582 // Does the primary display have status area?
583 bool HasPrimaryStatusArea();
584
[email protected]f9466702012-09-17 16:35:27585 // Starts the animation that occurs on first login.
586 void DoInitialWorkspaceAnimation();
587
yawanodc5533b32017-02-23 11:04:38588 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
589
Weidong Guod07448f2017-10-18 03:35:18590 // Updates cursor compositing on/off. Native cursor is disabled when cursor
[email protected]87ec2202014-02-06 06:24:27591 // compositing is enabled, and vice versa.
Weidong Guod07448f2017-10-18 03:35:18592 void UpdateCursorCompositingEnabled();
[email protected]87ec2202014-02-06 06:24:27593
Weidong Guod07448f2017-10-18 03:35:18594 // Force setting compositing on/off without checking dependency.
595 void SetCursorCompositingEnabled(bool enabled);
xdaid4913762017-07-06 00:17:22596
597 // Returns true if split view mode is active.
598 bool IsSplitViewModeActive() const;
599
James Cookfa4838e2018-08-08 16:30:15600 // Shows the context menu for the wallpaper or shelf at |location_in_screen|.
601 void ShowContextMenu(const gfx::Point& location_in_screen,
602 ui::MenuSourceType source_type);
603
Michael Giuffridae9ed3402019-03-28 01:18:43604 // Removes the AppListController.
605 void RemoveAppListController();
606
sky00c813f2017-03-08 22:48:55607 void AddShellObserver(ShellObserver* observer);
608 void RemoveShellObserver(ShellObserver* observer);
609
sky5ad143a2017-03-22 04:31:23610 // Called when the login status changes.
611 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
612 void UpdateAfterLoginStatusChange(LoginStatus status);
613
xdaid4913762017-07-06 00:17:22614 // Notifies observers that split view mode is about to be started (before the
615 // window gets snapped and activated).
616 void NotifySplitViewModeStarting();
617
Xiaoqian Daibf3771f2018-03-13 18:21:46618 // Notifies observers that split view mode has been started.
619 void NotifySplitViewModeStarted();
620
xdaid4913762017-07-06 00:17:22621 // Notifies observers that split view mode has ended.
622 void NotifySplitViewModeEnded();
623
sky00c813f2017-03-08 22:48:55624 // Notifies observers that fullscreen mode has changed for |root_window|.
varkhac71444e52017-05-25 22:51:34625 void NotifyFullscreenStateChanged(bool is_fullscreen,
626 aura::Window* root_window);
sky00c813f2017-03-08 22:48:55627
628 // Notifies observers that |pinned_window| changed its pinned window state.
varkha19d7e6c52017-05-25 21:15:30629 void NotifyPinnedStateChanged(aura::Window* pinned_window);
sky00c813f2017-03-08 22:48:55630
Aga Wronska5f0a7e072019-03-26 17:31:20631 // Notifies observers that |root_window|'s accessibility related insets have
632 // changed.
633 void NotifyAccessibilityInsetsChanged(aura::Window* root_window);
Aga Wronska0514fd62019-03-25 20:11:37634
sky00c813f2017-03-08 22:48:55635 // Notifies observers that |root_window|'s shelf changed alignment.
636 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18637 void NotifyShelfAlignmentChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55638
639 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
640 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18641 void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55642
jamescook518dccbd2017-05-18 04:57:07643 // Used to provide better error messages for Shell::Get() under mash.
644 static void SetIsBrowserProcessWithMash();
645
[email protected]2b4cd302012-02-24 20:21:13646 private:
[email protected]c39be8f2012-06-15 22:58:36647 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09648 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
649 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47650 friend class AcceleratorControllerTest;
Sam McNallya853cd82017-08-30 01:55:10651 friend class AshTestHelper;
[email protected]093b8d642014-04-03 20:59:28652 friend class RootWindowController;
sky27344382017-03-08 21:30:32653 friend class ScopedRootWindowForNewWindows;
James Cook317781a02017-07-18 02:08:06654 friend class ShellTestApi;
sky27344382017-03-08 21:30:32655 friend class SmsObserverTest;
[email protected]ad0c8722012-03-02 20:17:45656
skyb073203a2017-03-13 16:59:16657 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
Scott Violete5c79f52018-07-31 00:10:17658 service_manager::Connector* connector);
dcheng1f4538e2014-10-27 23:57:05659 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08660
Scott Violet7e33efc2018-08-29 22:30:15661 void Init(ui::ContextFactory* context_factory,
662 ui::ContextFactoryPrivate* context_factory_private,
663 std::unique_ptr<base::Value> initial_display_prefs,
Jun Mukaif2357792018-12-20 19:58:00664 std::unique_ptr<ws::GpuInterfaceProvider> gpu_interface_provider,
665 std::unique_ptr<keyboard::KeyboardUIFactory> keyboard_ui_factory);
[email protected]b0639282011-12-22 21:12:27666
Steven Bennetts7683e342018-01-02 21:29:52667 // Initializes the display manager and related components.
668 void InitializeDisplayManager();
669
[email protected]a273d33a2013-10-17 12:41:21670 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26671 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56672
skyabcae812017-01-18 17:01:34673 // Destroys all child windows including widgets across all roots.
674 void CloseAllRootWindowChildWindows();
675
hariank0dd03dd2016-07-14 23:47:33676 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05677 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27678
[email protected]5097e69c2012-10-30 22:08:41679 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05680 bool CanAcceptEvent(const ui::Event& event) override;
681 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11682 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05683 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e69c2012-10-30 22:08:41684
Thiago Farina3b086a02017-05-30 22:32:50685 // wm::ActivationChangeObserver:
sky27344382017-03-08 21:30:32686 void OnWindowActivated(ActivationReason reason,
687 aura::Window* gained_active,
688 aura::Window* lost_active) override;
689
Xiyuan Xia22b1a6c2017-04-18 22:46:01690 // SessionObserver:
Steven Bennettsbadc3092018-05-24 21:26:01691 void OnFirstSessionStarted() override;
Xiyuan Xiab64fd0a2017-04-13 17:53:14692 void OnSessionStateChanged(session_manager::SessionState state) override;
693 void OnLoginStatusChanged(LoginStatus login_status) override;
694 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23695
Sam McNallyf4dab612017-08-16 03:06:33696 // Callback for prefs::ConnectToPrefService.
Sam McNallye36abbc2017-07-20 01:04:28697 void OnLocalStatePrefServiceInitialized(
698 std::unique_ptr<::PrefService> pref_service);
tibellb93c729b2017-03-30 00:45:09699
[email protected]cac10fc62011-10-07 23:22:56700 static Shell* instance_;
701
Scott Violetac410622018-08-11 18:33:22702 // |owned_aura_env_| is non-null if Shell created aura::Env. Shell creates
703 // aura::Env only in single-process-mash mode.
704 std::unique_ptr<aura::Env> owned_aura_env_;
705
706 // This is either |owned_aura_env_|, or Env::GetInstance().
707 aura::Env* aura_env_;
708
[email protected]1aad3322012-06-06 06:37:09709 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11710 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14711
Mike Wassermanefbf3402018-04-26 00:41:32712 std::unique_ptr<EventRewriterController> event_rewriter_controller_;
713
dchenga94547472016-04-08 08:41:11714 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11715 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24716
sky81a2d792017-03-17 19:14:39717 std::unique_ptr<AcceleratorController> accelerator_controller_;
James Cookec144952017-09-01 00:05:16718 std::unique_ptr<AccessibilityController> accessibility_controller_;
sky07a24d42017-03-09 23:57:30719 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
Qiang Xua9591002018-03-15 22:29:31720 std::unique_ptr<AccessibilityFocusRingController>
721 accessibility_focus_ring_controller_;
Jiaquan He4b48f912018-03-01 03:59:39722 std::unique_ptr<AppListControllerImpl> app_list_controller_;
Ryo Hashimotobac835a2019-02-26 03:04:28723 std::unique_ptr<ArcCustomTabController> arc_custom_tab_controller_;
Jeffrey Kardatzkef108f022018-04-17 17:52:35724 std::unique_ptr<AshDBusServices> ash_dbus_services_;
Scott Violetd64dac12017-06-02 21:50:08725 std::unique_ptr<AshDisplayController> ash_display_controller_;
David Black00fdce32018-05-10 20:59:14726 std::unique_ptr<AssistantController> assistant_controller_;
Toni Barzic9d0c82f42017-12-06 00:53:52727 std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_;
sky79fa34712017-03-20 23:46:47728 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
729 std::unique_ptr<CastConfigController> cast_config_;
Steven Bennetts2a9b4382018-04-26 23:41:19730 std::unique_ptr<CrosDisplayConfig> cros_display_config_;
Scott Violete5c79f52018-07-31 00:10:17731 service_manager::Connector* const connector_;
Ahmed Fakhryc77ce402019-02-13 02:32:00732 std::unique_ptr<DesksController> desks_controller_;
Toni Barzicd6238312018-03-02 18:26:13733 std::unique_ptr<DetachableBaseHandler> detachable_base_handler_;
Toni Barzic550419f2018-03-08 03:56:21734 std::unique_ptr<DetachableBaseNotificationController>
735 detachable_base_notification_controller_;
Tetsui Ohkubo01421b32018-05-30 16:54:59736 std::unique_ptr<DisplaySpeakerController> display_speaker_controller_;
dchenga94547472016-04-08 08:41:11737 std::unique_ptr<DragDropController> drag_drop_controller_;
James Cookf5398842018-04-16 20:15:24738 std::unique_ptr<FirstRunHelper> first_run_helper_;
sky79fa34712017-03-20 23:46:47739 std::unique_ptr<FocusCycler> focus_cycler_;
Michael Giuffrida2d922de2019-03-08 00:53:14740 std::unique_ptr<HomeScreenController> home_screen_controller_;
James Cookf0c78fc2017-06-15 14:42:55741 std::unique_ptr<ImeController> ime_controller_;
Shu Chene21541f02019-03-28 01:25:07742 std::unique_ptr<ImeEngineFactoryRegistry> ime_engine_factory_registry_;
Xiyuan Xia5f1046e2018-06-01 16:04:44743 std::unique_ptr<ImeFocusHandler> ime_focus_handler_;
Evan Stade1467204e2018-10-11 02:03:50744 std::unique_ptr<ImmersiveContext> immersive_context_;
sky79fa34712017-03-20 23:46:47745 std::unique_ptr<KeyboardBrightnessControlDelegate>
746 keyboard_brightness_control_delegate_;
Lucas Tenório6ca0ed72019-03-01 13:57:41747 std::unique_ptr<KioskNextShellController> kiosk_next_shell_controller_;
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31748 std::unique_ptr<LocaleUpdateController> locale_update_controller_;
Jacob Dufaultffd9b0d2017-11-15 23:07:16749 std::unique_ptr<LoginScreenController> login_screen_controller_;
sky79fa34712017-03-20 23:46:47750 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03751 std::unique_ptr<TabletModeController> tablet_mode_controller_;
sky5ab16472017-03-21 19:35:08752 std::unique_ptr<MediaController> media_controller_;
Becca Hughesc6a0a062018-10-25 16:54:13753 std::unique_ptr<MediaNotificationController> media_notification_controller_;
sky5ab16472017-03-21 19:35:08754 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
Kyle Horimoto9fc84fc22018-04-27 19:45:15755 std::unique_ptr<MultiDeviceNotificationPresenter>
756 multidevice_notification_presenter_;
sky5ab16472017-03-21 19:35:08757 std::unique_ptr<NewWindowController> new_window_controller_;
dchenga94547472016-04-08 08:41:11758 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
sky5ad143a2017-03-22 04:31:23759 std::unique_ptr<SessionController> session_controller_;
afakhrye4fae852017-05-09 18:49:06760 std::unique_ptr<NightLightController> night_light_controller_;
Vladislav Kaznacheev92edf62e2017-10-13 22:08:01761 std::unique_ptr<NoteTakingController> note_taking_controller_;
Qiang Xud8e897e2018-05-24 20:07:57762 std::unique_ptr<PolicyRecommendationRestorer> policy_recommendation_restorer_;
Tetsui Ohkubo54d50222018-05-10 01:58:11763 std::unique_ptr<ScreenSwitchCheckController> screen_switch_check_controller_;
sky5ad143a2017-03-22 04:31:23764 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23765 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16766 std::unique_ptr<ShellDelegate> shell_delegate_;
James Cook40f7d752018-05-25 18:21:58767 std::unique_ptr<ShellState> shell_state_;
sky5b45ed82017-03-27 02:54:23768 std::unique_ptr<ShutdownController> shutdown_controller_;
Tetsui Ohkubo269b5792018-04-26 01:06:32769 std::unique_ptr<SystemNotificationController> system_notification_controller_;
Tetsui Ohkubo21722932018-03-02 02:56:56770 std::unique_ptr<SystemTrayModel> system_tray_model_;
sky5b45ed82017-03-27 02:54:23771 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
sky07a24d42017-03-09 23:57:30772 std::unique_ptr<ToastManager> toast_manager_;
Qiang Xuf1400a362017-09-14 02:28:30773 std::unique_ptr<TouchDevicesController> touch_devices_controller_;
Scott Violet3c554ae2017-12-13 02:25:41774 std::unique_ptr<TimeToFirstPresentRecorder> time_to_first_present_recorder_;
tbarzicc78da1ff92017-05-08 20:46:15775 std::unique_ptr<TrayAction> tray_action_;
Yue Lia33960a2017-11-01 22:06:07776 std::unique_ptr<VoiceInteractionController> voice_interaction_controller_;
sky5b45ed82017-03-27 02:54:23777 std::unique_ptr<VpnList> vpn_list_;
sky07a24d42017-03-09 23:57:30778 std::unique_ptr<WallpaperController> wallpaper_controller_;
sky5b45ed82017-03-27 02:54:23779 std::unique_ptr<WindowCycleController> window_cycle_controller_;
Sammie Quon80e82a12019-01-23 19:55:22780 std::unique_ptr<OverviewController> overview_controller_;
Scott Violet7dbdaeb2018-12-11 22:39:02781 // Owned by |focus_controller_|.
James Cooka8963fb2019-03-09 01:00:40782 AshFocusRules* focus_rules_ = nullptr;
dchenga94547472016-04-08 08:41:11783 std::unique_ptr<::wm::ShadowController> shadow_controller_;
784 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
785 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
Sam McNallya853cd82017-08-30 01:55:10786 std::unique_ptr<PrefService> local_state_;
dchenga94547472016-04-08 08:41:11787 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
dchenga94547472016-04-08 08:41:11788 std::unique_ptr<PowerButtonController> power_button_controller_;
789 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11790 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
791 std::unique_ptr<VideoDetector> video_detector_;
Scott Violet737fb752018-04-11 15:35:22792 std::unique_ptr<WaylandServerController> wayland_server_controller_;
Scott Violetb7f4df22018-05-17 04:43:12793 std::unique_ptr<WindowServiceOwner> window_service_owner_;
dchenga94547472016-04-08 08:41:11794 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
Qiang Xud77a90c2018-02-20 19:43:29795 std::unique_ptr<PersistentWindowController> persistent_window_controller_;
dchenga94547472016-04-08 08:41:11796 std::unique_ptr<HighContrastController> high_contrast_controller_;
797 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11798 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32799 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34800
oshima5a296e82016-04-29 01:32:27801 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45802
dchenga94547472016-04-08 08:41:11803 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
804 std::unique_ptr<ScreenPositionController> screen_position_controller_;
805 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
806 std::unique_ptr<EventClientImpl> event_client_;
807 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13808
[email protected]0b0b0742012-02-16 13:23:45809 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26810 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11811 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45812
[email protected]3537d472014-01-15 05:45:31813 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11814 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31815
[email protected]435b212e2012-04-05 19:43:37816 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11817 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37818
[email protected]745816be2011-11-22 05:08:30819 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11820 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30821
rjkroege72f8154f2016-10-29 00:49:02822 std::unique_ptr<display::DisplayManager> display_manager_;
Steven Bennetts3688c6032018-04-13 01:14:23823 std::unique_ptr<DisplayPrefs> display_prefs_;
dchenga94547472016-04-08 08:41:11824 std::unique_ptr<DisplayConfigurationController>
825 display_configuration_controller_;
Steven Bennetts9b21fa32018-04-13 23:45:55826 std::unique_ptr<DisplayConfigurationObserver> display_configuration_observer_;
[email protected]6bdf7952012-11-14 10:10:58827
hidehiko6821ca42016-06-18 11:12:23828 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56829
Sammie Quon95c6a1c2017-09-12 19:16:55830 std::unique_ptr<PeripheralBatteryNotifier> peripheral_battery_notifier_;
dchenga94547472016-04-08 08:41:11831 std::unique_ptr<PowerEventObserver> power_event_observer_;
Qiang Xu36234e532018-04-11 04:54:02832 std::unique_ptr<PowerPrefs> power_prefs_;
dchenga94547472016-04-08 08:41:11833 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
834 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
835 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
836 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34837 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11838 std::unique_ptr<BluetoothNotificationController>
[email protected]b31427252014-03-04 06:59:50839 bluetooth_notification_controller_;
Sonny Sasaka55f69fc2017-08-28 21:29:37840 std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_;
jamescookac6724332017-03-21 02:54:43841 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
Steven Bennettsa0ea30942018-10-11 22:27:51842 std::unique_ptr<AshKeyboardController> ash_keyboard_controller_;
[email protected]70b3e7d52012-06-02 22:12:25843 // Controls video output device state.
Scott Violetbed23cb2018-08-22 19:56:12844 std::unique_ptr<DisplayOutputProtection> display_output_protection_;
dchenga94547472016-04-08 08:41:11845 std::unique_ptr<DisplayColorManager> display_color_manager_;
846 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
847 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58848
[email protected]c1234a42013-08-20 09:35:40849 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35850 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2efd2014-02-09 22:50:39851
kylechar98748a52016-12-03 01:33:22852 // Listens for shutdown and updates DisplayConfigurator.
Steven Bennetts7683e342018-01-02 21:29:52853 std::unique_ptr<DisplayShutdownObserver> display_shutdown_observer_;
kylechar98748a52016-12-03 01:33:22854
yiyix90cfee22017-02-16 05:38:18855 // Listens for new sms messages and shows notifications.
856 std::unique_ptr<SmsObserver> sms_observer_;
857
derat94887a22017-01-20 18:17:25858 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11859 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13860 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51861
kylechar55f0eaf22017-01-11 22:57:37862 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39863
dchenga94547472016-04-08 08:41:11864 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
865 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42866 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
867 std::unique_ptr<PartialMagnificationController>
868 partial_magnification_controller_;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32869 std::unique_ptr<HighlighterController> highlighter_controller_;
[email protected]70b3e7d52012-06-02 22:12:25870
Ahmed Fakhry4bf3f742018-02-06 17:33:36871 std::unique_ptr<DockedMagnifierController> docked_magnifier_controller_;
872
xdaid4913762017-07-06 00:17:22873 // The split view controller for Chrome OS in tablet mode.
874 std::unique_ptr<SplitViewController> split_view_controller_;
875
[email protected]c0ff0342013-02-27 00:41:29876 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
877 // pointer to vend to test code.
erg36cfb952017-06-21 19:41:45878 NativeCursorManagerAsh* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03879
derat94887a22017-01-20 18:17:25880 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35881 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11882 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19883
David Tseng6792dc82018-05-04 19:18:41884 // Enables spoken feedback accessibility based on a press and hold of both
885 // volume keys.
886 std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_;
887
[email protected]852a55d2012-10-17 13:30:30888 // For testing only: simulate that a modal window is open
James Cook7b7c6a52018-01-04 23:40:03889 bool simulate_modal_window_open_for_test_ = false;
[email protected]852a55d2012-10-17 13:30:30890
Evan Stade2c43a87b32017-08-31 17:53:10891 std::unique_ptr<MessageCenterController> message_center_controller_;
892
Abhishek Bhardwaj62aeaad62019-02-28 08:49:34893 std::unique_ptr<NotificationReporter> notification_reporter_;
894
Trent Apteda250ec3ab2018-08-19 08:52:19895 base::ObserverList<ShellObserver>::Unchecked shell_observers_;
sky00c813f2017-03-08 22:48:55896
Sam McNallye36abbc2017-07-20 01:04:28897 base::WeakPtrFactory<Shell> weak_factory_;
898
[email protected]87b0d82e2011-10-07 21:02:59899 DISALLOW_COPY_AND_ASSIGN(Shell);
900};
901
[email protected]55f593352011-12-24 05:42:46902} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59903
[email protected]b65bdda2011-12-23 23:35:31904#endif // ASH_SHELL_H_