[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 5 | #ifndef ASH_SHELL_H_ |
| 6 | #define ASH_SHELL_H_ |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 7 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 8 | #include <memory> |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 9 | #include <utility> |
| 10 | #include <vector> |
| 11 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 12 | #include "ash/ash_export.h" |
[email protected] | 5d2ea36 | 2013-12-13 08:10:18 | [diff] [blame] | 13 | #include "ash/metrics/user_metrics_recorder.h" |
Mitsuru Oshima | e3e29b3 | 2020-07-07 17:29:17 | [diff] [blame] | 14 | #include "ash/public/cpp/session/session_observer.h" |
jamescook | d4649fa | 2016-09-30 17:50:09 | [diff] [blame] | 15 | #include "ash/public/cpp/shelf_types.h" |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 16 | #include "ash/wm/system_modal_container_event_filter_delegate.h" |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 17 | #include "base/gtest_prod_util.h" |
avi | db567a8a | 2015-12-20 17:07:24 | [diff] [blame] | 18 | #include "base/macros.h" |
[email protected] | 6f67df5 | 2013-10-29 01:07:15 | [diff] [blame] | 19 | #include "base/memory/weak_ptr.h" |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 20 | #include "base/observer_list.h" |
[email protected] | c9390bd | 2013-11-08 20:33:13 | [diff] [blame] | 21 | #include "ui/aura/window.h" |
James Cook | fa4838e | 2018-08-08 16:30:15 | [diff] [blame] | 22 | #include "ui/base/ui_base_types.h" |
oshima | f84b0da72 | 2016-04-27 19:47:19 | [diff] [blame] | 23 | #include "ui/display/screen.h" |
[email protected] | 86ccbd4 | 2013-09-18 18:11:54 | [diff] [blame] | 24 | #include "ui/events/event_target.h" |
[email protected] | ee3ed1077 | 2014-03-11 22:02:01 | [diff] [blame] | 25 | #include "ui/wm/core/cursor_manager.h" |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 26 | #include "ui/wm/public/activation_change_observer.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 27 | |
tibell | b93c729b | 2017-03-30 00:45:09 | [diff] [blame] | 28 | class PrefService; |
| 29 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 30 | namespace aura { |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 31 | class RootWindow; |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 32 | class Window; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 33 | } // namespace aura |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 34 | |
Steven Bennetts | adc71d0 | 2019-04-17 18:15:54 | [diff] [blame] | 35 | namespace dbus { |
| 36 | class Bus; |
| 37 | } |
| 38 | |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 39 | namespace display { |
kylechar | f2e4e41 | 2016-12-04 04:21:35 | [diff] [blame] | 40 | class DisplayChangeObserver; |
kylechar | 7a067ec | 2017-01-07 01:16:28 | [diff] [blame] | 41 | class DisplayConfigurator; |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 42 | class DisplayManager; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 43 | } // namespace display |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 44 | |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 45 | namespace gfx { |
sky | 4ec2be8 | 2017-01-06 17:38:32 | [diff] [blame] | 46 | class Insets; |
James Cook | fa4838e | 2018-08-08 16:30:15 | [diff] [blame] | 47 | class Point; |
Weidong Guo | 242bf92b | 2019-01-26 01:19:23 | [diff] [blame] | 48 | } // namespace gfx |
[email protected] | b6ba05d90 | 2013-10-04 21:38:45 | [diff] [blame] | 49 | |
Jun Mukai | f235779 | 2018-12-20 19:58:00 | [diff] [blame] | 50 | namespace keyboard { |
| 51 | class KeyboardUIFactory; |
| 52 | } |
| 53 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 54 | namespace ui { |
Scott Violet | c8a1c6c | 2017-11-29 23:17:36 | [diff] [blame] | 55 | class ContextFactory; |
derat | 2d4e62d | 2015-01-09 16:09:17 | [diff] [blame] | 56 | class UserActivityDetector; |
[email protected] | b0fa701 | 2014-04-16 12:50:57 | [diff] [blame] | 57 | class UserActivityPowerManagerNotifier; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 58 | } // namespace ui |
thanhph | 3f396851 | 2017-06-21 00:37:23 | [diff] [blame] | 59 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 60 | namespace views { |
| 61 | class NonClientFrameView; |
| 62 | class Widget; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 63 | namespace corewm { |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 64 | class TooltipController; |
| 65 | } |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 66 | } // namespace views |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 67 | |
| 68 | namespace wm { |
[email protected] | 60d677d | 2014-05-30 13:07:02 | [diff] [blame] | 69 | class AcceleratorFilter; |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 70 | class ActivationClient; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 71 | class CompoundEventFilter; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 72 | class FocusController; |
[email protected] | 86f2b5e | 2012-11-14 20:37:00 | [diff] [blame] | 73 | class ShadowController; |
[email protected] | b5756e2 | 2012-11-30 01:32:02 | [diff] [blame] | 74 | class VisibilityController; |
[email protected] | 0c2dc01 | 2012-12-02 00:00:23 | [diff] [blame] | 75 | class WindowModalityController; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 76 | } // namespace wm |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 77 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 78 | namespace ash { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 79 | |
Evan Stade | d7748c5 | 2019-05-08 18:17:27 | [diff] [blame] | 80 | class AcceleratorControllerImpl; |
Mike Wasserman | d13e95a | 2019-06-28 23:29:48 | [diff] [blame] | 81 | class AccessibilityControllerImpl; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 82 | class AccessibilityDelegate; |
Mike Wasserman | b00478d5 | 2019-06-18 22:20:32 | [diff] [blame] | 83 | class AccessibilityFocusRingControllerImpl; |
wutao | 9caadca | 2019-07-16 05:06:46 | [diff] [blame] | 84 | class AmbientController; |
Jeroen Dhollander | b35f5462 | 2020-09-30 15:44:24 | [diff] [blame] | 85 | class AppListControllerImpl; |
| 86 | class AshColorProvider; |
Jeffrey Kardatzke | f108f02 | 2018-04-17 17:52:35 | [diff] [blame] | 87 | class AshDBusServices; |
James Cook | a8963fb | 2019-03-09 01:00:40 | [diff] [blame] | 88 | class AshFocusRules; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 89 | class AshTouchTransformController; |
David Black | ec4cbcd | 2020-04-15 20:35:25 | [diff] [blame] | 90 | class AssistantControllerImpl; |
[email protected] | 55398d2 | 2013-10-10 19:49:20 | [diff] [blame] | 91 | class AutoclickController; |
minch | a25f0d3 | 2020-01-17 02:55:55 | [diff] [blame] | 92 | class BackGestureEventHandler; |
Toni Barzic | 9d0c82f4 | 2017-12-06 00:53:52 | [diff] [blame] | 93 | class BacklightsForcedOffSetter; |
Jeroen Dhollander | b35f5462 | 2020-09-30 15:44:24 | [diff] [blame] | 94 | class BloomUiControllerImpl; |
[email protected] | b314272 | 2014-03-04 06:59:50 | [diff] [blame] | 95 | class BluetoothNotificationController; |
Sonny Sasaka | 55f69fc | 2017-08-28 21:29:37 | [diff] [blame] | 96 | class BluetoothPowerController; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 97 | class BrightnessControlDelegate; |
Ahmed Fakhry | 0c6efef | 2020-07-30 21:51:19 | [diff] [blame] | 98 | class CaptureModeController; |
Steven Bennetts | 2a9b438 | 2018-04-26 23:41:19 | [diff] [blame] | 99 | class CrosDisplayConfig; |
Ahmed Fakhry | c77ce40 | 2019-02-13 02:32:00 | [diff] [blame] | 100 | class DesksController; |
Toni Barzic | d623831 | 2018-03-02 18:26:13 | [diff] [blame] | 101 | class DetachableBaseHandler; |
Toni Barzic | 550419f | 2018-03-08 03:56:21 | [diff] [blame] | 102 | class DetachableBaseNotificationController; |
Bailey Berro | 01bc58c8 | 2020-06-22 17:52:02 | [diff] [blame] | 103 | class DisplayAlignmentController; |
robert.bradford | ab05249 | 2015-05-06 11:09:56 | [diff] [blame] | 104 | class DisplayColorManager; |
Jeroen Dhollander | b35f5462 | 2020-09-30 15:44:24 | [diff] [blame] | 105 | class NativeCursorManagerAsh; |
stevenjb | 537c5c3f | 2016-01-20 23:38:12 | [diff] [blame] | 106 | class DisplayConfigurationController; |
Steven Bennetts | 9b21fa3 | 2018-04-13 23:45:55 | [diff] [blame] | 107 | class DisplayConfigurationObserver; |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 108 | class DisplayErrorObserver; |
Su Hong Koo | d22ceb1 | 2020-04-06 16:44:07 | [diff] [blame] | 109 | class DisplayHighlightController; |
Steven Bennetts | 3688c603 | 2018-04-13 01:14:23 | [diff] [blame] | 110 | class DisplayPrefs; |
Steven Bennetts | 7683e34 | 2018-01-02 21:29:52 | [diff] [blame] | 111 | class DisplayShutdownObserver; |
Tetsui Ohkubo | 01421b3 | 2018-05-30 16:54:59 | [diff] [blame] | 112 | class DisplaySpeakerController; |
Jun Mukai | f701ffa8 | 2019-05-15 20:45:25 | [diff] [blame] | 113 | class DockedMagnifierControllerImpl; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 114 | class DragDropController; |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 115 | class EventClientImpl; |
Mike Wasserman | aac88db1 | 2019-06-03 21:40:45 | [diff] [blame] | 116 | class EventRewriterControllerImpl; |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 117 | class EventTransformationHandler; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 118 | class FocusCycler; |
yjliu | 10679cf | 2020-07-17 18:16:46 | [diff] [blame] | 119 | class FrameThrottlingController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 120 | class HighContrastController; |
Vladislav Kaznacheev | 6d6aaff | 2017-07-22 04:06:32 | [diff] [blame] | 121 | class HighlighterController; |
Toni Barzic | e64ee29 | 2020-07-22 21:34:29 | [diff] [blame] | 122 | class HoldingSpaceController; |
Michael Giuffrida | 2d922de | 2019-03-08 00:53:14 | [diff] [blame] | 123 | class HomeScreenController; |
Darren Shen | 7b13278 | 2019-12-10 04:36:06 | [diff] [blame] | 124 | class ImeControllerImpl; |
Evan Stade | 1467204 | 2018-10-11 02:03:50 | [diff] [blame] | 125 | class ImmersiveContext; |
Yicheng Li | 93ebc69 | 2020-07-29 18:01:01 | [diff] [blame] | 126 | class InSessionAuthDialogControllerImpl; |
David Tseng | 6792dc8 | 2018-05-04 19:18:41 | [diff] [blame] | 127 | class KeyAccessibilityEnabler; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 128 | class KeyboardBrightnessControlDelegate; |
Darren Shen | 7daf3e1 | 2019-07-02 07:25:49 | [diff] [blame] | 129 | class KeyboardControllerImpl; |
sammiequon | 203ae02 | 2016-09-18 17:23:42 | [diff] [blame] | 130 | class LaserPointerController; |
Xiyuan Xia | be4303e7 | 2019-06-06 18:14:50 | [diff] [blame] | 131 | class LocaleUpdateControllerImpl; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 132 | class LockStateController; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 133 | class LogoutConfirmationController; |
Jacob Dufault | ffd9b0d | 2017-11-15 23:07:16 | [diff] [blame] | 134 | class LoginScreenController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 135 | class MagnificationController; |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 136 | class TabletModeController; |
Xiyuan Xia | d03bd2f | 2019-06-05 22:00:49 | [diff] [blame] | 137 | class MediaControllerImpl; |
Tommy Steimel | 875de1d4 | 2019-05-17 17:11:42 | [diff] [blame] | 138 | class MediaNotificationControllerImpl; |
Evan Stade | 2c43a87b3 | 2017-08-31 17:53:10 | [diff] [blame] | 139 | class MessageCenterController; |
[email protected] | 78d9630 | 2012-06-22 00:58:07 | [diff] [blame] | 140 | class MouseCursorEventFilter; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 141 | class MruWindowTracker; |
Kyle Horimoto | 9fc84fc2 | 2018-04-27 19:45:15 | [diff] [blame] | 142 | class MultiDeviceNotificationPresenter; |
Curt Clemens | 8c3a59a5 | 2020-09-25 23:58:19 | [diff] [blame] | 143 | class NearbyShareControllerImpl; |
Curt Clemens | c665963 | 2020-09-16 18:32:15 | [diff] [blame] | 144 | class NearbyShareDelegate; |
Steven Bennetts | 32f5d55 | 2019-07-09 16:16:13 | [diff] [blame] | 145 | class NightLightControllerImpl; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 146 | class OverlayEventFilter; |
Scott Violet | 60ca8a9 | 2019-04-25 23:19:31 | [diff] [blame] | 147 | class OverviewController; |
Fabian Sommer | dcb675c | 2020-02-12 09:31:05 | [diff] [blame] | 148 | class ParentAccessController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 149 | class PartialMagnificationController; |
Sammie Quon | 95c6a1c | 2017-09-12 19:16:55 | [diff] [blame] | 150 | class PeripheralBatteryNotifier; |
Alberto Herrera | 8a896dcc | 2019-07-24 22:41:44 | [diff] [blame] | 151 | class PeripheralBatteryTracker; |
Qiang Xu | d77a90c | 2018-02-20 19:43:29 | [diff] [blame] | 152 | class PersistentWindowController; |
Qiang Xu | d8e897e | 2018-05-24 20:07:57 | [diff] [blame] | 153 | class PolicyRecommendationRestorer; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 154 | class PowerButtonController; |
[email protected] | 5162505 | 2013-10-10 01:40:16 | [diff] [blame] | 155 | class PowerEventObserver; |
Qiang Xu | 36234e53 | 2018-04-11 04:54:02 | [diff] [blame] | 156 | class PowerPrefs; |
Gil Dekel | 6977703 | 2020-02-07 18:41:53 | [diff] [blame] | 157 | class PrivacyScreenController; |
[email protected] | 72bce52 | 2014-02-10 21:11:26 | [diff] [blame] | 158 | class ProjectingObserver; |
Xiao Yang | a16ba22e | 2020-03-01 04:50:25 | [diff] [blame] | 159 | class QuickAnswersController; |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 160 | class ResizeShadowController; |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 161 | class ResolutionNotificationController; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 162 | class RootWindowController; |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 163 | class ScreenLayoutObserver; |
jonross | 0af4521 | 2015-01-13 18:55:46 | [diff] [blame] | 164 | class ScreenOrientationController; |
oshima | 5a296e8 | 2016-04-29 01:32:27 | [diff] [blame] | 165 | class ScreenshotController; |
hidehiko | 6821ca4 | 2016-06-18 11:12:23 | [diff] [blame] | 166 | class ScreenPinningController; |
[email protected] | 8d625fb | 2012-07-18 16:40:06 | [diff] [blame] | 167 | class ScreenPositionController; |
Tetsui Ohkubo | 54d5022 | 2018-05-10 01:58:11 | [diff] [blame] | 168 | class ScreenSwitchCheckController; |
Xiyuan Xia | e7b1954 | 2019-05-06 23:05:18 | [diff] [blame] | 169 | class SessionControllerImpl; |
Matthew Mourgos | 7532756 | 2019-09-09 21:23:57 | [diff] [blame] | 170 | class ShelfConfig; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 171 | class ShelfController; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 172 | class ShelfWindowWatcher; |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 173 | class ShellDelegate; |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame] | 174 | struct ShellInitParams; |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 175 | class ShellObserver; |
Xiyuan Xia | 7107d49 | 2019-06-05 16:58:54 | [diff] [blame] | 176 | class ShutdownControllerImpl; |
yiyix | 90cfee2 | 2017-02-16 05:38:18 | [diff] [blame] | 177 | class SmsObserver; |
Evan Stade | eb42d77 | 2019-05-03 01:51:34 | [diff] [blame] | 178 | class SnapController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 179 | class StickyKeysController; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 180 | class SystemGestureEventFilter; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 181 | class SystemModalContainerEventFilter; |
Tetsui Ohkubo | 269b579 | 2018-04-26 01:06:32 | [diff] [blame] | 182 | class SystemNotificationController; |
Tetsui Ohkubo | 2172293 | 2018-03-02 02:56:56 | [diff] [blame] | 183 | class SystemTrayModel; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 184 | class SystemTrayNotifier; |
Anastasiia Nikolaienko | 8cdd7e6 | 2019-06-12 12:16:24 | [diff] [blame] | 185 | class ToastManagerImpl; |
Scott Violet | 60ca8a9 | 2019-04-25 23:19:31 | [diff] [blame] | 186 | class ToplevelWindowEventHandler; |
Andrew Xu | 2a5e5c4 | 2020-09-25 18:33:08 | [diff] [blame] | 187 | class ClipboardHistoryControllerImpl; |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 188 | class TouchDevicesController; |
tbarzic | c78da1ff9 | 2017-05-08 20:46:15 | [diff] [blame] | 189 | class TrayAction; |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 190 | class TrayBluetoothHelper; |
[email protected] | ded58fd | 2013-10-09 07:56:55 | [diff] [blame] | 191 | class VideoActivityNotifier; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 192 | class VideoDetector; |
Mike Wasserman | a5352da | 2019-05-30 17:26:08 | [diff] [blame] | 193 | class WallpaperControllerImpl; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 194 | class WindowCycleController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 195 | class WindowPositioner; |
msw | 607227f8 | 2016-08-30 17:22:39 | [diff] [blame] | 196 | class WindowTreeHostManager; |
Mitsuru Oshima | 51bf3d547 | 2020-06-17 21:28:34 | [diff] [blame] | 197 | class ArcInputMethodBoundsTracker; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 198 | |
sky | 494c6cbd | 2017-03-27 20:57:48 | [diff] [blame] | 199 | enum class LoginStatus; |
| 200 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 201 | // Shell is a singleton object that presents the Shell API and implements the |
[email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 202 | // RootWindow's delegate interface. |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 203 | // |
| 204 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 205 | // takes ownership of the Shell. |
Xiyuan Xia | 22b1a6c | 2017-04-18 22:46:01 | [diff] [blame] | 206 | class ASH_EXPORT Shell : public SessionObserver, |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 207 | public SystemModalContainerEventFilterDelegate, |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 208 | public ui::EventTarget, |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 209 | public ::wm::ActivationChangeObserver { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 210 | public: |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 211 | typedef std::vector<RootWindowController*> RootWindowControllerList; |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 212 | |
Scott Violet | c8a1c6c | 2017-11-29 23:17:36 | [diff] [blame] | 213 | // Creates the single Shell instance. |
| 214 | static Shell* CreateInstance(ShellInitParams init_params); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 215 | |
| 216 | // Should never be called before |CreateInstance()|. |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 217 | static Shell* Get(); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 218 | |
[email protected] | b3b7bcd | 2012-03-06 19:35:45 | [diff] [blame] | 219 | // Returns true if the ash shell has been instantiated. |
| 220 | static bool HasInstance(); |
| 221 | |
[email protected] | ef589af | 2011-12-03 01:07:15 | [diff] [blame] | 222 | static void DeleteInstance(); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 223 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 224 | // Returns the root window controller for the primary root window. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 225 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 226 | static RootWindowController* GetPrimaryRootWindowController(); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 227 | |
thanhph | c90f49ca | 2017-03-03 17:48:53 | [diff] [blame] | 228 | // Returns the RootWindowController for the given display id. If there |
| 229 | // is no display for |display_id|, null is returned. |
| 230 | static RootWindowController* GetRootWindowControllerWithDisplayId( |
| 231 | int64_t display_id); |
| 232 | |
Scott Violet | 596bb4634 | 2017-06-21 14:43:13 | [diff] [blame] | 233 | // Returns the root Window for the given display id. If there is no display |
| 234 | // for |display_id| null is returned. |
| 235 | static aura::Window* GetRootWindowForDisplayId(int64_t display_id); |
| 236 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 237 | // Returns all root window controllers. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 238 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 239 | static RootWindowControllerList GetAllRootWindowControllers(); |
| 240 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 241 | // Returns the primary root Window. The primary root Window is the one that |
| 242 | // has a launcher. |
| 243 | static aura::Window* GetPrimaryRootWindow(); |
[email protected] | e73bd780 | 2012-02-17 20:10:34 | [diff] [blame] | 244 | |
Joel Hockey | 784a832 | 2020-05-20 21:19:25 | [diff] [blame] | 245 | // Sets the root window that newly created windows should be added to. |
| 246 | static void SetRootWindowForNewWindows(aura::Window* root); |
| 247 | |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 248 | // Returns the root window that newly created windows should be added to. |
Joel Hockey | 784a832 | 2020-05-20 21:19:25 | [diff] [blame] | 249 | // Value can be temporarily overridden using |
| 250 | // display::ScopedDisplayForNewWindows. NOTE: this returns the root, newly |
| 251 | // created window should be added to the appropriate container in the returned |
| 252 | // window. |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 253 | static aura::Window* GetRootWindowForNewWindows(); |
mfomitchev | a1a8aa6 | 2016-05-03 16:23:26 | [diff] [blame] | 254 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 255 | // Returns all root windows. |
[email protected] | c9390bd | 2013-11-08 20:33:13 | [diff] [blame] | 256 | static aura::Window::Windows GetAllRootWindows(); |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 257 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 258 | static aura::Window* GetContainer(aura::Window* root_window, |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 259 | int container_id); |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 260 | static const aura::Window* GetContainer(const aura::Window* root_window, |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 261 | int container_id); |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 262 | |
James Cook | 7b7c6a5 | 2018-01-04 23:40:03 | [diff] [blame] | 263 | // If a system-modal dialog window is currently open, returns the ID of the |
| 264 | // system modal window container that contains the window. |
| 265 | // If no system-modal dialogs are open it returns -1. |
| 266 | static int GetOpenSystemModalWindowContainerId(); |
| 267 | |
| 268 | // Returns true if a system-modal dialog window is currently open. |
| 269 | static bool IsSystemModalWindowOpen(); |
| 270 | |
Mitsuru Oshima | 51bf3d547 | 2020-06-17 21:28:34 | [diff] [blame] | 271 | // Track/Untrack InputMethod bounds. |
| 272 | void TrackInputMethodBounds(ArcInputMethodBoundsTracker* tracker); |
| 273 | void UntrackTrackInputMethodBounds(ArcInputMethodBoundsTracker* tracker); |
Scott Violet | 737fb75 | 2018-04-11 15:35:22 | [diff] [blame] | 274 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 275 | // Creates a default views::NonClientFrameView for use by windows in the |
| 276 | // Ash environment. |
Thomas Lukaszewicz | 814abb35 | 2020-06-29 21:35:16 | [diff] [blame] | 277 | std::unique_ptr<views::NonClientFrameView> CreateDefaultNonClientFrameView( |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 278 | views::Widget* widget); |
| 279 | |
msw | ad28b25 | 2016-08-09 02:42:07 | [diff] [blame] | 280 | // Sets work area insets of the display containing |window|, pings observers. |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 281 | void SetDisplayWorkAreaInsets(aura::Window* window, |
[email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 282 | const gfx::Insets& insets); |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 283 | |
[email protected] | 58868abf | 2014-01-17 23:45:33 | [diff] [blame] | 284 | // Called when a casting session is started or stopped. |
| 285 | void OnCastingSessionStartedOrStopped(bool started); |
| 286 | |
[email protected] | 0e3e7cb | 2014-04-12 05:18:25 | [diff] [blame] | 287 | // Called when a root window is created. |
varkha | c71444e5 | 2017-05-25 22:51:34 | [diff] [blame] | 288 | void OnRootWindowAdded(aura::Window* root_window); |
[email protected] | 0e3e7cb | 2014-04-12 05:18:25 | [diff] [blame] | 289 | |
Zach Helfinstein | bbb6bad | 2018-05-02 18:21:51 | [diff] [blame] | 290 | // Called when dictation is activated. |
| 291 | void OnDictationStarted(); |
| 292 | |
| 293 | // Called when dictation is ended. |
| 294 | void OnDictationEnded(); |
| 295 | |
Manu Cornet | 369d8230 | 2020-02-13 17:04:52 | [diff] [blame] | 296 | // Returns whether the device is currently in tablet mode. If the tablet |
| 297 | // mode controller isn't available, we assume the device is not in |
| 298 | // tablet mode. |
| 299 | bool IsInTabletMode() const; |
| 300 | |
| 301 | // Tests if TabletModeWindowManager is not enabled, and if |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 302 | // TabletModeController is not currently setting a display rotation. Or if |
[email protected] | da28585 | 2014-05-27 19:53:43 | [diff] [blame] | 303 | // the |resolution_notification_controller_| is not showing its confirmation |
| 304 | // dialog. If true then changes to display settings can be saved. |
| 305 | bool ShouldSaveDisplaySettings(); |
[email protected] | da28585 | 2014-05-27 19:53:43 | [diff] [blame] | 306 | |
Evan Stade | d7748c5 | 2019-05-08 18:17:27 | [diff] [blame] | 307 | AcceleratorControllerImpl* accelerator_controller() { |
sky | 81a2d79 | 2017-03-17 19:14:39 | [diff] [blame] | 308 | return accelerator_controller_.get(); |
sky | 44a0989 | 2016-07-20 17:46:58 | [diff] [blame] | 309 | } |
Mike Wasserman | d13e95a | 2019-06-28 23:29:48 | [diff] [blame] | 310 | AccessibilityControllerImpl* accessibility_controller() { |
James Cook | ec14495 | 2017-09-01 00:05:16 | [diff] [blame] | 311 | return accessibility_controller_.get(); |
| 312 | } |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 313 | AccessibilityDelegate* accessibility_delegate() { |
| 314 | return accessibility_delegate_.get(); |
| 315 | } |
Mike Wasserman | b00478d5 | 2019-06-18 22:20:32 | [diff] [blame] | 316 | AccessibilityFocusRingControllerImpl* accessibility_focus_ring_controller() { |
Qiang Xu | a959100 | 2018-03-15 22:29:31 | [diff] [blame] | 317 | return accessibility_focus_ring_controller_.get(); |
| 318 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 319 | ::wm::ActivationClient* activation_client(); |
Jiaquan He | 4b48f91 | 2018-03-01 03:59:39 | [diff] [blame] | 320 | AppListControllerImpl* app_list_controller() { |
| 321 | return app_list_controller_.get(); |
| 322 | } |
wutao | 9caadca | 2019-07-16 05:06:46 | [diff] [blame] | 323 | AmbientController* ambient_controller() { return ambient_controller_.get(); } |
David Black | ec4cbcd | 2020-04-15 20:35:25 | [diff] [blame] | 324 | AssistantControllerImpl* assistant_controller() { |
| 325 | return assistant_controller_.get(); |
| 326 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 327 | AutoclickController* autoclick_controller() { |
| 328 | return autoclick_controller_.get(); |
| 329 | } |
Daniel Erat | 477c56d | 2017-12-13 21:42:54 | [diff] [blame] | 330 | BacklightsForcedOffSetter* backlights_forced_off_setter() { |
| 331 | return backlights_forced_off_setter_.get(); |
| 332 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 333 | BluetoothPowerController* bluetooth_power_controller() { |
| 334 | return bluetooth_power_controller_.get(); |
| 335 | } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 336 | BrightnessControlDelegate* brightness_control_delegate() { |
| 337 | return brightness_control_delegate_.get(); |
| 338 | } |
Steven Bennetts | 2a9b438 | 2018-04-26 23:41:19 | [diff] [blame] | 339 | CrosDisplayConfig* cros_display_config() { |
| 340 | return cros_display_config_.get(); |
| 341 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 342 | ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); } |
Ahmed Fakhry | c77ce40 | 2019-02-13 02:32:00 | [diff] [blame] | 343 | DesksController* desks_controller() { return desks_controller_.get(); } |
Toni Barzic | d623831 | 2018-03-02 18:26:13 | [diff] [blame] | 344 | DetachableBaseHandler* detachable_base_handler() { |
| 345 | return detachable_base_handler_.get(); |
| 346 | } |
| 347 | |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 348 | display::DisplayManager* display_manager() { return display_manager_.get(); } |
Steven Bennetts | 3688c603 | 2018-04-13 01:14:23 | [diff] [blame] | 349 | DisplayPrefs* display_prefs() { return display_prefs_.get(); } |
stevenjb | 537c5c3f | 2016-01-20 23:38:12 | [diff] [blame] | 350 | DisplayConfigurationController* display_configuration_controller() { |
| 351 | return display_configuration_controller_.get(); |
| 352 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 353 | |
Bailey Berro | 01bc58c8 | 2020-06-22 17:52:02 | [diff] [blame] | 354 | DisplayAlignmentController* display_alignment_controller() { |
| 355 | return display_alignment_controller_.get(); |
| 356 | } |
| 357 | |
Joone Hur | 60b9fd3 | 2019-02-23 00:10:26 | [diff] [blame] | 358 | display::DisplayConfigurator* display_configurator(); |
| 359 | |
Ahmed Fakhry | 4635734 | 2018-04-27 00:46:11 | [diff] [blame] | 360 | DisplayColorManager* display_color_manager() { |
| 361 | return display_color_manager_.get(); |
| 362 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 363 | DisplayErrorObserver* display_error_observer() { |
| 364 | return display_error_observer_.get(); |
| 365 | } |
| 366 | |
Su Hong Koo | d22ceb1 | 2020-04-06 16:44:07 | [diff] [blame] | 367 | DisplayHighlightController* display_highlight_controller() { |
| 368 | return display_highlight_controller_.get(); |
| 369 | } |
| 370 | |
Jun Mukai | f701ffa8 | 2019-05-15 20:45:25 | [diff] [blame] | 371 | DockedMagnifierControllerImpl* docked_magnifier_controller(); |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 372 | ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); } |
Mike Wasserman | aac88db1 | 2019-06-03 21:40:45 | [diff] [blame] | 373 | EventRewriterControllerImpl* event_rewriter_controller() { |
Mike Wasserman | efbf340 | 2018-04-26 00:41:32 | [diff] [blame] | 374 | return event_rewriter_controller_.get(); |
| 375 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 376 | EventClientImpl* event_client() { return event_client_.get(); } |
| 377 | EventTransformationHandler* event_transformation_handler() { |
| 378 | return event_transformation_handler_.get(); |
| 379 | } |
Michael Giuffrida | 2d922de | 2019-03-08 00:53:14 | [diff] [blame] | 380 | HomeScreenController* home_screen_controller() { |
| 381 | return home_screen_controller_.get(); |
| 382 | } |
Scott Violet | 319cfb5 | 2018-05-23 18:35:28 | [diff] [blame] | 383 | ::wm::FocusController* focus_controller() { return focus_controller_.get(); } |
James Cook | a8963fb | 2019-03-09 01:00:40 | [diff] [blame] | 384 | AshFocusRules* focus_rules() { return focus_rules_; } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 385 | FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 386 | HighlighterController* highlighter_controller() { |
| 387 | return highlighter_controller_.get(); |
| 388 | } |
| 389 | HighContrastController* high_contrast_controller() { |
| 390 | return high_contrast_controller_.get(); |
| 391 | } |
Darren Shen | 7b13278 | 2019-12-10 04:36:06 | [diff] [blame] | 392 | ImeControllerImpl* ime_controller() { return ime_controller_.get(); } |
Yicheng Li | 93ebc69 | 2020-07-29 18:01:01 | [diff] [blame] | 393 | InSessionAuthDialogControllerImpl* in_session_auth_dialog_controller() { |
| 394 | return in_session_auth_dialog_controller_.get(); |
| 395 | } |
David Tseng | 6792dc8 | 2018-05-04 19:18:41 | [diff] [blame] | 396 | KeyAccessibilityEnabler* key_accessibility_enabler() { |
| 397 | return key_accessibility_enabler_.get(); |
| 398 | } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 399 | KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() { |
| 400 | return keyboard_brightness_control_delegate_.get(); |
| 401 | } |
Darren Shen | 7daf3e1 | 2019-07-02 07:25:49 | [diff] [blame] | 402 | KeyboardControllerImpl* keyboard_controller() { |
| 403 | return keyboard_controller_.get(); |
Steven Bennetts | a00d64cc8 | 2018-10-04 00:17:22 | [diff] [blame] | 404 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 405 | LaserPointerController* laser_pointer_controller() { |
| 406 | return laser_pointer_controller_.get(); |
| 407 | } |
Xiyuan Xia | be4303e7 | 2019-06-06 18:14:50 | [diff] [blame] | 408 | LocaleUpdateControllerImpl* locale_update_controller() { |
Tatsuhisa Yamaguchi | 440e2d2e | 2018-12-05 09:16:31 | [diff] [blame] | 409 | return locale_update_controller_.get(); |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 410 | } |
Jacob Dufault | ffd9b0d | 2017-11-15 23:07:16 | [diff] [blame] | 411 | LoginScreenController* login_screen_controller() { |
| 412 | return login_screen_controller_.get(); |
xiaoyinh | 2bbdd10 | 2017-05-18 23:29:42 | [diff] [blame] | 413 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 414 | LockStateController* lock_state_controller() { |
| 415 | return lock_state_controller_.get(); |
| 416 | } |
| 417 | LogoutConfirmationController* logout_confirmation_controller() { |
| 418 | return logout_confirmation_controller_.get(); |
| 419 | } |
| 420 | MagnificationController* magnification_controller() { |
| 421 | return magnification_controller_.get(); |
| 422 | } |
Xiyuan Xia | d03bd2f | 2019-06-05 22:00:49 | [diff] [blame] | 423 | MediaControllerImpl* media_controller() { return media_controller_.get(); } |
Tommy Steimel | 875de1d4 | 2019-05-17 17:11:42 | [diff] [blame] | 424 | MediaNotificationControllerImpl* media_notification_controller() { |
Becca Hughes | c6a0a06 | 2018-10-25 16:54:13 | [diff] [blame] | 425 | return media_notification_controller_.get(); |
| 426 | } |
Evan Stade | 04c18d0 | 2017-10-20 20:53:22 | [diff] [blame] | 427 | MessageCenterController* message_center_controller() { |
| 428 | return message_center_controller_.get(); |
| 429 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 430 | MouseCursorEventFilter* mouse_cursor_filter() { |
| 431 | return mouse_cursor_filter_.get(); |
| 432 | } |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 433 | MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } |
Curt Clemens | 8c3a59a5 | 2020-09-25 23:58:19 | [diff] [blame] | 434 | NearbyShareControllerImpl* nearby_share_controller() { |
Curt Clemens | c665963 | 2020-09-16 18:32:15 | [diff] [blame] | 435 | return nearby_share_controller_.get(); |
| 436 | } |
| 437 | NearbyShareDelegate* nearby_share_delegate() { |
| 438 | return nearby_share_delegate_.get(); |
| 439 | } |
Steven Bennetts | 32f5d55 | 2019-07-09 16:16:13 | [diff] [blame] | 440 | NightLightControllerImpl* night_light_controller() { |
| 441 | return night_light_controller_.get(); |
| 442 | } |
Gil Dekel | 6977703 | 2020-02-07 18:41:53 | [diff] [blame] | 443 | PrivacyScreenController* privacy_screen_controller() { |
| 444 | return privacy_screen_controller_.get(); |
| 445 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 446 | OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); } |
Fabian Sommer | dcb675c | 2020-02-12 09:31:05 | [diff] [blame] | 447 | ParentAccessController* parent_access_controller() { |
| 448 | return parent_access_controller_.get(); |
| 449 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 450 | PartialMagnificationController* partial_magnification_controller() { |
| 451 | return partial_magnification_controller_.get(); |
| 452 | } |
Qiang Xu | d8e897e | 2018-05-24 20:07:57 | [diff] [blame] | 453 | PolicyRecommendationRestorer* policy_recommendation_restorer() { |
| 454 | return policy_recommendation_restorer_.get(); |
| 455 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 456 | PowerButtonController* power_button_controller() { |
| 457 | return power_button_controller_.get(); |
| 458 | } |
| 459 | PowerEventObserver* power_event_observer() { |
| 460 | return power_event_observer_.get(); |
| 461 | } |
| 462 | ResizeShadowController* resize_shadow_controller() { |
| 463 | return resize_shadow_controller_.get(); |
| 464 | } |
| 465 | ResolutionNotificationController* resolution_notification_controller() { |
| 466 | return resolution_notification_controller_.get(); |
| 467 | } |
| 468 | ScreenshotController* screenshot_controller() { |
| 469 | return screenshot_controller_.get(); |
| 470 | } |
| 471 | ScreenLayoutObserver* screen_layout_observer() { |
| 472 | return screen_layout_observer_.get(); |
| 473 | } |
| 474 | ScreenOrientationController* screen_orientation_controller() { |
| 475 | return screen_orientation_controller_.get(); |
| 476 | } |
| 477 | ScreenPinningController* screen_pinning_controller() { |
| 478 | return screen_pinning_controller_.get(); |
| 479 | } |
Tetsui Ohkubo | 54d5022 | 2018-05-10 01:58:11 | [diff] [blame] | 480 | ScreenSwitchCheckController* screen_switch_check_controller() { |
| 481 | return screen_switch_check_controller_.get(); |
| 482 | } |
Xiyuan Xia | e7b1954 | 2019-05-06 23:05:18 | [diff] [blame] | 483 | SessionControllerImpl* session_controller() { |
| 484 | return session_controller_.get(); |
| 485 | } |
Sammie Quon | 55741866 | 2018-04-25 18:45:51 | [diff] [blame] | 486 | ::wm::ShadowController* shadow_controller() { |
| 487 | return shadow_controller_.get(); |
| 488 | } |
Matthew Mourgos | 7532756 | 2019-09-09 21:23:57 | [diff] [blame] | 489 | ShelfConfig* shelf_config() { return shelf_config_.get(); } |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 490 | ShelfController* shelf_controller() { return shelf_controller_.get(); } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 491 | ShellDelegate* shell_delegate() { return shell_delegate_.get(); } |
Xiyuan Xia | 7107d49 | 2019-06-05 16:58:54 | [diff] [blame] | 492 | ShutdownControllerImpl* shutdown_controller() { |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 493 | return shutdown_controller_.get(); |
| 494 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 495 | StickyKeysController* sticky_keys_controller() { |
| 496 | return sticky_keys_controller_.get(); |
| 497 | } |
Steven Bennetts | 7fb8a99 | 2018-06-12 00:15:05 | [diff] [blame] | 498 | SystemNotificationController* system_notification_controller() { |
| 499 | return system_notification_controller_.get(); |
| 500 | } |
Tetsui Ohkubo | 2172293 | 2018-03-02 02:56:56 | [diff] [blame] | 501 | SystemTrayModel* system_tray_model() { return system_tray_model_.get(); } |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 502 | SystemTrayNotifier* system_tray_notifier() { |
| 503 | return system_tray_notifier_.get(); |
| 504 | } |
Manu Cornet | 369d8230 | 2020-02-13 17:04:52 | [diff] [blame] | 505 | TabletModeController* tablet_mode_controller() const { |
Sammie Quon | a6f9640 | 2017-08-24 01:08:37 | [diff] [blame] | 506 | return tablet_mode_controller_.get(); |
| 507 | } |
Anastasiia Nikolaienko | 8cdd7e6 | 2019-06-12 12:16:24 | [diff] [blame] | 508 | ToastManagerImpl* toast_manager() { return toast_manager_.get(); } |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 509 | views::corewm::TooltipController* tooltip_controller() { |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 510 | return tooltip_controller_.get(); |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 511 | } |
Andrew Xu | 2a5e5c4 | 2020-09-25 18:33:08 | [diff] [blame] | 512 | ClipboardHistoryControllerImpl* clipboard_history_controller() { |
Alex Newcomer | 55b050c | 2020-07-11 01:55:44 | [diff] [blame] | 513 | return clipboard_history_controller_.get(); |
Alex Newcomer | 46bfe14 | 2020-07-10 20:28:56 | [diff] [blame] | 514 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 515 | TouchDevicesController* touch_devices_controller() { |
| 516 | return touch_devices_controller_.get(); |
chirantan | 40e4cd8 | 2015-02-19 01:08:19 | [diff] [blame] | 517 | } |
kylechar | 55f0eaf2 | 2017-01-11 22:57:37 | [diff] [blame] | 518 | AshTouchTransformController* touch_transformer_controller() { |
[email protected] | 03122891a | 2014-05-13 23:56:49 | [diff] [blame] | 519 | return touch_transformer_controller_.get(); |
| 520 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 521 | TrayAction* tray_action() { return tray_action_.get(); } |
| 522 | TrayBluetoothHelper* tray_bluetooth_helper() { |
| 523 | return tray_bluetooth_helper_.get(); |
sammiequon | 203ae02 | 2016-09-18 17:23:42 | [diff] [blame] | 524 | } |
Evan Stade | 04c18d0 | 2017-10-20 20:53:22 | [diff] [blame] | 525 | UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 526 | VideoDetector* video_detector() { return video_detector_.get(); } |
Mike Wasserman | a5352da | 2019-05-30 17:26:08 | [diff] [blame] | 527 | WallpaperControllerImpl* wallpaper_controller() { |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 528 | return wallpaper_controller_.get(); |
Vladislav Kaznacheev | 6d6aaff | 2017-07-22 04:06:32 | [diff] [blame] | 529 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 530 | WindowCycleController* window_cycle_controller() { |
| 531 | return window_cycle_controller_.get(); |
mukai | 19274bdd | 2015-02-24 22:37:48 | [diff] [blame] | 532 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 533 | WindowPositioner* window_positioner() { return window_positioner_.get(); } |
Sammie Quon | 80e82a1 | 2019-01-23 19:55:22 | [diff] [blame] | 534 | OverviewController* overview_controller() { |
| 535 | return overview_controller_.get(); |
[email protected] | 8b7ba87b | 2012-09-01 00:40:40 | [diff] [blame] | 536 | } |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 537 | WindowTreeHostManager* window_tree_host_manager() { |
| 538 | return window_tree_host_manager_.get(); |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 539 | } |
minch | a25f0d3 | 2020-01-17 02:55:55 | [diff] [blame] | 540 | BackGestureEventHandler* back_gesture_event_handler() { |
| 541 | return back_gesture_event_handler_.get(); |
| 542 | } |
Angus L. M. McLean IV | aa6378e | 2020-09-30 18:52:20 | [diff] [blame] | 543 | ui::EventHandler* shell_tab_handler() { return shell_tab_handler_.get(); } |
Mitsuru Oshima | 89e5c135 | 2018-01-17 07:29:39 | [diff] [blame] | 544 | ToplevelWindowEventHandler* toplevel_window_event_handler() { |
| 545 | return toplevel_window_event_handler_.get(); |
| 546 | } |
Min Chen | fda33cb | 2019-07-08 17:42:23 | [diff] [blame] | 547 | AshColorProvider* ash_color_provider() { return ash_color_provider_.get(); } |
Mitsuru Oshima | 89e5c135 | 2018-01-17 07:29:39 | [diff] [blame] | 548 | |
Xiyuan Xia | bd4ea79 | 2019-05-15 01:54:06 | [diff] [blame] | 549 | PrefService* local_state() { return local_state_; } |
| 550 | |
yjliu | 10679cf | 2020-07-17 18:16:46 | [diff] [blame] | 551 | FrameThrottlingController* frame_throttling_controller() { |
| 552 | return frame_throttling_controller_.get(); |
| 553 | } |
| 554 | |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 555 | // Force the shelf to query for it's current visibility state. |
jamescook | 6afad6d | 2016-06-01 00:35:01 | [diff] [blame] | 556 | // TODO(jamescook): Move to Shelf. |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 557 | void UpdateShelfVisibility(); |
| 558 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 559 | // Does the primary display have status area? |
| 560 | bool HasPrimaryStatusArea(); |
| 561 | |
[email protected] | f946670 | 2012-09-17 16:35:27 | [diff] [blame] | 562 | // Starts the animation that occurs on first login. |
| 563 | void DoInitialWorkspaceAnimation(); |
| 564 | |
yawano | dc5533b3 | 2017-02-23 11:04:38 | [diff] [blame] | 565 | void SetLargeCursorSizeInDip(int large_cursor_size_in_dip); |
| 566 | |
Katie D | 42fef12c | 2020-05-28 17:17:10 | [diff] [blame] | 567 | // Sets a custom color for the cursor. |
| 568 | void SetCursorColor(SkColor cursor_color); |
| 569 | |
Weidong Guo | d07448f | 2017-10-18 03:35:18 | [diff] [blame] | 570 | // Updates cursor compositing on/off. Native cursor is disabled when cursor |
[email protected] | 87ec220 | 2014-02-06 06:24:27 | [diff] [blame] | 571 | // compositing is enabled, and vice versa. |
Weidong Guo | d07448f | 2017-10-18 03:35:18 | [diff] [blame] | 572 | void UpdateCursorCompositingEnabled(); |
[email protected] | 87ec220 | 2014-02-06 06:24:27 | [diff] [blame] | 573 | |
Weidong Guo | d07448f | 2017-10-18 03:35:18 | [diff] [blame] | 574 | // Force setting compositing on/off without checking dependency. |
| 575 | void SetCursorCompositingEnabled(bool enabled); |
xdai | d491376 | 2017-07-06 00:17:22 | [diff] [blame] | 576 | |
James Cook | fa4838e | 2018-08-08 16:30:15 | [diff] [blame] | 577 | // Shows the context menu for the wallpaper or shelf at |location_in_screen|. |
| 578 | void ShowContextMenu(const gfx::Point& location_in_screen, |
| 579 | ui::MenuSourceType source_type); |
| 580 | |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 581 | void AddShellObserver(ShellObserver* observer); |
| 582 | void RemoveShellObserver(ShellObserver* observer); |
| 583 | |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 584 | // Called when the login status changes. |
| 585 | // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. |
| 586 | void UpdateAfterLoginStatusChange(LoginStatus status); |
| 587 | |
Ahmed Fakhry | f1dd847ae | 2019-03-28 22:15:21 | [diff] [blame] | 588 | // Notifies observers that fullscreen mode has changed for |container|. |
| 589 | // |container| is always the active desk container. |
varkha | c71444e5 | 2017-05-25 22:51:34 | [diff] [blame] | 590 | void NotifyFullscreenStateChanged(bool is_fullscreen, |
Ahmed Fakhry | f1dd847ae | 2019-03-28 22:15:21 | [diff] [blame] | 591 | aura::Window* container); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 592 | |
| 593 | // Notifies observers that |pinned_window| changed its pinned window state. |
varkha | 19d7e6c5 | 2017-05-25 21:15:30 | [diff] [blame] | 594 | void NotifyPinnedStateChanged(aura::Window* pinned_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 595 | |
Aga Wronska | 4397114 | 2019-04-12 01:18:20 | [diff] [blame] | 596 | // Notifies observers that |root_window|'s user work area insets have changed. |
| 597 | // This notification is not fired when shelf bounds changed. |
| 598 | void NotifyUserWorkAreaInsetsChanged(aura::Window* root_window); |
Aga Wronska | 0514fd6 | 2019-03-25 20:11:37 | [diff] [blame] | 599 | |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 600 | // Notifies observers that |root_window|'s shelf changed alignment. |
| 601 | // TODO(jamescook): Move to Shelf. |
Sammie Quon | f6b30f9 | 2020-01-07 00:35:13 | [diff] [blame] | 602 | void NotifyShelfAlignmentChanged(aura::Window* root_window, |
| 603 | ShelfAlignment old_alignment); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 604 | |
| 605 | // Notifies observers that |root_window|'s shelf changed auto-hide behavior. |
| 606 | // TODO(jamescook): Move to Shelf. |
varkha | 6b016b0f | 2017-05-26 16:14:18 | [diff] [blame] | 607 | void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 608 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 609 | private: |
[email protected] | c39be8f | 2012-06-15 22:58:36 | [diff] [blame] | 610 | FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 611 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); |
| 612 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 613 | friend class AcceleratorControllerTest; |
Sam McNally | a853cd8 | 2017-08-30 01:55:10 | [diff] [blame] | 614 | friend class AshTestHelper; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 615 | friend class RootWindowController; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 616 | friend class ScopedRootWindowForNewWindows; |
James Cook | 317781a | 2017-07-18 02:08:06 | [diff] [blame] | 617 | friend class ShellTestApi; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 618 | friend class SmsObserverTest; |
[email protected] | ad0c872 | 2012-03-02 20:17:45 | [diff] [blame] | 619 | |
Ken Rockot | b9bab54 | 2019-12-12 00:53:30 | [diff] [blame] | 620 | explicit Shell(std::unique_ptr<ShellDelegate> shell_delegate); |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 621 | ~Shell() override; |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 622 | |
Scott Violet | 7e33efc | 2018-08-29 22:30:15 | [diff] [blame] | 623 | void Init(ui::ContextFactory* context_factory, |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 624 | PrefService* local_state, |
Steven Bennetts | adc71d0 | 2019-04-17 18:15:54 | [diff] [blame] | 625 | std::unique_ptr<keyboard::KeyboardUIFactory> keyboard_ui_factory, |
| 626 | scoped_refptr<dbus::Bus> dbus_bus); |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 627 | |
Steven Bennetts | 7683e34 | 2018-01-02 21:29:52 | [diff] [blame] | 628 | // Initializes the display manager and related components. |
| 629 | void InitializeDisplayManager(); |
| 630 | |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 631 | // Initializes the root window so that it can host browser windows. |
[email protected] | 41baaed | 2013-11-09 04:18:26 | [diff] [blame] | 632 | void InitRootWindow(aura::Window* root_window); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 633 | |
sky | abcae81 | 2017-01-18 17:01:34 | [diff] [blame] | 634 | // Destroys all child windows including widgets across all roots. |
| 635 | void CloseAllRootWindowChildWindows(); |
| 636 | |
hariank | 0dd03dd | 2016-07-14 23:47:33 | [diff] [blame] | 637 | // SystemModalContainerEventFilterDelegate: |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 638 | bool CanWindowReceiveEvents(aura::Window* window) override; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 639 | |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 640 | // Overridden from ui::EventTarget: |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 641 | bool CanAcceptEvent(const ui::Event& event) override; |
| 642 | EventTarget* GetParentTarget() override; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 643 | std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 644 | ui::EventTargeter* GetEventTargeter() override; |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 645 | |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 646 | // wm::ActivationChangeObserver: |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 647 | void OnWindowActivated(ActivationReason reason, |
| 648 | aura::Window* gained_active, |
| 649 | aura::Window* lost_active) override; |
| 650 | |
Xiyuan Xia | 22b1a6c | 2017-04-18 22:46:01 | [diff] [blame] | 651 | // SessionObserver: |
Steven Bennetts | badc309 | 2018-05-24 21:26:01 | [diff] [blame] | 652 | void OnFirstSessionStarted() override; |
Xiyuan Xia | b64fd0a | 2017-04-13 17:53:14 | [diff] [blame] | 653 | void OnSessionStateChanged(session_manager::SessionState state) override; |
| 654 | void OnLoginStatusChanged(LoginStatus login_status) override; |
| 655 | void OnLockStateChanged(bool locked) override; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 656 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 657 | static Shell* instance_; |
| 658 | |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 659 | // The CompoundEventFilter owned by aura::Env object. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 660 | std::unique_ptr<::wm::CompoundEventFilter> env_filter_; |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 661 | |
Mike Wasserman | aac88db1 | 2019-06-03 21:40:45 | [diff] [blame] | 662 | std::unique_ptr<EventRewriterControllerImpl> event_rewriter_controller_; |
Mike Wasserman | efbf340 | 2018-04-26 00:41:32 | [diff] [blame] | 663 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 664 | std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 665 | std::unique_ptr<WindowPositioner> window_positioner_; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 666 | |
Evan Stade | d7748c5 | 2019-05-08 18:17:27 | [diff] [blame] | 667 | std::unique_ptr<AcceleratorControllerImpl> accelerator_controller_; |
Mike Wasserman | d13e95a | 2019-06-28 23:29:48 | [diff] [blame] | 668 | std::unique_ptr<AccessibilityControllerImpl> accessibility_controller_; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 669 | std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
Mike Wasserman | b00478d5 | 2019-06-18 22:20:32 | [diff] [blame] | 670 | std::unique_ptr<AccessibilityFocusRingControllerImpl> |
Qiang Xu | a959100 | 2018-03-15 22:29:31 | [diff] [blame] | 671 | accessibility_focus_ring_controller_; |
wutao | 9caadca | 2019-07-16 05:06:46 | [diff] [blame] | 672 | std::unique_ptr<AmbientController> ambient_controller_; |
Jiaquan He | 4b48f91 | 2018-03-01 03:59:39 | [diff] [blame] | 673 | std::unique_ptr<AppListControllerImpl> app_list_controller_; |
James Cook | 8064d4c | 2019-08-07 14:55:55 | [diff] [blame] | 674 | // May be null in tests or when running on linux-chromeos. |
| 675 | scoped_refptr<dbus::Bus> dbus_bus_; |
Jeffrey Kardatzke | f108f02 | 2018-04-17 17:52:35 | [diff] [blame] | 676 | std::unique_ptr<AshDBusServices> ash_dbus_services_; |
David Black | ec4cbcd | 2020-04-15 20:35:25 | [diff] [blame] | 677 | std::unique_ptr<AssistantControllerImpl> assistant_controller_; |
Toni Barzic | 9d0c82f4 | 2017-12-06 00:53:52 | [diff] [blame] | 678 | std::unique_ptr<BacklightsForcedOffSetter> backlights_forced_off_setter_; |
Jeroen Dhollander | b35f5462 | 2020-09-30 15:44:24 | [diff] [blame] | 679 | std::unique_ptr<BloomUiControllerImpl> bloom_ui_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 680 | std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
Steven Bennetts | 2a9b438 | 2018-04-26 23:41:19 | [diff] [blame] | 681 | std::unique_ptr<CrosDisplayConfig> cros_display_config_; |
Ahmed Fakhry | c77ce40 | 2019-02-13 02:32:00 | [diff] [blame] | 682 | std::unique_ptr<DesksController> desks_controller_; |
Toni Barzic | d623831 | 2018-03-02 18:26:13 | [diff] [blame] | 683 | std::unique_ptr<DetachableBaseHandler> detachable_base_handler_; |
Toni Barzic | 550419f | 2018-03-08 03:56:21 | [diff] [blame] | 684 | std::unique_ptr<DetachableBaseNotificationController> |
| 685 | detachable_base_notification_controller_; |
Su Hong Koo | d22ceb1 | 2020-04-06 16:44:07 | [diff] [blame] | 686 | std::unique_ptr<DisplayHighlightController> display_highlight_controller_; |
Tetsui Ohkubo | 01421b3 | 2018-05-30 16:54:59 | [diff] [blame] | 687 | std::unique_ptr<DisplaySpeakerController> display_speaker_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 688 | std::unique_ptr<DragDropController> drag_drop_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 689 | std::unique_ptr<FocusCycler> focus_cycler_; |
Toni Barzic | e64ee29 | 2020-07-22 21:34:29 | [diff] [blame] | 690 | std::unique_ptr<HoldingSpaceController> holding_space_controller_; |
Michael Giuffrida | 2d922de | 2019-03-08 00:53:14 | [diff] [blame] | 691 | std::unique_ptr<HomeScreenController> home_screen_controller_; |
Darren Shen | 7b13278 | 2019-12-10 04:36:06 | [diff] [blame] | 692 | std::unique_ptr<ImeControllerImpl> ime_controller_; |
Evan Stade | 1467204 | 2018-10-11 02:03:50 | [diff] [blame] | 693 | std::unique_ptr<ImmersiveContext> immersive_context_; |
Yicheng Li | 93ebc69 | 2020-07-29 18:01:01 | [diff] [blame] | 694 | std::unique_ptr<InSessionAuthDialogControllerImpl> |
| 695 | in_session_auth_dialog_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 696 | std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 697 | keyboard_brightness_control_delegate_; |
Xiyuan Xia | be4303e7 | 2019-06-06 18:14:50 | [diff] [blame] | 698 | std::unique_ptr<LocaleUpdateControllerImpl> locale_update_controller_; |
Jacob Dufault | ffd9b0d | 2017-11-15 23:07:16 | [diff] [blame] | 699 | std::unique_ptr<LoginScreenController> login_screen_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 700 | std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 701 | std::unique_ptr<TabletModeController> tablet_mode_controller_; |
Xiyuan Xia | d03bd2f | 2019-06-05 22:00:49 | [diff] [blame] | 702 | std::unique_ptr<MediaControllerImpl> media_controller_; |
Tommy Steimel | 875de1d4 | 2019-05-17 17:11:42 | [diff] [blame] | 703 | std::unique_ptr<MediaNotificationControllerImpl> |
| 704 | media_notification_controller_; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 705 | std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
Kyle Horimoto | 9fc84fc2 | 2018-04-27 19:45:15 | [diff] [blame] | 706 | std::unique_ptr<MultiDeviceNotificationPresenter> |
| 707 | multidevice_notification_presenter_; |
Curt Clemens | 8c3a59a5 | 2020-09-25 23:58:19 | [diff] [blame] | 708 | std::unique_ptr<NearbyShareControllerImpl> nearby_share_controller_; |
Curt Clemens | c665963 | 2020-09-16 18:32:15 | [diff] [blame] | 709 | std::unique_ptr<NearbyShareDelegate> nearby_share_delegate_; |
Fabian Sommer | dcb675c | 2020-02-12 09:31:05 | [diff] [blame] | 710 | std::unique_ptr<ParentAccessController> parent_access_controller_; |
Xiao Yang | a16ba22e | 2020-03-01 04:50:25 | [diff] [blame] | 711 | std::unique_ptr<QuickAnswersController> quick_answers_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 712 | std::unique_ptr<ResizeShadowController> resize_shadow_controller_; |
Xiyuan Xia | e7b1954 | 2019-05-06 23:05:18 | [diff] [blame] | 713 | std::unique_ptr<SessionControllerImpl> session_controller_; |
minch | 308923f3 | 2020-08-28 18:58:30 | [diff] [blame] | 714 | std::unique_ptr<AshColorProvider> ash_color_provider_; |
Steven Bennetts | 32f5d55 | 2019-07-09 16:16:13 | [diff] [blame] | 715 | std::unique_ptr<NightLightControllerImpl> night_light_controller_; |
Gil Dekel | 6977703 | 2020-02-07 18:41:53 | [diff] [blame] | 716 | std::unique_ptr<PrivacyScreenController> privacy_screen_controller_; |
Qiang Xu | d8e897e | 2018-05-24 20:07:57 | [diff] [blame] | 717 | std::unique_ptr<PolicyRecommendationRestorer> policy_recommendation_restorer_; |
Tetsui Ohkubo | 54d5022 | 2018-05-10 01:58:11 | [diff] [blame] | 718 | std::unique_ptr<ScreenSwitchCheckController> screen_switch_check_controller_; |
Matthew Mourgos | 7532756 | 2019-09-09 21:23:57 | [diff] [blame] | 719 | std::unique_ptr<ShelfConfig> shelf_config_; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 720 | std::unique_ptr<ShelfController> shelf_controller_; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 721 | std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 722 | std::unique_ptr<ShellDelegate> shell_delegate_; |
Ahmed Fakhry | 0c6efef | 2020-07-30 21:51:19 | [diff] [blame] | 723 | std::unique_ptr<CaptureModeController> capture_mode_controller_; |
Xiyuan Xia | 7107d49 | 2019-06-05 16:58:54 | [diff] [blame] | 724 | std::unique_ptr<ShutdownControllerImpl> shutdown_controller_; |
Tetsui Ohkubo | 269b579 | 2018-04-26 01:06:32 | [diff] [blame] | 725 | std::unique_ptr<SystemNotificationController> system_notification_controller_; |
Tetsui Ohkubo | 2172293 | 2018-03-02 02:56:56 | [diff] [blame] | 726 | std::unique_ptr<SystemTrayModel> system_tray_model_; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 727 | std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
Anastasiia Nikolaienko | 8cdd7e6 | 2019-06-12 12:16:24 | [diff] [blame] | 728 | std::unique_ptr<ToastManagerImpl> toast_manager_; |
Andrew Xu | 2a5e5c4 | 2020-09-25 18:33:08 | [diff] [blame] | 729 | std::unique_ptr<ClipboardHistoryControllerImpl> clipboard_history_controller_; |
Qiang Xu | f1400a36 | 2017-09-14 02:28:30 | [diff] [blame] | 730 | std::unique_ptr<TouchDevicesController> touch_devices_controller_; |
tbarzic | c78da1ff9 | 2017-05-08 20:46:15 | [diff] [blame] | 731 | std::unique_ptr<TrayAction> tray_action_; |
Mike Wasserman | a5352da | 2019-05-30 17:26:08 | [diff] [blame] | 732 | std::unique_ptr<WallpaperControllerImpl> wallpaper_controller_; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 733 | std::unique_ptr<WindowCycleController> window_cycle_controller_; |
Sammie Quon | 80e82a1 | 2019-01-23 19:55:22 | [diff] [blame] | 734 | std::unique_ptr<OverviewController> overview_controller_; |
Scott Violet | 7dbdaeb | 2018-12-11 22:39:02 | [diff] [blame] | 735 | // Owned by |focus_controller_|. |
James Cook | a8963fb | 2019-03-09 01:00:40 | [diff] [blame] | 736 | AshFocusRules* focus_rules_ = nullptr; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 737 | std::unique_ptr<::wm::ShadowController> shadow_controller_; |
| 738 | std::unique_ptr<::wm::VisibilityController> visibility_controller_; |
| 739 | std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 740 | PrefService* local_state_ = nullptr; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 741 | std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 742 | std::unique_ptr<PowerButtonController> power_button_controller_; |
| 743 | std::unique_ptr<LockStateController> lock_state_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 744 | std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; |
| 745 | std::unique_ptr<VideoDetector> video_detector_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 746 | std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; |
Qiang Xu | d77a90c | 2018-02-20 19:43:29 | [diff] [blame] | 747 | std::unique_ptr<PersistentWindowController> persistent_window_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 748 | std::unique_ptr<HighContrastController> high_contrast_controller_; |
| 749 | std::unique_ptr<MagnificationController> magnification_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 750 | std::unique_ptr<AutoclickController> autoclick_controller_; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 751 | std::unique_ptr<::wm::FocusController> focus_controller_; |
sky | 984c189 | 2016-04-20 00:00:34 | [diff] [blame] | 752 | |
oshima | 5a296e8 | 2016-04-29 01:32:27 | [diff] [blame] | 753 | std::unique_ptr<ScreenshotController> screenshot_controller_; |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 754 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 755 | std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_; |
| 756 | std::unique_ptr<ScreenPositionController> screen_position_controller_; |
| 757 | std::unique_ptr<SystemModalContainerEventFilter> modality_filter_; |
| 758 | std::unique_ptr<EventClientImpl> event_client_; |
| 759 | std::unique_ptr<EventTransformationHandler> event_transformation_handler_; |
[email protected] | ae18b911 | 2011-11-07 16:59:13 | [diff] [blame] | 760 | |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 761 | // An event filter that pre-handles key events while the partial |
[email protected] | a1584a71 | 2012-07-30 21:02:26 | [diff] [blame] | 762 | // screenshot UI or the keyboard overlay is active. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 763 | std::unique_ptr<OverlayEventFilter> overlay_filter_; |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 764 | |
minch | a25f0d3 | 2020-01-17 02:55:55 | [diff] [blame] | 765 | // An event filter which handles swiping back from left side of the window. |
| 766 | std::unique_ptr<BackGestureEventHandler> back_gesture_event_handler_; |
| 767 | |
Angus L. M. McLean IV | aa6378e | 2020-09-30 18:52:20 | [diff] [blame] | 768 | // An event filter which redirects focus when tab is pressed on a RootWindow |
| 769 | // with no active windows. |
| 770 | std::unique_ptr<ui::EventHandler> shell_tab_handler_; |
| 771 | |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 772 | // An event filter which handles moving and resizing windows. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 773 | std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_; |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 774 | |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 775 | // An event filter which handles system level gestures |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 776 | std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_; |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 777 | |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 778 | // An event filter that pre-handles global accelerators. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 779 | std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_; |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 780 | |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 781 | std::unique_ptr<display::DisplayManager> display_manager_; |
Steven Bennetts | 3688c603 | 2018-04-13 01:14:23 | [diff] [blame] | 782 | std::unique_ptr<DisplayPrefs> display_prefs_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 783 | std::unique_ptr<DisplayConfigurationController> |
| 784 | display_configuration_controller_; |
Steven Bennetts | 9b21fa3 | 2018-04-13 23:45:55 | [diff] [blame] | 785 | std::unique_ptr<DisplayConfigurationObserver> display_configuration_observer_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 786 | |
hidehiko | 6821ca4 | 2016-06-18 11:12:23 | [diff] [blame] | 787 | std::unique_ptr<ScreenPinningController> screen_pinning_controller_; |
[email protected] | a9a4046 | 2013-07-31 06:22:56 | [diff] [blame] | 788 | |
Sammie Quon | 95c6a1c | 2017-09-12 19:16:55 | [diff] [blame] | 789 | std::unique_ptr<PeripheralBatteryNotifier> peripheral_battery_notifier_; |
Alberto Herrera | 8a896dcc | 2019-07-24 22:41:44 | [diff] [blame] | 790 | std::unique_ptr<PeripheralBatteryTracker> peripheral_battery_tracker_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 791 | std::unique_ptr<PowerEventObserver> power_event_observer_; |
Qiang Xu | 36234e53 | 2018-04-11 04:54:02 | [diff] [blame] | 792 | std::unique_ptr<PowerPrefs> power_prefs_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 793 | std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; |
| 794 | std::unique_ptr<VideoActivityNotifier> video_activity_notifier_; |
| 795 | std::unique_ptr<StickyKeysController> sticky_keys_controller_; |
| 796 | std::unique_ptr<ResolutionNotificationController> |
[email protected] | 7bc49bd | 2014-01-22 09:30:34 | [diff] [blame] | 797 | resolution_notification_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 798 | std::unique_ptr<BluetoothNotificationController> |
[email protected] | b314272 | 2014-03-04 06:59:50 | [diff] [blame] | 799 | bluetooth_notification_controller_; |
Sonny Sasaka | 55f69fc | 2017-08-28 21:29:37 | [diff] [blame] | 800 | std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_; |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 801 | std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_; |
Darren Shen | 7daf3e1 | 2019-07-02 07:25:49 | [diff] [blame] | 802 | std::unique_ptr<KeyboardControllerImpl> keyboard_controller_; |
Bailey Berro | 01bc58c8 | 2020-06-22 17:52:02 | [diff] [blame] | 803 | std::unique_ptr<DisplayAlignmentController> display_alignment_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 804 | std::unique_ptr<DisplayColorManager> display_color_manager_; |
| 805 | std::unique_ptr<DisplayErrorObserver> display_error_observer_; |
| 806 | std::unique_ptr<ProjectingObserver> projecting_observer_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 807 | |
[email protected] | c1234a4 | 2013-08-20 09:35:40 | [diff] [blame] | 808 | // Listens for output changes and updates the display manager. |
kylechar | f2e4e41 | 2016-12-04 04:21:35 | [diff] [blame] | 809 | std::unique_ptr<display::DisplayChangeObserver> display_change_observer_; |
[email protected] | 3dff2ef | 2014-02-09 22:50:39 | [diff] [blame] | 810 | |
kylechar | 98748a5 | 2016-12-03 01:33:22 | [diff] [blame] | 811 | // Listens for shutdown and updates DisplayConfigurator. |
Steven Bennetts | 7683e34 | 2018-01-02 21:29:52 | [diff] [blame] | 812 | std::unique_ptr<DisplayShutdownObserver> display_shutdown_observer_; |
kylechar | 98748a5 | 2016-12-03 01:33:22 | [diff] [blame] | 813 | |
yiyix | 90cfee2 | 2017-02-16 05:38:18 | [diff] [blame] | 814 | // Listens for new sms messages and shows notifications. |
| 815 | std::unique_ptr<SmsObserver> sms_observer_; |
| 816 | |
derat | 94887a2 | 2017-01-20 18:17:25 | [diff] [blame] | 817 | // Implements content::ScreenOrientationController for Chrome OS. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 818 | std::unique_ptr<ScreenOrientationController> screen_orientation_controller_; |
yiyix | a68ade51 | 2016-09-01 17:38:13 | [diff] [blame] | 819 | std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_; |
jonross | f21fea1 | 2014-11-13 01:22:51 | [diff] [blame] | 820 | |
kylechar | 55f0eaf2 | 2017-01-11 22:57:37 | [diff] [blame] | 821 | std::unique_ptr<AshTouchTransformController> touch_transformer_controller_; |
dnicoara | 8c3bd1e6 | 2014-10-30 19:53:39 | [diff] [blame] | 822 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 823 | std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_; |
| 824 | std::unique_ptr<ui::EventHandler> speech_feedback_handler_; |
sammiequon | 203ae02 | 2016-09-18 17:23:42 | [diff] [blame] | 825 | std::unique_ptr<LaserPointerController> laser_pointer_controller_; |
| 826 | std::unique_ptr<PartialMagnificationController> |
| 827 | partial_magnification_controller_; |
Vladislav Kaznacheev | 6d6aaff | 2017-07-22 04:06:32 | [diff] [blame] | 828 | std::unique_ptr<HighlighterController> highlighter_controller_; |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 829 | |
Jun Mukai | f701ffa8 | 2019-05-15 20:45:25 | [diff] [blame] | 830 | std::unique_ptr<DockedMagnifierControllerImpl> docked_magnifier_controller_; |
Ahmed Fakhry | 4bf3f74 | 2018-02-06 17:33:36 | [diff] [blame] | 831 | |
Evan Stade | eb42d77 | 2019-05-03 01:51:34 | [diff] [blame] | 832 | std::unique_ptr<SnapController> snap_controller_; |
| 833 | |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 834 | // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a |
| 835 | // pointer to vend to test code. |
erg | 36cfb95 | 2017-06-21 19:41:45 | [diff] [blame] | 836 | NativeCursorManagerAsh* native_cursor_manager_; |
[email protected] | e76096a5f | 2014-04-08 04:08:03 | [diff] [blame] | 837 | |
derat | 94887a2 | 2017-01-20 18:17:25 | [diff] [blame] | 838 | // Cursor may be hidden on certain key events in Chrome OS, whereas we never |
sadrul | 7a8785e | 2016-02-12 21:54:35 | [diff] [blame] | 839 | // hide the cursor on Windows. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 840 | std::unique_ptr<::wm::CursorManager> cursor_manager_; |
[email protected] | 4b8003c | 2012-07-26 00:54:19 | [diff] [blame] | 841 | |
David Tseng | 6792dc8 | 2018-05-04 19:18:41 | [diff] [blame] | 842 | // Enables spoken feedback accessibility based on a press and hold of both |
| 843 | // volume keys. |
| 844 | std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_; |
| 845 | |
yjliu | 10679cf | 2020-07-17 18:16:46 | [diff] [blame] | 846 | std::unique_ptr<FrameThrottlingController> frame_throttling_controller_; |
| 847 | |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 848 | // For testing only: simulate that a modal window is open |
James Cook | 7b7c6a5 | 2018-01-04 23:40:03 | [diff] [blame] | 849 | bool simulate_modal_window_open_for_test_ = false; |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 850 | |
Evan Stade | 2c43a87b3 | 2017-08-31 17:53:10 | [diff] [blame] | 851 | std::unique_ptr<MessageCenterController> message_center_controller_; |
| 852 | |
Trent Apted | a250ec3ab | 2018-08-19 08:52:19 | [diff] [blame] | 853 | base::ObserverList<ShellObserver>::Unchecked shell_observers_; |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 854 | |
Jeremy Roman | 47d432e | 2019-08-20 14:24:00 | [diff] [blame] | 855 | base::WeakPtrFactory<Shell> weak_factory_{this}; |
Sam McNally | e36abbc | 2017-07-20 01:04:28 | [diff] [blame] | 856 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 857 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 858 | }; |
| 859 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 860 | } // namespace ash |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 861 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 862 | #endif // ASH_SHELL_H_ |