blob: 6af5b1b0c16e5e13dc709c9810dc86da0e43faaa [file] [log] [blame]
[email protected]e0d22e82012-01-04 00:46:571// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]87b0d82e2011-10-07 21:02:592// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]b65bdda2011-12-23 23:35:315#ifndef ASH_SHELL_H_
6#define ASH_SHELL_H_
[email protected]87b0d82e2011-10-07 21:02:597
dchenga94547472016-04-08 08:41:118#include <memory>
[email protected]cac10fc62011-10-07 23:22:569#include <utility>
10#include <vector>
11
[email protected]b65bdda2011-12-23 23:35:3112#include "ash/ash_export.h"
[email protected]5d2ea362013-12-13 08:10:1813#include "ash/metrics/user_metrics_recorder.h"
jamescookd4649fa2016-09-30 17:50:0914#include "ash/public/cpp/shelf_types.h"
Xiyuan Xia22b1a6c2017-04-18 22:46:0115#include "ash/session/session_observer.h"
[email protected]c0ce80e2012-10-05 23:28:2716#include "ash/wm/system_modal_container_event_filter_delegate.h"
[email protected]b0639282011-12-22 21:12:2717#include "base/gtest_prod_util.h"
avidb567a8a2015-12-20 17:07:2418#include "base/macros.h"
[email protected]6f67df52013-10-29 01:07:1519#include "base/memory/weak_ptr.h"
[email protected]1a2145b2012-03-13 21:09:1720#include "base/observer_list.h"
Alex Newcomer8fdcb9342017-08-08 18:48:4421#include "ui/app_list/app_list_constants.h"
[email protected]c9390bd2013-11-08 20:33:1322#include "ui/aura/window.h"
oshimaf84b0da722016-04-27 19:47:1923#include "ui/display/screen.h"
[email protected]86ccbd42013-09-18 18:11:5424#include "ui/events/event_target.h"
[email protected]ee3ed10772014-03-11 22:02:0125#include "ui/wm/core/cursor_manager.h"
sky27344382017-03-08 21:30:3226#include "ui/wm/public/activation_change_observer.h"
[email protected]87b0d82e2011-10-07 21:02:5927
wychene120c2fd2017-05-10 07:37:0728#if defined(OS_CHROMEOS)
29#include "ash/wm/cursor_manager_chromeos.h"
30#endif // defined(OS_CHROMEOS)
31
afakhrye4fae852017-05-09 18:49:0632class PrefRegistrySimple;
tibellb93c729b2017-03-30 00:45:0933class PrefService;
34
[email protected]87b0d82e2011-10-07 21:02:5935namespace aura {
[email protected]35304ce2011-12-14 23:21:0136class RootWindow;
derat94887a22017-01-20 18:17:2537class UserActivityForwarder;
[email protected]87b0d82e2011-10-07 21:02:5938class Window;
skya8b222f2017-01-12 15:47:1339class WindowManagerClient;
sky00f98a372017-01-11 06:03:4940class WindowTreeClient;
Alex Newcomer8fdcb9342017-08-08 18:48:4441} // namespace aura
[email protected]fa4a45832012-04-12 21:32:4842
warx533c8f62016-04-12 01:19:4343namespace chromeos {
44class AudioA11yController;
45}
46
sky7db5ccf2017-03-14 21:52:2947namespace app_list {
48class AppList;
Alex Newcomer8fdcb9342017-08-08 18:48:4449} // namespace app_list
sky7db5ccf2017-03-14 21:52:2950
rjkroege72f8154f2016-10-29 00:49:0251namespace display {
kylecharf2e4e412016-12-04 04:21:3552class DisplayChangeObserver;
kylechar7a067ec2017-01-07 01:16:2853class DisplayConfigurator;
rjkroege72f8154f2016-10-29 00:49:0254class DisplayManager;
Alex Newcomer8fdcb9342017-08-08 18:48:4455} // namespace display
rjkroege72f8154f2016-10-29 00:49:0256
[email protected]2b99f8c2011-10-11 19:42:2457namespace gfx {
sky4ec2be82017-01-06 17:38:3258class Insets;
[email protected]cac10fc62011-10-07 23:22:5659}
[email protected]b6ba05d902013-10-04 21:38:4560
[email protected]a8bd1cb2012-02-17 23:05:5461namespace ui {
derat2d4e62d2015-01-09 16:09:1762class UserActivityDetector;
[email protected]b0fa7012014-04-16 12:50:5763class UserActivityPowerManagerNotifier;
Alex Newcomer8fdcb9342017-08-08 18:48:4464} // namespace ui
thanhph3f3968512017-06-21 00:37:2365
[email protected]57b8bb352012-01-11 05:11:4666namespace views {
67class NonClientFrameView;
68class Widget;
[email protected]4a59e4e2012-11-12 21:15:4069namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1470class TooltipController;
71}
Alex Newcomer8fdcb9342017-08-08 18:48:4472} // namespace views
[email protected]e319c7e2014-03-14 19:56:1473
74namespace wm {
[email protected]60d677d2014-05-30 13:07:0275class AcceleratorFilter;
Thiago Farina3b086a02017-05-30 22:32:5076class ActivationClient;
[email protected]4a59e4e2012-11-12 21:15:4077class CompoundEventFilter;
sky27344382017-03-08 21:30:3278class FocusController;
[email protected]86f2b5e2012-11-14 20:37:0079class ShadowController;
[email protected]b5756e22012-11-30 01:32:0280class VisibilityController;
[email protected]0c2dc012012-12-02 00:00:2381class WindowModalityController;
Alex Newcomer8fdcb9342017-08-08 18:48:4482} // namespace wm
[email protected]87b0d82e2011-10-07 21:02:5983
[email protected]55f593352011-12-24 05:42:4684namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5985
sky81a2d792017-03-17 19:14:3986class AcceleratorController;
sky07a24d42017-03-09 23:57:3087class AccessibilityDelegate;
Scott Violetd64dac12017-06-02 21:50:0888class AshDisplayController;
sky15ef0aa2017-01-20 18:55:5989class AppListDelegateImpl;
erg36cfb952017-06-21 19:41:4590class NativeCursorManagerAsh;
sky07a24d42017-03-09 23:57:3091class AshTouchTransformController;
[email protected]55398d22013-10-10 19:49:2092class AutoclickController;
[email protected]b3142722014-03-04 06:59:5093class BluetoothNotificationController;
Sonny Sasaka55f69fc2017-08-28 21:29:3794class BluetoothPowerController;
sky79fa34712017-03-20 23:46:4795class BrightnessControlDelegate;
96class CastConfigController;
robert.bradfordab052492015-05-06 11:09:5697class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:1298class DisplayConfigurationController;
[email protected]18b21b2e2013-03-01 20:56:2399class DisplayErrorObserver;
[email protected]084b6bb2011-11-17 05:18:16100class DragDropController;
[email protected]e67291f12012-10-10 05:52:38101class EventClientImpl;
[email protected]682990f2013-01-10 06:49:11102class EventTransformationHandler;
[email protected]093b8d642014-04-03 20:59:28103class FirstRunHelper;
sky79fa34712017-03-20 23:46:47104class FocusCycler;
[email protected]093b8d642014-04-03 20:59:28105class GPUSupport;
106class HighContrastController;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32107class HighlighterController;
James Cookbb026732017-06-09 23:01:55108class ImeController;
sky5ab16472017-03-21 19:35:08109class ImmersiveContextAsh;
skyb7b54092016-08-19 16:00:09110class ImmersiveHandlerFactoryAsh;
sky79fa34712017-03-20 23:46:47111class KeyboardBrightnessControlDelegate;
112class KeyboardUI;
sammiequon203ae022016-09-18 17:23:42113class LaserPointerController;
yusukes1168eda2016-04-27 07:52:08114class LinkHandlerModelFactory;
sky79fa34712017-03-20 23:46:47115class LocaleNotificationController;
[email protected]093b8d642014-04-03 20:59:28116class LockStateController;
sky79fa34712017-03-20 23:46:47117class LogoutConfirmationController;
xiaoyinh2bbdd102017-05-18 23:29:42118class LockScreenController;
[email protected]093b8d642014-04-03 20:59:28119class MagnificationController;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03120class TabletModeController;
sky5ab16472017-03-21 19:35:08121class MediaController;
[email protected]78d96302012-06-22 00:58:07122class MouseCursorEventFilter;
sky5ab16472017-03-21 19:35:08123class MruWindowTracker;
124class NewWindowController;
afakhrye4fae852017-05-09 18:49:06125class NightLightController;
[email protected]9ae32df2012-07-26 03:25:18126class OverlayEventFilter;
sky07a24d42017-03-09 23:57:30127class PaletteDelegate;
[email protected]093b8d642014-04-03 20:59:28128class PartialMagnificationController;
129class PowerButtonController;
[email protected]51625052013-10-10 01:40:16130class PowerEventObserver;
[email protected]72bce522014-02-10 21:11:26131class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57132class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44133class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56134class RootWindowController;
sky11cf8db92017-04-10 23:38:08135class ShellPort;
jamescookac6724332017-03-21 02:54:43136class ScreenLayoutObserver;
jonross0af45212015-01-13 18:55:46137class ScreenOrientationController;
oshima5a296e82016-04-29 01:32:27138class ScreenshotController;
hidehiko6821ca42016-06-18 11:12:23139class ScreenPinningController;
[email protected]8d625fb2012-07-18 16:40:06140class ScreenPositionController;
sky5ad143a2017-03-22 04:31:23141class SessionController;
sky5ad143a2017-03-22 04:31:23142class ShelfController;
sky5ad143a2017-03-22 04:31:23143class ShelfModel;
144class ShelfWindowWatcher;
skyb073203a2017-03-13 16:59:16145class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23146struct ShellInitParams;
sky00c813f2017-03-08 22:48:55147class ShellObserver;
sky5b45ed82017-03-27 02:54:23148class ShutdownController;
kylechar98748a52016-12-03 01:33:22149class ShutdownObserver;
yiyix90cfee22017-02-16 05:38:18150class SmsObserver;
xdaid4913762017-07-06 00:17:22151class SplitViewController;
[email protected]093b8d642014-04-03 20:59:28152class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18153class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27154class SystemModalContainerEventFilter;
[email protected]093b8d642014-04-03 20:59:28155class SystemTray;
sky79fa34712017-03-20 23:46:47156class SystemTrayController;
sky5b45ed82017-03-27 02:54:23157class SystemTrayNotifier;
[email protected]093b8d642014-04-03 20:59:28158class ToplevelWindowEventHandler;
sky07a24d42017-03-09 23:57:30159class ToastManager;
tbarzicc78da1ff92017-05-08 20:46:15160class TrayAction;
jamescookac6724332017-03-21 02:54:43161class TrayBluetoothHelper;
bsheeaae09a2014-09-22 23:16:52162class VirtualKeyboardController;
[email protected]ded58fd2013-10-09 07:56:55163class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28164class VideoDetector;
sky5b45ed82017-03-27 02:54:23165class VpnList;
sky07a24d42017-03-09 23:57:30166class WallpaperController;
skyb073203a2017-03-13 16:59:16167class WallpaperDelegate;
[email protected]093b8d642014-04-03 20:59:28168class WebNotificationTray;
sky5b45ed82017-03-27 02:54:23169class WindowCycleController;
[email protected]093b8d642014-04-03 20:59:28170class WindowPositioner;
sky5b45ed82017-03-27 02:54:23171class WindowSelectorController;
msw607227f82016-08-30 17:22:39172class WindowTreeHostManager;
[email protected]2b99f8c2011-10-11 19:42:24173
sky494c6cbd2017-03-27 20:57:48174enum class Config;
175enum class LoginStatus;
Xiaohui Chenba65544e2017-08-12 02:30:14176enum class VoiceInteractionState;
sky494c6cbd2017-03-27 20:57:48177
[email protected]87b0d82e2011-10-07 21:02:59178// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59179// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38180//
181// Upon creation, the Shell sets itself as the RootWindow's delegate, which
182// takes ownership of the Shell.
Xiyuan Xia22b1a6c2017-04-18 22:46:01183class ASH_EXPORT Shell : public SessionObserver,
sky5ad143a2017-03-22 04:31:23184 public SystemModalContainerEventFilterDelegate,
sky27344382017-03-08 21:30:32185 public ui::EventTarget,
Thiago Farina3b086a02017-05-30 22:32:50186 public ::wm::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59187 public:
[email protected]093b8d642014-04-03 20:59:28188 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23189
[email protected]3266c2b92011-11-14 00:06:08190 // A shell must be explicitly created so that it can call |Init()| with the
191 // delegate set. |delegate| can be NULL (if not required for initialization).
[email protected]09464c72013-04-26 07:31:28192 // Takes ownership of |delegate|.
[email protected]1b4c7472014-05-15 18:32:23193 static Shell* CreateInstance(const ShellInitParams& init_params);
[email protected]3266c2b92011-11-14 00:06:08194
195 // Should never be called before |CreateInstance()|.
skyb073203a2017-03-13 16:59:16196 static Shell* Get();
[email protected]3266c2b92011-11-14 00:06:08197
[email protected]b3b7bcd2012-03-06 19:35:45198 // Returns true if the ash shell has been instantiated.
199 static bool HasInstance();
200
[email protected]ef589af2011-12-03 01:07:15201 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56202
[email protected]d90b8392012-06-13 09:34:56203 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09204 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28205 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56206
thanhphc90f49ca2017-03-03 17:48:53207 // Returns the RootWindowController for the given display id. If there
208 // is no display for |display_id|, null is returned.
209 static RootWindowController* GetRootWindowControllerWithDisplayId(
210 int64_t display_id);
211
Scott Violet596bb46342017-06-21 14:43:13212 // Returns the root Window for the given display id. If there is no display
213 // for |display_id| null is returned.
214 static aura::Window* GetRootWindowForDisplayId(int64_t display_id);
215
[email protected]cf1c70e2012-08-30 01:13:02216 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09217 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23218 static RootWindowControllerList GetAllRootWindowControllers();
219
[email protected]bf9cdb362013-10-25 19:22:45220 // Returns the primary root Window. The primary root Window is the one that
221 // has a launcher.
222 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34223
sky27344382017-03-08 21:30:32224 // Returns the root window that newly created windows should be added to.
225 // Value can be temporarily overridden using ScopedRootWindowForNewWindows.
226 // NOTE: this returns the root, newly created window should be added to the
227 // appropriate container in the returned window.
228 static aura::Window* GetRootWindowForNewWindows();
mfomitcheva1a8aa62016-05-03 16:23:26229
[email protected]cf1c70e2012-08-30 01:13:02230 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13231 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23232
[email protected]bf9cdb362013-10-25 19:22:45233 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39234 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45235 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38236 int container_id);
[email protected]7b0f7502012-06-11 00:12:39237
skya8b222f2017-01-12 15:47:13238 // TODO(sky): move this and WindowManagerClient into ShellMash that is owned
239 // by Shell. Doing the move is gated on having mash create Shell.
sky00f98a372017-01-11 06:03:49240 static void set_window_tree_client(aura::WindowTreeClient* client) {
241 window_tree_client_ = client;
242 }
243
244 static aura::WindowTreeClient* window_tree_client() {
245 return window_tree_client_;
246 }
247
skya8b222f2017-01-12 15:47:13248 static void set_window_manager_client(aura::WindowManagerClient* client) {
249 window_manager_client_ = client;
250 }
251 static aura::WindowManagerClient* window_manager_client() {
252 return window_manager_client_;
253 }
254
jamescook0dfe5632017-04-05 18:49:02255 static Config GetAshConfig();
moshayedic229a522017-05-05 18:14:26256 static bool ShouldUseIMEService();
sky494c6cbd2017-03-27 20:57:48257
Wenzhao Zang56c292932017-08-02 04:58:34258 // Registers all ash related local state prefs to the given |registry|.
259 static void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
260
James Cook8532dbc2017-07-31 21:54:51261 // Registers all ash related user profile prefs to the given |registry|.
James Cook98072352017-08-07 18:00:07262 // Can be called before Shell is initialized.
James Cook8532dbc2017-07-31 21:54:51263 static void RegisterProfilePrefs(PrefRegistrySimple* registry);
afakhrye4fae852017-05-09 18:49:06264
[email protected]57b8bb352012-01-11 05:11:46265 // Creates a default views::NonClientFrameView for use by windows in the
266 // Ash environment.
267 views::NonClientFrameView* CreateDefaultNonClientFrameView(
268 views::Widget* widget);
269
mswad28b252016-08-09 02:42:07270 // Sets work area insets of the display containing |window|, pings observers.
[email protected]2e236a52012-06-27 22:21:47271 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44272 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17273
[email protected]58868abf2014-01-17 23:45:33274 // Called when a casting session is started or stopped.
275 void OnCastingSessionStartedOrStopped(bool started);
276
[email protected]0e3e7cb2014-04-12 05:18:25277 // Called when a root window is created.
varkhac71444e52017-05-25 22:51:34278 void OnRootWindowAdded(aura::Window* root_window);
[email protected]0e3e7cb2014-04-12 05:18:25279
Keigo Okae82281a2017-06-14 13:59:14280 // Creates a keyboard controller and associate it with the primary root window
281 // controller. Destroys the old keyboard controller if it already exists.
[email protected]51f438112013-11-18 19:32:50282 void CreateKeyboard();
283
Keigo Okac7617a42017-06-14 11:33:24284 // Destroys the virtual keyboard.
285 void DestroyKeyboard();
[email protected]e1b299b2014-01-29 23:53:41286
Mitsuru Oshima0e9b7a62017-07-19 18:23:03287 // Test if TabletModeWindowManager is not enabled, and if
288 // TabletModeController is not currently setting a display rotation. Or if
[email protected]da285852014-05-27 19:53:43289 // the |resolution_notification_controller_| is not showing its confirmation
290 // dialog. If true then changes to display settings can be saved.
291 bool ShouldSaveDisplaySettings();
[email protected]da285852014-05-27 19:53:43292
sky81a2d792017-03-17 19:14:39293 AcceleratorController* accelerator_controller() {
294 return accelerator_controller_.get();
sky44a09892016-07-20 17:46:58295 }
sky07a24d42017-03-09 23:57:30296 AccessibilityDelegate* accessibility_delegate() {
297 return accessibility_delegate_.get();
298 }
sky7db5ccf2017-03-14 21:52:29299 app_list::AppList* app_list() { return app_list_.get(); }
Scott Violetd64dac12017-06-02 21:50:08300 AshDisplayController* ash_display_controller() {
301 return ash_display_controller_.get();
302 }
sky79fa34712017-03-20 23:46:47303 BrightnessControlDelegate* brightness_control_delegate() {
304 return brightness_control_delegate_.get();
305 }
306 CastConfigController* cast_config() { return cast_config_.get(); }
rjkroege72f8154f2016-10-29 00:49:02307 display::DisplayManager* display_manager() { return display_manager_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12308 DisplayConfigurationController* display_configuration_controller() {
309 return display_configuration_controller_.get();
310 }
Sammie Quona6f96402017-08-24 01:08:37311 EventClientImpl* event_client() { return event_client_.get(); }
jamescookb8dcef522016-06-25 14:42:55312 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
sky79fa34712017-03-20 23:46:47313 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
James Cookf0c78fc2017-06-15 14:42:55314 ImeController* ime_controller() { return ime_controller_.get(); }
sky79fa34712017-03-20 23:46:47315 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
316 return keyboard_brightness_control_delegate_.get();
317 }
318 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
319 LocaleNotificationController* locale_notification_controller() {
320 return locale_notification_controller_.get();
321 }
322 LogoutConfirmationController* logout_confirmation_controller() {
323 return logout_confirmation_controller_.get();
324 }
xiaoyinh2bbdd102017-05-18 23:29:42325 LockScreenController* lock_screen_controller() {
326 return lock_screen_controller_.get();
327 }
sky5ab16472017-03-21 19:35:08328 MediaController* media_controller() { return media_controller_.get(); }
329 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
330 NewWindowController* new_window_controller() {
331 return new_window_controller_.get();
332 }
afakhry9e0a18b32017-06-05 19:23:14333 NightLightController* night_light_controller();
sky5ad143a2017-03-22 04:31:23334 SessionController* session_controller() { return session_controller_.get(); }
335 ShelfController* shelf_controller() { return shelf_controller_.get(); }
sky5ad143a2017-03-22 04:31:23336 ShelfModel* shelf_model();
sky5b45ed82017-03-27 02:54:23337 ShutdownController* shutdown_controller() {
338 return shutdown_controller_.get();
339 }
sky79fa34712017-03-20 23:46:47340 SystemTrayController* system_tray_controller() {
341 return system_tray_controller_.get();
342 }
sky5b45ed82017-03-27 02:54:23343 SystemTrayNotifier* system_tray_notifier() {
344 return system_tray_notifier_.get();
345 }
Sammie Quona6f96402017-08-24 01:08:37346 TabletModeController* tablet_mode_controller() {
347 return tablet_mode_controller_.get();
348 }
[email protected]a1b7a822013-02-23 19:08:04349 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33350 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11351 }
tbarzicc78da1ff92017-05-08 20:46:15352 TrayAction* tray_action() { return tray_action_.get(); }
sky5b45ed82017-03-27 02:54:23353 VpnList* vpn_list() { return vpn_list_.get(); }
354 WindowCycleController* window_cycle_controller() {
355 return window_cycle_controller_.get();
356 }
357 WindowSelectorController* window_selector_controller() {
358 return window_selector_controller_.get();
359 }
[email protected]093b8d642014-04-03 20:59:28360 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
yusukes1168eda2016-04-27 07:52:08361 LinkHandlerModelFactory* link_handler_model_factory() {
362 return link_handler_model_factory_;
363 }
364 void set_link_handler_model_factory(
365 LinkHandlerModelFactory* link_handler_model_factory) {
366 link_handler_model_factory_ = link_handler_model_factory;
367 }
[email protected]e0d22e82012-01-04 00:46:57368 PowerButtonController* power_button_controller() {
369 return power_button_controller_.get();
370 }
[email protected]ab4f8c92013-05-30 19:07:47371 LockStateController* lock_state_controller() {
372 return lock_state_controller_.get();
[email protected]222f40c2012-10-18 08:58:13373 }
sky07a24d42017-03-09 23:57:30374 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); }
skyb073203a2017-03-13 16:59:16375 ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
jamescookb8dcef522016-06-25 14:42:55376 VideoDetector* video_detector() { return video_detector_.get(); }
sky07a24d42017-03-09 23:57:30377 WallpaperController* wallpaper_controller() {
378 return wallpaper_controller_.get();
379 }
skyb073203a2017-03-13 16:59:16380 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); }
oshimae2818922015-07-28 01:18:52381 WindowTreeHostManager* window_tree_host_manager() {
382 return window_tree_host_manager_.get();
[email protected]3e1cdd312012-06-07 03:48:41383 }
chirantan40e4cd82015-02-19 01:08:19384 PowerEventObserver* power_event_observer() {
385 return power_event_observer_.get();
386 }
kylechar55f0eaf22017-01-11 22:57:37387 AshTouchTransformController* touch_transformer_controller() {
[email protected]03122891a2014-05-13 23:56:49388 return touch_transformer_controller_.get();
389 }
sammiequon203ae022016-09-18 17:23:42390 LaserPointerController* laser_pointer_controller() {
391 return laser_pointer_controller_.get();
392 }
393 PartialMagnificationController* partial_magnification_controller() {
394 return partial_magnification_controller_.get();
395 }
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32396 HighlighterController* highlighter_controller() {
397 return highlighter_controller_.get();
398 }
oshima5a296e82016-04-29 01:32:27399 ScreenshotController* screenshot_controller() {
400 return screenshot_controller_.get();
mukai19274bdd2015-02-24 22:37:48401 }
[email protected]093b8d642014-04-03 20:59:28402 MouseCursorEventFilter* mouse_cursor_filter() {
[email protected]8b7ba87b2012-09-01 00:40:40403 return mouse_cursor_filter_.get();
404 }
[email protected]093b8d642014-04-03 20:59:28405 EventTransformationHandler* event_transformation_handler() {
[email protected]682990f2013-01-10 06:49:11406 return event_transformation_handler_.get();
407 }
sadrul7a8785e2016-02-12 21:54:35408 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
[email protected]4a229e902011-12-01 21:21:11409
[email protected]f48075d2012-05-24 11:06:51410 HighContrastController* high_contrast_controller() {
411 return high_contrast_controller_.get();
412 }
413
[email protected]77f7c132012-11-15 06:52:54414 MagnificationController* magnification_controller() {
[email protected]c1c670172012-04-26 04:20:26415 return magnification_controller_.get();
416 }
[email protected]f48075d2012-05-24 11:06:51417
[email protected]55398d22013-10-10 19:49:20418 AutoclickController* autoclick_controller() {
419 return autoclick_controller_.get();
420 }
421
sky07a24d42017-03-09 23:57:30422 ToastManager* toast_manager() { return toast_manager_.get(); }
423
Thiago Farina3b086a02017-05-30 22:32:50424 ::wm::ActivationClient* activation_client();
[email protected]77f7c132012-11-15 06:52:54425
[email protected]c758fbf2012-03-25 22:53:59426 // Force the shelf to query for it's current visibility state.
jamescook6afad6d2016-06-01 00:35:01427 // TODO(jamescook): Move to Shelf.
[email protected]c758fbf2012-03-25 22:53:59428 void UpdateShelfVisibility();
429
Sam McNallye36abbc2017-07-20 01:04:28430 // Gets the local state pref service. It can be null in mash if connecting to
431 // local state pref service has not completed successfully.
Wenzhao Zang44240fb2017-07-13 01:36:54432 PrefService* GetLocalStatePrefService() const;
433
[email protected]88d71122012-10-18 07:11:01434 // Returns WebNotificationTray on the primary root window.
435 WebNotificationTray* GetWebNotificationTray();
[email protected]6d6546e2012-05-30 23:12:02436
[email protected]a0afeb12012-12-10 22:57:09437 // Does the primary display have status area?
438 bool HasPrimaryStatusArea();
439
440 // Returns the system tray on primary display.
441 SystemTray* GetPrimarySystemTray();
[email protected]bfb411312012-02-27 20:59:27442
[email protected]9488d4d2012-02-29 18:32:37443 static void set_initially_hide_cursor(bool hide) {
444 initially_hide_cursor_ = hide;
445 }
446
[email protected]093b8d642014-04-03 20:59:28447 ResizeShadowController* resize_shadow_controller() {
[email protected]e4a181cc2012-03-17 02:20:57448 return resize_shadow_controller_.get();
449 }
450
[email protected]a54e65b2011-11-21 22:03:34451 // Made available for tests.
[email protected]e319c7e2014-03-14 19:56:14452 ::wm::ShadowController* shadow_controller() {
[email protected]a54e65b2011-11-21 22:03:34453 return shadow_controller_.get();
454 }
455
[email protected]f9466702012-09-17 16:35:27456 // Starts the animation that occurs on first login.
457 void DoInitialWorkspaceAnimation();
458
oshimae2818922015-07-28 01:18:52459 // TODO(oshima): Move these objects to WindowTreeHostManager.
kylechar7a067ec2017-01-07 01:16:28460 display::DisplayConfigurator* display_configurator() {
[email protected]1e31cbd2014-04-07 20:06:11461 return display_configurator_.get();
[email protected]70b3e7d52012-06-02 22:12:25462 }
[email protected]093b8d642014-04-03 20:59:28463 DisplayErrorObserver* display_error_observer() {
[email protected]18b21b2e2013-03-01 20:56:23464 return display_error_observer_.get();
465 }
[email protected]70b3e7d52012-06-02 22:12:25466
yiyixa68ade512016-09-01 17:38:13467 ScreenLayoutObserver* screen_layout_observer() {
468 return screen_layout_observer_.get();
469 }
470
[email protected]093b8d642014-04-03 20:59:28471 ResolutionNotificationController* resolution_notification_controller() {
[email protected]6ef71d72013-08-10 18:13:44472 return resolution_notification_controller_.get();
473 }
[email protected]0dc85512014-03-13 13:26:41474
jonross0af45212015-01-13 18:55:46475 ScreenOrientationController* screen_orientation_controller() {
476 return screen_orientation_controller_.get();
jonrossf21fea12014-11-13 01:22:51477 }
478
jamescookac6724332017-03-21 02:54:43479 TrayBluetoothHelper* tray_bluetooth_helper() {
480 return tray_bluetooth_helper_.get();
481 }
482
Sonny Sasaka55f69fc2017-08-28 21:29:37483 BluetoothPowerController* bluetooth_power_controller() {
484 return bluetooth_power_controller_.get();
485 }
486
rsadamc727b6a2014-10-31 18:59:33487 VirtualKeyboardController* virtual_keyboard_controller() {
488 return virtual_keyboard_controller_.get();
489 }
warx533c8f62016-04-12 01:19:43490
491 chromeos::AudioA11yController* audio_a11y_controller() {
492 return audio_a11y_controller_.get();
493 }
[email protected]6ef71d72013-08-10 18:13:44494
jamescookb8dcef522016-06-25 14:42:55495 WindowPositioner* window_positioner() { return window_positioner_.get(); }
[email protected]e9a71312013-10-04 03:20:01496
jamescookb8dcef522016-06-25 14:42:55497 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
[email protected]5d2ea362013-12-13 08:10:18498
[email protected]2b8a9bb2013-07-01 22:43:40499 void SetTouchHudProjectionEnabled(bool enabled);
500
501 bool is_touch_hud_projection_enabled() const {
502 return is_touch_hud_projection_enabled_;
503 }
504
sky27344382017-03-08 21:30:32505 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily.
mswad3d9552017-05-18 21:23:36506 void set_root_window_for_new_windows(aura::Window* root) {
sky27344382017-03-08 21:30:32507 root_window_for_new_windows_ = root;
508 }
509
[email protected]59ccade2013-10-17 17:56:40510 // Creates instance of FirstRunHelper. Caller is responsible for deleting
511 // returned object.
512 ash::FirstRunHelper* CreateFirstRunHelper();
[email protected]f94c6aa2013-11-08 01:18:54513
yawanodc5533b32017-02-23 11:04:38514 void SetLargeCursorSizeInDip(int large_cursor_size_in_dip);
515
[email protected]87ec2202014-02-06 06:24:27516 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
517 // compositing is enabled, and vice versa.
518 void SetCursorCompositingEnabled(bool enabled);
519
[email protected]08bdabed2013-12-20 07:52:28520 StickyKeysController* sticky_keys_controller() {
521 return sticky_keys_controller_.get();
[email protected]f94c6aa2013-11-08 01:18:54522 }
hidehiko6821ca42016-06-18 11:12:23523
hidehiko6821ca42016-06-18 11:12:23524 ScreenPinningController* screen_pinning_controller() {
525 return screen_pinning_controller_.get();
526 }
527
[email protected]1d2a7212014-01-16 06:09:48528 GPUSupport* gpu_support() { return gpu_support_.get(); }
[email protected]1d2a7212014-01-16 06:09:48529
xdaid4913762017-07-06 00:17:22530 SplitViewController* split_view_controller() {
531 return split_view_controller_.get();
532 }
533
534 // Returns true if split view mode is active.
535 bool IsSplitViewModeActive() const;
536
sky00c813f2017-03-08 22:48:55537 void AddShellObserver(ShellObserver* observer);
538 void RemoveShellObserver(ShellObserver* observer);
539
MinChena2a384f2017-08-29 22:45:44540 // TODO(minch), move applist related functions to AppList.
541 // http://crbug.com/759909.
sky7db5ccf2017-03-14 21:52:29542 // Shows the app list on the active root window.
Alex Newcomer8fdcb9342017-08-08 18:48:44543 void ShowAppList(app_list::AppListShowSource toggle_method);
sky7db5ccf2017-03-14 21:52:29544
545 // Dismisses the app list.
546 void DismissAppList();
547
548 // Shows the app list if it's not visible. Dismisses it otherwise.
Alex Newcomer8fdcb9342017-08-08 18:48:44549 void ToggleAppList(app_list::AppListShowSource toggle_method);
sky7db5ccf2017-03-14 21:52:29550
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
sky5ad143a2017-03-22 04:31:23558 // Called when the login status changes.
559 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
560 void UpdateAfterLoginStatusChange(LoginStatus status);
561
sky00c813f2017-03-08 22:48:55562 // 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
xdaid4913762017-07-06 00:17:22569 // 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
sky00c813f2017-03-08 22:48:55576 // Notifies observers that fullscreen mode has changed for |root_window|.
varkhac71444e52017-05-25 22:51:34577 void NotifyFullscreenStateChanged(bool is_fullscreen,
578 aura::Window* root_window);
sky00c813f2017-03-08 22:48:55579
580 // Notifies observers that |pinned_window| changed its pinned window state.
varkha19d7e6c52017-05-25 21:15:30581 void NotifyPinnedStateChanged(aura::Window* pinned_window);
sky00c813f2017-03-08 22:48:55582
583 // Notifies observers that the virtual keyboard has been
xiyuan38160182017-03-14 22:50:13584 // activated/deactivated for |root_window|.
sky97f9a7432017-05-09 05:14:31585 void NotifyVirtualKeyboardActivated(bool activated,
586 aura::Window* root_window);
sky00c813f2017-03-08 22:48:55587
588 // Notifies observers that the shelf was created for |root_window|.
589 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18590 void NotifyShelfCreatedForRootWindow(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55591
592 // Notifies observers that |root_window|'s shelf changed alignment.
593 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18594 void NotifyShelfAlignmentChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55595
596 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
597 // TODO(jamescook): Move to Shelf.
varkha6b016b0f2017-05-26 16:14:18598 void NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window);
sky00c813f2017-03-08 22:48:55599
jamescook518dccbd2017-05-18 04:57:07600 // Used to provide better error messages for Shell::Get() under mash.
601 static void SetIsBrowserProcessWithMash();
602
muyuanlid766f2e2017-06-26 20:17:19603 void NotifyAppListVisibilityChanged(bool visible, aura::Window* root_window);
604
Vladislav Kaznacheev39d115f2017-08-25 17:19:46605 // TODO(kaznacheev) Move voice interaction related methods to a separate
606 // controller (crbug.com/758650)
Xiaohui Chenba65544e2017-08-12 02:30:14607 void NotifyVoiceInteractionStatusChanged(VoiceInteractionState state);
newcomer2febb9832017-06-12 17:00:23608
Yue Li2564a8d2017-08-21 23:30:32609 void NotifyVoiceInteractionEnabled(bool enabled);
610
Vladislav Kaznacheevd3a8b34a2017-08-25 16:18:00611 void NotifyVoiceInteractionContextEnabled(bool enabled);
612
Yue Li3e8eaba2017-08-29 19:18:55613 void NotifyVoiceInteractionSetupCompleted();
614
[email protected]2b4cd302012-02-24 20:21:13615 private:
[email protected]c39be8f2012-06-15 22:58:36616 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09617 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
618 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
sky79fa34712017-03-20 23:46:47619 friend class AcceleratorControllerTest;
Sam McNallya853cd82017-08-30 01:55:10620 friend class AshTestHelper;
[email protected]093b8d642014-04-03 20:59:28621 friend class RootWindowController;
sky27344382017-03-08 21:30:32622 friend class ScopedRootWindowForNewWindows;
James Cook317781a2017-07-18 02:08:06623 friend class ShellTestApi;
sky27344382017-03-08 21:30:32624 friend class SmsObserverTest;
[email protected]ad0c8722012-03-02 20:17:45625
skyb073203a2017-03-13 16:59:16626 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
sky11cf8db92017-04-10 23:38:08627 std::unique_ptr<ShellPort> shell_port);
dcheng1f4538e2014-10-27 23:57:05628 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08629
[email protected]1b4c7472014-05-15 18:32:23630 void Init(const ShellInitParams& init_params);
[email protected]b0639282011-12-22 21:12:27631
[email protected]a273d33a2013-10-17 12:41:21632 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26633 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56634
skyabcae812017-01-18 17:01:34635 // Destroys all child windows including widgets across all roots.
636 void CloseAllRootWindowChildWindows();
637
hariank0dd03dd2016-07-14 23:47:33638 // SystemModalContainerEventFilterDelegate:
dcheng1f4538e2014-10-27 23:57:05639 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27640
[email protected]5097e692012-10-30 22:08:41641 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05642 bool CanAcceptEvent(const ui::Event& event) override;
643 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11644 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05645 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e692012-10-30 22:08:41646
Thiago Farina3b086a02017-05-30 22:32:50647 // wm::ActivationChangeObserver:
sky27344382017-03-08 21:30:32648 void OnWindowActivated(ActivationReason reason,
649 aura::Window* gained_active,
650 aura::Window* lost_active) override;
651
Xiyuan Xia22b1a6c2017-04-18 22:46:01652 // SessionObserver:
Xiyuan Xiab64fd0a2017-04-13 17:53:14653 void OnSessionStateChanged(session_manager::SessionState state) override;
654 void OnLoginStatusChanged(LoginStatus login_status) override;
655 void OnLockStateChanged(bool locked) override;
sky5ad143a2017-03-22 04:31:23656
jamescook788b4fc2017-05-18 16:16:06657 // Finalizes the shelf state. Called after the user session is active and
658 // the profile is available.
659 void InitializeShelf();
660
Sam McNallyf4dab612017-08-16 03:06:33661 // Callback for prefs::ConnectToPrefService.
Sam McNallye36abbc2017-07-20 01:04:28662 void OnLocalStatePrefServiceInitialized(
663 std::unique_ptr<::PrefService> pref_service);
tibellb93c729b2017-03-30 00:45:09664
[email protected]cac10fc62011-10-07 23:22:56665 static Shell* instance_;
666
sky00f98a372017-01-11 06:03:49667 // Only valid in mash, for classic ash this is null.
668 static aura::WindowTreeClient* window_tree_client_;
skya8b222f2017-01-12 15:47:13669 static aura::WindowManagerClient* window_manager_client_;
sky00f98a372017-01-11 06:03:49670
[email protected]9488d4d2012-02-29 18:32:37671 // If set before the Shell is initialized, the mouse cursor will be hidden
672 // when the screen is initially created.
673 static bool initially_hide_cursor_;
674
sky11cf8db92017-04-10 23:38:08675 std::unique_ptr<ShellPort> shell_port_;
sky984c1892016-04-20 00:00:34676
[email protected]1aad3322012-06-06 06:37:09677 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11678 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14679
dchenga94547472016-04-08 08:41:11680 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
dchenga94547472016-04-08 08:41:11681 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24682
sky81a2d792017-03-17 19:14:39683 std::unique_ptr<AcceleratorController> accelerator_controller_;
sky07a24d42017-03-09 23:57:30684 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
Scott Violetd64dac12017-06-02 21:50:08685 std::unique_ptr<AshDisplayController> ash_display_controller_;
sky79fa34712017-03-20 23:46:47686 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
687 std::unique_ptr<CastConfigController> cast_config_;
dchenga94547472016-04-08 08:41:11688 std::unique_ptr<DragDropController> drag_drop_controller_;
sky79fa34712017-03-20 23:46:47689 std::unique_ptr<FocusCycler> focus_cycler_;
James Cookf0c78fc2017-06-15 14:42:55690 std::unique_ptr<ImeController> ime_controller_;
sky5ab16472017-03-21 19:35:08691 std::unique_ptr<ImmersiveContextAsh> immersive_context_;
sky79fa34712017-03-20 23:46:47692 std::unique_ptr<KeyboardBrightnessControlDelegate>
693 keyboard_brightness_control_delegate_;
694 std::unique_ptr<KeyboardUI> keyboard_ui_;
695 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
xiaoyinh2bbdd102017-05-18 23:29:42696 std::unique_ptr<LockScreenController> lock_screen_controller_;
sky79fa34712017-03-20 23:46:47697 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
Mitsuru Oshima0e9b7a62017-07-19 18:23:03698 std::unique_ptr<TabletModeController> tablet_mode_controller_;
sky5ab16472017-03-21 19:35:08699 std::unique_ptr<MediaController> media_controller_;
700 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
701 std::unique_ptr<NewWindowController> new_window_controller_;
sky79fa34712017-03-20 23:46:47702 std::unique_ptr<PaletteDelegate> palette_delegate_;
dchenga94547472016-04-08 08:41:11703 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
sky5ad143a2017-03-22 04:31:23704 std::unique_ptr<SessionController> session_controller_;
afakhrye4fae852017-05-09 18:49:06705 std::unique_ptr<NightLightController> night_light_controller_;
sky5ad143a2017-03-22 04:31:23706 std::unique_ptr<ShelfController> shelf_controller_;
sky5ad143a2017-03-22 04:31:23707 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
skyb073203a2017-03-13 16:59:16708 std::unique_ptr<ShellDelegate> shell_delegate_;
sky5b45ed82017-03-27 02:54:23709 std::unique_ptr<ShutdownController> shutdown_controller_;
sky79fa34712017-03-20 23:46:47710 std::unique_ptr<SystemTrayController> system_tray_controller_;
sky5b45ed82017-03-27 02:54:23711 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
sky07a24d42017-03-09 23:57:30712 std::unique_ptr<ToastManager> toast_manager_;
tbarzicc78da1ff92017-05-08 20:46:15713 std::unique_ptr<TrayAction> tray_action_;
sky5b45ed82017-03-27 02:54:23714 std::unique_ptr<VpnList> vpn_list_;
sky07a24d42017-03-09 23:57:30715 std::unique_ptr<WallpaperController> wallpaper_controller_;
skyb073203a2017-03-13 16:59:16716 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
sky5b45ed82017-03-27 02:54:23717 std::unique_ptr<WindowCycleController> window_cycle_controller_;
718 std::unique_ptr<WindowSelectorController> window_selector_controller_;
dchenga94547472016-04-08 08:41:11719 std::unique_ptr<::wm::ShadowController> shadow_controller_;
720 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
721 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
sky7db5ccf2017-03-14 21:52:29722 std::unique_ptr<app_list::AppList> app_list_;
Sam McNallya853cd82017-08-30 01:55:10723 std::unique_ptr<PrefService> local_state_;
dchenga94547472016-04-08 08:41:11724 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
yusukes1168eda2016-04-27 07:52:08725 LinkHandlerModelFactory* link_handler_model_factory_;
dchenga94547472016-04-08 08:41:11726 std::unique_ptr<PowerButtonController> power_button_controller_;
727 std::unique_ptr<LockStateController> lock_state_controller_;
dchenga94547472016-04-08 08:41:11728 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
729 std::unique_ptr<VideoDetector> video_detector_;
dchenga94547472016-04-08 08:41:11730 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
731 std::unique_ptr<HighContrastController> high_contrast_controller_;
732 std::unique_ptr<MagnificationController> magnification_controller_;
dchenga94547472016-04-08 08:41:11733 std::unique_ptr<AutoclickController> autoclick_controller_;
sky27344382017-03-08 21:30:32734 std::unique_ptr<::wm::FocusController> focus_controller_;
sky984c1892016-04-20 00:00:34735
oshima5a296e82016-04-29 01:32:27736 std::unique_ptr<ScreenshotController> screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45737
dchenga94547472016-04-08 08:41:11738 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
739 std::unique_ptr<ScreenPositionController> screen_position_controller_;
740 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
741 std::unique_ptr<EventClientImpl> event_client_;
742 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13743
[email protected]0b0b0742012-02-16 13:23:45744 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26745 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11746 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45747
[email protected]3537d472014-01-15 05:45:31748 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11749 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31750
[email protected]435b212e2012-04-05 19:43:37751 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11752 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37753
[email protected]745816be2011-11-22 05:08:30754 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11755 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30756
rjkroege72f8154f2016-10-29 00:49:02757 std::unique_ptr<display::DisplayManager> display_manager_;
dchenga94547472016-04-08 08:41:11758 std::unique_ptr<DisplayConfigurationController>
759 display_configuration_controller_;
[email protected]6bdf7952012-11-14 10:10:58760
hidehiko6821ca42016-06-18 11:12:23761 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
[email protected]a9a40462013-07-31 06:22:56762
derat94887a22017-01-20 18:17:25763 // Forwards user activity ui::mojom::UserActivityMonitor to
764 // |user_activity_detector_|. Only initialized for mash.
765 std::unique_ptr<aura::UserActivityForwarder> user_activity_forwarder_;
766
dchenga94547472016-04-08 08:41:11767 std::unique_ptr<PowerEventObserver> power_event_observer_;
768 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
769 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
770 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
771 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34772 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11773 std::unique_ptr<BluetoothNotificationController>
[email protected]b3142722014-03-04 06:59:50774 bluetooth_notification_controller_;
Sonny Sasaka55f69fc2017-08-28 21:29:37775 std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_;
jamescookac6724332017-03-21 02:54:43776 std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_;
dchenga94547472016-04-08 08:41:11777 std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_;
warx533c8f62016-04-12 01:19:43778 std::unique_ptr<chromeos::AudioA11yController> audio_a11y_controller_;
[email protected]70b3e7d52012-06-02 22:12:25779 // Controls video output device state.
kylechar7a067ec2017-01-07 01:16:28780 std::unique_ptr<display::DisplayConfigurator> display_configurator_;
dchenga94547472016-04-08 08:41:11781 std::unique_ptr<DisplayColorManager> display_color_manager_;
782 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
783 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58784
[email protected]c1234a42013-08-20 09:35:40785 // Listens for output changes and updates the display manager.
kylecharf2e4e412016-12-04 04:21:35786 std::unique_ptr<display::DisplayChangeObserver> display_change_observer_;
[email protected]3dff2ef2014-02-09 22:50:39787
kylechar98748a52016-12-03 01:33:22788 // Listens for shutdown and updates DisplayConfigurator.
789 std::unique_ptr<ShutdownObserver> shutdown_observer_;
790
yiyix90cfee22017-02-16 05:38:18791 // Listens for new sms messages and shows notifications.
792 std::unique_ptr<SmsObserver> sms_observer_;
793
derat94887a22017-01-20 18:17:25794 // Implements content::ScreenOrientationController for Chrome OS.
dchenga94547472016-04-08 08:41:11795 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
yiyixa68ade512016-09-01 17:38:13796 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
jonrossf21fea12014-11-13 01:22:51797
kylechar55f0eaf22017-01-11 22:57:37798 std::unique_ptr<AshTouchTransformController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39799
dchenga94547472016-04-08 08:41:11800 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
801 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
sammiequon203ae022016-09-18 17:23:42802 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
803 std::unique_ptr<PartialMagnificationController>
804 partial_magnification_controller_;
Vladislav Kaznacheev6d6aaff2017-07-22 04:06:32805 std::unique_ptr<HighlighterController> highlighter_controller_;
[email protected]70b3e7d52012-06-02 22:12:25806
xdaid4913762017-07-06 00:17:22807 // The split view controller for Chrome OS in tablet mode.
808 std::unique_ptr<SplitViewController> split_view_controller_;
809
[email protected]c0ff0342013-02-27 00:41:29810 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
811 // pointer to vend to test code.
erg36cfb952017-06-21 19:41:45812 NativeCursorManagerAsh* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03813
derat94887a22017-01-20 18:17:25814 // Cursor may be hidden on certain key events in Chrome OS, whereas we never
sadrul7a8785e2016-02-12 21:54:35815 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11816 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19817
[email protected]852a55d2012-10-17 13:30:30818 // For testing only: simulate that a modal window is open
819 bool simulate_modal_window_open_for_testing_;
820
[email protected]2b8a9bb2013-07-01 22:43:40821 bool is_touch_hud_projection_enabled_;
822
mswad3d9552017-05-18 21:23:36823 // See comment for GetRootWindowForNewWindows().
824 aura::Window* root_window_for_new_windows_ = nullptr;
825 aura::Window* scoped_root_window_for_new_windows_ = nullptr;
sky27344382017-03-08 21:30:32826
[email protected]1d2a7212014-01-16 06:09:48827 // Injected content::GPUDataManager support.
dchenga94547472016-04-08 08:41:11828 std::unique_ptr<GPUSupport> gpu_support_;
[email protected]1d2a7212014-01-16 06:09:48829
skyb7b54092016-08-19 16:00:09830 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_;
831
sky15ef0aa2017-01-20 18:55:59832 std::unique_ptr<AppListDelegateImpl> app_list_delegate_impl_;
833
sky00c813f2017-03-08 22:48:55834 base::ObserverList<ShellObserver> shell_observers_;
835
Sam McNallye36abbc2017-07-20 01:04:28836 base::WeakPtrFactory<Shell> weak_factory_;
837
[email protected]87b0d82e2011-10-07 21:02:59838 DISALLOW_COPY_AND_ASSIGN(Shell);
839};
840
[email protected]55f593352011-12-24 05:42:46841} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59842
[email protected]b65bdda2011-12-23 23:35:31843#endif // ASH_SHELL_H_