blob: f6f3839ce9801c64db1964345ff2d9da275d2774 [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"
[email protected]478c6c32013-03-09 02:50:5814#include "ash/shelf/shelf_types.h"
[email protected]82d3954ae2012-04-20 09:02:2215#include "ash/system/user/login_status.h"
[email protected]e76096a5f2014-04-08 04:08:0316#include "ash/wm/cursor_manager_chromeos.h"
[email protected]c0ce80e2012-10-05 23:28:2717#include "ash/wm/system_modal_container_event_filter_delegate.h"
[email protected]c45fdc72012-02-22 22:59:1218#include "base/compiler_specific.h"
[email protected]b0639282011-12-22 21:12:2719#include "base/gtest_prod_util.h"
avidb567a8a2015-12-20 17:07:2420#include "base/macros.h"
[email protected]6f67df52013-10-29 01:07:1521#include "base/memory/weak_ptr.h"
[email protected]1a2145b2012-03-13 21:09:1722#include "base/observer_list.h"
[email protected]c9390bd2013-11-08 20:33:1323#include "ui/aura/window.h"
[email protected]940fb1c2013-06-18 16:54:2824#include "ui/base/ui_base_types.h"
[email protected]86ccbd42013-09-18 18:11:5425#include "ui/events/event_target.h"
Avi Drissmanfefc2f82014-12-22 19:25:2926#include "ui/gfx/geometry/insets.h"
27#include "ui/gfx/geometry/size.h"
[email protected]ffabb1e2012-10-12 19:51:1728#include "ui/gfx/screen.h"
[email protected]ee3ed10772014-03-11 22:02:0129#include "ui/wm/core/cursor_manager.h"
[email protected]af4552b22014-03-21 19:45:0130#include "ui/wm/public/activation_change_observer.h"
[email protected]87b0d82e2011-10-07 21:02:5931
[email protected]59ccade2013-10-17 17:56:4032namespace app_list {
33class AppListView;
34}
[email protected]87b0d82e2011-10-07 21:02:5935namespace aura {
[email protected]e29014c2011-11-16 18:25:5136class EventFilter;
[email protected]35304ce2011-12-14 23:21:0137class RootWindow;
[email protected]87b0d82e2011-10-07 21:02:5938class Window;
[email protected]c28853612012-05-31 22:43:4439namespace client {
[email protected]39718b52012-12-03 17:24:5640class ActivationClient;
[email protected]8cfb6722012-11-28 03:28:4641class FocusClient;
[email protected]c28853612012-05-31 22:43:4442}
[email protected]87b0d82e2011-10-07 21:02:5943}
[email protected]fa4a45832012-04-12 21:32:4844
ben0d6be2d42015-09-26 04:37:1945namespace base {
46class SequencedWorkerPool;
47}
48
[email protected]2b99f8c2011-10-11 19:42:2449namespace gfx {
[email protected]9ec0f452012-05-31 15:58:5350class ImageSkia;
[email protected]b5f30602012-01-30 15:16:5751class Point;
[email protected]cac10fc62011-10-07 23:22:5652class Rect;
53}
[email protected]b6ba05d902013-10-04 21:38:4554
[email protected]a8bd1cb2012-02-17 23:05:5455namespace ui {
[email protected]1e31cbd2014-04-07 20:06:1156class DisplayConfigurator;
[email protected]a8bd1cb2012-02-17 23:05:5457class Layer;
derat2d4e62d2015-01-09 16:09:1758class UserActivityDetector;
[email protected]b0fa7012014-04-16 12:50:5759class UserActivityPowerManagerNotifier;
[email protected]a8bd1cb2012-02-17 23:05:5460}
[email protected]57b8bb352012-01-11 05:11:4661namespace views {
62class NonClientFrameView;
63class Widget;
[email protected]4a59e4e2012-11-12 21:15:4064namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1465class TooltipController;
66}
67}
68
69namespace wm {
[email protected]60d677d2014-05-30 13:07:0270class AcceleratorFilter;
[email protected]4a59e4e2012-11-12 21:15:4071class CompoundEventFilter;
[email protected]86f2b5e2012-11-14 20:37:0072class ShadowController;
[email protected]b5756e22012-11-30 01:32:0273class VisibilityController;
[email protected]0c2dc012012-12-02 00:00:2374class WindowModalityController;
[email protected]4a59e4e2012-11-12 21:15:4075}
[email protected]87b0d82e2011-10-07 21:02:5976
[email protected]55f593352011-12-24 05:42:4677namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5978
[email protected]2f744282011-12-23 22:40:5279class AcceleratorController;
[email protected]f3ab6eff52013-10-24 03:29:3880class AccessibilityDelegate;
[email protected]093b8d642014-04-03 20:59:2881class AppListController;
[email protected]c0ff0342013-02-27 00:41:2982class AshNativeCursorManager;
[email protected]55398d22013-10-10 19:49:2083class AutoclickController;
[email protected]b3142722014-03-04 06:59:5084class BluetoothNotificationController;
[email protected]60a978b72012-06-08 00:29:1885class CaptureController;
[email protected]093b8d642014-04-03 20:59:2886class DesktopBackgroundController;
[email protected]c1234a42013-08-20 09:35:4087class DisplayChangeObserver;
robert.bradfordab052492015-05-06 11:09:5688class DisplayColorManager;
stevenjb537c5c3f2016-01-20 23:38:1289class DisplayConfigurationController;
oshimae2818922015-07-28 01:18:5290class WindowTreeHostManager;
[email protected]18b21b2e2013-03-01 20:56:2391class DisplayErrorObserver;
[email protected]6bdf7952012-11-14 10:10:5892class DisplayManager;
[email protected]084b6bb2011-11-17 05:18:1693class DragDropController;
[email protected]e67291f12012-10-10 05:52:3894class EventClientImpl;
[email protected]b9d224c2012-07-13 01:09:0395class EventRewriterEventFilter;
[email protected]682990f2013-01-10 06:49:1196class EventTransformationHandler;
[email protected]093b8d642014-04-03 20:59:2897class FirstRunHelper;
[email protected]3d29912a2012-02-07 07:41:5198class FocusCycler;
[email protected]093b8d642014-04-03 20:59:2899class GPUSupport;
100class HighContrastController;
skyfee520c2016-02-11 19:57:46101class KeyboardUI;
[email protected]7a80cdd2013-09-26 09:20:53102class KeyboardUMAEventFilter;
[email protected]ded32492014-03-14 10:09:28103class LastWindowClosedLogoutReminder;
[email protected]a9a40462013-07-31 06:22:56104class LocaleNotificationController;
[email protected]093b8d642014-04-03 20:59:28105class LockStateController;
[email protected]7b3f91ee2014-03-06 11:41:40106class LogoutConfirmationController;
[email protected]093b8d642014-04-03 20:59:28107class MagnificationController;
[email protected]58fb353d2014-04-04 03:28:05108class MaximizeModeController;
[email protected]e55b73452014-02-20 13:18:04109class MaximizeModeWindowManager;
[email protected]093b8d642014-04-03 20:59:28110class MediaDelegate;
[email protected]78d96302012-06-22 00:58:07111class MouseCursorEventFilter;
[email protected]093b8d642014-04-03 20:59:28112class MruWindowTracker;
[email protected]093b8d642014-04-03 20:59:28113class NewWindowDelegate;
[email protected]9ae32df2012-07-26 03:25:18114class OverlayEventFilter;
[email protected]093b8d642014-04-03 20:59:28115class PartialMagnificationController;
mukai19274bdd2015-02-24 22:37:48116class PartialScreenshotController;
[email protected]093b8d642014-04-03 20:59:28117class PowerButtonController;
[email protected]51625052013-10-10 01:40:16118class PowerEventObserver;
[email protected]72bce522014-02-10 21:11:26119class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57120class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44121class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56122class RootWindowController;
[email protected]b42910f2013-08-01 11:45:29123class ScopedTargetRootWindow;
[email protected]093b8d642014-04-03 20:59:28124class ScreenAsh;
jonross0af45212015-01-13 18:55:46125class ScreenOrientationController;
[email protected]8d625fb2012-07-18 16:40:06126class ScreenPositionController;
[email protected]093b8d642014-04-03 20:59:28127class SessionStateDelegate;
128class Shelf;
129class ShelfDelegate;
130class ShelfItemDelegateManager;
131class ShelfModel;
[email protected]055a56d2013-12-06 12:13:36132class ShelfWindowWatcher;
[email protected]093b8d642014-04-03 20:59:28133class ShellDelegate;
[email protected]1b4c7472014-05-15 18:32:23134struct ShellInitParams;
[email protected]093b8d642014-04-03 20:59:28135class ShellObserver;
[email protected]9861f1752012-06-01 07:16:14136class SlowAnimationEventFilter;
[email protected]6d6546e2012-05-30 23:12:02137class StatusAreaWidget;
[email protected]093b8d642014-04-03 20:59:28138class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18139class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27140class SystemModalContainerEventFilter;
[email protected]093b8d642014-04-03 20:59:28141class SystemTray;
142class SystemTrayDelegate;
143class SystemTrayNotifier;
yoshiki32f51632016-03-24 01:24:43144class ToastManager;
[email protected]093b8d642014-04-03 20:59:28145class ToplevelWindowEventHandler;
[email protected]03122891a2014-05-13 23:56:49146class TouchTransformerController;
[email protected]73074742012-05-17 01:44:41147class TouchObserverHUD;
[email protected]093b8d642014-04-03 20:59:28148class UserWallpaperDelegate;
bsheeaae09a2014-09-22 23:16:52149class VirtualKeyboardController;
[email protected]ded58fd2013-10-09 07:56:55150class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28151class VideoDetector;
152class WebNotificationTray;
153class WindowCycleController;
154class WindowPositioner;
155class WindowSelectorController;
[email protected]2b99f8c2011-10-11 19:42:24156
[email protected]0af58042012-12-13 03:21:35157namespace shell {
158class WindowWatcher;
159}
160
[email protected]0c68e892012-12-08 16:54:53161namespace test {
162class ShellTestApi;
163}
164
[email protected]87b0d82e2011-10-07 21:02:59165// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59166// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38167//
168// Upon creation, the Shell sets itself as the RootWindow's delegate, which
169// takes ownership of the Shell.
[email protected]093b8d642014-04-03 20:59:28170class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
171 public ui::EventTarget,
172 public aura::client::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59173 public:
[email protected]093b8d642014-04-03 20:59:28174 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23175
[email protected]3d29912a2012-02-07 07:41:51176 enum Direction {
177 FORWARD,
178 BACKWARD
179 };
180
[email protected]3266c2b92011-11-14 00:06:08181 // A shell must be explicitly created so that it can call |Init()| with the
182 // delegate set. |delegate| can be NULL (if not required for initialization).
[email protected]09464c72013-04-26 07:31:28183 // Takes ownership of |delegate|.
[email protected]1b4c7472014-05-15 18:32:23184 static Shell* CreateInstance(const ShellInitParams& init_params);
[email protected]3266c2b92011-11-14 00:06:08185
186 // Should never be called before |CreateInstance()|.
[email protected]cac10fc62011-10-07 23:22:56187 static Shell* GetInstance();
[email protected]3266c2b92011-11-14 00:06:08188
[email protected]b3b7bcd2012-03-06 19:35:45189 // Returns true if the ash shell has been instantiated.
190 static bool HasInstance();
191
[email protected]ef589af2011-12-03 01:07:15192 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56193
[email protected]d90b8392012-06-13 09:34:56194 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09195 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28196 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56197
[email protected]cf1c70e2012-08-30 01:13:02198 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09199 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23200 static RootWindowControllerList GetAllRootWindowControllers();
201
[email protected]bf9cdb362013-10-25 19:22:45202 // Returns the primary root Window. The primary root Window is the one that
203 // has a launcher.
204 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34205
[email protected]bf9cdb362013-10-25 19:22:45206 // Returns a root Window when used as a target when creating a new window.
[email protected]b42910f2013-08-01 11:45:29207 // The root window of the active window is used in most cases, but can
208 // be overridden by using ScopedTargetRootWindow().
[email protected]bf9cdb362013-10-25 19:22:45209 // If you want to get the root Window of the active window, just use
[email protected]b42910f2013-08-01 11:45:29210 // |wm::GetActiveWindow()->GetRootWindow()|.
[email protected]bf9cdb362013-10-25 19:22:45211 static aura::Window* GetTargetRootWindow();
[email protected]a857dbe2012-05-30 22:10:14212
[email protected]cf1c70e2012-08-30 01:13:02213 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13214 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23215
[email protected]bf9cdb362013-10-25 19:22:45216 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39217 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45218 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38219 int container_id);
[email protected]7b0f7502012-06-11 00:12:39220
221 // Returns the list of containers that match |container_id| in
[email protected]429433f2012-12-28 20:14:46222 // all root windows. If |priority_root| is given, the container
223 // in the |priority_root| will be inserted at the top of the list.
224 static std::vector<aura::Window*> GetContainersFromAllRootWindows(
225 int container_id,
[email protected]bf9cdb362013-10-25 19:22:45226 aura::Window* priority_root);
[email protected]7b0f7502012-06-11 00:12:39227
[email protected]bf9cdb362013-10-25 19:22:45228 void set_target_root_window(aura::Window* target_root_window) {
[email protected]b42910f2013-08-01 11:45:29229 target_root_window_ = target_root_window;
[email protected]a857dbe2012-05-30 22:10:14230 }
231
[email protected]cb054f972012-10-11 20:27:28232 // Shows the context menu for the background and launcher at
[email protected]431552c2012-10-23 00:38:33233 // |location_in_screen| (in screen coordinates).
[email protected]940fb1c2013-06-18 16:54:28234 void ShowContextMenu(const gfx::Point& location_in_screen,
235 ui::MenuSourceType source_type);
[email protected]cac10fc62011-10-07 23:22:56236
[email protected]1b467802014-08-15 16:03:06237 // Shows the app list. |window| specifies in which display the app
[email protected]b913a3a2012-12-11 13:07:19238 // list should be shown. If this is NULL, the active root window
239 // will be used.
[email protected]1b467802014-08-15 16:03:06240 void ShowAppList(aura::Window* anchor);
241
242 // Dismisses the app list.
243 void DismissAppList();
244
245 // Shows the app list if it's not visible. Dismisses it otherwise.
[email protected]b913a3a2012-12-11 13:07:19246 void ToggleAppList(aura::Window* anchor);
[email protected]ae4987d2011-11-21 22:52:44247
[email protected]7510d1082012-03-30 21:58:34248 // Returns app list target visibility.
249 bool GetAppListTargetVisibility() const;
250
[email protected]1e51a9d2012-04-09 23:31:11251 // Returns app list window or NULL if it is not visible.
252 aura::Window* GetAppListWindow();
253
mfomitchev01551e62016-03-22 19:40:28254 // Returns app list view if one exists, or NULL otherwise.
[email protected]59ccade2013-10-17 17:56:40255 app_list::AppListView* GetAppListView();
256
[email protected]dc09739372012-11-15 20:17:39257 // Returns true if a system-modal dialog window is currently open.
258 bool IsSystemModalWindowOpen() const;
[email protected]40c4cbb2012-01-10 23:26:07259
[email protected]852a55d2012-10-17 13:30:30260 // For testing only: set simulation that a modal window is open
261 void SimulateModalWindowOpenForTesting(bool modal_window_open) {
262 simulate_modal_window_open_for_testing_ = modal_window_open;
263 }
264
[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
[email protected]d9456cb2012-03-21 16:41:04270 // Rotates focus through containers that can receive focus.
[email protected]3d29912a2012-02-07 07:41:51271 void RotateFocus(Direction direction);
272
[email protected]2e236a52012-06-27 22:21:47273 // Sets the work area insets of the display that contains |window|,
[email protected]8a45c972012-03-14 18:22:44274 // this notifies observers too.
[email protected]27f6af62012-03-21 05:34:40275 // TODO(sky): this no longer really replicates what happens and is unreliable.
276 // Remove this.
[email protected]2e236a52012-06-27 22:21:47277 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44278 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17279
[email protected]82d3954ae2012-04-20 09:02:22280 // Called when the user logs in.
281 void OnLoginStateChanged(user::LoginStatus status);
282
[email protected]51f438112013-11-18 19:32:50283 // Called after the logged-in user's profile is ready.
284 void OnLoginUserProfilePrepared();
285
[email protected]88d71122012-10-18 07:11:01286 // Called when the login status changes.
287 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
288 void UpdateAfterLoginStatusChange(user::LoginStatus status);
289
[email protected]82d3954ae2012-04-20 09:02:22290 // Called when the application is exiting.
291 void OnAppTerminating();
292
293 // Called when the screen is locked (after the lock window is visible) or
294 // unlocked.
295 void OnLockStateChanged(bool locked);
296
[email protected]58868abf2014-01-17 23:45:33297 // Called when a casting session is started or stopped.
298 void OnCastingSessionStartedOrStopped(bool started);
299
[email protected]de42bcc2014-03-04 05:17:00300 // Called when the overview mode is about to be started (before the windows
301 // get re-arranged).
302 void OnOverviewModeStarting();
303
bruthigd7cf765b2015-01-20 19:32:27304 // Called after overview mode has ended.
305 void OnOverviewModeEnded();
[email protected]de42bcc2014-03-04 05:17:00306
[email protected]02a80052014-03-14 05:45:23307 // Called after maximize mode has started, windows might still animate though.
308 void OnMaximizeModeStarted();
309
310 // Called after maximize mode has ended, windows might still be returning to
311 // their original position.
312 void OnMaximizeModeEnded();
313
[email protected]0e3e7cb2014-04-12 05:18:25314 // Called when a root window is created.
315 void OnRootWindowAdded(aura::Window* root_window);
316
[email protected]864b58552013-12-19 04:19:38317 // Initializes |shelf_|. Does nothing if it's already initialized.
318 void CreateShelf();
[email protected]d9456cb2012-03-21 16:41:04319
[email protected]b8642ec2014-04-17 05:20:39320 // Called when the shelf is created for |root_window|.
321 void OnShelfCreatedForRootWindow(aura::Window* root_window);
322
[email protected]e1b299b2014-01-29 23:53:41323 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
324 // exists.
[email protected]51f438112013-11-18 19:32:50325 void CreateKeyboard();
326
[email protected]e1b299b2014-01-29 23:53:41327 // Deactivates the virtual keyboard.
328 void DeactivateKeyboard();
329
[email protected]99c5ed82013-10-18 01:30:04330 // Show shelf view if it was created hidden (before session has started).
[email protected]864b58552013-12-19 04:19:38331 void ShowShelf();
[email protected]7e1df2f62012-07-19 19:17:18332
[email protected]d9456cb2012-03-21 16:41:04333 // Adds/removes observer.
[email protected]1a2145b2012-03-13 21:09:17334 void AddShellObserver(ShellObserver* observer);
335 void RemoveShellObserver(ShellObserver* observer);
336
[email protected]da285852014-05-27 19:53:43337#if defined(OS_CHROMEOS)
338 // Test if MaximizeModeWindowManager is not enabled, and if
339 // MaximizeModeController is not currently setting a display rotation. Or if
340 // the |resolution_notification_controller_| is not showing its confirmation
341 // dialog. If true then changes to display settings can be saved.
342 bool ShouldSaveDisplaySettings();
343#endif
344
[email protected]2f744282011-12-23 22:40:52345 AcceleratorController* accelerator_controller() {
[email protected]745816be2011-11-22 05:08:30346 return accelerator_controller_.get();
347 }
[email protected]6e9f6aa2012-02-09 04:16:20348
[email protected]093b8d642014-04-03 20:59:28349 DisplayManager* display_manager() { return display_manager_.get(); }
stevenjb537c5c3f2016-01-20 23:38:12350 DisplayConfigurationController* display_configuration_controller() {
351 return display_configuration_controller_.get();
352 }
[email protected]e319c7e2014-03-14 19:56:14353 ::wm::CompoundEventFilter* env_filter() {
[email protected]492533b32012-09-21 19:06:14354 return env_filter_.get();
[email protected]627a62f2012-02-14 22:59:14355 }
[email protected]a1b7a822013-02-23 19:08:04356 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33357 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11358 }
[email protected]093b8d642014-04-03 20:59:28359 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
[email protected]e70cf0ed2012-03-15 16:24:47360 DesktopBackgroundController* desktop_background_controller() {
361 return desktop_background_controller_.get();
362 }
[email protected]e0d22e82012-01-04 00:46:57363 PowerButtonController* power_button_controller() {
364 return power_button_controller_.get();
365 }
[email protected]ab4f8c92013-05-30 19:07:47366 LockStateController* lock_state_controller() {
367 return lock_state_controller_.get();
[email protected]222f40c2012-10-18 08:58:13368 }
[email protected]66c5c4112013-07-31 07:10:59369 MruWindowTracker* mru_window_tracker() {
370 return mru_window_tracker_.get();
371 }
[email protected]6aa614a2012-01-19 22:13:38372 VideoDetector* video_detector() {
373 return video_detector_.get();
374 }
[email protected]dd1e1ac2014-05-13 03:44:09375 WindowCycleController* window_cycle_controller() {
376 return window_cycle_controller_.get();
377 }
[email protected]d24ce2c2013-08-01 15:14:19378 WindowSelectorController* window_selector_controller() {
379 return window_selector_controller_.get();
380 }
[email protected]093b8d642014-04-03 20:59:28381 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
oshimae2818922015-07-28 01:18:52382 WindowTreeHostManager* window_tree_host_manager() {
383 return window_tree_host_manager_.get();
[email protected]3e1cdd312012-06-07 03:48:41384 }
dnicoara8c3bd1e62014-10-30 19:53:39385#if defined(OS_CHROMEOS)
chirantan40e4cd82015-02-19 01:08:19386 PowerEventObserver* power_event_observer() {
387 return power_event_observer_.get();
388 }
[email protected]03122891a2014-05-13 23:56:49389 TouchTransformerController* touch_transformer_controller() {
390 return touch_transformer_controller_.get();
391 }
dnicoara8c3bd1e62014-10-30 19:53:39392#endif // defined(OS_CHROMEOS)
mukai19274bdd2015-02-24 22:37:48393 PartialScreenshotController* partial_screenshot_controller() {
394 return partial_screenshot_controller_.get();
395 }
[email protected]093b8d642014-04-03 20:59:28396 MouseCursorEventFilter* mouse_cursor_filter() {
[email protected]8b7ba87b2012-09-01 00:40:40397 return mouse_cursor_filter_.get();
398 }
[email protected]093b8d642014-04-03 20:59:28399 EventTransformationHandler* event_transformation_handler() {
[email protected]682990f2013-01-10 06:49:11400 return event_transformation_handler_.get();
401 }
sadrul7a8785e2016-02-12 21:54:35402 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
[email protected]4a229e902011-12-01 21:21:11403
[email protected]3266c2b92011-11-14 00:06:08404 ShellDelegate* delegate() { return delegate_.get(); }
[email protected]aa54218b2012-06-12 16:51:42405
[email protected]10b22612012-03-22 17:07:55406 UserWallpaperDelegate* user_wallpaper_delegate() {
407 return user_wallpaper_delegate_.get();
408 }
[email protected]35304ce2011-12-14 23:21:01409
[email protected]fcb123d2013-04-17 15:58:49410 SessionStateDelegate* session_state_delegate() {
411 return session_state_delegate_.get();
412 }
413
[email protected]f3ab6eff52013-10-24 03:29:38414 AccessibilityDelegate* accessibility_delegate() {
415 return accessibility_delegate_.get();
416 }
417
[email protected]47686c42013-10-25 01:49:17418 NewWindowDelegate* new_window_delegate() {
419 return new_window_delegate_.get();
420 }
421
[email protected]efc897f72013-11-01 11:43:07422 MediaDelegate* media_delegate() {
423 return media_delegate_.get();
424 }
425
[email protected]f48075d2012-05-24 11:06:51426 HighContrastController* high_contrast_controller() {
427 return high_contrast_controller_.get();
428 }
429
[email protected]77f7c132012-11-15 06:52:54430 MagnificationController* magnification_controller() {
[email protected]c1c670172012-04-26 04:20:26431 return magnification_controller_.get();
432 }
[email protected]f48075d2012-05-24 11:06:51433
[email protected]77f7c132012-11-15 06:52:54434 PartialMagnificationController* partial_magnification_controller() {
435 return partial_magnification_controller_.get();
436 }
[email protected]55398d22013-10-10 19:49:20437
438 AutoclickController* autoclick_controller() {
439 return autoclick_controller_.get();
440 }
441
[email protected]d219a192012-12-14 00:08:18442 aura::client::ActivationClient* activation_client() {
443 return activation_client_;
444 }
[email protected]77f7c132012-11-15 06:52:54445
[email protected]c25ff502013-12-04 13:52:48446 ShelfItemDelegateManager* shelf_item_delegate_manager() {
447 return shelf_item_delegate_manager_.get();
[email protected]cc29ba12013-08-28 05:22:34448 }
449
ben0d6be2d42015-09-26 04:37:19450 base::SequencedWorkerPool* blocking_pool() {
451 return blocking_pool_;
452 }
453
[email protected]c758fbf2012-03-25 22:53:59454 // Force the shelf to query for it's current visibility state.
455 void UpdateShelfVisibility();
456
[email protected]431552c2012-10-23 00:38:33457 // TODO(oshima): Define an interface to access shelf/launcher
458 // state, or just use Launcher.
[email protected]c758fbf2012-03-25 22:53:59459
[email protected]431552c2012-10-23 00:38:33460 // Sets/gets the shelf auto-hide behavior on |root_window|.
461 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
[email protected]bf9cdb362013-10-25 19:22:45462 aura::Window* root_window);
[email protected]431552c2012-10-23 00:38:33463 ShelfAutoHideBehavior GetShelfAutoHideBehavior(
[email protected]bf9cdb362013-10-25 19:22:45464 aura::Window* root_window) const;
[email protected]431552c2012-10-23 00:38:33465
[email protected]431552c2012-10-23 00:38:33466 // Sets/gets shelf's alignment on |root_window|.
msw953caf1f2016-03-18 00:33:29467 void SetShelfAlignment(ShelfAlignment alignment, aura::Window* root_window);
468 ShelfAlignment GetShelfAlignment(const aura::Window* root_window) const;
469
470 // Called when the alignment for a shelf changes.
471 void OnShelfAlignmentChanged(aura::Window* root_window);
[email protected]55444502012-05-10 15:43:53472
msw174379b2016-04-05 00:25:11473 // Called when the auto-hide behavior for a shelf changes.
474 void OnShelfAutoHideBehaviorChanged(aura::Window* root_window);
475
[email protected]375069e2013-10-04 13:54:31476 // Notifies |observers_| when entering or exiting fullscreen mode in
477 // |root_window|.
478 void NotifyFullscreenStateChange(bool is_fullscreen,
[email protected]bf9cdb362013-10-25 19:22:45479 aura::Window* root_window);
[email protected]375069e2013-10-04 13:54:31480
[email protected]090c4f12012-10-29 18:56:42481 // Creates a modal background (a partially-opaque fullscreen window)
482 // on all displays for |window|.
483 void CreateModalBackground(aura::Window* window);
[email protected]c0ce80e2012-10-05 23:28:27484
485 // Called when a modal window is removed. It will activate
486 // another modal window if any, or remove modal screens
487 // on all displays.
488 void OnModalWindowRemoved(aura::Window* removed);
489
[email protected]88d71122012-10-18 07:11:01490 // Returns WebNotificationTray on the primary root window.
491 WebNotificationTray* GetWebNotificationTray();
[email protected]6d6546e2012-05-30 23:12:02492
[email protected]a0afeb12012-12-10 22:57:09493 // Does the primary display have status area?
494 bool HasPrimaryStatusArea();
495
496 // Returns the system tray on primary display.
497 SystemTray* GetPrimarySystemTray();
[email protected]bfb411312012-02-27 20:59:27498
[email protected]945f9cae2012-12-12 09:54:29499 SystemTrayDelegate* system_tray_delegate() {
[email protected]51ed5992012-11-07 10:14:39500 return system_tray_delegate_.get();
501 }
502
[email protected]83b2b84c2012-11-14 01:11:00503 SystemTrayNotifier* system_tray_notifier() {
504 return system_tray_notifier_.get();
505 }
506
[email protected]9488d4d2012-02-29 18:32:37507 static void set_initially_hide_cursor(bool hide) {
508 initially_hide_cursor_ = hide;
509 }
510
[email protected]093b8d642014-04-03 20:59:28511 ResizeShadowController* resize_shadow_controller() {
[email protected]e4a181cc2012-03-17 02:20:57512 return resize_shadow_controller_.get();
513 }
514
[email protected]a54e65b2011-11-21 22:03:34515 // Made available for tests.
[email protected]e319c7e2014-03-14 19:56:14516 ::wm::ShadowController* shadow_controller() {
[email protected]a54e65b2011-11-21 22:03:34517 return shadow_controller_.get();
518 }
519
[email protected]f9466702012-09-17 16:35:27520 // Starts the animation that occurs on first login.
521 void DoInitialWorkspaceAnimation();
522
[email protected]58fb353d2014-04-04 03:28:05523 MaximizeModeController* maximize_mode_controller() {
524 return maximize_mode_controller_.get();
525 }
526
[email protected]7bc49bd2014-01-22 09:30:34527#if defined(OS_CHROMEOS)
oshimae2818922015-07-28 01:18:52528 // TODO(oshima): Move these objects to WindowTreeHostManager.
[email protected]1e31cbd2014-04-07 20:06:11529 ui::DisplayConfigurator* display_configurator() {
530 return display_configurator_.get();
[email protected]70b3e7d52012-06-02 22:12:25531 }
[email protected]093b8d642014-04-03 20:59:28532 DisplayErrorObserver* display_error_observer() {
[email protected]18b21b2e2013-03-01 20:56:23533 return display_error_observer_.get();
534 }
[email protected]70b3e7d52012-06-02 22:12:25535
[email protected]093b8d642014-04-03 20:59:28536 ResolutionNotificationController* resolution_notification_controller() {
[email protected]6ef71d72013-08-10 18:13:44537 return resolution_notification_controller_.get();
538 }
[email protected]0dc85512014-03-13 13:26:41539
[email protected]093b8d642014-04-03 20:59:28540 LogoutConfirmationController* logout_confirmation_controller() {
[email protected]0dc85512014-03-13 13:26:41541 return logout_confirmation_controller_.get();
542 }
rsadamc727b6a2014-10-31 18:59:33543
jonross0af45212015-01-13 18:55:46544 ScreenOrientationController* screen_orientation_controller() {
545 return screen_orientation_controller_.get();
jonrossf21fea12014-11-13 01:22:51546 }
547
rsadamc727b6a2014-10-31 18:59:33548 VirtualKeyboardController* virtual_keyboard_controller() {
549 return virtual_keyboard_controller_.get();
550 }
[email protected]7bc49bd2014-01-22 09:30:34551#endif // defined(OS_CHROMEOS)
[email protected]6ef71d72013-08-10 18:13:44552
[email protected]64936bf2013-11-14 19:48:36553 ShelfModel* shelf_model() {
554 return shelf_model_.get();
[email protected]478c6c32013-03-09 02:50:58555 }
556
[email protected]e9a71312013-10-04 03:20:01557 WindowPositioner* window_positioner() {
558 return window_positioner_.get();
559 }
560
[email protected]478c6c32013-03-09 02:50:58561 // Returns the launcher delegate, creating if necesary.
[email protected]8b57e942013-12-09 19:39:20562 ShelfDelegate* GetShelfDelegate();
[email protected]478c6c32013-03-09 02:50:58563
[email protected]5d2ea362013-12-13 08:10:18564 UserMetricsRecorder* metrics() {
565 return user_metrics_recorder_.get();
566 }
567
[email protected]2b8a9bb2013-07-01 22:43:40568 void SetTouchHudProjectionEnabled(bool enabled);
569
570 bool is_touch_hud_projection_enabled() const {
571 return is_touch_hud_projection_enabled_;
572 }
573
skyfee520c2016-02-11 19:57:46574 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
575
576 bool in_mus() const { return in_mus_; }
577
[email protected]59ccade2013-10-17 17:56:40578#if defined(OS_CHROMEOS)
579 // Creates instance of FirstRunHelper. Caller is responsible for deleting
580 // returned object.
581 ash::FirstRunHelper* CreateFirstRunHelper();
[email protected]f94c6aa2013-11-08 01:18:54582
[email protected]87ec2202014-02-06 06:24:27583 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
584 // compositing is enabled, and vice versa.
585 void SetCursorCompositingEnabled(bool enabled);
586
[email protected]08bdabed2013-12-20 07:52:28587 StickyKeysController* sticky_keys_controller() {
588 return sticky_keys_controller_.get();
[email protected]f94c6aa2013-11-08 01:18:54589 }
[email protected]59ccade2013-10-17 17:56:40590#endif // defined(OS_CHROMEOS)
591
yoshiki32f51632016-03-24 01:24:43592 ToastManager* toast_manager() { return toast_manager_.get(); }
593
[email protected]1d2a7212014-01-16 06:09:48594 GPUSupport* gpu_support() { return gpu_support_.get(); }
[email protected]1d2a7212014-01-16 06:09:48595
[email protected]2b4cd302012-02-24 20:21:13596 private:
[email protected]c39be8f2012-06-15 22:58:36597 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09598 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
599 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
[email protected]093b8d642014-04-03 20:59:28600 friend class RootWindowController;
601 friend class ScopedTargetRootWindow;
[email protected]0c68e892012-12-08 16:54:53602 friend class test::ShellTestApi;
[email protected]0af58042012-12-13 03:21:35603 friend class shell::WindowWatcher;
[email protected]ad0c8722012-03-02 20:17:45604
[email protected]cac10fc62011-10-07 23:22:56605 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
606
[email protected]09464c72013-04-26 07:31:28607 // Takes ownership of |delegate|.
ben0d6be2d42015-09-26 04:37:19608 Shell(ShellDelegate* delegate, base::SequencedWorkerPool* blocking_pool);
dcheng1f4538e2014-10-27 23:57:05609 ~Shell() override;
[email protected]3266c2b92011-11-14 00:06:08610
[email protected]1b4c7472014-05-15 18:32:23611 void Init(const ShellInitParams& init_params);
[email protected]b0639282011-12-22 21:12:27612
[email protected]51f438112013-11-18 19:32:50613 // Initializes virtual keyboard controller.
614 void InitKeyboard();
[email protected]b6ba05d902013-10-04 21:38:45615
[email protected]a273d33a2013-10-17 12:41:21616 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26617 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56618
jdufault551152e2016-01-27 19:48:43619 // Hides the shelf view if any are visible.
620 void HideShelf();
621
[email protected]093b8d642014-04-03 20:59:28622 // ash::SystemModalContainerEventFilterDelegate overrides:
dcheng1f4538e2014-10-27 23:57:05623 bool CanWindowReceiveEvents(aura::Window* window) override;
[email protected]c0ce80e2012-10-05 23:28:27624
[email protected]5097e692012-10-30 22:08:41625 // Overridden from ui::EventTarget:
dcheng1f4538e2014-10-27 23:57:05626 bool CanAcceptEvent(const ui::Event& event) override;
627 EventTarget* GetParentTarget() override;
dchenga94547472016-04-08 08:41:11628 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
dcheng1f4538e2014-10-27 23:57:05629 ui::EventTargeter* GetEventTargeter() override;
[email protected]5097e692012-10-30 22:08:41630
[email protected]1ae361652012-12-12 22:39:51631 // Overridden from aura::client::ActivationChangeObserver:
bruthig5681d882015-06-05 15:33:21632 void OnWindowActivated(
633 aura::client::ActivationChangeObserver::ActivationReason reason,
634 aura::Window* gained_active,
635 aura::Window* lost_active) override;
[email protected]1ae361652012-12-12 22:39:51636
[email protected]cac10fc62011-10-07 23:22:56637 static Shell* instance_;
638
[email protected]9488d4d2012-02-29 18:32:37639 // If set before the Shell is initialized, the mouse cursor will be hidden
640 // when the screen is initially created.
641 static bool initially_hide_cursor_;
642
[email protected]b42910f2013-08-01 11:45:29643 // When no explicit target display/RootWindow is given, new windows are
644 // created on |scoped_target_root_window_| , unless NULL in
645 // which case they are created on |target_root_window_|.
646 // |target_root_window_| never becomes NULL during the session.
[email protected]bf9cdb362013-10-25 19:22:45647 aura::Window* target_root_window_;
648 aura::Window* scoped_target_root_window_;
[email protected]a857dbe2012-05-30 22:10:14649
[email protected]1aad3322012-06-06 06:37:09650 // The CompoundEventFilter owned by aura::Env object.
dchenga94547472016-04-08 08:41:11651 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14652
[email protected]cac10fc62011-10-07 23:22:56653 std::vector<WindowAndBoundsPair> to_restore_;
654
dchenga94547472016-04-08 08:41:11655 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
656 std::unique_ptr<AcceleratorController> accelerator_controller_;
657 std::unique_ptr<ShellDelegate> delegate_;
658 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
659 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
660 std::unique_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
661 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
662 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
663 std::unique_ptr<NewWindowDelegate> new_window_delegate_;
664 std::unique_ptr<MediaDelegate> media_delegate_;
665 std::unique_ptr<ShelfDelegate> shelf_delegate_;
666 std::unique_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
667 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
[email protected]b913a3a2012-12-11 13:07:19668
dchenga94547472016-04-08 08:41:11669 std::unique_ptr<ShelfModel> shelf_model_;
670 std::unique_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24671
dchenga94547472016-04-08 08:41:11672 std::unique_ptr<AppListController> app_list_controller_;
[email protected]ae4987d2011-11-21 22:52:44673
dchenga94547472016-04-08 08:41:11674 std::unique_ptr<DragDropController> drag_drop_controller_;
675 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
676 std::unique_ptr<::wm::ShadowController> shadow_controller_;
677 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
678 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
679 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
680 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_;
681 std::unique_ptr<PowerButtonController> power_button_controller_;
682 std::unique_ptr<LockStateController> lock_state_controller_;
683 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
684 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
685 std::unique_ptr<VideoDetector> video_detector_;
686 std::unique_ptr<WindowCycleController> window_cycle_controller_;
687 std::unique_ptr<WindowSelectorController> window_selector_controller_;
688 std::unique_ptr<FocusCycler> focus_cycler_;
689 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
690 std::unique_ptr<HighContrastController> high_contrast_controller_;
691 std::unique_ptr<MagnificationController> magnification_controller_;
692 std::unique_ptr<PartialMagnificationController>
693 partial_magnification_controller_;
694 std::unique_ptr<AutoclickController> autoclick_controller_;
695 std::unique_ptr<aura::client::FocusClient> focus_client_;
[email protected]39718b52012-12-03 17:24:56696 aura::client::ActivationClient* activation_client_;
dchenga94547472016-04-08 08:41:11697 std::unique_ptr<PartialScreenshotController> partial_screenshot_controller_;
[email protected]f5c9dbc2014-04-11 08:13:45698
dchenga94547472016-04-08 08:41:11699 std::unique_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
700 std::unique_ptr<ScreenPositionController> screen_position_controller_;
701 std::unique_ptr<SystemModalContainerEventFilter> modality_filter_;
702 std::unique_ptr<EventClientImpl> event_client_;
703 std::unique_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13704
[email protected]0b0b0742012-02-16 13:23:45705 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26706 // screenshot UI or the keyboard overlay is active.
dchenga94547472016-04-08 08:41:11707 std::unique_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45708
[email protected]7a80cdd2013-09-26 09:20:53709 // An event filter for logging keyboard-related metrics.
dchenga94547472016-04-08 08:41:11710 std::unique_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_;
[email protected]7a80cdd2013-09-26 09:20:53711
[email protected]3537d472014-01-15 05:45:31712 // An event filter which handles moving and resizing windows.
dchenga94547472016-04-08 08:41:11713 std::unique_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
[email protected]3537d472014-01-15 05:45:31714
[email protected]435b212e2012-04-05 19:43:37715 // An event filter which handles system level gestures
dchenga94547472016-04-08 08:41:11716 std::unique_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37717
[email protected]745816be2011-11-22 05:08:30718 // An event filter that pre-handles global accelerators.
dchenga94547472016-04-08 08:41:11719 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30720
dchenga94547472016-04-08 08:41:11721 std::unique_ptr<DisplayManager> display_manager_;
722 std::unique_ptr<DisplayConfigurationController>
723 display_configuration_controller_;
[email protected]6bdf7952012-11-14 10:10:58724
dchenga94547472016-04-08 08:41:11725 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
[email protected]a9a40462013-07-31 06:22:56726
[email protected]ded58fd2013-10-09 07:56:55727#if defined(OS_CHROMEOS)
dchenga94547472016-04-08 08:41:11728 std::unique_ptr<PowerEventObserver> power_event_observer_;
729 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
730 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
731 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
732 std::unique_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34733 resolution_notification_controller_;
dchenga94547472016-04-08 08:41:11734 std::unique_ptr<BluetoothNotificationController>
[email protected]b3142722014-03-04 06:59:50735 bluetooth_notification_controller_;
dchenga94547472016-04-08 08:41:11736 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
737 std::unique_ptr<LastWindowClosedLogoutReminder>
[email protected]ded32492014-03-14 10:09:28738 last_window_closed_logout_reminder_;
dchenga94547472016-04-08 08:41:11739 std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_;
[email protected]70b3e7d52012-06-02 22:12:25740 // Controls video output device state.
dchenga94547472016-04-08 08:41:11741 std::unique_ptr<ui::DisplayConfigurator> display_configurator_;
742 std::unique_ptr<DisplayColorManager> display_color_manager_;
743 std::unique_ptr<DisplayErrorObserver> display_error_observer_;
744 std::unique_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58745
[email protected]c1234a42013-08-20 09:35:40746 // Listens for output changes and updates the display manager.
dchenga94547472016-04-08 08:41:11747 std::unique_ptr<DisplayChangeObserver> display_change_observer_;
[email protected]3dff2ef2014-02-09 22:50:39748
jonross0af45212015-01-13 18:55:46749 // Implements content::ScreenOrientationController for ChromeOS
dchenga94547472016-04-08 08:41:11750 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
jonrossf21fea12014-11-13 01:22:51751
dchenga94547472016-04-08 08:41:11752 std::unique_ptr<TouchTransformerController> touch_transformer_controller_;
dnicoara8c3bd1e62014-10-30 19:53:39753
dchenga94547472016-04-08 08:41:11754 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
755 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
[email protected]ded58fd2013-10-09 07:56:55756#endif // defined(OS_CHROMEOS)
[email protected]70b3e7d52012-06-02 22:12:25757
dchenga94547472016-04-08 08:41:11758 std::unique_ptr<ToastManager> toast_manager_;
759 std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
[email protected]58fb353d2014-04-04 03:28:05760
[email protected]c0ff0342013-02-27 00:41:29761 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
762 // pointer to vend to test code.
763 AshNativeCursorManager* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03764
sadrul7a8785e2016-02-12 21:54:35765 // Cursor may be hidden on certain key events in ChromeOS, whereas we never
766 // hide the cursor on Windows.
dchenga94547472016-04-08 08:41:11767 std::unique_ptr<::wm::CursorManager> cursor_manager_;
[email protected]4b8003c2012-07-26 00:54:19768
brettw236d3172015-06-03 16:31:43769 base::ObserverList<ShellObserver> observers_;
[email protected]1a2145b2012-03-13 21:09:17770
[email protected]852a55d2012-10-17 13:30:30771 // For testing only: simulate that a modal window is open
772 bool simulate_modal_window_open_for_testing_;
773
[email protected]2b8a9bb2013-07-01 22:43:40774 bool is_touch_hud_projection_enabled_;
775
[email protected]1d2a7212014-01-16 06:09:48776 // Injected content::GPUDataManager support.
dchenga94547472016-04-08 08:41:11777 std::unique_ptr<GPUSupport> gpu_support_;
[email protected]1d2a7212014-01-16 06:09:48778
ben0d6be2d42015-09-26 04:37:19779 base::SequencedWorkerPool* blocking_pool_;
780
skyfee520c2016-02-11 19:57:46781 bool in_mus_ = false;
782
dchenga94547472016-04-08 08:41:11783 std::unique_ptr<KeyboardUI> keyboard_ui_;
skyfee520c2016-02-11 19:57:46784
[email protected]87b0d82e2011-10-07 21:02:59785 DISALLOW_COPY_AND_ASSIGN(Shell);
786};
787
[email protected]55f593352011-12-24 05:42:46788} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59789
[email protected]b65bdda2011-12-23 23:35:31790#endif // ASH_SHELL_H_