blob: 1253c080101e2ef1bd4d66b6f320d43a89feae79 [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"
Mitsuru Oshimae3e29b32020-07-07 17:29:1714#include "ash/public/cpp/session/session_observer.h"
jamescookd4649fa2016-09-30 17:50:0915#include "ash/public/cpp/shelf_types.h"
[email protected]c0ce80e2012-10-05 23:28:2716#include "ash/wm/system_modal_container_event_filter_delegate.h"
[email protected]b0639282011-12-22 21:12:2717#include "base/gtest_prod_util.h"
avidb567a8a2015-12-20 17:07:2418#include "base/macros.h"
[email protected]6f67df52013-10-29 01:07:1519#include "base/memory/weak_ptr.h"
[email protected]1a2145b2012-03-13 21:09:1720#include "base/observer_list.h"
[email protected]c9390bd2013-11-08 20:33:1321#include "ui/aura/window.h"
James Cookfa4838e2018-08-08 16:30:1522#include "ui/base/ui_base_types.h"
oshimaf84b0da722016-04-27 19:47:1923#include "ui/display/screen.h"
[email protected]86ccbd42013-09-18 18:11:5424#include "ui/events/event_target.h"
[email protected]ee3ed10772014-03-11 22:02:0125#include "ui/wm/core/cursor_manager.h"
sky27344382017-03-08 21:30:3226#include "ui/wm/public/activation_change_observer.h"
[email protected]87b0d82e2011-10-07 21:02:5927
tibellb93c729b2017-03-30 00:45:0928class PrefService;
29
[email protected]87b0d82e2011-10-07 21:02:5930namespace aura {
[email protected]35304ce2011-12-14 23:21:0131class RootWindow;
[email protected]87b0d82e2011-10-07 21:02:5932class Window;
Alex Newcomer8fdcb9342017-08-08 18:48:4433} // namespace aura
[email protected]fa4a45832012-04-12 21:32:4834
Steven Bennettsadc71d02019-04-17 18:15:5435namespace dbus {
36class Bus;
37}
38
rjkroege72f8154f2016-10-29 00:49:0239namespace display {
kylecharf2e4e412016-12-04 04:21:3540class DisplayChangeObserver;
kylechar7a067ec2017-01-07 01:16:2841class DisplayConfigurator;
rjkroege72f8154f2016-10-29 00:49:0242class DisplayManager;
Alex Newcomer8fdcb9342017-08-08 18:48:4443} // namespace display
rjkroege72f8154f2016-10-29 00:49:0244
[email protected]2b99f8c2011-10-11 19:42:2445namespace gfx {
sky4ec2be82017-01-06 17:38:3246class Insets;
James Cookfa4838e2018-08-08 16:30:1547class Point;
Weidong Guo242bf92b2019-01-26 01:19:2348} // namespace gfx
[email protected]b6ba05d902013-10-04 21:38:4549
Jun Mukaif2357792018-12-20 19:58:0050namespace keyboard {
51class KeyboardUIFactory;
52}
53
[email protected]a8bd1cb2012-02-17 23:05:5454namespace ui {
Scott Violetc8a1c6c2017-11-29 23:17:3655class ContextFactory;
derat2d4e62d2015-01-09 16:09:1756class UserActivityDetector;
[email protected]b0fa7012014-04-16 12:50:5757class UserActivityPowerManagerNotifier;
Alex Newcomer8fdcb9342017-08-08 18:48:4458} // namespace ui
thanhph3f3968512017-06-21 00:37:2359
[email protected]57b8bb352012-01-11 05:11:4660namespace views {
61class NonClientFrameView;
62class Widget;
[email protected]4a59e4e2012-11-12 21:15:4063namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1464class TooltipController;
65}
Alex Newcomer8fdcb9342017-08-08 18:48:4466} // namespace views
[email protected]e319c7e2014-03-14 19:56:1467
68namespace wm {
[email protected]60d677d2014-05-30 13:07:0269class AcceleratorFilter;
Thiago Farina3b086a02017-05-30 22:32:5070class ActivationClient;
[email protected]4a59e4e2012-11-12 21:15:4071class CompoundEventFilter;
sky27344382017-03-08 21:30:3272class FocusController;
[email protected]86f2b5e2012-11-14 20:37:0073class ShadowController;
[email protected]b5756e22012-11-30 01:32:0274class VisibilityController;
[email protected]0c2dc012012-12-02 00:00:2375class WindowModalityController;
Alex Newcomer8fdcb9342017-08-08 18:48:4476} // namespace wm
[email protected]87b0d82e2011-10-07 21:02:5977
[email protected]55f593352011-12-24 05:42:4678namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5979
Evan Staded7748c52019-05-08 18:17:2780class AcceleratorControllerImpl;
Mike Wassermand13e95a2019-06-28 23:29:4881class AccessibilityControllerImpl;
sky07a24d42017-03-09 23:57:3082class AccessibilityDelegate;
Mike Wassermanb00478d52019-06-18 22:20:3283class AccessibilityFocusRingControllerImpl;
wutao9caadca2019-07-16 05:06:4684class AmbientController;
Jeffrey Kardatzkef108f022018-04-17 17:52:3585class AshDBusServices;
James Cooka8963fb2019-03-09 01:00:4086class AshFocusRules;
Jiaquan He4b48f912018-03-01 03:59:3987class AppListControllerImpl;
erg36cfb952017-06-21 19:41:4588class NativeCursorManagerAsh;
sky07a24d42017-03-09 23:57:3089class AshTouchTransformController;
David Blackec4cbcd2020-04-15 20:35:2590class AssistantControllerImpl;
[email protected]55398d22013-10-10 19:49:2091class AutoclickController;
mincha25f0d32020-01-17 02:55:5592class BackGestureEventHandler;
Toni Barzic9d0c82f42017-12-06 00:53:5293class BacklightsForcedOffSetter;
[email protected]b3142722014-03-04 06:59:5094class BluetoothNotificationController;
Sonny Sasaka55f69fc2017-08-28 21:29:3795class BluetoothPowerController;
sky79fa34712017-03-20 23:46:4796class BrightnessControlDelegate;
Min Chenfda33cb2019-07-08 17:42:2397class AshColorProvider;
Ahmed Fakhry0c6efef2020-07-30 21:51:1998class CaptureModeController;
Steven Bennetts2a9b4382018-04-26 23:41:1999class CrosDisplayConfig;
Ahmed Fakhryc77ce402019-02-13 02:32:00100class DesksController;
Toni Barzicd6238312018-03-02 18:26:13101class DetachableBaseHandler;
Toni Barzic550419f2018-03-08 03:56:21102class DetachableBaseNotificationController;
Bailey Berro01bc58c82020-06-22 17:52:02103class DisplayAlignmentController;
robert.bradfordab052492015-05-06 11:09:56104class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:12105class DisplayConfigurationController;
Steven Bennetts9b21fa32018-04-13 23:45:55106class DisplayConfigurationObserver;
[email protected]18b21b2e2013-03-01 20:56:23107class DisplayErrorObserver;
Su Hong Kood22ceb12020-04-06 16:44:07108class DisplayHighlightController;
Steven Bennetts3688c6032018-04-13 01:14:23109class DisplayPrefs;
Steven Bennetts7683e342018-01-02 21:29:52110class DisplayShutdownObserver;
Tetsui Ohkubo01421b32018-05-30 16:54:59111class DisplaySpeakerController;
Jun Mukaif701ffa82019-05-15 20:45:25112class DockedMagnifierControllerImpl;
[email protected]084b6bb2011-11-17 05:18:16113class DragDropController;
[email protected]e67291f12012-10-10 05:52:38114class EventClientImpl;
Mike Wassermanaac88db12019-06-03 21:40:45115class EventRewriterControllerImpl;
[email protected]682990f2013-01-10 06:49:11116class EventTransformationHandler;
sky79fa34712017-03-20 23:46:47117class FocusCycler;
yjliu10679cf2020-07-17 18:16:46118class FrameThrottlingController;
[email protected]093b8d642014-04-03 20:59:28119class HighContrastController;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32120class HighlighterController;
Toni Barzice64ee292020-07-22 21:34:29121class HoldingSpaceController;
Michael Giuffrida2d922de2019-03-08 00:53:14122class HomeScreenController;
Darren Shen7b132782019-12-10 04:36:06123class ImeControllerImpl;
Evan Stade14672042018-10-11 02:03:50124class ImmersiveContext;
Yicheng Li93ebc692020-07-29 18:01:01125class InSessionAuthDialogControllerImpl;
David Tseng6792dc82018-05-04 19:18:41126class KeyAccessibilityEnabler;
sky79fa34712017-03-20 23:46:47127class KeyboardBrightnessControlDelegate;
Darren Shen7daf3e12019-07-02 07:25:49128class KeyboardControllerImpl;
sammiequon203ae022016-09-18 17:23:42129class LaserPointerController;
Xiyuan Xiabe4303e72019-06-06 18:14:50130class LocaleUpdateControllerImpl;
[email protected]093b8d642014-04-03 20:59:28131class LockStateController;
sky79fa34712017-03-20 23:46:47132class LogoutConfirmationController;
Jacob Dufaultffd9b0d2017-11-15 23:07:16133class LoginScreenController;
[email protected]093b8d642014-04-03 20:59:28134class MagnificationController;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03135class TabletModeController;
Xiyuan Xiad03bd2f2019-06-05 22:00:49136class MediaControllerImpl;
Tommy Steimel875de1d42019-05-17 17:11:42137class MediaNotificationControllerImpl;
Evan Stade2c43a87b32017-08-31 17:53:10138class MessageCenterController;
[email protected]78d96302012-06-22 00:58:07139class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08140class MruWindowTracker;
Kyle Horimoto9fc84fc22018-04-27 19:45:15141class MultiDeviceNotificationPresenter;
Curt Clemensc6659632020-09-16 18:32:15142class NearbyShareController;
143class NearbyShareDelegate;
Steven Bennetts32f5d552019-07-09 16:16:13144class NightLightControllerImpl;
[email protected]9ae32df2012-07-26 03:25:18145class OverlayEventFilter;
Scott Violet60ca8a92019-04-25 23:19:31146class OverviewController;
Fabian Sommerdcb675c2020-02-12 09:31:05147class ParentAccessController;
[email protected]093b8d642014-04-03 20:59:28148class PartialMagnificationController;
Sammie Quon95c6a1c2017-09-12 19:16:55149class PeripheralBatteryNotifier;
Alberto Herrera8a896dcc2019-07-24 22:41:44150class PeripheralBatteryTracker;
Qiang Xud77a90c2018-02-20 19:43:29151class PersistentWindowController;
Qiang Xud8e897e2018-05-24 20:07:57152class PolicyRecommendationRestorer;
[email protected]093b8d642014-04-03 20:59:28153class PowerButtonController;
[email protected]51625052013-10-10 01:40:16154class PowerEventObserver;
Qiang Xu36234e532018-04-11 04:54:02155class PowerPrefs;
Gil Dekel69777032020-02-07 18:41:53156class PrivacyScreenController;
[email protected]72bce522014-02-10 21:11:26157class ProjectingObserver;
Xiao Yanga16ba22e2020-03-01 04:50:25158class QuickAnswersController;
[email protected]e4a181cc2012-03-17 02:20:57159class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44160class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56161class RootWindowController;
jamescookac6724332017-03-21 02:54:43162class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46163class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27164class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23165class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06166class ScreenPositionController;
Tetsui Ohkubo54d50222018-05-10 01:58:11167class ScreenSwitchCheckController;
Xiyuan Xiae7b19542019-05-06 23:05:18168class SessionControllerImpl;
Matthew Mourgos75327562019-09-09 21:23:57169class ShelfConfig;
sky5ad143a2017-03-22 04:31:23170class ShelfController;
sky5ad143a2017-03-22 04:31:23171class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16172class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23173struct ShellInitParams;
sky00c813f2017-03-08 22:48:55174class ShellObserver;
Xiyuan Xia7107d492019-06-05 16:58:54175class ShutdownControllerImpl;
yiyix90cfee22017-02-16 05:38:18176class SmsObserver;
Evan Stadeeb42d772019-05-03 01:51:34177class SnapController;
[email protected]093b8d642014-04-03 20:59:28178class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18179class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27180class SystemModalContainerEventFilter;
Tetsui Ohkubo269b5792018-04-26 01:06:32181class SystemNotificationController;
Tetsui Ohkubo21722932018-03-02 02:56:56182class SystemTrayModel;
sky5b45ed82017-03-27 02:54:23183class SystemTrayNotifier;
Anastasiia Nikolaienko8cdd7e62019-06-12 12:16:24184class ToastManagerImpl;
Scott Violet60ca8a92019-04-25 23:19:31185class ToplevelWindowEventHandler;
Andrew Xu2a5e5c42020-09-25 18:33:08186class ClipboardHistoryControllerImpl;
Qiang Xuf1400a362017-09-14 02:28:30187class TouchDevicesController;
tbarzicc78da1ff92017-05-08 20:46:15188class TrayAction;
jamescookac6724332017-03-21 02:54:43189class TrayBluetoothHelper;
[email protected]ded58fd2013-10-09 07:56:55190class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28191class VideoDetector;
Mike Wassermana5352da2019-05-30 17:26:08192class WallpaperControllerImpl;
sky5b45ed82017-03-27 02:54:23193class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28194class WindowPositioner;
msw607227f82016-08-30 17:22:39195class WindowTreeHostManager;
Mitsuru Oshima51bf3d5472020-06-17 21:28:34196class ArcInputMethodBoundsTracker;
[email protected]2b99f8c2011-10-11 19:42:24197
sky494c6cbd2017-03-27 20:57:48198enum class LoginStatus;
199
[email protected]87b0d82e2011-10-07 21:02:59200// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59201// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38202//
203// Upon creation, the Shell sets itself as the RootWindow's delegate, which
204// takes ownership of the Shell.
Xiyuan Xia22b1a6c2017-04-18 22:46:01205class ASH_EXPORT Shell : public SessionObserver,
sky5ad143a2017-03-22 04:31:23206 public SystemModalContainerEventFilterDelegate,
sky27344382017-03-08 21:30:32207 public ui::EventTarget,
Thiago Farina3b086a02017-05-30 22:32:50208 public ::wm::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59209 public:
[email protected]093b8d642014-04-03 20:59:28210 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23211
Scott Violetc8a1c6c2017-11-29 23:17:36212 // Creates the single Shell instance.
213 static Shell* CreateInstance(ShellInitParams init_params);
[email protected]3266c2b92011-11-14 00:06:08214
215 // Should never be called before |CreateInstance()|.
skyb073203a2017-03-13 16:59:16216 static Shell* Get();
[email protected]3266c2b92011-11-14 00:06:08217
[email protected]b3b7bcd2012-03-06 19:35:45218 // Returns true if the ash shell has been instantiated.
219 static bool HasInstance();
220
[email protected]ef589af2011-12-03 01:07:15221 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56222
[email protected]d90b8392012-06-13 09:34:56223 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09224 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28225 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56226
thanhphc90f49ca2017-03-03 17:48:53227 // Returns the RootWindowController for the given display id. If there
228 // is no display for |display_id|, null is returned.
229 static RootWindowController* GetRootWindowControllerWithDisplayId(
230 int64_t display_id);
231
Scott Violet596bb46342017-06-21 14:43:13232 // Returns the root Window for the given display id. If there is no display
233 // for |display_id| null is returned.
234 static aura::Window* GetRootWindowForDisplayId(int64_t display_id);
235
[email protected]cf1c70e2012-08-30 01:13:02236 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09237 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23238 static RootWindowControllerList GetAllRootWindowControllers();
239
[email protected]bf9cdb362013-10-25 19:22:45240 // Returns the primary root Window. The primary root Window is the one that
241 // has a launcher.
242 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34243
Joel Hockey784a8322020-05-20 21:19:25244 // Sets the root window that newly created windows should be added to.
245 static void SetRootWindowForNewWindows(aura::Window* root);
246
sky27344382017-03-08 21:30:32247 // Returns the root window that newly created windows should be added to.
Joel Hockey784a8322020-05-20 21:19:25248 // Value can be temporarily overridden using
249 // display::ScopedDisplayForNewWindows. NOTE: this returns the root, newly
250 // created window should be added to the appropriate container in the returned
251 // window.
sky27344382017-03-08 21:30:32252 static aura::Window* GetRootWindowForNewWindows();
mfomitcheva1a8aa62016-05-03 16:23:26253
[email protected]cf1c70e2012-08-30 01:13:02254 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13255 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23256
[email protected]bf9cdb362013-10-25 19:22:45257 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39258 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45259 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38260 int container_id);
[email protected]7b0f7502012-06-11 00:12:39261
James Cook7b7c6a52018-01-04 23:40:03262 // If a system-modal dialog window is currently open, returns the ID of the
263 // system modal window container that contains the window.
264 // If no system-modal dialogs are open it returns -1.
265 static int GetOpenSystemModalWindowContainerId();
266
267 // Returns true if a system-modal dialog window is currently open.
268 static bool IsSystemModalWindowOpen();
269
Mitsuru Oshima51bf3d5472020-06-17 21:28:34270 // Track/Untrack InputMethod bounds.
271 void TrackInputMethodBounds(ArcInputMethodBoundsTracker* tracker);
272 void UntrackTrackInputMethodBounds(ArcInputMethodBoundsTracker* tracker);
Scott Violet737fb752018-04-11 15:35:22273
[email protected]57b8bb352012-01-11 05:11:46274 // Creates a default views::NonClientFrameView for use by windows in the
275 // Ash environment.
Thomas Lukaszewicz814abb352020-06-29 21:35:16276 std::unique_ptr<views::NonClientFrameView> CreateDefaultNonClientFrameView(
[email protected]57b8bb352012-01-11 05:11:46277 views::Widget* widget);
278
mswad28b252016-08-09 02:42:07279 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47280 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44281 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17282
[email protected]58868abf2014-01-17 23:45:33283 // Called when a casting session is started or stopped.
284 void OnCastingSessionStartedOrStopped(bool started);
285
[email protected]0e3e7cb2014-04-12 05:18:25286 // Called when a root window is created.
varkhac71444e52017-05-25 22:51:34287 void OnRootWindowAdded(aura::Window* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25288
Zach Helfinsteinbbb6bad2018-05-02 18:21:51289 // Called when dictation is activated.
290 void OnDictationStarted();
291
292 // Called when dictation is ended.
293 void OnDictationEnded();
294
Manu Cornet369d82302020-02-13 17:04:52295 // Returns whether the device is currently in tablet mode. If the tablet
296 // mode controller isn't available, we assume the device is not in
297 // tablet mode.
298 bool IsInTabletMode() const;
299
300 // Tests if TabletModeWindowManager is not enabled, and if
Mitsuru Oshima0e9b7a62017-07-19 18:23:03301 // TabletModeController is not currently setting a display rotation. Or if
[email protected]da285852014-05-27 19:53:43302 // the |resolution_notification_controller_| is not showing its confirmation
303 // dialog. If true then changes to display settings can be saved.
304 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43305
Evan Staded7748c52019-05-08 18:17:27306 AcceleratorControllerImpl* accelerator_controller() {
sky81a2d792017-03-17 19:14:39307 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58308 }
Mike Wassermand13e95a2019-06-28 23:29:48309 AccessibilityControllerImpl* accessibility_controller() {
James Cookec144952017-09-01 00:05:16310 return accessibility_controller_.get();
311 }
sky07a24d42017-03-09 23:57:30312 AccessibilityDelegate* accessibility_delegate() {
313 return accessibility_delegate_.get();
314 }
Mike Wassermanb00478d52019-06-18 22:20:32315 AccessibilityFocusRingControllerImpl* accessibility_focus_ring_controller() {
Qiang Xua9591002018-03-15 22:29:31316 return accessibility_focus_ring_controller_.get();
317 }
Qiang Xuf1400a362017-09-14 02:28:30318 ::wm::ActivationClient* activation_client();
Jiaquan He4b48f912018-03-01 03:59:39319 AppListControllerImpl* app_list_controller() {
320 return app_list_controller_.get();
321 }
wutao9caadca2019-07-16 05:06:46322 AmbientController* ambient_controller() { return ambient_controller_.get(); }
David Blackec4cbcd2020-04-15 20:35:25323 AssistantControllerImpl* assistant_controller() {
324 return assistant_controller_.get();
325 }
Qiang Xuf1400a362017-09-14 02:28:30326 AutoclickController* autoclick_controller() {
327 return autoclick_controller_.get();
328 }
Daniel Erat477c56d2017-12-13 21:42:54329 BacklightsForcedOffSetter* backlights_forced_off_setter() {
330 return backlights_forced_off_setter_.get();
331 }
Qiang Xuf1400a362017-09-14 02:28:30332 BluetoothPowerController* bluetooth_power_controller() {
333 return bluetooth_power_controller_.get();
334 }
sky79fa34712017-03-20 23:46:47335 BrightnessControlDelegate* brightness_control_delegate() {
336 return brightness_control_delegate_.get();
337 }
Steven Bennetts2a9b4382018-04-26 23:41:19338 CrosDisplayConfig* cros_display_config() {
339 return cros_display_config_.get();
340 }
Qiang Xuf1400a362017-09-14 02:28:30341 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
Ahmed Fakhryc77ce402019-02-13 02:32:00342 DesksController* desks_controller() { return desks_controller_.get(); }
Toni Barzicd6238312018-03-02 18:26:13343 DetachableBaseHandler* detachable_base_handler() {
344 return detachable_base_handler_.get();
345 }
346
rjkroege72f8154f2016-10-29 00:49:02347 display::DisplayManager* display_manager() { return display_manager_.get(); }
Steven Bennetts3688c6032018-04-13 01:14:23348 DisplayPrefs* display_prefs() { return display_prefs_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12349 DisplayConfigurationController* display_configuration_controller() {
350 return display_configuration_controller_.get();
351 }
Qiang Xuf1400a362017-09-14 02:28:30352
Bailey Berro01bc58c82020-06-22 17:52:02353 DisplayAlignmentController* display_alignment_controller() {
354 return display_alignment_controller_.get();
355 }
356
Joone Hur60b9fd32019-02-23 00:10:26357 display::DisplayConfigurator* display_configurator();
358
Ahmed Fakhry46357342018-04-27 00:46:11359 DisplayColorManager* display_color_manager() {
360 return display_color_manager_.get();
361 }
Qiang Xuf1400a362017-09-14 02:28:30362 DisplayErrorObserver* display_error_observer() {
363 return display_error_observer_.get();
364 }
365
Su Hong Kood22ceb12020-04-06 16:44:07366 DisplayHighlightController* display_highlight_controller() {
367 return display_highlight_controller_.get();
368 }
369
Jun Mukaif701ffa82019-05-15 20:45:25370 DockedMagnifierControllerImpl* docked_magnifier_controller();
jamescookb8dcef522016-06-25 14:42:55371 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
Mike Wassermanaac88db12019-06-03 21:40:45372 EventRewriterControllerImpl* event_rewriter_controller() {
Mike Wassermanefbf3402018-04-26 00:41:32373 return event_rewriter_controller_.get();
374 }
Qiang Xuf1400a362017-09-14 02:28:30375 EventClientImpl* event_client() { return event_client_.get(); }
376 EventTransformationHandler* event_transformation_handler() {
377 return event_transformation_handler_.get();
378 }
Michael Giuffrida2d922de2019-03-08 00:53:14379 HomeScreenController* home_screen_controller() {
380 return home_screen_controller_.get();
381 }
Scott Violet319cfb52018-05-23 18:35:28382 ::wm::FocusController* focus_controller() { return focus_controller_.get(); }
James Cooka8963fb2019-03-09 01:00:40383 AshFocusRules* focus_rules() { return focus_rules_; }
sky79fa34712017-03-20 23:46:47384 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30385 HighlighterController* highlighter_controller() {
386 return highlighter_controller_.get();
387 }
388 HighContrastController* high_contrast_controller() {
389 return high_contrast_controller_.get();
390 }
Darren Shen7b132782019-12-10 04:36:06391 ImeControllerImpl* ime_controller() { return ime_controller_.get(); }
Yicheng Li93ebc692020-07-29 18:01:01392 InSessionAuthDialogControllerImpl* in_session_auth_dialog_controller() {
393 return in_session_auth_dialog_controller_.get();
394 }
David Tseng6792dc82018-05-04 19:18:41395 KeyAccessibilityEnabler* key_accessibility_enabler() {
396 return key_accessibility_enabler_.get();
397 }
sky79fa34712017-03-20 23:46:47398 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
399 return keyboard_brightness_control_delegate_.get();
400 }
Darren Shen7daf3e12019-07-02 07:25:49401 KeyboardControllerImpl* keyboard_controller() {
402 return keyboard_controller_.get();
Steven Bennettsa00d64cc82018-10-04 00:17:22403 }
Qiang Xuf1400a362017-09-14 02:28:30404 LaserPointerController* laser_pointer_controller() {
405 return laser_pointer_controller_.get();
406 }
Xiyuan Xiabe4303e72019-06-06 18:14:50407 LocaleUpdateControllerImpl* locale_update_controller() {
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31408 return locale_update_controller_.get();
sky79fa34712017-03-20 23:46:47409 }
Jacob Dufaultffd9b0d2017-11-15 23:07:16410 LoginScreenController* login_screen_controller() {
411 return login_screen_controller_.get();
xiaoyinh2bbdd102017-05-18 23:29:42412 }
Qiang Xuf1400a362017-09-14 02:28:30413 LockStateController* lock_state_controller() {
414 return lock_state_controller_.get();
415 }
416 LogoutConfirmationController* logout_confirmation_controller() {
417 return logout_confirmation_controller_.get();
418 }
419 MagnificationController* magnification_controller() {
420 return magnification_controller_.get();
421 }
Xiyuan Xiad03bd2f2019-06-05 22:00:49422 MediaControllerImpl* media_controller() { return media_controller_.get(); }
Tommy Steimel875de1d42019-05-17 17:11:42423 MediaNotificationControllerImpl* media_notification_controller() {
Becca Hughesc6a0a062018-10-25 16:54:13424 return media_notification_controller_.get();
425 }
Evan Stade04c18d02017-10-20 20:53:22426 MessageCenterController* message_center_controller() {
427 return message_center_controller_.get();
428 }
Qiang Xuf1400a362017-09-14 02:28:30429 MouseCursorEventFilter* mouse_cursor_filter() {
430 return mouse_cursor_filter_.get();
431 }
sky5ab16472017-03-21 19:35:08432 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
Curt Clemensc6659632020-09-16 18:32:15433 NearbyShareController* nearby_share_controller() {
434 return nearby_share_controller_.get();
435 }
436 NearbyShareDelegate* nearby_share_delegate() {
437 return nearby_share_delegate_.get();
438 }
Steven Bennetts32f5d552019-07-09 16:16:13439 NightLightControllerImpl* night_light_controller() {
440 return night_light_controller_.get();
441 }
Gil Dekel69777032020-02-07 18:41:53442 PrivacyScreenController* privacy_screen_controller() {
443 return privacy_screen_controller_.get();
444 }
Qiang Xuf1400a362017-09-14 02:28:30445 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
Fabian Sommerdcb675c2020-02-12 09:31:05446 ParentAccessController* parent_access_controller() {
447 return parent_access_controller_.get();
448 }
Qiang Xuf1400a362017-09-14 02:28:30449 PartialMagnificationController* partial_magnification_controller() {
450 return partial_magnification_controller_.get();
451 }
Qiang Xud8e897e2018-05-24 20:07:57452 PolicyRecommendationRestorer* policy_recommendation_restorer() {
453 return policy_recommendation_restorer_.get();
454 }
Qiang Xuf1400a362017-09-14 02:28:30455 PowerButtonController* power_button_controller() {
456 return power_button_controller_.get();
457 }
458 PowerEventObserver* power_event_observer() {
459 return power_event_observer_.get();
460 }
461 ResizeShadowController* resize_shadow_controller() {
462 return resize_shadow_controller_.get();
463 }
464 ResolutionNotificationController* resolution_notification_controller() {
465 return resolution_notification_controller_.get();
466 }
467 ScreenshotController* screenshot_controller() {
468 return screenshot_controller_.get();
469 }
470 ScreenLayoutObserver* screen_layout_observer() {
471 return screen_layout_observer_.get();
472 }
473 ScreenOrientationController* screen_orientation_controller() {
474 return screen_orientation_controller_.get();
475 }
476 ScreenPinningController* screen_pinning_controller() {
477 return screen_pinning_controller_.get();
478 }
Tetsui Ohkubo54d50222018-05-10 01:58:11479 ScreenSwitchCheckController* screen_switch_check_controller() {
480 return screen_switch_check_controller_.get();
481 }
Xiyuan Xiae7b19542019-05-06 23:05:18482 SessionControllerImpl* session_controller() {
483 return session_controller_.get();
484 }
Sammie Quon557418662018-04-25 18:45:51485 ::wm::ShadowController* shadow_controller() {
486 return shadow_controller_.get();
487 }
Matthew Mourgos75327562019-09-09 21:23:57488 ShelfConfig* shelf_config() { return shelf_config_.get(); }
sky5ad143a2017-03-22 04:31:23489 ShelfController* shelf_controller() { return shelf_controller_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30490 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
Xiyuan Xia7107d492019-06-05 16:58:54491 ShutdownControllerImpl* shutdown_controller() {
sky5b45ed82017-03-27 02:54:23492 return shutdown_controller_.get();
493 }
Qiang Xuf1400a362017-09-14 02:28:30494 StickyKeysController* sticky_keys_controller() {
495 return sticky_keys_controller_.get();
496 }
Steven Bennetts7fb8a992018-06-12 00:15:05497 SystemNotificationController* system_notification_controller() {
498 return system_notification_controller_.get();
499 }
Tetsui Ohkubo21722932018-03-02 02:56:56500 SystemTrayModel* system_tray_model() { return system_tray_model_.get(); }
sky5b45ed82017-03-27 02:54:23501 SystemTrayNotifier* system_tray_notifier() {
502 return system_tray_notifier_.get();
503 }
Manu Cornet369d82302020-02-13 17:04:52504 TabletModeController* tablet_mode_controller() const {
Sammie Quona6f96402017-08-24 01:08:37505 return tablet_mode_controller_.get();
506 }
Anastasiia Nikolaienko8cdd7e62019-06-12 12:16:24507 ToastManagerImpl* toast_manager() { return toast_manager_.get(); }
[email protected]a1b7a822013-02-23 19:08:04508 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33509 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11510 }
Andrew Xu2a5e5c42020-09-25 18:33:08511 ClipboardHistoryControllerImpl* clipboard_history_controller() {
Alex Newcomer55b050c2020-07-11 01:55:44512 return clipboard_history_controller_.get();
Alex Newcomer46bfe142020-07-10 20:28:56513 }
Qiang Xuf1400a362017-09-14 02:28:30514 TouchDevicesController* touch_devices_controller() {
515 return touch_devices_controller_.get();
chirantan40e4cd82015-02-19 01:08:19516 }
kylechar55f0eaf22017-01-11 22:57:37517 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49518 return touch_transformer_controller_.get();
519 }
Qiang Xuf1400a362017-09-14 02:28:30520 TrayAction* tray_action() { return tray_action_.get(); }
521 TrayBluetoothHelper* tray_bluetooth_helper() {
522 return tray_bluetooth_helper_.get();
sammiequon203ae022016-09-18 17:23:42523 }
Evan Stade04c18d02017-10-20 20:53:22524 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30525 VideoDetector* video_detector() { return video_detector_.get(); }
Mike Wassermana5352da2019-05-30 17:26:08526 WallpaperControllerImpl* wallpaper_controller() {
Qiang Xuf1400a362017-09-14 02:28:30527 return wallpaper_controller_.get();
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32528 }
Qiang Xuf1400a362017-09-14 02:28:30529 WindowCycleController* window_cycle_controller() {
530 return window_cycle_controller_.get();
mukai19274bdd2015-02-24 22:37:48531 }
Qiang Xuf1400a362017-09-14 02:28:30532 WindowPositioner* window_positioner() { return window_positioner_.get(); }
Sammie Quon80e82a12019-01-23 19:55:22533 OverviewController* overview_controller() {
534 return overview_controller_.get();
[email protected]8b7ba87b2012-09-01 00:40:40535 }
Qiang Xuf1400a362017-09-14 02:28:30536 WindowTreeHostManager* window_tree_host_manager() {
537 return window_tree_host_manager_.get();
[email protected]682990f2013-01-10 06:49:11538 }
mincha25f0d32020-01-17 02:55:55539 BackGestureEventHandler* back_gesture_event_handler() {
540 return back_gesture_event_handler_.get();
541 }
Mitsuru Oshima89e5c1352018-01-17 07:29:39542 ToplevelWindowEventHandler* toplevel_window_event_handler() {
543 return toplevel_window_event_handler_.get();
544 }
Min Chenfda33cb2019-07-08 17:42:23545 AshColorProvider* ash_color_provider() { return ash_color_provider_.get(); }
Mitsuru Oshima89e5c1352018-01-17 07:29:39546
Xiyuan Xiabd4ea792019-05-15 01:54:06547 PrefService* local_state() { return local_state_; }
548
yjliu10679cf2020-07-17 18:16:46549 FrameThrottlingController* frame_throttling_controller() {
550 return frame_throttling_controller_.get();
551 }
552
[email protected]c758fbf2012-03-25 22:53:59553 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01554 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59555 void UpdateShelfVisibility();
556
[email protected]a0afeb12012-12-10 22:57:09557 // Does the primary display have status area?
558 bool HasPrimaryStatusArea();
559
[email protected]f9466702012-09-17 16:35:27560 // Starts the animation that occurs on first login.
561 void DoInitialWorkspaceAnimation();
562
yawanodc5533b32017-02-23 11:04:38563 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
564
Katie D42fef12c2020-05-28 17:17:10565 // Sets a custom color for the cursor.
566 void SetCursorColor(SkColor cursor_color);
567
Weidong Guod07448f2017-10-18 03:35:18568 // Updates cursor compositing on/off. Native cursor is disabled when cursor
[email protected]87ec2202014-02-06 06:24:27569 // compositing is enabled, and vice versa.
Weidong Guod07448f2017-10-18 03:35:18570 void UpdateCursorCompositingEnabled();
[email protected]87ec2202014-02-06 06:24:27571
Weidong Guod07448f2017-10-18 03:35:18572 // Force setting compositing on/off without checking dependency.
573 void SetCursorCompositingEnabled(bool enabled);
xdaid4913762017-07-06 00:17:22574
James Cookfa4838e2018-08-08 16:30:15575 // Shows the context menu for the wallpaper or shelf at |location_in_screen|.
576 void ShowContextMenu(const gfx::Point& location_in_screen,
577 ui::MenuSourceType source_type);
578
sky00c813f2017-03-08 22:48:55579 void AddShellObserver(ShellObserver* observer);
580 void RemoveShellObserver(ShellObserver* observer);
581
sky5ad143a2017-03-22 04:31:23582 // Called when the login status changes.
583 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
584 void UpdateAfterLoginStatusChange(LoginStatus status);
585
Ahmed Fakhryf1dd847ae2019-03-28 22:15:21586 // Notifies observers that fullscreen mode has changed for |container|.
587 // |container| is always the active desk container.
varkhac71444e52017-05-25 22:51:34588 void NotifyFullscreenStateChanged(bool is_fullscreen,
Ahmed Fakhryf1dd847ae2019-03-28 22:15:21589 aura::Window* container);
sky00c813f2017-03-08 22:48:55590
591 // Notifies observers that |pinned_window| changed its pinned window state.
varkha19d7e6c52017-05-25 21:15:30592 void NotifyPinnedStateChanged(aura::Window* pinned_window);
sky00c813f2017-03-08 22:48:55593
Aga Wronska43971142019-04-12 01:18:20594 // Notifies observers that |root_window|'s user work area insets have changed.
595 // This notification is not fired when shelf bounds changed.
596 void NotifyUserWorkAreaInsetsChanged(aura::Window* root_window);
Aga Wronska0514fd62019-03-25 20:11:37597
sky00c813f2017-03-08 22:48:55598 // Notifies observers that |root_window|'s shelf changed alignment.
599 // TODO(jamescook): Move to Shelf.
Sammie Quonf6b30f92020-01-07 00:35:13600 void NotifyShelfAlignmentChanged(aura::Window* root_window,
601 ShelfAlignment old_alignment);
sky00c813f2017-03-08 22:48:55602
603 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
604 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18605 void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55606
[email protected]2b4cd302012-02-24 20:21:13607 private:
[email protected]c39be8f2012-06-15 22:58:36608 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09609 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
610 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47611 friend class AcceleratorControllerTest;
Sam McNallya853cd82017-08-30 01:55:10612 friend class AshTestHelper;
[email protected]093b8d642014-04-03 20:59:28613 friend class RootWindowController;
sky27344382017-03-08 21:30:32614 friend class ScopedRootWindowForNewWindows;
James Cook317781a2017-07-18 02:08:06615 friend class ShellTestApi;
sky27344382017-03-08 21:30:32616 friend class SmsObserverTest;
[email protected]ad0c8722012-03-02 20:17:45617
Ken Rockotb9bab542019-12-12 00:53:30618 explicit Shell(std::unique_ptr<ShellDelegate> shell_delegate);
dcheng1f4538e2014-10-27 23:57:05619 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08620
Scott Violet7e33efc2018-08-29 22:30:15621 void Init(ui::ContextFactory* context_factory,
Xiyuan Xia14619a22019-05-14 20:20:44622 PrefService* local_state,
Steven Bennettsadc71d02019-04-17 18:15:54623 std::unique_ptr<keyboard::KeyboardUIFactory> keyboard_ui_factory,
624 scoped_refptr<dbus::Bus> dbus_bus);
[email protected]b0639282011-12-22 21:12:27625
Steven Bennetts7683e342018-01-02 21:29:52626 // Initializes the display manager and related components.
627 void InitializeDisplayManager();
628
[email protected]a273d33a2013-10-17 12:41:21629 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26630 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56631
skyabcae812017-01-18 17:01:34632 // Destroys all child windows including widgets across all roots.
633 void CloseAllRootWindowChildWindows();
634
hariank0dd03dd2016-07-14 23:47:33635 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05636 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27637
[email protected]5097e692012-10-30 22:08:41638 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05639 bool CanAcceptEvent(const ui::Event& event) override;
640 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11641 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05642 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e692012-10-30 22:08:41643
Thiago Farina3b086a02017-05-30 22:32:50644 // wm::ActivationChangeObserver:
sky27344382017-03-08 21:30:32645 void OnWindowActivated(ActivationReason reason,
646 aura::Window* gained_active,
647 aura::Window* lost_active) override;
648
Xiyuan Xia22b1a6c2017-04-18 22:46:01649 // SessionObserver:
Steven Bennettsbadc3092018-05-24 21:26:01650 void OnFirstSessionStarted() override;
Xiyuan Xiab64fd0a2017-04-13 17:53:14651 void OnSessionStateChanged(session_manager::SessionState state) override;
652 void OnLoginStatusChanged(LoginStatus login_status) override;
653 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23654
[email protected]cac10fc62011-10-07 23:22:56655 static Shell* instance_;
656
[email protected]1aad3322012-06-06 06:37:09657 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11658 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14659
Mike Wassermanaac88db12019-06-03 21:40:45660 std::unique_ptr<EventRewriterControllerImpl> event_rewriter_controller_;
Mike Wassermanefbf3402018-04-26 00:41:32661
dchenga94547472016-04-08 08:41:11662 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11663 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24664
Evan Staded7748c52019-05-08 18:17:27665 std::unique_ptr<AcceleratorControllerImpl> accelerator_controller_;
Mike Wassermand13e95a2019-06-28 23:29:48666 std::unique_ptr<AccessibilityControllerImpl> accessibility_controller_;
sky07a24d42017-03-09 23:57:30667 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
Mike Wassermanb00478d52019-06-18 22:20:32668 std::unique_ptr<AccessibilityFocusRingControllerImpl>
Qiang Xua9591002018-03-15 22:29:31669 accessibility_focus_ring_controller_;
wutao9caadca2019-07-16 05:06:46670 std::unique_ptr<AmbientController> ambient_controller_;
Jiaquan He4b48f912018-03-01 03:59:39671 std::unique_ptr<AppListControllerImpl> app_list_controller_;
James Cook8064d4c2019-08-07 14:55:55672 // May be null in tests or when running on linux-chromeos.
673 scoped_refptr<dbus::Bus> dbus_bus_;
Jeffrey Kardatzkef108f022018-04-17 17:52:35674 std::unique_ptr<AshDBusServices> ash_dbus_services_;
David Blackec4cbcd2020-04-15 20:35:25675 std::unique_ptr<AssistantControllerImpl> assistant_controller_;
Toni Barzic9d0c82f42017-12-06 00:53:52676 std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_;
sky79fa34712017-03-20 23:46:47677 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
Steven Bennetts2a9b4382018-04-26 23:41:19678 std::unique_ptr<CrosDisplayConfig> cros_display_config_;
Ahmed Fakhryc77ce402019-02-13 02:32:00679 std::unique_ptr<DesksController> desks_controller_;
Toni Barzicd6238312018-03-02 18:26:13680 std::unique_ptr<DetachableBaseHandler> detachable_base_handler_;
Toni Barzic550419f2018-03-08 03:56:21681 std::unique_ptr<DetachableBaseNotificationController>
682 detachable_base_notification_controller_;
Su Hong Kood22ceb12020-04-06 16:44:07683 std::unique_ptr<DisplayHighlightController> display_highlight_controller_;
Tetsui Ohkubo01421b32018-05-30 16:54:59684 std::unique_ptr<DisplaySpeakerController> display_speaker_controller_;
dchenga94547472016-04-08 08:41:11685 std::unique_ptr<DragDropController> drag_drop_controller_;
sky79fa34712017-03-20 23:46:47686 std::unique_ptr<FocusCycler> focus_cycler_;
Toni Barzice64ee292020-07-22 21:34:29687 std::unique_ptr<HoldingSpaceController> holding_space_controller_;
Michael Giuffrida2d922de2019-03-08 00:53:14688 std::unique_ptr<HomeScreenController> home_screen_controller_;
Darren Shen7b132782019-12-10 04:36:06689 std::unique_ptr<ImeControllerImpl> ime_controller_;
Evan Stade14672042018-10-11 02:03:50690 std::unique_ptr<ImmersiveContext> immersive_context_;
Yicheng Li93ebc692020-07-29 18:01:01691 std::unique_ptr<InSessionAuthDialogControllerImpl>
692 in_session_auth_dialog_controller_;
sky79fa34712017-03-20 23:46:47693 std::unique_ptr<KeyboardBrightnessControlDelegate>
694 keyboard_brightness_control_delegate_;
Xiyuan Xiabe4303e72019-06-06 18:14:50695 std::unique_ptr<LocaleUpdateControllerImpl> locale_update_controller_;
Jacob Dufaultffd9b0d2017-11-15 23:07:16696 std::unique_ptr<LoginScreenController> login_screen_controller_;
sky79fa34712017-03-20 23:46:47697 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03698 std::unique_ptr<TabletModeController> tablet_mode_controller_;
Xiyuan Xiad03bd2f2019-06-05 22:00:49699 std::unique_ptr<MediaControllerImpl> media_controller_;
Tommy Steimel875de1d42019-05-17 17:11:42700 std::unique_ptr<MediaNotificationControllerImpl>
701 media_notification_controller_;
sky5ab16472017-03-21 19:35:08702 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
Kyle Horimoto9fc84fc22018-04-27 19:45:15703 std::unique_ptr<MultiDeviceNotificationPresenter>
704 multidevice_notification_presenter_;
Curt Clemensc6659632020-09-16 18:32:15705 std::unique_ptr<NearbyShareController> nearby_share_controller_;
706 std::unique_ptr<NearbyShareDelegate> nearby_share_delegate_;
Fabian Sommerdcb675c2020-02-12 09:31:05707 std::unique_ptr<ParentAccessController> parent_access_controller_;
Xiao Yanga16ba22e2020-03-01 04:50:25708 std::unique_ptr<QuickAnswersController> quick_answers_controller_;
dchenga94547472016-04-08 08:41:11709 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
Xiyuan Xiae7b19542019-05-06 23:05:18710 std::unique_ptr<SessionControllerImpl> session_controller_;
minch308923f32020-08-28 18:58:30711 std::unique_ptr<AshColorProvider> ash_color_provider_;
Steven Bennetts32f5d552019-07-09 16:16:13712 std::unique_ptr<NightLightControllerImpl> night_light_controller_;
Gil Dekel69777032020-02-07 18:41:53713 std::unique_ptr<PrivacyScreenController> privacy_screen_controller_;
Qiang Xud8e897e2018-05-24 20:07:57714 std::unique_ptr<PolicyRecommendationRestorer> policy_recommendation_restorer_;
Tetsui Ohkubo54d50222018-05-10 01:58:11715 std::unique_ptr<ScreenSwitchCheckController> screen_switch_check_controller_;
Matthew Mourgos75327562019-09-09 21:23:57716 std::unique_ptr<ShelfConfig> shelf_config_;
sky5ad143a2017-03-22 04:31:23717 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23718 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16719 std::unique_ptr<ShellDelegate> shell_delegate_;
Ahmed Fakhry0c6efef2020-07-30 21:51:19720 std::unique_ptr<CaptureModeController> capture_mode_controller_;
Xiyuan Xia7107d492019-06-05 16:58:54721 std::unique_ptr<ShutdownControllerImpl> shutdown_controller_;
Tetsui Ohkubo269b5792018-04-26 01:06:32722 std::unique_ptr<SystemNotificationController> system_notification_controller_;
Tetsui Ohkubo21722932018-03-02 02:56:56723 std::unique_ptr<SystemTrayModel> system_tray_model_;
sky5b45ed82017-03-27 02:54:23724 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
Anastasiia Nikolaienko8cdd7e62019-06-12 12:16:24725 std::unique_ptr<ToastManagerImpl> toast_manager_;
Andrew Xu2a5e5c42020-09-25 18:33:08726 std::unique_ptr<ClipboardHistoryControllerImpl> clipboard_history_controller_;
Qiang Xuf1400a362017-09-14 02:28:30727 std::unique_ptr<TouchDevicesController> touch_devices_controller_;
tbarzicc78da1ff92017-05-08 20:46:15728 std::unique_ptr<TrayAction> tray_action_;
Mike Wassermana5352da2019-05-30 17:26:08729 std::unique_ptr<WallpaperControllerImpl> wallpaper_controller_;
sky5b45ed82017-03-27 02:54:23730 std::unique_ptr<WindowCycleController> window_cycle_controller_;
Sammie Quon80e82a12019-01-23 19:55:22731 std::unique_ptr<OverviewController> overview_controller_;
Scott Violet7dbdaeb2018-12-11 22:39:02732 // Owned by |focus_controller_|.
James Cooka8963fb2019-03-09 01:00:40733 AshFocusRules* focus_rules_ = nullptr;
dchenga94547472016-04-08 08:41:11734 std::unique_ptr<::wm::ShadowController> shadow_controller_;
735 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
736 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
Xiyuan Xia14619a22019-05-14 20:20:44737 PrefService* local_state_ = nullptr;
dchenga94547472016-04-08 08:41:11738 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
dchenga94547472016-04-08 08:41:11739 std::unique_ptr<PowerButtonController> power_button_controller_;
740 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11741 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
742 std::unique_ptr<VideoDetector> video_detector_;
dchenga94547472016-04-08 08:41:11743 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
Qiang Xud77a90c2018-02-20 19:43:29744 std::unique_ptr<PersistentWindowController> persistent_window_controller_;
dchenga94547472016-04-08 08:41:11745 std::unique_ptr<HighContrastController> high_contrast_controller_;
746 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11747 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32748 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34749
oshima5a296e82016-04-29 01:32:27750 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45751
dchenga94547472016-04-08 08:41:11752 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
753 std::unique_ptr<ScreenPositionController> screen_position_controller_;
754 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
755 std::unique_ptr<EventClientImpl> event_client_;
756 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13757
[email protected]0b0b0742012-02-16 13:23:45758 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26759 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11760 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45761
mincha25f0d32020-01-17 02:55:55762 // An event filter which handles swiping back from left side of the window.
763 std::unique_ptr<BackGestureEventHandler> back_gesture_event_handler_;
764
[email protected]3537d472014-01-15 05:45:31765 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11766 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31767
[email protected]435b212e2012-04-05 19:43:37768 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11769 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37770
[email protected]745816be2011-11-22 05:08:30771 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11772 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30773
rjkroege72f8154f2016-10-29 00:49:02774 std::unique_ptr<display::DisplayManager> display_manager_;
Steven Bennetts3688c6032018-04-13 01:14:23775 std::unique_ptr<DisplayPrefs> display_prefs_;
dchenga94547472016-04-08 08:41:11776 std::unique_ptr<DisplayConfigurationController>
777 display_configuration_controller_;
Steven Bennetts9b21fa32018-04-13 23:45:55778 std::unique_ptr<DisplayConfigurationObserver> display_configuration_observer_;
[email protected]6bdf7952012-11-14 10:10:58779
hidehiko6821ca42016-06-18 11:12:23780 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56781
Sammie Quon95c6a1c2017-09-12 19:16:55782 std::unique_ptr<PeripheralBatteryNotifier> peripheral_battery_notifier_;
Alberto Herrera8a896dcc2019-07-24 22:41:44783 std::unique_ptr<PeripheralBatteryTracker> peripheral_battery_tracker_;
dchenga94547472016-04-08 08:41:11784 std::unique_ptr<PowerEventObserver> power_event_observer_;
Qiang Xu36234e532018-04-11 04:54:02785 std::unique_ptr<PowerPrefs> power_prefs_;
dchenga94547472016-04-08 08:41:11786 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
787 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
788 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
789 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34790 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11791 std::unique_ptr<BluetoothNotificationController>
[email protected]b3142722014-03-04 06:59:50792 bluetooth_notification_controller_;
Sonny Sasaka55f69fc2017-08-28 21:29:37793 std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_;
jamescookac6724332017-03-21 02:54:43794 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
Darren Shen7daf3e12019-07-02 07:25:49795 std::unique_ptr<KeyboardControllerImpl> keyboard_controller_;
Bailey Berro01bc58c82020-06-22 17:52:02796 std::unique_ptr<DisplayAlignmentController> display_alignment_controller_;
dchenga94547472016-04-08 08:41:11797 std::unique_ptr<DisplayColorManager> display_color_manager_;
798 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
799 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58800
[email protected]c1234a42013-08-20 09:35:40801 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35802 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2ef2014-02-09 22:50:39803
kylechar98748a52016-12-03 01:33:22804 // Listens for shutdown and updates DisplayConfigurator.
Steven Bennetts7683e342018-01-02 21:29:52805 std::unique_ptr<DisplayShutdownObserver> display_shutdown_observer_;
kylechar98748a52016-12-03 01:33:22806
yiyix90cfee22017-02-16 05:38:18807 // Listens for new sms messages and shows notifications.
808 std::unique_ptr<SmsObserver> sms_observer_;
809
derat94887a22017-01-20 18:17:25810 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11811 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13812 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51813
kylechar55f0eaf22017-01-11 22:57:37814 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39815
dchenga94547472016-04-08 08:41:11816 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
817 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42818 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
819 std::unique_ptr<PartialMagnificationController>
820 partial_magnification_controller_;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32821 std::unique_ptr<HighlighterController> highlighter_controller_;
[email protected]70b3e7d52012-06-02 22:12:25822
Jun Mukaif701ffa82019-05-15 20:45:25823 std::unique_ptr<DockedMagnifierControllerImpl> docked_magnifier_controller_;
Ahmed Fakhry4bf3f742018-02-06 17:33:36824
Evan Stadeeb42d772019-05-03 01:51:34825 std::unique_ptr<SnapController> snap_controller_;
826
[email protected]c0ff0342013-02-27 00:41:29827 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
828 // pointer to vend to test code.
erg36cfb952017-06-21 19:41:45829 NativeCursorManagerAsh* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03830
derat94887a22017-01-20 18:17:25831 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35832 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11833 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19834
David Tseng6792dc82018-05-04 19:18:41835 // Enables spoken feedback accessibility based on a press and hold of both
836 // volume keys.
837 std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_;
838
yjliu10679cf2020-07-17 18:16:46839 std::unique_ptr<FrameThrottlingController> frame_throttling_controller_;
840
[email protected]852a55d2012-10-17 13:30:30841 // For testing only: simulate that a modal window is open
James Cook7b7c6a52018-01-04 23:40:03842 bool simulate_modal_window_open_for_test_ = false;
[email protected]852a55d2012-10-17 13:30:30843
Evan Stade2c43a87b32017-08-31 17:53:10844 std::unique_ptr<MessageCenterController> message_center_controller_;
845
Trent Apteda250ec3ab2018-08-19 08:52:19846 base::ObserverList<ShellObserver>::Unchecked shell_observers_;
sky00c813f2017-03-08 22:48:55847
Jeremy Roman47d432e2019-08-20 14:24:00848 base::WeakPtrFactory<Shell> weak_factory_{this};
Sam McNallye36abbc2017-07-20 01:04:28849
[email protected]87b0d82e2011-10-07 21:02:59850 DISALLOW_COPY_AND_ASSIGN(Shell);
851};
852
[email protected]55f593352011-12-24 05:42:46853} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59854
[email protected]b65bdda2011-12-23 23:35:31855#endif // ASH_SHELL_H_