[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" |
jamescook | d4649fa | 2016-09-30 17:50:09 | [diff] [blame] | 14 | #include "ash/public/cpp/shelf_types.h" |
Xiyuan Xia | 22b1a6c | 2017-04-18 22:46:01 | [diff] [blame] | 15 | #include "ash/session/session_observer.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" |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 21 | #include "ui/app_list/app_list_constants.h" |
[email protected] | c9390bd | 2013-11-08 20:33:13 | [diff] [blame] | 22 | #include "ui/aura/window.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 | |
wychen | e120c2fd | 2017-05-10 07:37:07 | [diff] [blame] | 28 | #if defined(OS_CHROMEOS) |
| 29 | #include "ash/wm/cursor_manager_chromeos.h" |
| 30 | #endif // defined(OS_CHROMEOS) |
| 31 | |
afakhry | e4fae85 | 2017-05-09 18:49:06 | [diff] [blame] | 32 | class PrefRegistrySimple; |
tibell | b93c729b | 2017-03-30 00:45:09 | [diff] [blame] | 33 | class PrefService; |
| 34 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 35 | namespace aura { |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 36 | class RootWindow; |
derat | 94887a2 | 2017-01-20 18:17:25 | [diff] [blame] | 37 | class UserActivityForwarder; |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 38 | class Window; |
sky | a8b222f | 2017-01-12 15:47:13 | [diff] [blame] | 39 | class WindowManagerClient; |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 40 | class WindowTreeClient; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 41 | } // namespace aura |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 42 | |
warx | 533c8f6 | 2016-04-12 01:19:43 | [diff] [blame] | 43 | namespace chromeos { |
| 44 | class AudioA11yController; |
| 45 | } |
| 46 | |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 47 | namespace app_list { |
| 48 | class AppList; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 49 | } // namespace app_list |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 50 | |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 51 | namespace display { |
kylechar | f2e4e41 | 2016-12-04 04:21:35 | [diff] [blame] | 52 | class DisplayChangeObserver; |
kylechar | 7a067ec | 2017-01-07 01:16:28 | [diff] [blame] | 53 | class DisplayConfigurator; |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 54 | class DisplayManager; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 55 | } // namespace display |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 56 | |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 57 | namespace gfx { |
sky | 4ec2be8 | 2017-01-06 17:38:32 | [diff] [blame] | 58 | class Insets; |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 59 | } |
[email protected] | b6ba05d90 | 2013-10-04 21:38:45 | [diff] [blame] | 60 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 61 | namespace ui { |
derat | 2d4e62d | 2015-01-09 16:09:17 | [diff] [blame] | 62 | class UserActivityDetector; |
[email protected] | b0fa701 | 2014-04-16 12:50:57 | [diff] [blame] | 63 | class UserActivityPowerManagerNotifier; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 64 | } // namespace ui |
thanhph | 3f396851 | 2017-06-21 00:37:23 | [diff] [blame] | 65 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 66 | namespace views { |
| 67 | class NonClientFrameView; |
| 68 | class Widget; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 69 | namespace corewm { |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 70 | class TooltipController; |
| 71 | } |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 72 | } // namespace views |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 73 | |
| 74 | namespace wm { |
[email protected] | 60d677d | 2014-05-30 13:07:02 | [diff] [blame] | 75 | class AcceleratorFilter; |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 76 | class ActivationClient; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 77 | class CompoundEventFilter; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 78 | class FocusController; |
[email protected] | 86f2b5e | 2012-11-14 20:37:00 | [diff] [blame] | 79 | class ShadowController; |
[email protected] | b5756e2 | 2012-11-30 01:32:02 | [diff] [blame] | 80 | class VisibilityController; |
[email protected] | 0c2dc01 | 2012-12-02 00:00:23 | [diff] [blame] | 81 | class WindowModalityController; |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 82 | } // namespace wm |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 83 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 84 | namespace ash { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 85 | |
sky | 81a2d79 | 2017-03-17 19:14:39 | [diff] [blame] | 86 | class AcceleratorController; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 87 | class AccessibilityDelegate; |
Scott Violet | d64dac1 | 2017-06-02 21:50:08 | [diff] [blame] | 88 | class AshDisplayController; |
sky | 15ef0aa | 2017-01-20 18:55:59 | [diff] [blame] | 89 | class AppListDelegateImpl; |
erg | 36cfb95 | 2017-06-21 19:41:45 | [diff] [blame] | 90 | class NativeCursorManagerAsh; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 91 | class AshTouchTransformController; |
[email protected] | 55398d2 | 2013-10-10 19:49:20 | [diff] [blame] | 92 | class AutoclickController; |
[email protected] | b314272 | 2014-03-04 06:59:50 | [diff] [blame] | 93 | class BluetoothNotificationController; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 94 | class BrightnessControlDelegate; |
| 95 | class CastConfigController; |
robert.bradford | ab05249 | 2015-05-06 11:09:56 | [diff] [blame] | 96 | class DisplayColorManager; |
stevenjb | 537c5c3f | 2016-01-20 23:38:12 | [diff] [blame] | 97 | class DisplayConfigurationController; |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 98 | class DisplayErrorObserver; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 99 | class DragDropController; |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 100 | class EventClientImpl; |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 101 | class EventTransformationHandler; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 102 | class FirstRunHelper; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 103 | class FocusCycler; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 104 | class GPUSupport; |
| 105 | class HighContrastController; |
Vladislav Kaznacheev | 6d6aaff | 2017-07-22 04:06:32 | [diff] [blame] | 106 | class HighlighterController; |
James Cook | bb02673 | 2017-06-09 23:01:55 | [diff] [blame] | 107 | class ImeController; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 108 | class ImmersiveContextAsh; |
sky | b7b5409 | 2016-08-19 16:00:09 | [diff] [blame] | 109 | class ImmersiveHandlerFactoryAsh; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 110 | class KeyboardBrightnessControlDelegate; |
| 111 | class KeyboardUI; |
sammiequon | 203ae02 | 2016-09-18 17:23:42 | [diff] [blame] | 112 | class LaserPointerController; |
yusukes | 1168eda | 2016-04-27 07:52:08 | [diff] [blame] | 113 | class LinkHandlerModelFactory; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 114 | class LocaleNotificationController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 115 | class LockStateController; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 116 | class LogoutConfirmationController; |
xiaoyinh | 2bbdd10 | 2017-05-18 23:29:42 | [diff] [blame] | 117 | class LockScreenController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 118 | class MagnificationController; |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 119 | class TabletModeController; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 120 | class MediaController; |
[email protected] | 78d9630 | 2012-06-22 00:58:07 | [diff] [blame] | 121 | class MouseCursorEventFilter; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 122 | class MruWindowTracker; |
| 123 | class NewWindowController; |
afakhry | e4fae85 | 2017-05-09 18:49:06 | [diff] [blame] | 124 | class NightLightController; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 125 | class OverlayEventFilter; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 126 | class PaletteDelegate; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 127 | class PartialMagnificationController; |
| 128 | class PowerButtonController; |
[email protected] | 5162505 | 2013-10-10 01:40:16 | [diff] [blame] | 129 | class PowerEventObserver; |
[email protected] | 72bce52 | 2014-02-10 21:11:26 | [diff] [blame] | 130 | class ProjectingObserver; |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 131 | class ResizeShadowController; |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 132 | class ResolutionNotificationController; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 133 | class RootWindowController; |
sky | 11cf8db9 | 2017-04-10 23:38:08 | [diff] [blame] | 134 | class ShellPort; |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 135 | class ScreenLayoutObserver; |
jonross | 0af4521 | 2015-01-13 18:55:46 | [diff] [blame] | 136 | class ScreenOrientationController; |
oshima | 5a296e8 | 2016-04-29 01:32:27 | [diff] [blame] | 137 | class ScreenshotController; |
hidehiko | 6821ca4 | 2016-06-18 11:12:23 | [diff] [blame] | 138 | class ScreenPinningController; |
[email protected] | 8d625fb | 2012-07-18 16:40:06 | [diff] [blame] | 139 | class ScreenPositionController; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 140 | class SessionController; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 141 | class ShelfController; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 142 | class ShelfModel; |
| 143 | class ShelfWindowWatcher; |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 144 | class ShellDelegate; |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame] | 145 | struct ShellInitParams; |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 146 | class ShellObserver; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 147 | class ShutdownController; |
kylechar | 98748a5 | 2016-12-03 01:33:22 | [diff] [blame] | 148 | class ShutdownObserver; |
yiyix | 90cfee2 | 2017-02-16 05:38:18 | [diff] [blame] | 149 | class SmsObserver; |
xdai | d491376 | 2017-07-06 00:17:22 | [diff] [blame] | 150 | class SplitViewController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 151 | class StickyKeysController; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 152 | class SystemGestureEventFilter; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 153 | class SystemModalContainerEventFilter; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 154 | class SystemTray; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 155 | class SystemTrayController; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 156 | class SystemTrayNotifier; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 157 | class ToplevelWindowEventHandler; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 158 | class ToastManager; |
tbarzic | c78da1ff9 | 2017-05-08 20:46:15 | [diff] [blame] | 159 | class TrayAction; |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 160 | class TrayBluetoothHelper; |
bshe | eaae09a | 2014-09-22 23:16:52 | [diff] [blame] | 161 | class VirtualKeyboardController; |
[email protected] | ded58fd | 2013-10-09 07:56:55 | [diff] [blame] | 162 | class VideoActivityNotifier; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 163 | class VideoDetector; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 164 | class VpnList; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 165 | class WallpaperController; |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 166 | class WallpaperDelegate; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 167 | class WebNotificationTray; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 168 | class WindowCycleController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 169 | class WindowPositioner; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 170 | class WindowSelectorController; |
msw | 607227f8 | 2016-08-30 17:22:39 | [diff] [blame] | 171 | class WindowTreeHostManager; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 172 | |
sky | 494c6cbd | 2017-03-27 20:57:48 | [diff] [blame] | 173 | enum class Config; |
| 174 | enum class LoginStatus; |
Xiaohui Chen | ba65544e | 2017-08-12 02:30:14 | [diff] [blame] | 175 | enum class VoiceInteractionState; |
sky | 494c6cbd | 2017-03-27 20:57:48 | [diff] [blame] | 176 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 177 | // Shell is a singleton object that presents the Shell API and implements the |
[email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 178 | // RootWindow's delegate interface. |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 179 | // |
| 180 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 181 | // takes ownership of the Shell. |
Xiyuan Xia | 22b1a6c | 2017-04-18 22:46:01 | [diff] [blame] | 182 | class ASH_EXPORT Shell : public SessionObserver, |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 183 | public SystemModalContainerEventFilterDelegate, |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 184 | public ui::EventTarget, |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 185 | public ::wm::ActivationChangeObserver { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 186 | public: |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 187 | typedef std::vector<RootWindowController*> RootWindowControllerList; |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 188 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 189 | // A shell must be explicitly created so that it can call |Init()| with the |
| 190 | // delegate set. |delegate| can be NULL (if not required for initialization). |
[email protected] | 09464c7 | 2013-04-26 07:31:28 | [diff] [blame] | 191 | // Takes ownership of |delegate|. |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame] | 192 | static Shell* CreateInstance(const ShellInitParams& init_params); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 193 | |
| 194 | // Should never be called before |CreateInstance()|. |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 195 | static Shell* Get(); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 196 | |
[email protected] | b3b7bcd | 2012-03-06 19:35:45 | [diff] [blame] | 197 | // Returns true if the ash shell has been instantiated. |
| 198 | static bool HasInstance(); |
| 199 | |
[email protected] | ef589af | 2011-12-03 01:07:15 | [diff] [blame] | 200 | static void DeleteInstance(); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 201 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 202 | // Returns the root window controller for the primary root window. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 203 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 204 | static RootWindowController* GetPrimaryRootWindowController(); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 205 | |
thanhph | c90f49ca | 2017-03-03 17:48:53 | [diff] [blame] | 206 | // Returns the RootWindowController for the given display id. If there |
| 207 | // is no display for |display_id|, null is returned. |
| 208 | static RootWindowController* GetRootWindowControllerWithDisplayId( |
| 209 | int64_t display_id); |
| 210 | |
Scott Violet | 596bb4634 | 2017-06-21 14:43:13 | [diff] [blame] | 211 | // Returns the root Window for the given display id. If there is no display |
| 212 | // for |display_id| null is returned. |
| 213 | static aura::Window* GetRootWindowForDisplayId(int64_t display_id); |
| 214 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 215 | // Returns all root window controllers. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 216 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 217 | static RootWindowControllerList GetAllRootWindowControllers(); |
| 218 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 219 | // Returns the primary root Window. The primary root Window is the one that |
| 220 | // has a launcher. |
| 221 | static aura::Window* GetPrimaryRootWindow(); |
[email protected] | e73bd780 | 2012-02-17 20:10:34 | [diff] [blame] | 222 | |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 223 | // Returns the root window that newly created windows should be added to. |
| 224 | // Value can be temporarily overridden using ScopedRootWindowForNewWindows. |
| 225 | // NOTE: this returns the root, newly created window should be added to the |
| 226 | // appropriate container in the returned window. |
| 227 | static aura::Window* GetRootWindowForNewWindows(); |
mfomitchev | a1a8aa6 | 2016-05-03 16:23:26 | [diff] [blame] | 228 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 229 | // Returns all root windows. |
[email protected] | c9390bd | 2013-11-08 20:33:13 | [diff] [blame] | 230 | static aura::Window::Windows GetAllRootWindows(); |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 231 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 232 | static aura::Window* GetContainer(aura::Window* root_window, |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 233 | int container_id); |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 234 | static const aura::Window* GetContainer(const aura::Window* root_window, |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 235 | int container_id); |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 236 | |
sky | a8b222f | 2017-01-12 15:47:13 | [diff] [blame] | 237 | // TODO(sky): move this and WindowManagerClient into ShellMash that is owned |
| 238 | // by Shell. Doing the move is gated on having mash create Shell. |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 239 | static void set_window_tree_client(aura::WindowTreeClient* client) { |
| 240 | window_tree_client_ = client; |
| 241 | } |
| 242 | |
| 243 | static aura::WindowTreeClient* window_tree_client() { |
| 244 | return window_tree_client_; |
| 245 | } |
| 246 | |
sky | a8b222f | 2017-01-12 15:47:13 | [diff] [blame] | 247 | static void set_window_manager_client(aura::WindowManagerClient* client) { |
| 248 | window_manager_client_ = client; |
| 249 | } |
| 250 | static aura::WindowManagerClient* window_manager_client() { |
| 251 | return window_manager_client_; |
| 252 | } |
| 253 | |
jamescook | 0dfe563 | 2017-04-05 18:49:02 | [diff] [blame] | 254 | static Config GetAshConfig(); |
moshayedi | c229a52 | 2017-05-05 18:14:26 | [diff] [blame] | 255 | static bool ShouldUseIMEService(); |
sky | 494c6cbd | 2017-03-27 20:57:48 | [diff] [blame] | 256 | |
Wenzhao Zang | 56c29293 | 2017-08-02 04:58:34 | [diff] [blame] | 257 | // Registers all ash related local state prefs to the given |registry|. |
| 258 | static void RegisterLocalStatePrefs(PrefRegistrySimple* registry); |
| 259 | |
James Cook | 8532dbc | 2017-07-31 21:54:51 | [diff] [blame] | 260 | // Registers all ash related user profile prefs to the given |registry|. |
James Cook | 9807235 | 2017-08-07 18:00:07 | [diff] [blame] | 261 | // Can be called before Shell is initialized. |
James Cook | 8532dbc | 2017-07-31 21:54:51 | [diff] [blame] | 262 | static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
afakhry | e4fae85 | 2017-05-09 18:49:06 | [diff] [blame] | 263 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 264 | // Creates a default views::NonClientFrameView for use by windows in the |
| 265 | // Ash environment. |
| 266 | views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 267 | views::Widget* widget); |
| 268 | |
msw | ad28b25 | 2016-08-09 02:42:07 | [diff] [blame] | 269 | // Sets work area insets of the display containing |window|, pings observers. |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 270 | void SetDisplayWorkAreaInsets(aura::Window* window, |
[email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 271 | const gfx::Insets& insets); |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 272 | |
[email protected] | 58868abf | 2014-01-17 23:45:33 | [diff] [blame] | 273 | // Called when a casting session is started or stopped. |
| 274 | void OnCastingSessionStartedOrStopped(bool started); |
| 275 | |
[email protected] | 0e3e7cb | 2014-04-12 05:18:25 | [diff] [blame] | 276 | // Called when a root window is created. |
varkha | c71444e5 | 2017-05-25 22:51:34 | [diff] [blame] | 277 | void OnRootWindowAdded(aura::Window* root_window); |
[email protected] | 0e3e7cb | 2014-04-12 05:18:25 | [diff] [blame] | 278 | |
Keigo Oka | e82281a | 2017-06-14 13:59:14 | [diff] [blame] | 279 | // Creates a keyboard controller and associate it with the primary root window |
| 280 | // controller. Destroys the old keyboard controller if it already exists. |
[email protected] | 51f43811 | 2013-11-18 19:32:50 | [diff] [blame] | 281 | void CreateKeyboard(); |
| 282 | |
Keigo Oka | c7617a4 | 2017-06-14 11:33:24 | [diff] [blame] | 283 | // Destroys the virtual keyboard. |
| 284 | void DestroyKeyboard(); |
[email protected] | e1b299b | 2014-01-29 23:53:41 | [diff] [blame] | 285 | |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 286 | // Test if TabletModeWindowManager is not enabled, and if |
| 287 | // TabletModeController is not currently setting a display rotation. Or if |
[email protected] | da28585 | 2014-05-27 19:53:43 | [diff] [blame] | 288 | // the |resolution_notification_controller_| is not showing its confirmation |
| 289 | // dialog. If true then changes to display settings can be saved. |
| 290 | bool ShouldSaveDisplaySettings(); |
[email protected] | da28585 | 2014-05-27 19:53:43 | [diff] [blame] | 291 | |
sky | 81a2d79 | 2017-03-17 19:14:39 | [diff] [blame] | 292 | AcceleratorController* accelerator_controller() { |
| 293 | return accelerator_controller_.get(); |
sky | 44a0989 | 2016-07-20 17:46:58 | [diff] [blame] | 294 | } |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 295 | AccessibilityDelegate* accessibility_delegate() { |
| 296 | return accessibility_delegate_.get(); |
| 297 | } |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 298 | app_list::AppList* app_list() { return app_list_.get(); } |
Scott Violet | d64dac1 | 2017-06-02 21:50:08 | [diff] [blame] | 299 | AshDisplayController* ash_display_controller() { |
| 300 | return ash_display_controller_.get(); |
| 301 | } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 302 | BrightnessControlDelegate* brightness_control_delegate() { |
| 303 | return brightness_control_delegate_.get(); |
| 304 | } |
| 305 | CastConfigController* cast_config() { return cast_config_.get(); } |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 306 | display::DisplayManager* display_manager() { return display_manager_.get(); } |
stevenjb | 537c5c3f | 2016-01-20 23:38:12 | [diff] [blame] | 307 | DisplayConfigurationController* display_configuration_controller() { |
| 308 | return display_configuration_controller_.get(); |
| 309 | } |
Sammie Quon | a6f9640 | 2017-08-24 01:08:37 | [diff] [blame^] | 310 | EventClientImpl* event_client() { return event_client_.get(); } |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 311 | ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 312 | FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
James Cook | f0c78fc | 2017-06-15 14:42:55 | [diff] [blame] | 313 | ImeController* ime_controller() { return ime_controller_.get(); } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 314 | KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() { |
| 315 | return keyboard_brightness_control_delegate_.get(); |
| 316 | } |
| 317 | KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); } |
| 318 | LocaleNotificationController* locale_notification_controller() { |
| 319 | return locale_notification_controller_.get(); |
| 320 | } |
| 321 | LogoutConfirmationController* logout_confirmation_controller() { |
| 322 | return logout_confirmation_controller_.get(); |
| 323 | } |
xiaoyinh | 2bbdd10 | 2017-05-18 23:29:42 | [diff] [blame] | 324 | LockScreenController* lock_screen_controller() { |
| 325 | return lock_screen_controller_.get(); |
| 326 | } |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 327 | MediaController* media_controller() { return media_controller_.get(); } |
| 328 | MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } |
| 329 | NewWindowController* new_window_controller() { |
| 330 | return new_window_controller_.get(); |
| 331 | } |
afakhry | 9e0a18b3 | 2017-06-05 19:23:14 | [diff] [blame] | 332 | NightLightController* night_light_controller(); |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 333 | SessionController* session_controller() { return session_controller_.get(); } |
| 334 | ShelfController* shelf_controller() { return shelf_controller_.get(); } |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 335 | ShelfModel* shelf_model(); |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 336 | ShutdownController* shutdown_controller() { |
| 337 | return shutdown_controller_.get(); |
| 338 | } |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 339 | SystemTrayController* system_tray_controller() { |
| 340 | return system_tray_controller_.get(); |
| 341 | } |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 342 | SystemTrayNotifier* system_tray_notifier() { |
| 343 | return system_tray_notifier_.get(); |
| 344 | } |
Sammie Quon | a6f9640 | 2017-08-24 01:08:37 | [diff] [blame^] | 345 | TabletModeController* tablet_mode_controller() { |
| 346 | return tablet_mode_controller_.get(); |
| 347 | } |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 348 | views::corewm::TooltipController* tooltip_controller() { |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 349 | return tooltip_controller_.get(); |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 350 | } |
tbarzic | c78da1ff9 | 2017-05-08 20:46:15 | [diff] [blame] | 351 | TrayAction* tray_action() { return tray_action_.get(); } |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 352 | VpnList* vpn_list() { return vpn_list_.get(); } |
| 353 | WindowCycleController* window_cycle_controller() { |
| 354 | return window_cycle_controller_.get(); |
| 355 | } |
| 356 | WindowSelectorController* window_selector_controller() { |
| 357 | return window_selector_controller_.get(); |
| 358 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 359 | OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); } |
yusukes | 1168eda | 2016-04-27 07:52:08 | [diff] [blame] | 360 | LinkHandlerModelFactory* link_handler_model_factory() { |
| 361 | return link_handler_model_factory_; |
| 362 | } |
| 363 | void set_link_handler_model_factory( |
| 364 | LinkHandlerModelFactory* link_handler_model_factory) { |
| 365 | link_handler_model_factory_ = link_handler_model_factory; |
| 366 | } |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 367 | PowerButtonController* power_button_controller() { |
| 368 | return power_button_controller_.get(); |
| 369 | } |
[email protected] | ab4f8c9 | 2013-05-30 19:07:47 | [diff] [blame] | 370 | LockStateController* lock_state_controller() { |
| 371 | return lock_state_controller_.get(); |
[email protected] | 222f40c | 2012-10-18 08:58:13 | [diff] [blame] | 372 | } |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 373 | PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 374 | ShellDelegate* shell_delegate() { return shell_delegate_.get(); } |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 375 | VideoDetector* video_detector() { return video_detector_.get(); } |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 376 | WallpaperController* wallpaper_controller() { |
| 377 | return wallpaper_controller_.get(); |
| 378 | } |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 379 | WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); } |
oshima | e281892 | 2015-07-28 01:18:52 | [diff] [blame] | 380 | WindowTreeHostManager* window_tree_host_manager() { |
| 381 | return window_tree_host_manager_.get(); |
[email protected] | 3e1cdd31 | 2012-06-07 03:48:41 | [diff] [blame] | 382 | } |
chirantan | 40e4cd8 | 2015-02-19 01:08:19 | [diff] [blame] | 383 | PowerEventObserver* power_event_observer() { |
| 384 | return power_event_observer_.get(); |
| 385 | } |
kylechar | 55f0eaf2 | 2017-01-11 22:57:37 | [diff] [blame] | 386 | AshTouchTransformController* touch_transformer_controller() { |
[email protected] | 03122891a | 2014-05-13 23:56:49 | [diff] [blame] | 387 | return touch_transformer_controller_.get(); |
| 388 | } |
sammiequon | 203ae02 | 2016-09-18 17:23:42 | [diff] [blame] | 389 | LaserPointerController* laser_pointer_controller() { |
| 390 | return laser_pointer_controller_.get(); |
| 391 | } |
| 392 | PartialMagnificationController* partial_magnification_controller() { |
| 393 | return partial_magnification_controller_.get(); |
| 394 | } |
Vladislav Kaznacheev | 6d6aaff | 2017-07-22 04:06:32 | [diff] [blame] | 395 | HighlighterController* highlighter_controller() { |
| 396 | return highlighter_controller_.get(); |
| 397 | } |
oshima | 5a296e8 | 2016-04-29 01:32:27 | [diff] [blame] | 398 | ScreenshotController* screenshot_controller() { |
| 399 | return screenshot_controller_.get(); |
mukai | 19274bdd | 2015-02-24 22:37:48 | [diff] [blame] | 400 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 401 | MouseCursorEventFilter* mouse_cursor_filter() { |
[email protected] | 8b7ba87b | 2012-09-01 00:40:40 | [diff] [blame] | 402 | return mouse_cursor_filter_.get(); |
| 403 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 404 | EventTransformationHandler* event_transformation_handler() { |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 405 | return event_transformation_handler_.get(); |
| 406 | } |
sadrul | 7a8785e | 2016-02-12 21:54:35 | [diff] [blame] | 407 | ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); } |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 408 | |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 409 | HighContrastController* high_contrast_controller() { |
| 410 | return high_contrast_controller_.get(); |
| 411 | } |
| 412 | |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 413 | MagnificationController* magnification_controller() { |
[email protected] | c1c67017 | 2012-04-26 04:20:26 | [diff] [blame] | 414 | return magnification_controller_.get(); |
| 415 | } |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 416 | |
[email protected] | 55398d2 | 2013-10-10 19:49:20 | [diff] [blame] | 417 | AutoclickController* autoclick_controller() { |
| 418 | return autoclick_controller_.get(); |
| 419 | } |
| 420 | |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 421 | ToastManager* toast_manager() { return toast_manager_.get(); } |
| 422 | |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 423 | ::wm::ActivationClient* activation_client(); |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 424 | |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 425 | // Force the shelf to query for it's current visibility state. |
jamescook | 6afad6d | 2016-06-01 00:35:01 | [diff] [blame] | 426 | // TODO(jamescook): Move to Shelf. |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 427 | void UpdateShelfVisibility(); |
| 428 | |
Sam McNally | e36abbc | 2017-07-20 01:04:28 | [diff] [blame] | 429 | // Gets the local state pref service. It can be null in mash if connecting to |
| 430 | // local state pref service has not completed successfully. |
Wenzhao Zang | 44240fb | 2017-07-13 01:36:54 | [diff] [blame] | 431 | PrefService* GetLocalStatePrefService() const; |
| 432 | |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [diff] [blame] | 433 | // Returns WebNotificationTray on the primary root window. |
| 434 | WebNotificationTray* GetWebNotificationTray(); |
[email protected] | 6d6546e | 2012-05-30 23:12:02 | [diff] [blame] | 435 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 436 | // Does the primary display have status area? |
| 437 | bool HasPrimaryStatusArea(); |
| 438 | |
| 439 | // Returns the system tray on primary display. |
| 440 | SystemTray* GetPrimarySystemTray(); |
[email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 441 | |
[email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 442 | static void set_initially_hide_cursor(bool hide) { |
| 443 | initially_hide_cursor_ = hide; |
| 444 | } |
| 445 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 446 | ResizeShadowController* resize_shadow_controller() { |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 447 | return resize_shadow_controller_.get(); |
| 448 | } |
| 449 | |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 450 | // Made available for tests. |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 451 | ::wm::ShadowController* shadow_controller() { |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 452 | return shadow_controller_.get(); |
| 453 | } |
| 454 | |
[email protected] | f946670 | 2012-09-17 16:35:27 | [diff] [blame] | 455 | // Starts the animation that occurs on first login. |
| 456 | void DoInitialWorkspaceAnimation(); |
| 457 | |
oshima | e281892 | 2015-07-28 01:18:52 | [diff] [blame] | 458 | // TODO(oshima): Move these objects to WindowTreeHostManager. |
kylechar | 7a067ec | 2017-01-07 01:16:28 | [diff] [blame] | 459 | display::DisplayConfigurator* display_configurator() { |
[email protected] | 1e31cbd | 2014-04-07 20:06:11 | [diff] [blame] | 460 | return display_configurator_.get(); |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 461 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 462 | DisplayErrorObserver* display_error_observer() { |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 463 | return display_error_observer_.get(); |
| 464 | } |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 465 | |
yiyix | a68ade51 | 2016-09-01 17:38:13 | [diff] [blame] | 466 | ScreenLayoutObserver* screen_layout_observer() { |
| 467 | return screen_layout_observer_.get(); |
| 468 | } |
| 469 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 470 | ResolutionNotificationController* resolution_notification_controller() { |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 471 | return resolution_notification_controller_.get(); |
| 472 | } |
[email protected] | 0dc8551 | 2014-03-13 13:26:41 | [diff] [blame] | 473 | |
jonross | 0af4521 | 2015-01-13 18:55:46 | [diff] [blame] | 474 | ScreenOrientationController* screen_orientation_controller() { |
| 475 | return screen_orientation_controller_.get(); |
jonross | f21fea1 | 2014-11-13 01:22:51 | [diff] [blame] | 476 | } |
| 477 | |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 478 | TrayBluetoothHelper* tray_bluetooth_helper() { |
| 479 | return tray_bluetooth_helper_.get(); |
| 480 | } |
| 481 | |
rsadam | c727b6a | 2014-10-31 18:59:33 | [diff] [blame] | 482 | VirtualKeyboardController* virtual_keyboard_controller() { |
| 483 | return virtual_keyboard_controller_.get(); |
| 484 | } |
warx | 533c8f6 | 2016-04-12 01:19:43 | [diff] [blame] | 485 | |
| 486 | chromeos::AudioA11yController* audio_a11y_controller() { |
| 487 | return audio_a11y_controller_.get(); |
| 488 | } |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 489 | |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 490 | WindowPositioner* window_positioner() { return window_positioner_.get(); } |
[email protected] | e9a7131 | 2013-10-04 03:20:01 | [diff] [blame] | 491 | |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 492 | UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } |
[email protected] | 5d2ea36 | 2013-12-13 08:10:18 | [diff] [blame] | 493 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 494 | void SetTouchHudProjectionEnabled(bool enabled); |
| 495 | |
| 496 | bool is_touch_hud_projection_enabled() const { |
| 497 | return is_touch_hud_projection_enabled_; |
| 498 | } |
| 499 | |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 500 | // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily. |
msw | ad3d955 | 2017-05-18 21:23:36 | [diff] [blame] | 501 | void set_root_window_for_new_windows(aura::Window* root) { |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 502 | root_window_for_new_windows_ = root; |
| 503 | } |
| 504 | |
[email protected] | 59ccade | 2013-10-17 17:56:40 | [diff] [blame] | 505 | // Creates instance of FirstRunHelper. Caller is responsible for deleting |
| 506 | // returned object. |
| 507 | ash::FirstRunHelper* CreateFirstRunHelper(); |
[email protected] | f94c6aa | 2013-11-08 01:18:54 | [diff] [blame] | 508 | |
yawano | dc5533b3 | 2017-02-23 11:04:38 | [diff] [blame] | 509 | void SetLargeCursorSizeInDip(int large_cursor_size_in_dip); |
| 510 | |
[email protected] | 87ec220 | 2014-02-06 06:24:27 | [diff] [blame] | 511 | // Toggles cursor compositing on/off. Native cursor is disabled when cursor |
| 512 | // compositing is enabled, and vice versa. |
| 513 | void SetCursorCompositingEnabled(bool enabled); |
| 514 | |
[email protected] | 08bdabed | 2013-12-20 07:52:28 | [diff] [blame] | 515 | StickyKeysController* sticky_keys_controller() { |
| 516 | return sticky_keys_controller_.get(); |
[email protected] | f94c6aa | 2013-11-08 01:18:54 | [diff] [blame] | 517 | } |
hidehiko | 6821ca4 | 2016-06-18 11:12:23 | [diff] [blame] | 518 | |
hidehiko | 6821ca4 | 2016-06-18 11:12:23 | [diff] [blame] | 519 | ScreenPinningController* screen_pinning_controller() { |
| 520 | return screen_pinning_controller_.get(); |
| 521 | } |
| 522 | |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 523 | GPUSupport* gpu_support() { return gpu_support_.get(); } |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 524 | |
xdai | d491376 | 2017-07-06 00:17:22 | [diff] [blame] | 525 | SplitViewController* split_view_controller() { |
| 526 | return split_view_controller_.get(); |
| 527 | } |
| 528 | |
| 529 | // Returns true if split view mode is active. |
| 530 | bool IsSplitViewModeActive() const; |
| 531 | |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 532 | void AddShellObserver(ShellObserver* observer); |
| 533 | void RemoveShellObserver(ShellObserver* observer); |
| 534 | |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 535 | // Shows the app list on the active root window. |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 536 | void ShowAppList(app_list::AppListShowSource toggle_method); |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 537 | |
MinChen | eafaa52e | 2017-07-31 18:32:52 | [diff] [blame] | 538 | // Updates y position and opacity of app list. |is_end_gesture| means it is |
| 539 | // the end of the gesture dragging of app list from shelf and should restore |
| 540 | // the opacity of the app list. |
| 541 | void UpdateAppListYPositionAndOpacity(int y_position_in_screen, |
| 542 | float app_list_background_opacity, |
| 543 | bool is_end_gesture); |
MinChen | d646ae0 | 2017-07-21 23:07:17 | [diff] [blame] | 544 | |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 545 | // Dismisses the app list. |
| 546 | void DismissAppList(); |
| 547 | |
| 548 | // Shows the app list if it's not visible. Dismisses it otherwise. |
Alex Newcomer | 8fdcb934 | 2017-08-08 18:48:44 | [diff] [blame] | 549 | void ToggleAppList(app_list::AppListShowSource toggle_method); |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 550 | |
| 551 | // Returns app list actual visibility. This might differ from |
| 552 | // GetAppListTargetVisibility() when hiding animation is still in flight. |
| 553 | bool IsAppListVisible() const; |
| 554 | |
| 555 | // Returns app list target visibility. |
| 556 | bool GetAppListTargetVisibility() const; |
| 557 | |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 558 | // Called when the login status changes. |
| 559 | // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. |
| 560 | void UpdateAfterLoginStatusChange(LoginStatus status); |
| 561 | |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 562 | // Notifies observers that overview mode is about to be started (before the |
| 563 | // windows get re-arranged). |
| 564 | void NotifyOverviewModeStarting(); |
| 565 | |
| 566 | // Notifies observers that overview mode has ended. |
| 567 | void NotifyOverviewModeEnded(); |
| 568 | |
xdai | d491376 | 2017-07-06 00:17:22 | [diff] [blame] | 569 | // Notifies observers that split view mode is about to be started (before the |
| 570 | // window gets snapped and activated). |
| 571 | void NotifySplitViewModeStarting(); |
| 572 | |
| 573 | // Notifies observers that split view mode has ended. |
| 574 | void NotifySplitViewModeEnded(); |
| 575 | |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 576 | // Notifies observers that fullscreen mode has changed for |root_window|. |
varkha | c71444e5 | 2017-05-25 22:51:34 | [diff] [blame] | 577 | void NotifyFullscreenStateChanged(bool is_fullscreen, |
| 578 | aura::Window* root_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 579 | |
| 580 | // Notifies observers that |pinned_window| changed its pinned window state. |
varkha | 19d7e6c5 | 2017-05-25 21:15:30 | [diff] [blame] | 581 | void NotifyPinnedStateChanged(aura::Window* pinned_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 582 | |
| 583 | // Notifies observers that the virtual keyboard has been |
xiyuan | 3816018 | 2017-03-14 22:50:13 | [diff] [blame] | 584 | // activated/deactivated for |root_window|. |
sky | 97f9a743 | 2017-05-09 05:14:31 | [diff] [blame] | 585 | void NotifyVirtualKeyboardActivated(bool activated, |
| 586 | aura::Window* root_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 587 | |
| 588 | // Notifies observers that the shelf was created for |root_window|. |
| 589 | // TODO(jamescook): Move to Shelf. |
varkha | 6b016b0f | 2017-05-26 16:14:18 | [diff] [blame] | 590 | void NotifyShelfCreatedForRootWindow(aura::Window* root_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 591 | |
| 592 | // Notifies observers that |root_window|'s shelf changed alignment. |
| 593 | // TODO(jamescook): Move to Shelf. |
varkha | 6b016b0f | 2017-05-26 16:14:18 | [diff] [blame] | 594 | void NotifyShelfAlignmentChanged(aura::Window* root_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 595 | |
| 596 | // Notifies observers that |root_window|'s shelf changed auto-hide behavior. |
| 597 | // TODO(jamescook): Move to Shelf. |
varkha | 6b016b0f | 2017-05-26 16:14:18 | [diff] [blame] | 598 | void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window); |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 599 | |
jamescook | 518dccbd | 2017-05-18 04:57:07 | [diff] [blame] | 600 | // Used to provide better error messages for Shell::Get() under mash. |
| 601 | static void SetIsBrowserProcessWithMash(); |
| 602 | |
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame] | 603 | // Used when Chrome owns the pref service (not mash). |
| 604 | void SetLocalStatePrefService(PrefService* local_state); |
| 605 | |
muyuanli | d766f2e | 2017-06-26 20:17:19 | [diff] [blame] | 606 | void NotifyAppListVisibilityChanged(bool visible, aura::Window* root_window); |
| 607 | |
Xiaohui Chen | ba65544e | 2017-08-12 02:30:14 | [diff] [blame] | 608 | void NotifyVoiceInteractionStatusChanged(VoiceInteractionState state); |
newcomer | 2febb983 | 2017-06-12 17:00:23 | [diff] [blame] | 609 | |
Yue Li | 2564a8d | 2017-08-21 23:30:32 | [diff] [blame] | 610 | void NotifyVoiceInteractionEnabled(bool enabled); |
| 611 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 612 | private: |
[email protected] | c39be8f | 2012-06-15 22:58:36 | [diff] [blame] | 613 | FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 614 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); |
| 615 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 616 | friend class AcceleratorControllerTest; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 617 | friend class RootWindowController; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 618 | friend class ScopedRootWindowForNewWindows; |
James Cook | 317781a | 2017-07-18 02:08:06 | [diff] [blame] | 619 | friend class ShellTestApi; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 620 | friend class SmsObserverTest; |
[email protected] | ad0c872 | 2012-03-02 20:17:45 | [diff] [blame] | 621 | |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 622 | Shell(std::unique_ptr<ShellDelegate> shell_delegate, |
sky | 11cf8db9 | 2017-04-10 23:38:08 | [diff] [blame] | 623 | std::unique_ptr<ShellPort> shell_port); |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 624 | ~Shell() override; |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 625 | |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame] | 626 | void Init(const ShellInitParams& init_params); |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 627 | |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 628 | // Initializes the root window so that it can host browser windows. |
[email protected] | 41baaed | 2013-11-09 04:18:26 | [diff] [blame] | 629 | void InitRootWindow(aura::Window* root_window); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 630 | |
sky | abcae81 | 2017-01-18 17:01:34 | [diff] [blame] | 631 | // Destroys all child windows including widgets across all roots. |
| 632 | void CloseAllRootWindowChildWindows(); |
| 633 | |
hariank | 0dd03dd | 2016-07-14 23:47:33 | [diff] [blame] | 634 | // SystemModalContainerEventFilterDelegate: |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 635 | bool CanWindowReceiveEvents(aura::Window* window) override; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 636 | |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 637 | // Overridden from ui::EventTarget: |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 638 | bool CanAcceptEvent(const ui::Event& event) override; |
| 639 | EventTarget* GetParentTarget() override; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 640 | std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
dcheng | 1f4538e | 2014-10-27 23:57:05 | [diff] [blame] | 641 | ui::EventTargeter* GetEventTargeter() override; |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 642 | |
Thiago Farina | 3b086a0 | 2017-05-30 22:32:50 | [diff] [blame] | 643 | // wm::ActivationChangeObserver: |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 644 | void OnWindowActivated(ActivationReason reason, |
| 645 | aura::Window* gained_active, |
| 646 | aura::Window* lost_active) override; |
| 647 | |
Xiyuan Xia | 22b1a6c | 2017-04-18 22:46:01 | [diff] [blame] | 648 | // SessionObserver: |
Xiyuan Xia | b64fd0a | 2017-04-13 17:53:14 | [diff] [blame] | 649 | void OnSessionStateChanged(session_manager::SessionState state) override; |
| 650 | void OnLoginStatusChanged(LoginStatus login_status) override; |
| 651 | void OnLockStateChanged(bool locked) override; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 652 | |
jamescook | 788b4fc | 2017-05-18 16:16:06 | [diff] [blame] | 653 | // Finalizes the shelf state. Called after the user session is active and |
| 654 | // the profile is available. |
| 655 | void InitializeShelf(); |
| 656 | |
Sam McNally | f4dab61 | 2017-08-16 03:06:33 | [diff] [blame] | 657 | // Callback for prefs::ConnectToPrefService. |
Sam McNally | e36abbc | 2017-07-20 01:04:28 | [diff] [blame] | 658 | void OnLocalStatePrefServiceInitialized( |
| 659 | std::unique_ptr<::PrefService> pref_service); |
tibell | b93c729b | 2017-03-30 00:45:09 | [diff] [blame] | 660 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 661 | static Shell* instance_; |
| 662 | |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 663 | // Only valid in mash, for classic ash this is null. |
| 664 | static aura::WindowTreeClient* window_tree_client_; |
sky | a8b222f | 2017-01-12 15:47:13 | [diff] [blame] | 665 | static aura::WindowManagerClient* window_manager_client_; |
sky | 00f98a37 | 2017-01-11 06:03:49 | [diff] [blame] | 666 | |
[email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 667 | // If set before the Shell is initialized, the mouse cursor will be hidden |
| 668 | // when the screen is initially created. |
| 669 | static bool initially_hide_cursor_; |
| 670 | |
sky | 11cf8db9 | 2017-04-10 23:38:08 | [diff] [blame] | 671 | std::unique_ptr<ShellPort> shell_port_; |
sky | 984c189 | 2016-04-20 00:00:34 | [diff] [blame] | 672 | |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 673 | // The CompoundEventFilter owned by aura::Env object. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 674 | std::unique_ptr<::wm::CompoundEventFilter> env_filter_; |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 675 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 676 | std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 677 | std::unique_ptr<WindowPositioner> window_positioner_; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 678 | |
sky | 81a2d79 | 2017-03-17 19:14:39 | [diff] [blame] | 679 | std::unique_ptr<AcceleratorController> accelerator_controller_; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 680 | std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
Scott Violet | d64dac1 | 2017-06-02 21:50:08 | [diff] [blame] | 681 | std::unique_ptr<AshDisplayController> ash_display_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 682 | std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| 683 | std::unique_ptr<CastConfigController> cast_config_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 684 | std::unique_ptr<DragDropController> drag_drop_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 685 | std::unique_ptr<FocusCycler> focus_cycler_; |
James Cook | f0c78fc | 2017-06-15 14:42:55 | [diff] [blame] | 686 | std::unique_ptr<ImeController> ime_controller_; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 687 | std::unique_ptr<ImmersiveContextAsh> immersive_context_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 688 | std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 689 | keyboard_brightness_control_delegate_; |
| 690 | std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 691 | std::unique_ptr<LocaleNotificationController> locale_notification_controller_; |
xiaoyinh | 2bbdd10 | 2017-05-18 23:29:42 | [diff] [blame] | 692 | std::unique_ptr<LockScreenController> lock_screen_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 693 | std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 694 | std::unique_ptr<TabletModeController> tablet_mode_controller_; |
sky | 5ab1647 | 2017-03-21 19:35:08 | [diff] [blame] | 695 | std::unique_ptr<MediaController> media_controller_; |
| 696 | std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
| 697 | std::unique_ptr<NewWindowController> new_window_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 698 | std::unique_ptr<PaletteDelegate> palette_delegate_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 699 | std::unique_ptr<ResizeShadowController> resize_shadow_controller_; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 700 | std::unique_ptr<SessionController> session_controller_; |
afakhry | e4fae85 | 2017-05-09 18:49:06 | [diff] [blame] | 701 | std::unique_ptr<NightLightController> night_light_controller_; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 702 | std::unique_ptr<ShelfController> shelf_controller_; |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 703 | std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 704 | std::unique_ptr<ShellDelegate> shell_delegate_; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 705 | std::unique_ptr<ShutdownController> shutdown_controller_; |
sky | 79fa3471 | 2017-03-20 23:46:47 | [diff] [blame] | 706 | std::unique_ptr<SystemTrayController> system_tray_controller_; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 707 | std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 708 | std::unique_ptr<ToastManager> toast_manager_; |
tbarzic | c78da1ff9 | 2017-05-08 20:46:15 | [diff] [blame] | 709 | std::unique_ptr<TrayAction> tray_action_; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 710 | std::unique_ptr<VpnList> vpn_list_; |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 711 | std::unique_ptr<WallpaperController> wallpaper_controller_; |
sky | b073203a | 2017-03-13 16:59:16 | [diff] [blame] | 712 | std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; |
sky | 5b45ed8 | 2017-03-27 02:54:23 | [diff] [blame] | 713 | std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 714 | std::unique_ptr<WindowSelectorController> window_selector_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 715 | std::unique_ptr<::wm::ShadowController> shadow_controller_; |
| 716 | std::unique_ptr<::wm::VisibilityController> visibility_controller_; |
| 717 | std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; |
sky | 7db5ccf | 2017-03-14 21:52:29 | [diff] [blame] | 718 | std::unique_ptr<app_list::AppList> app_list_; |
James Cook | 8532dbc | 2017-07-31 21:54:51 | [diff] [blame] | 719 | |
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame] | 720 | // Used in non-mash. Owned by chrome. |
| 721 | PrefService* local_state_non_mash_ = nullptr; |
| 722 | |
| 723 | // Used in mash. |
| 724 | std::unique_ptr<PrefService> local_state_mash_; |
James Cook | 8532dbc | 2017-07-31 21:54:51 | [diff] [blame] | 725 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 726 | std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; |
yusukes | 1168eda | 2016-04-27 07:52:08 | [diff] [blame] | 727 | LinkHandlerModelFactory* link_handler_model_factory_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 728 | std::unique_ptr<PowerButtonController> power_button_controller_; |
| 729 | std::unique_ptr<LockStateController> lock_state_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 730 | std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; |
| 731 | std::unique_ptr<VideoDetector> video_detector_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 732 | std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; |
| 733 | std::unique_ptr<HighContrastController> high_contrast_controller_; |
| 734 | std::unique_ptr<MagnificationController> magnification_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 735 | std::unique_ptr<AutoclickController> autoclick_controller_; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 736 | std::unique_ptr<::wm::FocusController> focus_controller_; |
sky | 984c189 | 2016-04-20 00:00:34 | [diff] [blame] | 737 | |
oshima | 5a296e8 | 2016-04-29 01:32:27 | [diff] [blame] | 738 | std::unique_ptr<ScreenshotController> screenshot_controller_; |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 739 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 740 | std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_; |
| 741 | std::unique_ptr<ScreenPositionController> screen_position_controller_; |
| 742 | std::unique_ptr<SystemModalContainerEventFilter> modality_filter_; |
| 743 | std::unique_ptr<EventClientImpl> event_client_; |
| 744 | std::unique_ptr<EventTransformationHandler> event_transformation_handler_; |
[email protected] | ae18b911 | 2011-11-07 16:59:13 | [diff] [blame] | 745 | |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 746 | // An event filter that pre-handles key events while the partial |
[email protected] | a1584a71 | 2012-07-30 21:02:26 | [diff] [blame] | 747 | // screenshot UI or the keyboard overlay is active. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 748 | std::unique_ptr<OverlayEventFilter> overlay_filter_; |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 749 | |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 750 | // An event filter which handles moving and resizing windows. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 751 | std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_; |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 752 | |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 753 | // An event filter which handles system level gestures |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 754 | std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_; |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 755 | |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 756 | // An event filter that pre-handles global accelerators. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 757 | std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_; |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 758 | |
rjkroege | 72f8154f | 2016-10-29 00:49:02 | [diff] [blame] | 759 | std::unique_ptr<display::DisplayManager> display_manager_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 760 | std::unique_ptr<DisplayConfigurationController> |
| 761 | display_configuration_controller_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 762 | |
hidehiko | 6821ca4 | 2016-06-18 11:12:23 | [diff] [blame] | 763 | std::unique_ptr<ScreenPinningController> screen_pinning_controller_; |
[email protected] | a9a4046 | 2013-07-31 06:22:56 | [diff] [blame] | 764 | |
derat | 94887a2 | 2017-01-20 18:17:25 | [diff] [blame] | 765 | // Forwards user activity ui::mojom::UserActivityMonitor to |
| 766 | // |user_activity_detector_|. Only initialized for mash. |
| 767 | std::unique_ptr<aura::UserActivityForwarder> user_activity_forwarder_; |
| 768 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 769 | std::unique_ptr<PowerEventObserver> power_event_observer_; |
| 770 | std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; |
| 771 | std::unique_ptr<VideoActivityNotifier> video_activity_notifier_; |
| 772 | std::unique_ptr<StickyKeysController> sticky_keys_controller_; |
| 773 | std::unique_ptr<ResolutionNotificationController> |
[email protected] | 7bc49bd | 2014-01-22 09:30:34 | [diff] [blame] | 774 | resolution_notification_controller_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 775 | std::unique_ptr<BluetoothNotificationController> |
[email protected] | b314272 | 2014-03-04 06:59:50 | [diff] [blame] | 776 | bluetooth_notification_controller_; |
jamescook | ac672433 | 2017-03-21 02:54:43 | [diff] [blame] | 777 | std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 778 | std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_; |
warx | 533c8f6 | 2016-04-12 01:19:43 | [diff] [blame] | 779 | std::unique_ptr<chromeos::AudioA11yController> audio_a11y_controller_; |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 780 | // Controls video output device state. |
kylechar | 7a067ec | 2017-01-07 01:16:28 | [diff] [blame] | 781 | std::unique_ptr<display::DisplayConfigurator> display_configurator_; |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 782 | std::unique_ptr<DisplayColorManager> display_color_manager_; |
| 783 | std::unique_ptr<DisplayErrorObserver> display_error_observer_; |
| 784 | std::unique_ptr<ProjectingObserver> projecting_observer_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 785 | |
[email protected] | c1234a4 | 2013-08-20 09:35:40 | [diff] [blame] | 786 | // Listens for output changes and updates the display manager. |
kylechar | f2e4e41 | 2016-12-04 04:21:35 | [diff] [blame] | 787 | std::unique_ptr<display::DisplayChangeObserver> display_change_observer_; |
[email protected] | 3dff2ef | 2014-02-09 22:50:39 | [diff] [blame] | 788 | |
kylechar | 98748a5 | 2016-12-03 01:33:22 | [diff] [blame] | 789 | // Listens for shutdown and updates DisplayConfigurator. |
| 790 | std::unique_ptr<ShutdownObserver> shutdown_observer_; |
| 791 | |
yiyix | 90cfee2 | 2017-02-16 05:38:18 | [diff] [blame] | 792 | // Listens for new sms messages and shows notifications. |
| 793 | std::unique_ptr<SmsObserver> sms_observer_; |
| 794 | |
derat | 94887a2 | 2017-01-20 18:17:25 | [diff] [blame] | 795 | // Implements content::ScreenOrientationController for Chrome OS. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 796 | std::unique_ptr<ScreenOrientationController> screen_orientation_controller_; |
yiyix | a68ade51 | 2016-09-01 17:38:13 | [diff] [blame] | 797 | std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_; |
jonross | f21fea1 | 2014-11-13 01:22:51 | [diff] [blame] | 798 | |
kylechar | 55f0eaf2 | 2017-01-11 22:57:37 | [diff] [blame] | 799 | std::unique_ptr<AshTouchTransformController> touch_transformer_controller_; |
dnicoara | 8c3bd1e6 | 2014-10-30 19:53:39 | [diff] [blame] | 800 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 801 | std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_; |
| 802 | std::unique_ptr<ui::EventHandler> speech_feedback_handler_; |
sammiequon | 203ae02 | 2016-09-18 17:23:42 | [diff] [blame] | 803 | std::unique_ptr<LaserPointerController> laser_pointer_controller_; |
| 804 | std::unique_ptr<PartialMagnificationController> |
| 805 | partial_magnification_controller_; |
Vladislav Kaznacheev | 6d6aaff | 2017-07-22 04:06:32 | [diff] [blame] | 806 | std::unique_ptr<HighlighterController> highlighter_controller_; |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 807 | |
xdai | d491376 | 2017-07-06 00:17:22 | [diff] [blame] | 808 | // The split view controller for Chrome OS in tablet mode. |
| 809 | std::unique_ptr<SplitViewController> split_view_controller_; |
| 810 | |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 811 | // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a |
| 812 | // pointer to vend to test code. |
erg | 36cfb95 | 2017-06-21 19:41:45 | [diff] [blame] | 813 | NativeCursorManagerAsh* native_cursor_manager_; |
[email protected] | e76096a5f | 2014-04-08 04:08:03 | [diff] [blame] | 814 | |
derat | 94887a2 | 2017-01-20 18:17:25 | [diff] [blame] | 815 | // Cursor may be hidden on certain key events in Chrome OS, whereas we never |
sadrul | 7a8785e | 2016-02-12 21:54:35 | [diff] [blame] | 816 | // hide the cursor on Windows. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 817 | std::unique_ptr<::wm::CursorManager> cursor_manager_; |
[email protected] | 4b8003c | 2012-07-26 00:54:19 | [diff] [blame] | 818 | |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 819 | // For testing only: simulate that a modal window is open |
| 820 | bool simulate_modal_window_open_for_testing_; |
| 821 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 822 | bool is_touch_hud_projection_enabled_; |
| 823 | |
msw | ad3d955 | 2017-05-18 21:23:36 | [diff] [blame] | 824 | // See comment for GetRootWindowForNewWindows(). |
| 825 | aura::Window* root_window_for_new_windows_ = nullptr; |
| 826 | aura::Window* scoped_root_window_for_new_windows_ = nullptr; |
sky | 2734438 | 2017-03-08 21:30:32 | [diff] [blame] | 827 | |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 828 | // Injected content::GPUDataManager support. |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 829 | std::unique_ptr<GPUSupport> gpu_support_; |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 830 | |
sky | b7b5409 | 2016-08-19 16:00:09 | [diff] [blame] | 831 | std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; |
| 832 | |
sky | 15ef0aa | 2017-01-20 18:55:59 | [diff] [blame] | 833 | std::unique_ptr<AppListDelegateImpl> app_list_delegate_impl_; |
| 834 | |
sky | 00c813f | 2017-03-08 22:48:55 | [diff] [blame] | 835 | base::ObserverList<ShellObserver> shell_observers_; |
| 836 | |
Sam McNally | e36abbc | 2017-07-20 01:04:28 | [diff] [blame] | 837 | base::WeakPtrFactory<Shell> weak_factory_; |
| 838 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 839 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 840 | }; |
| 841 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 842 | } // namespace ash |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 843 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 844 | #endif // ASH_SHELL_H_ |