blob: 265719926b3038b8b6ba8f11dbe248e2d5f45c9b [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;
Steven Bennetts2a9b4382018-04-26 23:41:1998class CrosDisplayConfig;
Ahmed Fakhryc77ce402019-02-13 02:32:0099class DesksController;
Toni Barzicd6238312018-03-02 18:26:13100class DetachableBaseHandler;
Toni Barzic550419f2018-03-08 03:56:21101class DetachableBaseNotificationController;
Bailey Berro01bc58c82020-06-22 17:52:02102class DisplayAlignmentController;
robert.bradfordab052492015-05-06 11:09:56103class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:12104class DisplayConfigurationController;
Steven Bennetts9b21fa32018-04-13 23:45:55105class DisplayConfigurationObserver;
[email protected]18b21b2e2013-03-01 20:56:23106class DisplayErrorObserver;
Su Hong Kood22ceb12020-04-06 16:44:07107class DisplayHighlightController;
Steven Bennetts3688c6032018-04-13 01:14:23108class DisplayPrefs;
Steven Bennetts7683e342018-01-02 21:29:52109class DisplayShutdownObserver;
Tetsui Ohkubo01421b32018-05-30 16:54:59110class DisplaySpeakerController;
Jun Mukaif701ffa82019-05-15 20:45:25111class DockedMagnifierControllerImpl;
[email protected]084b6bb2011-11-17 05:18:16112class DragDropController;
[email protected]e67291f12012-10-10 05:52:38113class EventClientImpl;
Mike Wassermanaac88db12019-06-03 21:40:45114class EventRewriterControllerImpl;
[email protected]682990f2013-01-10 06:49:11115class EventTransformationHandler;
sky79fa34712017-03-20 23:46:47116class FocusCycler;
yjliu10679cf2020-07-17 18:16:46117class FrameThrottlingController;
[email protected]093b8d642014-04-03 20:59:28118class HighContrastController;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32119class HighlighterController;
Toni Barzice64ee292020-07-22 21:34:29120class HoldingSpaceController;
Michael Giuffrida2d922de2019-03-08 00:53:14121class HomeScreenController;
Darren Shen7b132782019-12-10 04:36:06122class ImeControllerImpl;
Evan Stade14672042018-10-11 02:03:50123class ImmersiveContext;
Yicheng Li93ebc692020-07-29 18:01:01124class InSessionAuthDialogControllerImpl;
David Tseng6792dc82018-05-04 19:18:41125class KeyAccessibilityEnabler;
sky79fa34712017-03-20 23:46:47126class KeyboardBrightnessControlDelegate;
Darren Shen7daf3e12019-07-02 07:25:49127class KeyboardControllerImpl;
sammiequon203ae022016-09-18 17:23:42128class LaserPointerController;
Xiyuan Xiabe4303e72019-06-06 18:14:50129class LocaleUpdateControllerImpl;
[email protected]093b8d642014-04-03 20:59:28130class LockStateController;
sky79fa34712017-03-20 23:46:47131class LogoutConfirmationController;
Jacob Dufaultffd9b0d2017-11-15 23:07:16132class LoginScreenController;
[email protected]093b8d642014-04-03 20:59:28133class MagnificationController;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03134class TabletModeController;
Xiyuan Xiad03bd2f2019-06-05 22:00:49135class MediaControllerImpl;
Tommy Steimel875de1d42019-05-17 17:11:42136class MediaNotificationControllerImpl;
Evan Stade2c43a87b32017-08-31 17:53:10137class MessageCenterController;
[email protected]78d96302012-06-22 00:58:07138class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08139class MruWindowTracker;
Kyle Horimoto9fc84fc22018-04-27 19:45:15140class MultiDeviceNotificationPresenter;
Steven Bennetts32f5d552019-07-09 16:16:13141class NightLightControllerImpl;
[email protected]9ae32df2012-07-26 03:25:18142class OverlayEventFilter;
Scott Violet60ca8a92019-04-25 23:19:31143class OverviewController;
Fabian Sommerdcb675c2020-02-12 09:31:05144class ParentAccessController;
[email protected]093b8d642014-04-03 20:59:28145class PartialMagnificationController;
Sammie Quon95c6a1c2017-09-12 19:16:55146class PeripheralBatteryNotifier;
Alberto Herrera8a896dcc2019-07-24 22:41:44147class PeripheralBatteryTracker;
Qiang Xud77a90c2018-02-20 19:43:29148class PersistentWindowController;
Qiang Xud8e897e2018-05-24 20:07:57149class PolicyRecommendationRestorer;
[email protected]093b8d642014-04-03 20:59:28150class PowerButtonController;
[email protected]51625052013-10-10 01:40:16151class PowerEventObserver;
Qiang Xu36234e532018-04-11 04:54:02152class PowerPrefs;
Gil Dekel69777032020-02-07 18:41:53153class PrivacyScreenController;
[email protected]72bce522014-02-10 21:11:26154class ProjectingObserver;
Xiao Yanga16ba22e2020-03-01 04:50:25155class QuickAnswersController;
[email protected]e4a181cc2012-03-17 02:20:57156class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44157class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56158class RootWindowController;
jamescookac6724332017-03-21 02:54:43159class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46160class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27161class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23162class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06163class ScreenPositionController;
Tetsui Ohkubo54d50222018-05-10 01:58:11164class ScreenSwitchCheckController;
Xiyuan Xiae7b19542019-05-06 23:05:18165class SessionControllerImpl;
Matthew Mourgos75327562019-09-09 21:23:57166class ShelfConfig;
sky5ad143a2017-03-22 04:31:23167class ShelfController;
sky5ad143a2017-03-22 04:31:23168class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16169class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23170struct ShellInitParams;
sky00c813f2017-03-08 22:48:55171class ShellObserver;
Xiyuan Xia7107d492019-06-05 16:58:54172class ShutdownControllerImpl;
yiyix90cfee22017-02-16 05:38:18173class SmsObserver;
Evan Stadeeb42d772019-05-03 01:51:34174class SnapController;
[email protected]093b8d642014-04-03 20:59:28175class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18176class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27177class SystemModalContainerEventFilter;
Tetsui Ohkubo269b5792018-04-26 01:06:32178class SystemNotificationController;
Tetsui Ohkubo21722932018-03-02 02:56:56179class SystemTrayModel;
sky5b45ed82017-03-27 02:54:23180class SystemTrayNotifier;
Anastasiia Nikolaienko8cdd7e62019-06-12 12:16:24181class ToastManagerImpl;
Scott Violet60ca8a92019-04-25 23:19:31182class ToplevelWindowEventHandler;
Alex Newcomer55b050c2020-07-11 01:55:44183class ClipboardHistoryController;
Qiang Xuf1400a362017-09-14 02:28:30184class TouchDevicesController;
tbarzicc78da1ff92017-05-08 20:46:15185class TrayAction;
jamescookac6724332017-03-21 02:54:43186class TrayBluetoothHelper;
[email protected]ded58fd2013-10-09 07:56:55187class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28188class VideoDetector;
Mike Wassermana5352da2019-05-30 17:26:08189class WallpaperControllerImpl;
sky5b45ed82017-03-27 02:54:23190class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28191class WindowPositioner;
msw607227f82016-08-30 17:22:39192class WindowTreeHostManager;
Mitsuru Oshima51bf3d5472020-06-17 21:28:34193class ArcInputMethodBoundsTracker;
[email protected]2b99f8c2011-10-11 19:42:24194
sky494c6cbd2017-03-27 20:57:48195enum class LoginStatus;
196
[email protected]87b0d82e2011-10-07 21:02:59197// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59198// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38199//
200// Upon creation, the Shell sets itself as the RootWindow's delegate, which
201// takes ownership of the Shell.
Xiyuan Xia22b1a6c2017-04-18 22:46:01202class ASH_EXPORT Shell : public SessionObserver,
sky5ad143a2017-03-22 04:31:23203 public SystemModalContainerEventFilterDelegate,
sky27344382017-03-08 21:30:32204 public ui::EventTarget,
Thiago Farina3b086a02017-05-30 22:32:50205 public ::wm::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59206 public:
[email protected]093b8d642014-04-03 20:59:28207 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23208
Scott Violetc8a1c6c2017-11-29 23:17:36209 // Creates the single Shell instance.
210 static Shell* CreateInstance(ShellInitParams init_params);
[email protected]3266c2b92011-11-14 00:06:08211
212 // Should never be called before |CreateInstance()|.
skyb073203a2017-03-13 16:59:16213 static Shell* Get();
[email protected]3266c2b92011-11-14 00:06:08214
[email protected]b3b7bcd2012-03-06 19:35:45215 // Returns true if the ash shell has been instantiated.
216 static bool HasInstance();
217
[email protected]ef589af2011-12-03 01:07:15218 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56219
[email protected]d90b8392012-06-13 09:34:56220 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09221 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28222 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56223
thanhphc90f49ca2017-03-03 17:48:53224 // Returns the RootWindowController for the given display id. If there
225 // is no display for |display_id|, null is returned.
226 static RootWindowController* GetRootWindowControllerWithDisplayId(
227 int64_t display_id);
228
Scott Violet596bb46342017-06-21 14:43:13229 // Returns the root Window for the given display id. If there is no display
230 // for |display_id| null is returned.
231 static aura::Window* GetRootWindowForDisplayId(int64_t display_id);
232
[email protected]cf1c70e2012-08-30 01:13:02233 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09234 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23235 static RootWindowControllerList GetAllRootWindowControllers();
236
[email protected]bf9cdb362013-10-25 19:22:45237 // Returns the primary root Window. The primary root Window is the one that
238 // has a launcher.
239 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34240
Joel Hockey784a8322020-05-20 21:19:25241 // Sets the root window that newly created windows should be added to.
242 static void SetRootWindowForNewWindows(aura::Window* root);
243
sky27344382017-03-08 21:30:32244 // Returns the root window that newly created windows should be added to.
Joel Hockey784a8322020-05-20 21:19:25245 // Value can be temporarily overridden using
246 // display::ScopedDisplayForNewWindows. NOTE: this returns the root, newly
247 // created window should be added to the appropriate container in the returned
248 // window.
sky27344382017-03-08 21:30:32249 static aura::Window* GetRootWindowForNewWindows();
mfomitcheva1a8aa62016-05-03 16:23:26250
[email protected]cf1c70e2012-08-30 01:13:02251 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13252 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23253
[email protected]bf9cdb362013-10-25 19:22:45254 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39255 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45256 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38257 int container_id);
[email protected]7b0f7502012-06-11 00:12:39258
James Cook7b7c6a52018-01-04 23:40:03259 // If a system-modal dialog window is currently open, returns the ID of the
260 // system modal window container that contains the window.
261 // If no system-modal dialogs are open it returns -1.
262 static int GetOpenSystemModalWindowContainerId();
263
264 // Returns true if a system-modal dialog window is currently open.
265 static bool IsSystemModalWindowOpen();
266
Mitsuru Oshima51bf3d5472020-06-17 21:28:34267 // Track/Untrack InputMethod bounds.
268 void TrackInputMethodBounds(ArcInputMethodBoundsTracker* tracker);
269 void UntrackTrackInputMethodBounds(ArcInputMethodBoundsTracker* tracker);
Scott Violet737fb752018-04-11 15:35:22270
[email protected]57b8bb352012-01-11 05:11:46271 // Creates a default views::NonClientFrameView for use by windows in the
272 // Ash environment.
Thomas Lukaszewicz814abb352020-06-29 21:35:16273 std::unique_ptr<views::NonClientFrameView> CreateDefaultNonClientFrameView(
[email protected]57b8bb352012-01-11 05:11:46274 views::Widget* widget);
275
mswad28b252016-08-09 02:42:07276 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47277 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44278 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17279
[email protected]58868abf2014-01-17 23:45:33280 // Called when a casting session is started or stopped.
281 void OnCastingSessionStartedOrStopped(bool started);
282
[email protected]0e3e7cb2014-04-12 05:18:25283 // Called when a root window is created.
varkhac71444e52017-05-25 22:51:34284 void OnRootWindowAdded(aura::Window* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25285
Zach Helfinsteinbbb6bad2018-05-02 18:21:51286 // Called when dictation is activated.
287 void OnDictationStarted();
288
289 // Called when dictation is ended.
290 void OnDictationEnded();
291
Manu Cornet369d82302020-02-13 17:04:52292 // Returns whether the device is currently in tablet mode. If the tablet
293 // mode controller isn't available, we assume the device is not in
294 // tablet mode.
295 bool IsInTabletMode() const;
296
297 // Tests if TabletModeWindowManager is not enabled, and if
Mitsuru Oshima0e9b7a62017-07-19 18:23:03298 // TabletModeController is not currently setting a display rotation. Or if
[email protected]da285852014-05-27 19:53:43299 // the |resolution_notification_controller_| is not showing its confirmation
300 // dialog. If true then changes to display settings can be saved.
301 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43302
Evan Staded7748c52019-05-08 18:17:27303 AcceleratorControllerImpl* accelerator_controller() {
sky81a2d792017-03-17 19:14:39304 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58305 }
Mike Wassermand13e95a2019-06-28 23:29:48306 AccessibilityControllerImpl* accessibility_controller() {
James Cookec144952017-09-01 00:05:16307 return accessibility_controller_.get();
308 }
sky07a24d42017-03-09 23:57:30309 AccessibilityDelegate* accessibility_delegate() {
310 return accessibility_delegate_.get();
311 }
Mike Wassermanb00478d52019-06-18 22:20:32312 AccessibilityFocusRingControllerImpl* accessibility_focus_ring_controller() {
Qiang Xua9591002018-03-15 22:29:31313 return accessibility_focus_ring_controller_.get();
314 }
Qiang Xuf1400a362017-09-14 02:28:30315 ::wm::ActivationClient* activation_client();
Jiaquan He4b48f912018-03-01 03:59:39316 AppListControllerImpl* app_list_controller() {
317 return app_list_controller_.get();
318 }
wutao9caadca2019-07-16 05:06:46319 AmbientController* ambient_controller() { return ambient_controller_.get(); }
David Blackec4cbcd2020-04-15 20:35:25320 AssistantControllerImpl* assistant_controller() {
321 return assistant_controller_.get();
322 }
Qiang Xuf1400a362017-09-14 02:28:30323 AutoclickController* autoclick_controller() {
324 return autoclick_controller_.get();
325 }
Daniel Erat477c56d2017-12-13 21:42:54326 BacklightsForcedOffSetter* backlights_forced_off_setter() {
327 return backlights_forced_off_setter_.get();
328 }
Qiang Xuf1400a362017-09-14 02:28:30329 BluetoothPowerController* bluetooth_power_controller() {
330 return bluetooth_power_controller_.get();
331 }
sky79fa34712017-03-20 23:46:47332 BrightnessControlDelegate* brightness_control_delegate() {
333 return brightness_control_delegate_.get();
334 }
Steven Bennetts2a9b4382018-04-26 23:41:19335 CrosDisplayConfig* cros_display_config() {
336 return cros_display_config_.get();
337 }
Qiang Xuf1400a362017-09-14 02:28:30338 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
Ahmed Fakhryc77ce402019-02-13 02:32:00339 DesksController* desks_controller() { return desks_controller_.get(); }
Toni Barzicd6238312018-03-02 18:26:13340 DetachableBaseHandler* detachable_base_handler() {
341 return detachable_base_handler_.get();
342 }
343
rjkroege72f8154f2016-10-29 00:49:02344 display::DisplayManager* display_manager() { return display_manager_.get(); }
Steven Bennetts3688c6032018-04-13 01:14:23345 DisplayPrefs* display_prefs() { return display_prefs_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12346 DisplayConfigurationController* display_configuration_controller() {
347 return display_configuration_controller_.get();
348 }
Qiang Xuf1400a362017-09-14 02:28:30349
Bailey Berro01bc58c82020-06-22 17:52:02350 DisplayAlignmentController* display_alignment_controller() {
351 return display_alignment_controller_.get();
352 }
353
Joone Hur60b9fd32019-02-23 00:10:26354 display::DisplayConfigurator* display_configurator();
355
Ahmed Fakhry46357342018-04-27 00:46:11356 DisplayColorManager* display_color_manager() {
357 return display_color_manager_.get();
358 }
Qiang Xuf1400a362017-09-14 02:28:30359 DisplayErrorObserver* display_error_observer() {
360 return display_error_observer_.get();
361 }
362
Su Hong Kood22ceb12020-04-06 16:44:07363 DisplayHighlightController* display_highlight_controller() {
364 return display_highlight_controller_.get();
365 }
366
Jun Mukaif701ffa82019-05-15 20:45:25367 DockedMagnifierControllerImpl* docked_magnifier_controller();
jamescookb8dcef522016-06-25 14:42:55368 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
Mike Wassermanaac88db12019-06-03 21:40:45369 EventRewriterControllerImpl* event_rewriter_controller() {
Mike Wassermanefbf3402018-04-26 00:41:32370 return event_rewriter_controller_.get();
371 }
Qiang Xuf1400a362017-09-14 02:28:30372 EventClientImpl* event_client() { return event_client_.get(); }
373 EventTransformationHandler* event_transformation_handler() {
374 return event_transformation_handler_.get();
375 }
Michael Giuffrida2d922de2019-03-08 00:53:14376 HomeScreenController* home_screen_controller() {
377 return home_screen_controller_.get();
378 }
Scott Violet319cfb52018-05-23 18:35:28379 ::wm::FocusController* focus_controller() { return focus_controller_.get(); }
James Cooka8963fb2019-03-09 01:00:40380 AshFocusRules* focus_rules() { return focus_rules_; }
sky79fa34712017-03-20 23:46:47381 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30382 HighlighterController* highlighter_controller() {
383 return highlighter_controller_.get();
384 }
385 HighContrastController* high_contrast_controller() {
386 return high_contrast_controller_.get();
387 }
Darren Shen7b132782019-12-10 04:36:06388 ImeControllerImpl* ime_controller() { return ime_controller_.get(); }
Yicheng Li93ebc692020-07-29 18:01:01389 InSessionAuthDialogControllerImpl* in_session_auth_dialog_controller() {
390 return in_session_auth_dialog_controller_.get();
391 }
David Tseng6792dc82018-05-04 19:18:41392 KeyAccessibilityEnabler* key_accessibility_enabler() {
393 return key_accessibility_enabler_.get();
394 }
sky79fa34712017-03-20 23:46:47395 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
396 return keyboard_brightness_control_delegate_.get();
397 }
Darren Shen7daf3e12019-07-02 07:25:49398 KeyboardControllerImpl* keyboard_controller() {
399 return keyboard_controller_.get();
Steven Bennettsa00d64cc82018-10-04 00:17:22400 }
Qiang Xuf1400a362017-09-14 02:28:30401 LaserPointerController* laser_pointer_controller() {
402 return laser_pointer_controller_.get();
403 }
Xiyuan Xiabe4303e72019-06-06 18:14:50404 LocaleUpdateControllerImpl* locale_update_controller() {
Tatsuhisa Yamaguchi440e2d2e2018-12-05 09:16:31405 return locale_update_controller_.get();
sky79fa34712017-03-20 23:46:47406 }
Jacob Dufaultffd9b0d2017-11-15 23:07:16407 LoginScreenController* login_screen_controller() {
408 return login_screen_controller_.get();
xiaoyinh2bbdd102017-05-18 23:29:42409 }
Qiang Xuf1400a362017-09-14 02:28:30410 LockStateController* lock_state_controller() {
411 return lock_state_controller_.get();
412 }
413 LogoutConfirmationController* logout_confirmation_controller() {
414 return logout_confirmation_controller_.get();
415 }
416 MagnificationController* magnification_controller() {
417 return magnification_controller_.get();
418 }
Xiyuan Xiad03bd2f2019-06-05 22:00:49419 MediaControllerImpl* media_controller() { return media_controller_.get(); }
Tommy Steimel875de1d42019-05-17 17:11:42420 MediaNotificationControllerImpl* media_notification_controller() {
Becca Hughesc6a0a062018-10-25 16:54:13421 return media_notification_controller_.get();
422 }
Evan Stade04c18d02017-10-20 20:53:22423 MessageCenterController* message_center_controller() {
424 return message_center_controller_.get();
425 }
Qiang Xuf1400a362017-09-14 02:28:30426 MouseCursorEventFilter* mouse_cursor_filter() {
427 return mouse_cursor_filter_.get();
428 }
sky5ab16472017-03-21 19:35:08429 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
Steven Bennetts32f5d552019-07-09 16:16:13430 NightLightControllerImpl* night_light_controller() {
431 return night_light_controller_.get();
432 }
Gil Dekel69777032020-02-07 18:41:53433 PrivacyScreenController* privacy_screen_controller() {
434 return privacy_screen_controller_.get();
435 }
Qiang Xuf1400a362017-09-14 02:28:30436 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
Fabian Sommerdcb675c2020-02-12 09:31:05437 ParentAccessController* parent_access_controller() {
438 return parent_access_controller_.get();
439 }
Qiang Xuf1400a362017-09-14 02:28:30440 PartialMagnificationController* partial_magnification_controller() {
441 return partial_magnification_controller_.get();
442 }
Qiang Xud8e897e2018-05-24 20:07:57443 PolicyRecommendationRestorer* policy_recommendation_restorer() {
444 return policy_recommendation_restorer_.get();
445 }
Qiang Xuf1400a362017-09-14 02:28:30446 PowerButtonController* power_button_controller() {
447 return power_button_controller_.get();
448 }
449 PowerEventObserver* power_event_observer() {
450 return power_event_observer_.get();
451 }
452 ResizeShadowController* resize_shadow_controller() {
453 return resize_shadow_controller_.get();
454 }
455 ResolutionNotificationController* resolution_notification_controller() {
456 return resolution_notification_controller_.get();
457 }
458 ScreenshotController* screenshot_controller() {
459 return screenshot_controller_.get();
460 }
461 ScreenLayoutObserver* screen_layout_observer() {
462 return screen_layout_observer_.get();
463 }
464 ScreenOrientationController* screen_orientation_controller() {
465 return screen_orientation_controller_.get();
466 }
467 ScreenPinningController* screen_pinning_controller() {
468 return screen_pinning_controller_.get();
469 }
Tetsui Ohkubo54d50222018-05-10 01:58:11470 ScreenSwitchCheckController* screen_switch_check_controller() {
471 return screen_switch_check_controller_.get();
472 }
Xiyuan Xiae7b19542019-05-06 23:05:18473 SessionControllerImpl* session_controller() {
474 return session_controller_.get();
475 }
Sammie Quon557418662018-04-25 18:45:51476 ::wm::ShadowController* shadow_controller() {
477 return shadow_controller_.get();
478 }
Matthew Mourgos75327562019-09-09 21:23:57479 ShelfConfig* shelf_config() { return shelf_config_.get(); }
sky5ad143a2017-03-22 04:31:23480 ShelfController* shelf_controller() { return shelf_controller_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30481 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
Xiyuan Xia7107d492019-06-05 16:58:54482 ShutdownControllerImpl* shutdown_controller() {
sky5b45ed82017-03-27 02:54:23483 return shutdown_controller_.get();
484 }
Qiang Xuf1400a362017-09-14 02:28:30485 StickyKeysController* sticky_keys_controller() {
486 return sticky_keys_controller_.get();
487 }
Steven Bennetts7fb8a992018-06-12 00:15:05488 SystemNotificationController* system_notification_controller() {
489 return system_notification_controller_.get();
490 }
Tetsui Ohkubo21722932018-03-02 02:56:56491 SystemTrayModel* system_tray_model() { return system_tray_model_.get(); }
sky5b45ed82017-03-27 02:54:23492 SystemTrayNotifier* system_tray_notifier() {
493 return system_tray_notifier_.get();
494 }
Manu Cornet369d82302020-02-13 17:04:52495 TabletModeController* tablet_mode_controller() const {
Sammie Quona6f96402017-08-24 01:08:37496 return tablet_mode_controller_.get();
497 }
Anastasiia Nikolaienko8cdd7e62019-06-12 12:16:24498 ToastManagerImpl* toast_manager() { return toast_manager_.get(); }
[email protected]a1b7a822013-02-23 19:08:04499 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33500 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11501 }
Alex Newcomer55b050c2020-07-11 01:55:44502 ClipboardHistoryController* clipboard_history_controller() {
503 return clipboard_history_controller_.get();
Alex Newcomer46bfe142020-07-10 20:28:56504 }
Qiang Xuf1400a362017-09-14 02:28:30505 TouchDevicesController* touch_devices_controller() {
506 return touch_devices_controller_.get();
chirantan40e4cd82015-02-19 01:08:19507 }
kylechar55f0eaf22017-01-11 22:57:37508 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49509 return touch_transformer_controller_.get();
510 }
Qiang Xuf1400a362017-09-14 02:28:30511 TrayAction* tray_action() { return tray_action_.get(); }
512 TrayBluetoothHelper* tray_bluetooth_helper() {
513 return tray_bluetooth_helper_.get();
sammiequon203ae022016-09-18 17:23:42514 }
Evan Stade04c18d02017-10-20 20:53:22515 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
Qiang Xuf1400a362017-09-14 02:28:30516 VideoDetector* video_detector() { return video_detector_.get(); }
Mike Wassermana5352da2019-05-30 17:26:08517 WallpaperControllerImpl* wallpaper_controller() {
Qiang Xuf1400a362017-09-14 02:28:30518 return wallpaper_controller_.get();
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32519 }
Qiang Xuf1400a362017-09-14 02:28:30520 WindowCycleController* window_cycle_controller() {
521 return window_cycle_controller_.get();
mukai19274bdd2015-02-24 22:37:48522 }
Qiang Xuf1400a362017-09-14 02:28:30523 WindowPositioner* window_positioner() { return window_positioner_.get(); }
Sammie Quon80e82a12019-01-23 19:55:22524 OverviewController* overview_controller() {
525 return overview_controller_.get();
[email protected]8b7ba87b2012-09-01 00:40:40526 }
Qiang Xuf1400a362017-09-14 02:28:30527 WindowTreeHostManager* window_tree_host_manager() {
528 return window_tree_host_manager_.get();
[email protected]682990f2013-01-10 06:49:11529 }
mincha25f0d32020-01-17 02:55:55530 BackGestureEventHandler* back_gesture_event_handler() {
531 return back_gesture_event_handler_.get();
532 }
Mitsuru Oshima89e5c1352018-01-17 07:29:39533 ToplevelWindowEventHandler* toplevel_window_event_handler() {
534 return toplevel_window_event_handler_.get();
535 }
Min Chenfda33cb2019-07-08 17:42:23536 AshColorProvider* ash_color_provider() { return ash_color_provider_.get(); }
Mitsuru Oshima89e5c1352018-01-17 07:29:39537
Xiyuan Xiabd4ea792019-05-15 01:54:06538 PrefService* local_state() { return local_state_; }
539
yjliu10679cf2020-07-17 18:16:46540 FrameThrottlingController* frame_throttling_controller() {
541 return frame_throttling_controller_.get();
542 }
543
[email protected]c758fbf2012-03-25 22:53:59544 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01545 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59546 void UpdateShelfVisibility();
547
[email protected]a0afeb12012-12-10 22:57:09548 // Does the primary display have status area?
549 bool HasPrimaryStatusArea();
550
[email protected]f9466702012-09-17 16:35:27551 // Starts the animation that occurs on first login.
552 void DoInitialWorkspaceAnimation();
553
yawanodc5533b32017-02-23 11:04:38554 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
555
Katie D42fef12c2020-05-28 17:17:10556 // Sets a custom color for the cursor.
557 void SetCursorColor(SkColor cursor_color);
558
Weidong Guod07448f2017-10-18 03:35:18559 // Updates cursor compositing on/off. Native cursor is disabled when cursor
[email protected]87ec2202014-02-06 06:24:27560 // compositing is enabled, and vice versa.
Weidong Guod07448f2017-10-18 03:35:18561 void UpdateCursorCompositingEnabled();
[email protected]87ec2202014-02-06 06:24:27562
Weidong Guod07448f2017-10-18 03:35:18563 // Force setting compositing on/off without checking dependency.
564 void SetCursorCompositingEnabled(bool enabled);
xdaid4913762017-07-06 00:17:22565
James Cookfa4838e2018-08-08 16:30:15566 // Shows the context menu for the wallpaper or shelf at |location_in_screen|.
567 void ShowContextMenu(const gfx::Point& location_in_screen,
568 ui::MenuSourceType source_type);
569
sky00c813f2017-03-08 22:48:55570 void AddShellObserver(ShellObserver* observer);
571 void RemoveShellObserver(ShellObserver* observer);
572
sky5ad143a2017-03-22 04:31:23573 // Called when the login status changes.
574 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
575 void UpdateAfterLoginStatusChange(LoginStatus status);
576
Ahmed Fakhryf1dd847ae2019-03-28 22:15:21577 // Notifies observers that fullscreen mode has changed for |container|.
578 // |container| is always the active desk container.
varkhac71444e52017-05-25 22:51:34579 void NotifyFullscreenStateChanged(bool is_fullscreen,
Ahmed Fakhryf1dd847ae2019-03-28 22:15:21580 aura::Window* container);
sky00c813f2017-03-08 22:48:55581
582 // Notifies observers that |pinned_window| changed its pinned window state.
varkha19d7e6c52017-05-25 21:15:30583 void NotifyPinnedStateChanged(aura::Window* pinned_window);
sky00c813f2017-03-08 22:48:55584
Aga Wronska43971142019-04-12 01:18:20585 // Notifies observers that |root_window|'s user work area insets have changed.
586 // This notification is not fired when shelf bounds changed.
587 void NotifyUserWorkAreaInsetsChanged(aura::Window* root_window);
Aga Wronska0514fd62019-03-25 20:11:37588
sky00c813f2017-03-08 22:48:55589 // Notifies observers that |root_window|'s shelf changed alignment.
590 // TODO(jamescook): Move to Shelf.
Sammie Quonf6b30f92020-01-07 00:35:13591 void NotifyShelfAlignmentChanged(aura::Window* root_window,
592 ShelfAlignment old_alignment);
sky00c813f2017-03-08 22:48:55593
594 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
595 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18596 void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55597
[email protected]2b4cd302012-02-24 20:21:13598 private:
[email protected]c39be8f2012-06-15 22:58:36599 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09600 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
601 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47602 friend class AcceleratorControllerTest;
Sam McNallya853cd82017-08-30 01:55:10603 friend class AshTestHelper;
[email protected]093b8d642014-04-03 20:59:28604 friend class RootWindowController;
sky27344382017-03-08 21:30:32605 friend class ScopedRootWindowForNewWindows;
James Cook317781a2017-07-18 02:08:06606 friend class ShellTestApi;
sky27344382017-03-08 21:30:32607 friend class SmsObserverTest;
[email protected]ad0c8722012-03-02 20:17:45608
Ken Rockotb9bab542019-12-12 00:53:30609 explicit Shell(std::unique_ptr<ShellDelegate> shell_delegate);
dcheng1f4538e2014-10-27 23:57:05610 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08611
Scott Violet7e33efc2018-08-29 22:30:15612 void Init(ui::ContextFactory* context_factory,
Xiyuan Xia14619a22019-05-14 20:20:44613 PrefService* local_state,
Steven Bennettsadc71d02019-04-17 18:15:54614 std::unique_ptr<keyboard::KeyboardUIFactory> keyboard_ui_factory,
615 scoped_refptr<dbus::Bus> dbus_bus);
[email protected]b0639282011-12-22 21:12:27616
Steven Bennetts7683e342018-01-02 21:29:52617 // Initializes the display manager and related components.
618 void InitializeDisplayManager();
619
[email protected]a273d33a2013-10-17 12:41:21620 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26621 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56622
skyabcae812017-01-18 17:01:34623 // Destroys all child windows including widgets across all roots.
624 void CloseAllRootWindowChildWindows();
625
hariank0dd03dd2016-07-14 23:47:33626 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05627 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27628
[email protected]5097e692012-10-30 22:08:41629 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05630 bool CanAcceptEvent(const ui::Event& event) override;
631 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11632 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05633 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e692012-10-30 22:08:41634
Thiago Farina3b086a02017-05-30 22:32:50635 // wm::ActivationChangeObserver:
sky27344382017-03-08 21:30:32636 void OnWindowActivated(ActivationReason reason,
637 aura::Window* gained_active,
638 aura::Window* lost_active) override;
639
Xiyuan Xia22b1a6c2017-04-18 22:46:01640 // SessionObserver:
Steven Bennettsbadc3092018-05-24 21:26:01641 void OnFirstSessionStarted() override;
Xiyuan Xiab64fd0a2017-04-13 17:53:14642 void OnSessionStateChanged(session_manager::SessionState state) override;
643 void OnLoginStatusChanged(LoginStatus login_status) override;
644 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23645
[email protected]cac10fc62011-10-07 23:22:56646 static Shell* instance_;
647
[email protected]1aad3322012-06-06 06:37:09648 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11649 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14650
Mike Wassermanaac88db12019-06-03 21:40:45651 std::unique_ptr<EventRewriterControllerImpl> event_rewriter_controller_;
Mike Wassermanefbf3402018-04-26 00:41:32652
dchenga94547472016-04-08 08:41:11653 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11654 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24655
Evan Staded7748c52019-05-08 18:17:27656 std::unique_ptr<AcceleratorControllerImpl> accelerator_controller_;
Mike Wassermand13e95a2019-06-28 23:29:48657 std::unique_ptr<AccessibilityControllerImpl> accessibility_controller_;
sky07a24d42017-03-09 23:57:30658 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
Mike Wassermanb00478d52019-06-18 22:20:32659 std::unique_ptr<AccessibilityFocusRingControllerImpl>
Qiang Xua9591002018-03-15 22:29:31660 accessibility_focus_ring_controller_;
wutao9caadca2019-07-16 05:06:46661 std::unique_ptr<AmbientController> ambient_controller_;
Jiaquan He4b48f912018-03-01 03:59:39662 std::unique_ptr<AppListControllerImpl> app_list_controller_;
James Cook8064d4c2019-08-07 14:55:55663 // May be null in tests or when running on linux-chromeos.
664 scoped_refptr<dbus::Bus> dbus_bus_;
Jeffrey Kardatzkef108f022018-04-17 17:52:35665 std::unique_ptr<AshDBusServices> ash_dbus_services_;
David Blackec4cbcd2020-04-15 20:35:25666 std::unique_ptr<AssistantControllerImpl> assistant_controller_;
Toni Barzic9d0c82f42017-12-06 00:53:52667 std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_;
sky79fa34712017-03-20 23:46:47668 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
Steven Bennetts2a9b4382018-04-26 23:41:19669 std::unique_ptr<CrosDisplayConfig> cros_display_config_;
Ahmed Fakhryc77ce402019-02-13 02:32:00670 std::unique_ptr<DesksController> desks_controller_;
Toni Barzicd6238312018-03-02 18:26:13671 std::unique_ptr<DetachableBaseHandler> detachable_base_handler_;
Toni Barzic550419f2018-03-08 03:56:21672 std::unique_ptr<DetachableBaseNotificationController>
673 detachable_base_notification_controller_;
Su Hong Kood22ceb12020-04-06 16:44:07674 std::unique_ptr<DisplayHighlightController> display_highlight_controller_;
Tetsui Ohkubo01421b32018-05-30 16:54:59675 std::unique_ptr<DisplaySpeakerController> display_speaker_controller_;
dchenga94547472016-04-08 08:41:11676 std::unique_ptr<DragDropController> drag_drop_controller_;
sky79fa34712017-03-20 23:46:47677 std::unique_ptr<FocusCycler> focus_cycler_;
Toni Barzice64ee292020-07-22 21:34:29678 std::unique_ptr<HoldingSpaceController> holding_space_controller_;
Michael Giuffrida2d922de2019-03-08 00:53:14679 std::unique_ptr<HomeScreenController> home_screen_controller_;
Darren Shen7b132782019-12-10 04:36:06680 std::unique_ptr<ImeControllerImpl> ime_controller_;
Evan Stade14672042018-10-11 02:03:50681 std::unique_ptr<ImmersiveContext> immersive_context_;
Yicheng Li93ebc692020-07-29 18:01:01682 std::unique_ptr<InSessionAuthDialogControllerImpl>
683 in_session_auth_dialog_controller_;
sky79fa34712017-03-20 23:46:47684 std::unique_ptr<KeyboardBrightnessControlDelegate>
685 keyboard_brightness_control_delegate_;
Xiyuan Xiabe4303e72019-06-06 18:14:50686 std::unique_ptr<LocaleUpdateControllerImpl> locale_update_controller_;
Jacob Dufaultffd9b0d2017-11-15 23:07:16687 std::unique_ptr<LoginScreenController> login_screen_controller_;
sky79fa34712017-03-20 23:46:47688 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03689 std::unique_ptr<TabletModeController> tablet_mode_controller_;
Xiyuan Xiad03bd2f2019-06-05 22:00:49690 std::unique_ptr<MediaControllerImpl> media_controller_;
Tommy Steimel875de1d42019-05-17 17:11:42691 std::unique_ptr<MediaNotificationControllerImpl>
692 media_notification_controller_;
sky5ab16472017-03-21 19:35:08693 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
Kyle Horimoto9fc84fc22018-04-27 19:45:15694 std::unique_ptr<MultiDeviceNotificationPresenter>
695 multidevice_notification_presenter_;
Fabian Sommerdcb675c2020-02-12 09:31:05696 std::unique_ptr<ParentAccessController> parent_access_controller_;
Xiao Yanga16ba22e2020-03-01 04:50:25697 std::unique_ptr<QuickAnswersController> quick_answers_controller_;
dchenga94547472016-04-08 08:41:11698 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
minchbee2e312019-08-15 21:52:40699 std::unique_ptr<AshColorProvider> ash_color_provider_;
Xiyuan Xiae7b19542019-05-06 23:05:18700 std::unique_ptr<SessionControllerImpl> session_controller_;
Steven Bennetts32f5d552019-07-09 16:16:13701 std::unique_ptr<NightLightControllerImpl> night_light_controller_;
Gil Dekel69777032020-02-07 18:41:53702 std::unique_ptr<PrivacyScreenController> privacy_screen_controller_;
Qiang Xud8e897e2018-05-24 20:07:57703 std::unique_ptr<PolicyRecommendationRestorer> policy_recommendation_restorer_;
Tetsui Ohkubo54d50222018-05-10 01:58:11704 std::unique_ptr<ScreenSwitchCheckController> screen_switch_check_controller_;
Matthew Mourgos75327562019-09-09 21:23:57705 std::unique_ptr<ShelfConfig> shelf_config_;
sky5ad143a2017-03-22 04:31:23706 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23707 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16708 std::unique_ptr<ShellDelegate> shell_delegate_;
Xiyuan Xia7107d492019-06-05 16:58:54709 std::unique_ptr<ShutdownControllerImpl> shutdown_controller_;
Tetsui Ohkubo269b5792018-04-26 01:06:32710 std::unique_ptr<SystemNotificationController> system_notification_controller_;
Tetsui Ohkubo21722932018-03-02 02:56:56711 std::unique_ptr<SystemTrayModel> system_tray_model_;
sky5b45ed82017-03-27 02:54:23712 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
Anastasiia Nikolaienko8cdd7e62019-06-12 12:16:24713 std::unique_ptr<ToastManagerImpl> toast_manager_;
Alex Newcomer55b050c2020-07-11 01:55:44714 std::unique_ptr<ClipboardHistoryController> clipboard_history_controller_;
Qiang Xuf1400a362017-09-14 02:28:30715 std::unique_ptr<TouchDevicesController> touch_devices_controller_;
tbarzicc78da1ff92017-05-08 20:46:15716 std::unique_ptr<TrayAction> tray_action_;
Mike Wassermana5352da2019-05-30 17:26:08717 std::unique_ptr<WallpaperControllerImpl> wallpaper_controller_;
sky5b45ed82017-03-27 02:54:23718 std::unique_ptr<WindowCycleController> window_cycle_controller_;
Sammie Quon80e82a12019-01-23 19:55:22719 std::unique_ptr<OverviewController> overview_controller_;
Scott Violet7dbdaeb2018-12-11 22:39:02720 // Owned by |focus_controller_|.
James Cooka8963fb2019-03-09 01:00:40721 AshFocusRules* focus_rules_ = nullptr;
dchenga94547472016-04-08 08:41:11722 std::unique_ptr<::wm::ShadowController> shadow_controller_;
723 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
724 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
Xiyuan Xia14619a22019-05-14 20:20:44725 PrefService* local_state_ = nullptr;
dchenga94547472016-04-08 08:41:11726 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
dchenga94547472016-04-08 08:41:11727 std::unique_ptr<PowerButtonController> power_button_controller_;
728 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11729 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
730 std::unique_ptr<VideoDetector> video_detector_;
dchenga94547472016-04-08 08:41:11731 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
Qiang Xud77a90c2018-02-20 19:43:29732 std::unique_ptr<PersistentWindowController> persistent_window_controller_;
dchenga94547472016-04-08 08:41:11733 std::unique_ptr<HighContrastController> high_contrast_controller_;
734 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11735 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32736 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34737
oshima5a296e82016-04-29 01:32:27738 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45739
dchenga94547472016-04-08 08:41:11740 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
741 std::unique_ptr<ScreenPositionController> screen_position_controller_;
742 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
743 std::unique_ptr<EventClientImpl> event_client_;
744 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13745
[email protected]0b0b0742012-02-16 13:23:45746 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26747 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11748 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45749
mincha25f0d32020-01-17 02:55:55750 // An event filter which handles swiping back from left side of the window.
751 std::unique_ptr<BackGestureEventHandler> back_gesture_event_handler_;
752
[email protected]3537d472014-01-15 05:45:31753 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11754 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31755
[email protected]435b212e2012-04-05 19:43:37756 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11757 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37758
[email protected]745816be2011-11-22 05:08:30759 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11760 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30761
rjkroege72f8154f2016-10-29 00:49:02762 std::unique_ptr<display::DisplayManager> display_manager_;
Steven Bennetts3688c6032018-04-13 01:14:23763 std::unique_ptr<DisplayPrefs> display_prefs_;
dchenga94547472016-04-08 08:41:11764 std::unique_ptr<DisplayConfigurationController>
765 display_configuration_controller_;
Steven Bennetts9b21fa32018-04-13 23:45:55766 std::unique_ptr<DisplayConfigurationObserver> display_configuration_observer_;
[email protected]6bdf7952012-11-14 10:10:58767
hidehiko6821ca42016-06-18 11:12:23768 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56769
Sammie Quon95c6a1c2017-09-12 19:16:55770 std::unique_ptr<PeripheralBatteryNotifier> peripheral_battery_notifier_;
Alberto Herrera8a896dcc2019-07-24 22:41:44771 std::unique_ptr<PeripheralBatteryTracker> peripheral_battery_tracker_;
dchenga94547472016-04-08 08:41:11772 std::unique_ptr<PowerEventObserver> power_event_observer_;
Qiang Xu36234e532018-04-11 04:54:02773 std::unique_ptr<PowerPrefs> power_prefs_;
dchenga94547472016-04-08 08:41:11774 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
775 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
776 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
777 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34778 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11779 std::unique_ptr<BluetoothNotificationController>
[email protected]b3142722014-03-04 06:59:50780 bluetooth_notification_controller_;
Sonny Sasaka55f69fc2017-08-28 21:29:37781 std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_;
jamescookac6724332017-03-21 02:54:43782 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
Darren Shen7daf3e12019-07-02 07:25:49783 std::unique_ptr<KeyboardControllerImpl> keyboard_controller_;
Bailey Berro01bc58c82020-06-22 17:52:02784 std::unique_ptr<DisplayAlignmentController> display_alignment_controller_;
dchenga94547472016-04-08 08:41:11785 std::unique_ptr<DisplayColorManager> display_color_manager_;
786 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
787 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58788
[email protected]c1234a42013-08-20 09:35:40789 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35790 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2ef2014-02-09 22:50:39791
kylechar98748a52016-12-03 01:33:22792 // Listens for shutdown and updates DisplayConfigurator.
Steven Bennetts7683e342018-01-02 21:29:52793 std::unique_ptr<DisplayShutdownObserver> display_shutdown_observer_;
kylechar98748a52016-12-03 01:33:22794
yiyix90cfee22017-02-16 05:38:18795 // Listens for new sms messages and shows notifications.
796 std::unique_ptr<SmsObserver> sms_observer_;
797
derat94887a22017-01-20 18:17:25798 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11799 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13800 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51801
kylechar55f0eaf22017-01-11 22:57:37802 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39803
dchenga94547472016-04-08 08:41:11804 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
805 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42806 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
807 std::unique_ptr<PartialMagnificationController>
808 partial_magnification_controller_;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32809 std::unique_ptr<HighlighterController> highlighter_controller_;
[email protected]70b3e7d52012-06-02 22:12:25810
Jun Mukaif701ffa82019-05-15 20:45:25811 std::unique_ptr<DockedMagnifierControllerImpl> docked_magnifier_controller_;
Ahmed Fakhry4bf3f742018-02-06 17:33:36812
Evan Stadeeb42d772019-05-03 01:51:34813 std::unique_ptr<SnapController> snap_controller_;
814
[email protected]c0ff0342013-02-27 00:41:29815 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
816 // pointer to vend to test code.
erg36cfb952017-06-21 19:41:45817 NativeCursorManagerAsh* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03818
derat94887a22017-01-20 18:17:25819 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35820 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11821 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19822
David Tseng6792dc82018-05-04 19:18:41823 // Enables spoken feedback accessibility based on a press and hold of both
824 // volume keys.
825 std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_;
826
yjliu10679cf2020-07-17 18:16:46827 std::unique_ptr<FrameThrottlingController> frame_throttling_controller_;
828
[email protected]852a55d2012-10-17 13:30:30829 // For testing only: simulate that a modal window is open
James Cook7b7c6a52018-01-04 23:40:03830 bool simulate_modal_window_open_for_test_ = false;
[email protected]852a55d2012-10-17 13:30:30831
Evan Stade2c43a87b32017-08-31 17:53:10832 std::unique_ptr<MessageCenterController> message_center_controller_;
833
Trent Apteda250ec3ab2018-08-19 08:52:19834 base::ObserverList<ShellObserver>::Unchecked shell_observers_;
sky00c813f2017-03-08 22:48:55835
Jeremy Roman47d432e2019-08-20 14:24:00836 base::WeakPtrFactory<Shell> weak_factory_{this};
Sam McNallye36abbc2017-07-20 01:04:28837
[email protected]87b0d82e2011-10-07 21:02:59838 DISALLOW_COPY_AND_ASSIGN(Shell);
839};
840
[email protected]55f593352011-12-24 05:42:46841} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59842
[email protected]b65bdda2011-12-23 23:35:31843#endif // ASH_SHELL_H_