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