blob: df906c23b53ba11ed3acbd5e3ed9a98c5e4776ff [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
[email protected]cac10fc62011-10-07 23:22:568#include <utility>
9#include <vector>
10
[email protected]b65bdda2011-12-23 23:35:3111#include "ash/ash_export.h"
[email protected]5d2ea362013-12-13 08:10:1812#include "ash/metrics/user_metrics_recorder.h"
[email protected]478c6c32013-03-09 02:50:5813#include "ash/shelf/shelf_types.h"
[email protected]82d3954ae2012-04-20 09:02:2214#include "ash/system/user/login_status.h"
[email protected]e76096a5f2014-04-08 04:08:0315#include "ash/wm/cursor_manager_chromeos.h"
[email protected]c0ce80e2012-10-05 23:28:2716#include "ash/wm/system_modal_container_event_filter_delegate.h"
[email protected]87b0d82e2011-10-07 21:02:5917#include "base/basictypes.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"
[email protected]2b99f8c2011-10-11 19:42:2420#include "base/memory/scoped_ptr.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"
[email protected]2eb6b892012-05-31 13:28:2126#include "ui/gfx/insets.h"
[email protected]ffabb1e2012-10-12 19:51:1727#include "ui/gfx/screen.h"
[email protected]9ec0f452012-05-31 15:58:5328#include "ui/gfx/size.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
[email protected]2b99f8c2011-10-11 19:42:2445namespace gfx {
[email protected]9ec0f452012-05-31 15:58:5346class ImageSkia;
[email protected]b5f30602012-01-30 15:16:5747class Point;
[email protected]cac10fc62011-10-07 23:22:5648class Rect;
49}
[email protected]b6ba05d902013-10-04 21:38:4550
[email protected]a8bd1cb2012-02-17 23:05:5451namespace ui {
[email protected]1e31cbd2014-04-07 20:06:1152class DisplayConfigurator;
[email protected]a8bd1cb2012-02-17 23:05:5453class Layer;
[email protected]b0fa7012014-04-16 12:50:5754class UserActivityPowerManagerNotifier;
[email protected]a8bd1cb2012-02-17 23:05:5455}
[email protected]57b8bb352012-01-11 05:11:4656namespace views {
57class NonClientFrameView;
58class Widget;
[email protected]4a59e4e2012-11-12 21:15:4059namespace corewm {
[email protected]e319c7e2014-03-14 19:56:1460class TooltipController;
61}
62}
63
64namespace wm {
[email protected]4a59e4e2012-11-12 21:15:4065class CompoundEventFilter;
66class InputMethodEventFilter;
[email protected]86f2b5e2012-11-14 20:37:0067class ShadowController;
[email protected]b5756e22012-11-30 01:32:0268class VisibilityController;
[email protected]f0f612382014-04-03 15:11:4969class UserActivityDetector;
[email protected]0c2dc012012-12-02 00:00:2370class WindowModalityController;
[email protected]4a59e4e2012-11-12 21:15:4071}
[email protected]87b0d82e2011-10-07 21:02:5972
[email protected]55f593352011-12-24 05:42:4673namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5974
[email protected]2f744282011-12-23 22:40:5275class AcceleratorController;
[email protected]cc4fc3b2014-04-03 08:07:0976class AccelerometerController;
[email protected]093b8d642014-04-03 20:59:2877class AcceleratorFilter;
[email protected]f3ab6eff52013-10-24 03:29:3878class AccessibilityDelegate;
[email protected]093b8d642014-04-03 20:59:2879class AppListController;
[email protected]c0ff0342013-02-27 00:41:2980class AshNativeCursorManager;
[email protected]55398d22013-10-10 19:49:2081class AutoclickController;
[email protected]b3142722014-03-04 06:59:5082class BluetoothNotificationController;
[email protected]60a978b72012-06-08 00:29:1883class CaptureController;
[email protected]093b8d642014-04-03 20:59:2884class DesktopBackgroundController;
[email protected]c1234a42013-08-20 09:35:4085class DisplayChangeObserver;
[email protected]129aad82014-04-24 23:17:0486class DisplayConfiguratorAnimation;
[email protected]093b8d642014-04-03 20:59:2887class DisplayController;
[email protected]18b21b2e2013-03-01 20:56:2388class DisplayErrorObserver;
[email protected]6bdf7952012-11-14 10:10:5889class DisplayManager;
[email protected]084b6bb2011-11-17 05:18:1690class DragDropController;
[email protected]e67291f12012-10-10 05:52:3891class EventClientImpl;
[email protected]b9d224c2012-07-13 01:09:0392class EventRewriterEventFilter;
[email protected]682990f2013-01-10 06:49:1193class EventTransformationHandler;
[email protected]093b8d642014-04-03 20:59:2894class FirstRunHelper;
[email protected]3d29912a2012-02-07 07:41:5195class FocusCycler;
[email protected]093b8d642014-04-03 20:59:2896class GPUSupport;
97class HighContrastController;
[email protected]7a80cdd2013-09-26 09:20:5398class KeyboardUMAEventFilter;
[email protected]ded32492014-03-14 10:09:2899class LastWindowClosedLogoutReminder;
[email protected]a9a40462013-07-31 06:22:56100class LocaleNotificationController;
[email protected]093b8d642014-04-03 20:59:28101class LockStateController;
[email protected]7b3f91ee2014-03-06 11:41:40102class LogoutConfirmationController;
[email protected]093b8d642014-04-03 20:59:28103class MagnificationController;
[email protected]58fb353d2014-04-04 03:28:05104class MaximizeModeController;
[email protected]e55b73452014-02-20 13:18:04105class MaximizeModeWindowManager;
[email protected]093b8d642014-04-03 20:59:28106class MediaDelegate;
[email protected]78d96302012-06-22 00:58:07107class MouseCursorEventFilter;
[email protected]093b8d642014-04-03 20:59:28108class MruWindowTracker;
109class NestedDispatcherController;
110class NewWindowDelegate;
[email protected]9ae32df2012-07-26 03:25:18111class OverlayEventFilter;
[email protected]093b8d642014-04-03 20:59:28112class PartialMagnificationController;
113class PowerButtonController;
[email protected]51625052013-10-10 01:40:16114class PowerEventObserver;
[email protected]72bce522014-02-10 21:11:26115class ProjectingObserver;
[email protected]e4a181cc2012-03-17 02:20:57116class ResizeShadowController;
[email protected]6ef71d72013-08-10 18:13:44117class ResolutionNotificationController;
[email protected]d90b8392012-06-13 09:34:56118class RootWindowController;
[email protected]b42910f2013-08-01 11:45:29119class ScopedTargetRootWindow;
[email protected]093b8d642014-04-03 20:59:28120class ScreenAsh;
[email protected]8d625fb2012-07-18 16:40:06121class ScreenPositionController;
[email protected]093b8d642014-04-03 20:59:28122class SessionStateDelegate;
123class Shelf;
124class ShelfDelegate;
125class ShelfItemDelegateManager;
126class ShelfModel;
[email protected]055a56d2013-12-06 12:13:36127class ShelfWindowWatcher;
[email protected]093b8d642014-04-03 20:59:28128class ShellDelegate;
129class ShellObserver;
[email protected]9861f1752012-06-01 07:16:14130class SlowAnimationEventFilter;
[email protected]6d6546e2012-05-30 23:12:02131class StatusAreaWidget;
[email protected]093b8d642014-04-03 20:59:28132class StickyKeysController;
[email protected]9ae32df2012-07-26 03:25:18133class SystemGestureEventFilter;
[email protected]c0ce80e2012-10-05 23:28:27134class SystemModalContainerEventFilter;
[email protected]093b8d642014-04-03 20:59:28135class SystemTray;
136class SystemTrayDelegate;
137class SystemTrayNotifier;
138class ToplevelWindowEventHandler;
[email protected]03122891a2014-05-13 23:56:49139class TouchTransformerController;
[email protected]73074742012-05-17 01:44:41140class TouchObserverHUD;
[email protected]093b8d642014-04-03 20:59:28141class UserActivityDetector;
[email protected]093b8d642014-04-03 20:59:28142class UserWallpaperDelegate;
[email protected]ded58fd2013-10-09 07:56:55143class VideoActivityNotifier;
[email protected]093b8d642014-04-03 20:59:28144class VideoDetector;
145class WebNotificationTray;
146class WindowCycleController;
147class WindowPositioner;
148class WindowSelectorController;
[email protected]2b99f8c2011-10-11 19:42:24149
[email protected]0af58042012-12-13 03:21:35150namespace shell {
151class WindowWatcher;
152}
153
[email protected]0c68e892012-12-08 16:54:53154namespace test {
155class ShellTestApi;
156}
157
[email protected]87b0d82e2011-10-07 21:02:59158// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59159// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38160//
161// Upon creation, the Shell sets itself as the RootWindow's delegate, which
162// takes ownership of the Shell.
[email protected]093b8d642014-04-03 20:59:28163class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
164 public ui::EventTarget,
165 public aura::client::ActivationChangeObserver {
[email protected]87b0d82e2011-10-07 21:02:59166 public:
[email protected]093b8d642014-04-03 20:59:28167 typedef std::vector<RootWindowController*> RootWindowControllerList;
[email protected]be65be362012-06-15 07:38:23168
[email protected]3d29912a2012-02-07 07:41:51169 enum Direction {
170 FORWARD,
171 BACKWARD
172 };
173
[email protected]3266c2b92011-11-14 00:06:08174 // A shell must be explicitly created so that it can call |Init()| with the
175 // delegate set. |delegate| can be NULL (if not required for initialization).
[email protected]09464c72013-04-26 07:31:28176 // Takes ownership of |delegate|.
[email protected]3266c2b92011-11-14 00:06:08177 static Shell* CreateInstance(ShellDelegate* delegate);
178
179 // Should never be called before |CreateInstance()|.
[email protected]cac10fc62011-10-07 23:22:56180 static Shell* GetInstance();
[email protected]3266c2b92011-11-14 00:06:08181
[email protected]b3b7bcd2012-03-06 19:35:45182 // Returns true if the ash shell has been instantiated.
183 static bool HasInstance();
184
[email protected]ef589af2011-12-03 01:07:15185 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56186
[email protected]d90b8392012-06-13 09:34:56187 // Returns the root window controller for the primary root window.
[email protected]a0afeb12012-12-10 22:57:09188 // TODO(oshima): move this to |RootWindowController|
[email protected]093b8d642014-04-03 20:59:28189 static RootWindowController* GetPrimaryRootWindowController();
[email protected]d90b8392012-06-13 09:34:56190
[email protected]cf1c70e2012-08-30 01:13:02191 // Returns all root window controllers.
[email protected]a0afeb12012-12-10 22:57:09192 // TODO(oshima): move this to |RootWindowController|
[email protected]be65be362012-06-15 07:38:23193 static RootWindowControllerList GetAllRootWindowControllers();
194
[email protected]bf9cdb362013-10-25 19:22:45195 // Returns the primary root Window. The primary root Window is the one that
196 // has a launcher.
197 static aura::Window* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34198
[email protected]bf9cdb362013-10-25 19:22:45199 // Returns a root Window when used as a target when creating a new window.
[email protected]b42910f2013-08-01 11:45:29200 // The root window of the active window is used in most cases, but can
201 // be overridden by using ScopedTargetRootWindow().
[email protected]bf9cdb362013-10-25 19:22:45202 // If you want to get the root Window of the active window, just use
[email protected]b42910f2013-08-01 11:45:29203 // |wm::GetActiveWindow()->GetRootWindow()|.
[email protected]bf9cdb362013-10-25 19:22:45204 static aura::Window* GetTargetRootWindow();
[email protected]a857dbe2012-05-30 22:10:14205
[email protected]ffabb1e2012-10-12 19:51:17206 // Returns the global Screen object that's always active in ash.
207 static gfx::Screen* GetScreen();
208
[email protected]cf1c70e2012-08-30 01:13:02209 // Returns all root windows.
[email protected]c9390bd2013-11-08 20:33:13210 static aura::Window::Windows GetAllRootWindows();
[email protected]be65be362012-06-15 07:38:23211
[email protected]bf9cdb362013-10-25 19:22:45212 static aura::Window* GetContainer(aura::Window* root_window,
[email protected]7b0f7502012-06-11 00:12:39213 int container_id);
[email protected]bf9cdb362013-10-25 19:22:45214 static const aura::Window* GetContainer(const aura::Window* root_window,
[email protected]e67291f12012-10-10 05:52:38215 int container_id);
[email protected]7b0f7502012-06-11 00:12:39216
217 // Returns the list of containers that match |container_id| in
[email protected]429433f2012-12-28 20:14:46218 // all root windows. If |priority_root| is given, the container
219 // in the |priority_root| will be inserted at the top of the list.
220 static std::vector<aura::Window*> GetContainersFromAllRootWindows(
221 int container_id,
[email protected]bf9cdb362013-10-25 19:22:45222 aura::Window* priority_root);
[email protected]7b0f7502012-06-11 00:12:39223
[email protected]bf9cdb362013-10-25 19:22:45224 void set_target_root_window(aura::Window* target_root_window) {
[email protected]b42910f2013-08-01 11:45:29225 target_root_window_ = target_root_window;
[email protected]a857dbe2012-05-30 22:10:14226 }
227
[email protected]cb054f972012-10-11 20:27:28228 // Shows the context menu for the background and launcher at
[email protected]431552c2012-10-23 00:38:33229 // |location_in_screen| (in screen coordinates).
[email protected]940fb1c2013-06-18 16:54:28230 void ShowContextMenu(const gfx::Point& location_in_screen,
231 ui::MenuSourceType source_type);
[email protected]cac10fc62011-10-07 23:22:56232
[email protected]b913a3a2012-12-11 13:07:19233 // Toggles the app list. |window| specifies in which display the app
234 // list should be shown. If this is NULL, the active root window
235 // will be used.
236 void ToggleAppList(aura::Window* anchor);
[email protected]ae4987d2011-11-21 22:52:44237
[email protected]7510d1082012-03-30 21:58:34238 // Returns app list target visibility.
239 bool GetAppListTargetVisibility() const;
240
[email protected]1e51a9d2012-04-09 23:31:11241 // Returns app list window or NULL if it is not visible.
242 aura::Window* GetAppListWindow();
243
[email protected]59ccade2013-10-17 17:56:40244 // Returns app list view or NULL if it is not visible.
245 app_list::AppListView* GetAppListView();
246
[email protected]dc09739372012-11-15 20:17:39247 // Returns true if a system-modal dialog window is currently open.
248 bool IsSystemModalWindowOpen() const;
[email protected]40c4cbb2012-01-10 23:26:07249
[email protected]852a55d2012-10-17 13:30:30250 // For testing only: set simulation that a modal window is open
251 void SimulateModalWindowOpenForTesting(bool modal_window_open) {
252 simulate_modal_window_open_for_testing_ = modal_window_open;
253 }
254
[email protected]57b8bb352012-01-11 05:11:46255 // Creates a default views::NonClientFrameView for use by windows in the
256 // Ash environment.
257 views::NonClientFrameView* CreateDefaultNonClientFrameView(
258 views::Widget* widget);
259
[email protected]d9456cb2012-03-21 16:41:04260 // Rotates focus through containers that can receive focus.
[email protected]3d29912a2012-02-07 07:41:51261 void RotateFocus(Direction direction);
262
[email protected]2e236a52012-06-27 22:21:47263 // Sets the work area insets of the display that contains |window|,
[email protected]8a45c972012-03-14 18:22:44264 // this notifies observers too.
[email protected]27f6af62012-03-21 05:34:40265 // TODO(sky): this no longer really replicates what happens and is unreliable.
266 // Remove this.
[email protected]2e236a52012-06-27 22:21:47267 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44268 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17269
[email protected]82d3954ae2012-04-20 09:02:22270 // Called when the user logs in.
271 void OnLoginStateChanged(user::LoginStatus status);
272
[email protected]51f438112013-11-18 19:32:50273 // Called after the logged-in user's profile is ready.
274 void OnLoginUserProfilePrepared();
275
[email protected]88d71122012-10-18 07:11:01276 // Called when the login status changes.
277 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
278 void UpdateAfterLoginStatusChange(user::LoginStatus status);
279
[email protected]82d3954ae2012-04-20 09:02:22280 // Called when the application is exiting.
281 void OnAppTerminating();
282
283 // Called when the screen is locked (after the lock window is visible) or
284 // unlocked.
285 void OnLockStateChanged(bool locked);
286
[email protected]58868abf2014-01-17 23:45:33287 // Called when a casting session is started or stopped.
288 void OnCastingSessionStartedOrStopped(bool started);
289
[email protected]de42bcc2014-03-04 05:17:00290 // Called when the overview mode is about to be started (before the windows
291 // get re-arranged).
292 void OnOverviewModeStarting();
293
294 // Called before the overview mode is ending (before the windows get arranged
295 // to their final position).
296 void OnOverviewModeEnding();
297
[email protected]02a80052014-03-14 05:45:23298 // Called after maximize mode has started, windows might still animate though.
299 void OnMaximizeModeStarted();
300
301 // Called after maximize mode has ended, windows might still be returning to
302 // their original position.
303 void OnMaximizeModeEnded();
304
[email protected]0e3e7cb2014-04-12 05:18:25305 // Called when a root window is created.
306 void OnRootWindowAdded(aura::Window* root_window);
307
[email protected]864b58552013-12-19 04:19:38308 // Initializes |shelf_|. Does nothing if it's already initialized.
309 void CreateShelf();
[email protected]d9456cb2012-03-21 16:41:04310
[email protected]b8642ec2014-04-17 05:20:39311 // Called when the shelf is created for |root_window|.
312 void OnShelfCreatedForRootWindow(aura::Window* root_window);
313
[email protected]e1b299b2014-01-29 23:53:41314 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
315 // exists.
[email protected]51f438112013-11-18 19:32:50316 void CreateKeyboard();
317
[email protected]e1b299b2014-01-29 23:53:41318 // Deactivates the virtual keyboard.
319 void DeactivateKeyboard();
320
[email protected]99c5ed82013-10-18 01:30:04321 // Show shelf view if it was created hidden (before session has started).
[email protected]864b58552013-12-19 04:19:38322 void ShowShelf();
[email protected]7e1df2f62012-07-19 19:17:18323
[email protected]d9456cb2012-03-21 16:41:04324 // Adds/removes observer.
[email protected]1a2145b2012-03-13 21:09:17325 void AddShellObserver(ShellObserver* observer);
326 void RemoveShellObserver(ShellObserver* observer);
327
[email protected]e55b73452014-02-20 13:18:04328 // Turn the always maximize mode window manager on or off.
329 void EnableMaximizeModeWindowManager(bool enable);
330
[email protected]b19b09a2014-02-26 05:34:34331 // Test if the MaximizeModeWindowManager is enabled or not.
332 bool IsMaximizeModeWindowManagerEnabled();
333
[email protected]2f744282011-12-23 22:40:52334 AcceleratorController* accelerator_controller() {
[email protected]745816be2011-11-22 05:08:30335 return accelerator_controller_.get();
336 }
[email protected]6e9f6aa2012-02-09 04:16:20337
[email protected]093b8d642014-04-03 20:59:28338 DisplayManager* display_manager() { return display_manager_.get(); }
[email protected]e319c7e2014-03-14 19:56:14339 ::wm::InputMethodEventFilter* input_method_filter() {
[email protected]f1d5c3a2013-04-23 17:42:56340 return input_method_filter_.get();
341 }
[email protected]e319c7e2014-03-14 19:56:14342 ::wm::CompoundEventFilter* env_filter() {
[email protected]492533b32012-09-21 19:06:14343 return env_filter_.get();
[email protected]627a62f2012-02-14 22:59:14344 }
[email protected]a1b7a822013-02-23 19:08:04345 views::corewm::TooltipController* tooltip_controller() {
[email protected]862deef2011-12-15 22:07:33346 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11347 }
[email protected]093b8d642014-04-03 20:59:28348 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
[email protected]e70cf0ed2012-03-15 16:24:47349 DesktopBackgroundController* desktop_background_controller() {
350 return desktop_background_controller_.get();
351 }
[email protected]e0d22e82012-01-04 00:46:57352 PowerButtonController* power_button_controller() {
353 return power_button_controller_.get();
354 }
[email protected]ab4f8c92013-05-30 19:07:47355 LockStateController* lock_state_controller() {
356 return lock_state_controller_.get();
[email protected]222f40c2012-10-18 08:58:13357 }
[email protected]66c5c4112013-07-31 07:10:59358 MruWindowTracker* mru_window_tracker() {
359 return mru_window_tracker_.get();
360 }
[email protected]f0f612382014-04-03 15:11:49361 ::wm::UserActivityDetector* user_activity_detector() {
[email protected]c16b9422012-06-06 21:51:11362 return user_activity_detector_.get();
363 }
[email protected]6aa614a2012-01-19 22:13:38364 VideoDetector* video_detector() {
365 return video_detector_.get();
366 }
[email protected]dd1e1ac2014-05-13 03:44:09367 WindowCycleController* window_cycle_controller() {
368 return window_cycle_controller_.get();
369 }
[email protected]d24ce2c2013-08-01 15:14:19370 WindowSelectorController* window_selector_controller() {
371 return window_selector_controller_.get();
372 }
[email protected]093b8d642014-04-03 20:59:28373 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
[email protected]edbfb8d2012-09-03 08:33:43374 DisplayController* display_controller() {
[email protected]2e236a52012-06-27 22:21:47375 return display_controller_.get();
[email protected]3e1cdd312012-06-07 03:48:41376 }
[email protected]03122891a2014-05-13 23:56:49377#if defined(OS_CHROMEOS) && defined(USE_X11)
378 TouchTransformerController* touch_transformer_controller() {
379 return touch_transformer_controller_.get();
380 }
381#endif // defined(OS_CHROMEOS) && defined(USE_X11)
[email protected]093b8d642014-04-03 20:59:28382 MouseCursorEventFilter* mouse_cursor_filter() {
[email protected]8b7ba87b2012-09-01 00:40:40383 return mouse_cursor_filter_.get();
384 }
[email protected]093b8d642014-04-03 20:59:28385 EventTransformationHandler* event_transformation_handler() {
[email protected]682990f2013-01-10 06:49:11386 return event_transformation_handler_.get();
387 }
[email protected]e319c7e2014-03-14 19:56:14388 ::wm::CursorManager* cursor_manager() { return &cursor_manager_; }
[email protected]4a229e902011-12-01 21:21:11389
[email protected]3266c2b92011-11-14 00:06:08390 ShellDelegate* delegate() { return delegate_.get(); }
[email protected]aa54218b2012-06-12 16:51:42391
[email protected]10b22612012-03-22 17:07:55392 UserWallpaperDelegate* user_wallpaper_delegate() {
393 return user_wallpaper_delegate_.get();
394 }
[email protected]35304ce2011-12-14 23:21:01395
[email protected]fcb123d2013-04-17 15:58:49396 SessionStateDelegate* session_state_delegate() {
397 return session_state_delegate_.get();
398 }
399
[email protected]f3ab6eff52013-10-24 03:29:38400 AccessibilityDelegate* accessibility_delegate() {
401 return accessibility_delegate_.get();
402 }
403
[email protected]47686c42013-10-25 01:49:17404 NewWindowDelegate* new_window_delegate() {
405 return new_window_delegate_.get();
406 }
407
[email protected]efc897f72013-11-01 11:43:07408 MediaDelegate* media_delegate() {
409 return media_delegate_.get();
410 }
411
[email protected]f48075d2012-05-24 11:06:51412 HighContrastController* high_contrast_controller() {
413 return high_contrast_controller_.get();
414 }
415
[email protected]77f7c132012-11-15 06:52:54416 MagnificationController* magnification_controller() {
[email protected]c1c670172012-04-26 04:20:26417 return magnification_controller_.get();
418 }
[email protected]f48075d2012-05-24 11:06:51419
[email protected]77f7c132012-11-15 06:52:54420 PartialMagnificationController* partial_magnification_controller() {
421 return partial_magnification_controller_.get();
422 }
[email protected]55398d22013-10-10 19:49:20423
424 AutoclickController* autoclick_controller() {
425 return autoclick_controller_.get();
426 }
427
[email protected]d219a192012-12-14 00:08:18428 aura::client::ActivationClient* activation_client() {
429 return activation_client_;
430 }
[email protected]77f7c132012-11-15 06:52:54431
[email protected]c25ff502013-12-04 13:52:48432 ShelfItemDelegateManager* shelf_item_delegate_manager() {
433 return shelf_item_delegate_manager_.get();
[email protected]cc29ba12013-08-28 05:22:34434 }
435
[email protected]c758fbf2012-03-25 22:53:59436 // Force the shelf to query for it's current visibility state.
437 void UpdateShelfVisibility();
438
[email protected]431552c2012-10-23 00:38:33439 // TODO(oshima): Define an interface to access shelf/launcher
440 // state, or just use Launcher.
[email protected]c758fbf2012-03-25 22:53:59441
[email protected]431552c2012-10-23 00:38:33442 // Sets/gets the shelf auto-hide behavior on |root_window|.
443 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
[email protected]bf9cdb362013-10-25 19:22:45444 aura::Window* root_window);
[email protected]431552c2012-10-23 00:38:33445 ShelfAutoHideBehavior GetShelfAutoHideBehavior(
[email protected]bf9cdb362013-10-25 19:22:45446 aura::Window* root_window) const;
[email protected]431552c2012-10-23 00:38:33447
[email protected]431552c2012-10-23 00:38:33448 // Sets/gets shelf's alignment on |root_window|.
449 void SetShelfAlignment(ShelfAlignment alignment,
[email protected]bf9cdb362013-10-25 19:22:45450 aura::Window* root_window);
451 ShelfAlignment GetShelfAlignment(aura::Window* root_window);
[email protected]55444502012-05-10 15:43:53452
[email protected]d90b8392012-06-13 09:34:56453 // Dims or undims the screen.
454 void SetDimming(bool should_dim);
455
[email protected]375069e2013-10-04 13:54:31456 // Notifies |observers_| when entering or exiting fullscreen mode in
457 // |root_window|.
458 void NotifyFullscreenStateChange(bool is_fullscreen,
[email protected]bf9cdb362013-10-25 19:22:45459 aura::Window* root_window);
[email protected]375069e2013-10-04 13:54:31460
[email protected]090c4f12012-10-29 18:56:42461 // Creates a modal background (a partially-opaque fullscreen window)
462 // on all displays for |window|.
463 void CreateModalBackground(aura::Window* window);
[email protected]c0ce80e2012-10-05 23:28:27464
465 // Called when a modal window is removed. It will activate
466 // another modal window if any, or remove modal screens
467 // on all displays.
468 void OnModalWindowRemoved(aura::Window* removed);
469
[email protected]88d71122012-10-18 07:11:01470 // Returns WebNotificationTray on the primary root window.
471 WebNotificationTray* GetWebNotificationTray();
[email protected]6d6546e2012-05-30 23:12:02472
[email protected]a0afeb12012-12-10 22:57:09473 // Does the primary display have status area?
474 bool HasPrimaryStatusArea();
475
476 // Returns the system tray on primary display.
477 SystemTray* GetPrimarySystemTray();
[email protected]bfb411312012-02-27 20:59:27478
[email protected]945f9cae2012-12-12 09:54:29479 SystemTrayDelegate* system_tray_delegate() {
[email protected]51ed5992012-11-07 10:14:39480 return system_tray_delegate_.get();
481 }
482
[email protected]83b2b84c2012-11-14 01:11:00483 SystemTrayNotifier* system_tray_notifier() {
484 return system_tray_notifier_.get();
485 }
486
[email protected]9488d4d2012-02-29 18:32:37487 static void set_initially_hide_cursor(bool hide) {
488 initially_hide_cursor_ = hide;
489 }
490
[email protected]093b8d642014-04-03 20:59:28491 ResizeShadowController* resize_shadow_controller() {
[email protected]e4a181cc2012-03-17 02:20:57492 return resize_shadow_controller_.get();
493 }
494
[email protected]a54e65b2011-11-21 22:03:34495 // Made available for tests.
[email protected]e319c7e2014-03-14 19:56:14496 ::wm::ShadowController* shadow_controller() {
[email protected]a54e65b2011-11-21 22:03:34497 return shadow_controller_.get();
498 }
499
[email protected]f9466702012-09-17 16:35:27500 // Starts the animation that occurs on first login.
501 void DoInitialWorkspaceAnimation();
502
[email protected]cc4fc3b2014-04-03 08:07:09503 AccelerometerController* accelerometer_controller() {
504 return accelerometer_controller_.get();
505 }
506
[email protected]58fb353d2014-04-04 03:28:05507 MaximizeModeController* maximize_mode_controller() {
508 return maximize_mode_controller_.get();
509 }
510
[email protected]7bc49bd2014-01-22 09:30:34511#if defined(OS_CHROMEOS)
[email protected]945ece962013-03-21 06:42:39512 // TODO(oshima): Move these objects to DisplayController.
[email protected]1e31cbd2014-04-07 20:06:11513 ui::DisplayConfigurator* display_configurator() {
514 return display_configurator_.get();
[email protected]70b3e7d52012-06-02 22:12:25515 }
[email protected]129aad82014-04-24 23:17:04516 DisplayConfiguratorAnimation* display_configurator_animation() {
517 return display_configurator_animation_.get();
[email protected]196e9452012-08-01 06:42:51518 }
[email protected]093b8d642014-04-03 20:59:28519 DisplayErrorObserver* display_error_observer() {
[email protected]18b21b2e2013-03-01 20:56:23520 return display_error_observer_.get();
521 }
[email protected]70b3e7d52012-06-02 22:12:25522
[email protected]093b8d642014-04-03 20:59:28523 ResolutionNotificationController* resolution_notification_controller() {
[email protected]6ef71d72013-08-10 18:13:44524 return resolution_notification_controller_.get();
525 }
[email protected]0dc85512014-03-13 13:26:41526
[email protected]093b8d642014-04-03 20:59:28527 LogoutConfirmationController* logout_confirmation_controller() {
[email protected]0dc85512014-03-13 13:26:41528 return logout_confirmation_controller_.get();
529 }
[email protected]7bc49bd2014-01-22 09:30:34530#endif // defined(OS_CHROMEOS)
[email protected]6ef71d72013-08-10 18:13:44531
[email protected]64936bf2013-11-14 19:48:36532 ShelfModel* shelf_model() {
533 return shelf_model_.get();
[email protected]478c6c32013-03-09 02:50:58534 }
535
[email protected]e9a71312013-10-04 03:20:01536 WindowPositioner* window_positioner() {
537 return window_positioner_.get();
538 }
539
[email protected]478c6c32013-03-09 02:50:58540 // Returns the launcher delegate, creating if necesary.
[email protected]8b57e942013-12-09 19:39:20541 ShelfDelegate* GetShelfDelegate();
[email protected]478c6c32013-03-09 02:50:58542
[email protected]5d2ea362013-12-13 08:10:18543 UserMetricsRecorder* metrics() {
544 return user_metrics_recorder_.get();
545 }
546
[email protected]2b8a9bb2013-07-01 22:43:40547 void SetTouchHudProjectionEnabled(bool enabled);
548
549 bool is_touch_hud_projection_enabled() const {
550 return is_touch_hud_projection_enabled_;
551 }
552
[email protected]59ccade2013-10-17 17:56:40553#if defined(OS_CHROMEOS)
554 // Creates instance of FirstRunHelper. Caller is responsible for deleting
555 // returned object.
556 ash::FirstRunHelper* CreateFirstRunHelper();
[email protected]f94c6aa2013-11-08 01:18:54557
[email protected]87ec2202014-02-06 06:24:27558 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
559 // compositing is enabled, and vice versa.
560 void SetCursorCompositingEnabled(bool enabled);
561
[email protected]08bdabed2013-12-20 07:52:28562 StickyKeysController* sticky_keys_controller() {
563 return sticky_keys_controller_.get();
[email protected]f94c6aa2013-11-08 01:18:54564 }
[email protected]59ccade2013-10-17 17:56:40565#endif // defined(OS_CHROMEOS)
566
[email protected]1d2a7212014-01-16 06:09:48567 GPUSupport* gpu_support() { return gpu_support_.get(); }
[email protected]1d2a7212014-01-16 06:09:48568
[email protected]2b4cd302012-02-24 20:21:13569 private:
[email protected]c39be8f2012-06-15 22:58:36570 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09571 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
572 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
[email protected]093b8d642014-04-03 20:59:28573 friend class RootWindowController;
574 friend class ScopedTargetRootWindow;
[email protected]0c68e892012-12-08 16:54:53575 friend class test::ShellTestApi;
[email protected]0af58042012-12-13 03:21:35576 friend class shell::WindowWatcher;
[email protected]ad0c8722012-03-02 20:17:45577
[email protected]cac10fc62011-10-07 23:22:56578 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
579
[email protected]09464c72013-04-26 07:31:28580 // Takes ownership of |delegate|.
[email protected]3266c2b92011-11-14 00:06:08581 explicit Shell(ShellDelegate* delegate);
582 virtual ~Shell();
583
584 void Init();
[email protected]b0639282011-12-22 21:12:27585
[email protected]51f438112013-11-18 19:32:50586 // Initializes virtual keyboard controller.
587 void InitKeyboard();
[email protected]b6ba05d902013-10-04 21:38:45588
[email protected]a273d33a2013-10-17 12:41:21589 // Initializes the root window so that it can host browser windows.
[email protected]41baaed2013-11-09 04:18:26590 void InitRootWindow(aura::Window* root_window);
[email protected]d90b8392012-06-13 09:34:56591
[email protected]093b8d642014-04-03 20:59:28592 // ash::SystemModalContainerEventFilterDelegate overrides:
[email protected]c0ce80e2012-10-05 23:28:27593 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE;
594
[email protected]5097e692012-10-30 22:08:41595 // Overridden from ui::EventTarget:
[email protected]869f6352012-12-06 20:47:17596 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
[email protected]5097e692012-10-30 22:08:41597 virtual EventTarget* GetParentTarget() OVERRIDE;
[email protected]3e670aa2013-12-02 19:04:32598 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
599 virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
[email protected]049cf34b2012-12-07 17:15:48600 virtual void OnEvent(ui::Event* event) OVERRIDE;
[email protected]5097e692012-10-30 22:08:41601
[email protected]1ae361652012-12-12 22:39:51602 // Overridden from aura::client::ActivationChangeObserver:
603 virtual void OnWindowActivated(aura::Window* gained_active,
604 aura::Window* lost_active) OVERRIDE;
605
[email protected]cac10fc62011-10-07 23:22:56606 static Shell* instance_;
607
[email protected]9488d4d2012-02-29 18:32:37608 // If set before the Shell is initialized, the mouse cursor will be hidden
609 // when the screen is initially created.
610 static bool initially_hide_cursor_;
611
[email protected]b42910f2013-08-01 11:45:29612 // When no explicit target display/RootWindow is given, new windows are
613 // created on |scoped_target_root_window_| , unless NULL in
614 // which case they are created on |target_root_window_|.
615 // |target_root_window_| never becomes NULL during the session.
[email protected]bf9cdb362013-10-25 19:22:45616 aura::Window* target_root_window_;
617 aura::Window* scoped_target_root_window_;
[email protected]a857dbe2012-05-30 22:10:14618
[email protected]1aad3322012-06-06 06:37:09619 // The CompoundEventFilter owned by aura::Env object.
[email protected]e319c7e2014-03-14 19:56:14620 scoped_ptr< ::wm::CompoundEventFilter> env_filter_;
[email protected]627a62f2012-02-14 22:59:14621
[email protected]cac10fc62011-10-07 23:22:56622 std::vector<WindowAndBoundsPair> to_restore_;
623
[email protected]5d2ea362013-12-13 08:10:18624 scoped_ptr<UserMetricsRecorder> user_metrics_recorder_;
[email protected]8f80db0f2012-02-07 14:44:53625 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
[email protected]2f744282011-12-23 22:40:52626 scoped_ptr<AcceleratorController> accelerator_controller_;
[email protected]2b99f8c2011-10-11 19:42:24627 scoped_ptr<ShellDelegate> delegate_;
[email protected]51ed5992012-11-07 10:14:39628 scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
[email protected]83b2b84c2012-11-14 01:11:00629 scoped_ptr<SystemTrayNotifier> system_tray_notifier_;
[email protected]10b22612012-03-22 17:07:55630 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
[email protected]fcb123d2013-04-17 15:58:49631 scoped_ptr<SessionStateDelegate> session_state_delegate_;
[email protected]f3ab6eff52013-10-24 03:29:38632 scoped_ptr<AccessibilityDelegate> accessibility_delegate_;
[email protected]47686c42013-10-25 01:49:17633 scoped_ptr<NewWindowDelegate> new_window_delegate_;
[email protected]efc897f72013-11-01 11:43:07634 scoped_ptr<MediaDelegate> media_delegate_;
[email protected]8b57e942013-12-09 19:39:20635 scoped_ptr<ShelfDelegate> shelf_delegate_;
[email protected]c25ff502013-12-04 13:52:48636 scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
[email protected]093b8d642014-04-03 20:59:28637 scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_;
[email protected]b913a3a2012-12-11 13:07:19638
[email protected]64936bf2013-11-14 19:48:36639 scoped_ptr<ShelfModel> shelf_model_;
640 scoped_ptr<WindowPositioner> window_positioner_;
[email protected]2b99f8c2011-10-11 19:42:24641
[email protected]093b8d642014-04-03 20:59:28642 scoped_ptr<AppListController> app_list_controller_;
[email protected]ae4987d2011-11-21 22:52:44643
[email protected]093b8d642014-04-03 20:59:28644 scoped_ptr<DragDropController> drag_drop_controller_;
645 scoped_ptr<ResizeShadowController> resize_shadow_controller_;
[email protected]e319c7e2014-03-14 19:56:14646 scoped_ptr< ::wm::ShadowController> shadow_controller_;
647 scoped_ptr< ::wm::VisibilityController> visibility_controller_;
648 scoped_ptr< ::wm::WindowModalityController> window_modality_controller_;
[email protected]a1b7a822013-02-23 19:08:04649 scoped_ptr<views::corewm::TooltipController> tooltip_controller_;
[email protected]e70cf0ed2012-03-15 16:24:47650 scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
[email protected]e0d22e82012-01-04 00:46:57651 scoped_ptr<PowerButtonController> power_button_controller_;
[email protected]ab4f8c92013-05-30 19:07:47652 scoped_ptr<LockStateController> lock_state_controller_;
[email protected]66c5c4112013-07-31 07:10:59653 scoped_ptr<MruWindowTracker> mru_window_tracker_;
[email protected]f0f612382014-04-03 15:11:49654 scoped_ptr< ::wm::UserActivityDetector> user_activity_detector_;
[email protected]6aa614a2012-01-19 22:13:38655 scoped_ptr<VideoDetector> video_detector_;
[email protected]dd1e1ac2014-05-13 03:44:09656 scoped_ptr<WindowCycleController> window_cycle_controller_;
[email protected]d24ce2c2013-08-01 15:14:19657 scoped_ptr<WindowSelectorController> window_selector_controller_;
[email protected]093b8d642014-04-03 20:59:28658 scoped_ptr<FocusCycler> focus_cycler_;
[email protected]edbfb8d2012-09-03 08:33:43659 scoped_ptr<DisplayController> display_controller_;
[email protected]f48075d2012-05-24 11:06:51660 scoped_ptr<HighContrastController> high_contrast_controller_;
[email protected]77f7c132012-11-15 06:52:54661 scoped_ptr<MagnificationController> magnification_controller_;
662 scoped_ptr<PartialMagnificationController> partial_magnification_controller_;
[email protected]55398d22013-10-10 19:49:20663 scoped_ptr<AutoclickController> autoclick_controller_;
[email protected]8cfb6722012-11-28 03:28:46664 scoped_ptr<aura::client::FocusClient> focus_client_;
[email protected]39718b52012-12-03 17:24:56665 aura::client::ActivationClient* activation_client_;
[email protected]f5c9dbc2014-04-11 08:13:45666
[email protected]093b8d642014-04-03 20:59:28667 scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
668 scoped_ptr<ScreenPositionController> screen_position_controller_;
669 scoped_ptr<SystemModalContainerEventFilter> modality_filter_;
670 scoped_ptr<EventClientImpl> event_client_;
671 scoped_ptr<EventTransformationHandler> event_transformation_handler_;
[email protected]ae18b9112011-11-07 16:59:13672
[email protected]0b0b0742012-02-16 13:23:45673 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26674 // screenshot UI or the keyboard overlay is active.
[email protected]093b8d642014-04-03 20:59:28675 scoped_ptr<OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45676
[email protected]7a80cdd2013-09-26 09:20:53677 // An event filter for logging keyboard-related metrics.
[email protected]093b8d642014-04-03 20:59:28678 scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_;
[email protected]7a80cdd2013-09-26 09:20:53679
[email protected]3537d472014-01-15 05:45:31680 // An event filter which handles moving and resizing windows.
681 scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
682
[email protected]435b212e2012-04-05 19:43:37683 // An event filter which handles system level gestures
[email protected]093b8d642014-04-03 20:59:28684 scoped_ptr<SystemGestureEventFilter> system_gesture_filter_;
[email protected]435b212e2012-04-05 19:43:37685
[email protected]745816be2011-11-22 05:08:30686 // An event filter that pre-handles global accelerators.
[email protected]093b8d642014-04-03 20:59:28687 scoped_ptr<AcceleratorFilter> accelerator_filter_;
[email protected]745816be2011-11-22 05:08:30688
[email protected]42f06f92012-03-27 00:57:57689 // An event filter that pre-handles all key events to send them to an IME.
[email protected]e319c7e2014-03-14 19:56:14690 scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_;
[email protected]42f06f92012-03-27 00:57:57691
[email protected]093b8d642014-04-03 20:59:28692 scoped_ptr<DisplayManager> display_manager_;
693 scoped_ptr<base::WeakPtrFactory<DisplayManager> >
[email protected]6f67df52013-10-29 01:07:15694 weak_display_manager_factory_;
[email protected]6bdf7952012-11-14 10:10:58695
[email protected]093b8d642014-04-03 20:59:28696 scoped_ptr<LocaleNotificationController> locale_notification_controller_;
[email protected]a9a40462013-07-31 06:22:56697
[email protected]e55b73452014-02-20 13:18:04698 // The maximized window manager (if enabled).
[email protected]093b8d642014-04-03 20:59:28699 scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_;
[email protected]e55b73452014-02-20 13:18:04700
[email protected]cc4fc3b2014-04-03 08:07:09701 scoped_ptr<AccelerometerController> accelerometer_controller_;
702
[email protected]ded58fd2013-10-09 07:56:55703#if defined(OS_CHROMEOS)
[email protected]093b8d642014-04-03 20:59:28704 scoped_ptr<PowerEventObserver> power_event_observer_;
[email protected]b0fa7012014-04-16 12:50:57705 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
[email protected]093b8d642014-04-03 20:59:28706 scoped_ptr<VideoActivityNotifier> video_activity_notifier_;
[email protected]08bdabed2013-12-20 07:52:28707 scoped_ptr<StickyKeysController> sticky_keys_controller_;
[email protected]093b8d642014-04-03 20:59:28708 scoped_ptr<ResolutionNotificationController>
[email protected]7bc49bd2014-01-22 09:30:34709 resolution_notification_controller_;
[email protected]093b8d642014-04-03 20:59:28710 scoped_ptr<BluetoothNotificationController>
[email protected]b3142722014-03-04 06:59:50711 bluetooth_notification_controller_;
[email protected]093b8d642014-04-03 20:59:28712 scoped_ptr<LogoutConfirmationController> logout_confirmation_controller_;
713 scoped_ptr<LastWindowClosedLogoutReminder>
[email protected]ded32492014-03-14 10:09:28714 last_window_closed_logout_reminder_;
[email protected]70b3e7d52012-06-02 22:12:25715 // Controls video output device state.
[email protected]1e31cbd2014-04-07 20:06:11716 scoped_ptr<ui::DisplayConfigurator> display_configurator_;
[email protected]129aad82014-04-24 23:17:04717 scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_;
[email protected]093b8d642014-04-03 20:59:28718 scoped_ptr<DisplayErrorObserver> display_error_observer_;
719 scoped_ptr<ProjectingObserver> projecting_observer_;
[email protected]6bdf7952012-11-14 10:10:58720
[email protected]c1234a42013-08-20 09:35:40721 // Listens for output changes and updates the display manager.
[email protected]093b8d642014-04-03 20:59:28722 scoped_ptr<DisplayChangeObserver> display_change_observer_;
[email protected]3dff2ef2014-02-09 22:50:39723
[email protected]94545ca92014-03-29 01:17:59724#if defined(USE_X11)
[email protected]e4ea52362014-02-15 03:21:06725 scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
726 scoped_ptr<ui::EventHandler> speech_feedback_handler_;
[email protected]03122891a2014-05-13 23:56:49727 scoped_ptr<TouchTransformerController> touch_transformer_controller_;
[email protected]ded58fd2013-10-09 07:56:55728#endif // defined(USE_X11)
729#endif // defined(OS_CHROMEOS)
[email protected]70b3e7d52012-06-02 22:12:25730
[email protected]58fb353d2014-04-04 03:28:05731 scoped_ptr<MaximizeModeController> maximize_mode_controller_;
732
[email protected]c0ff0342013-02-27 00:41:29733 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
734 // pointer to vend to test code.
735 AshNativeCursorManager* native_cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03736
737// Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
738// the cursor on Windows.
739#if defined(OS_CHROMEOS)
740 CursorManager cursor_manager_;
741#else // !defined(OS_CHROMEOS)
[email protected]e319c7e2014-03-14 19:56:14742 ::wm::CursorManager cursor_manager_;
[email protected]e76096a5f2014-04-08 04:08:03743#endif // defined(OS_CHROMEOS)
[email protected]4b8003c2012-07-26 00:54:19744
[email protected]1a2145b2012-03-13 21:09:17745 ObserverList<ShellObserver> observers_;
746
[email protected]852a55d2012-10-17 13:30:30747 // For testing only: simulate that a modal window is open
748 bool simulate_modal_window_open_for_testing_;
749
[email protected]2b8a9bb2013-07-01 22:43:40750 bool is_touch_hud_projection_enabled_;
751
[email protected]1d2a7212014-01-16 06:09:48752 // Injected content::GPUDataManager support.
753 scoped_ptr<GPUSupport> gpu_support_;
754
[email protected]87b0d82e2011-10-07 21:02:59755 DISALLOW_COPY_AND_ASSIGN(Shell);
756};
757
[email protected]55f593352011-12-24 05:42:46758} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59759
[email protected]b65bdda2011-12-23 23:35:31760#endif // ASH_SHELL_H_