Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef ASH_SHELL_H_ |
| 6 | #define ASH_SHELL_H_ |
| 7 | |
| 8 | #include <utility> |
| 9 | #include <vector> |
| 10 | |
| 11 | #include "ash/ash_export.h" |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 12 | #include "ash/metrics/user_metrics_recorder.h" |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 13 | #include "ash/shelf/shelf_types.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 14 | #include "ash/system/user/login_status.h" |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 15 | #include "ash/wm/cursor_manager_chromeos.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 16 | #include "ash/wm/system_modal_container_event_filter_delegate.h" |
| 17 | #include "base/basictypes.h" |
| 18 | #include "base/compiler_specific.h" |
| 19 | #include "base/gtest_prod_util.h" |
| 20 | #include "base/memory/scoped_ptr.h" |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 21 | #include "base/memory/weak_ptr.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 22 | #include "base/observer_list.h" |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 23 | #include "ui/aura/window.h" |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 24 | #include "ui/base/ui_base_types.h" |
Torne (Richard Coles) | d0247b1 | 2013-09-19 22:36:51 +0100 | [diff] [blame] | 25 | #include "ui/events/event_target.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 26 | #include "ui/gfx/insets.h" |
| 27 | #include "ui/gfx/screen.h" |
| 28 | #include "ui/gfx/size.h" |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 29 | #include "ui/wm/core/cursor_manager.h" |
Ben Murdoch | effb81e | 2014-03-31 11:51:25 +0100 | [diff] [blame] | 30 | #include "ui/wm/public/activation_change_observer.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 31 | |
Torne (Richard Coles) | 8bcbed8 | 2013-10-22 16:41:35 +0100 | [diff] [blame] | 32 | namespace app_list { |
| 33 | class AppListView; |
| 34 | } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 35 | namespace aura { |
| 36 | class EventFilter; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 37 | class RootWindow; |
| 38 | class Window; |
| 39 | namespace client { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 40 | class ActivationClient; |
| 41 | class FocusClient; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 42 | } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 43 | } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 44 | |
| 45 | namespace gfx { |
| 46 | class ImageSkia; |
| 47 | class Point; |
| 48 | class Rect; |
| 49 | } |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 50 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 51 | namespace ui { |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 52 | class DisplayConfigurator; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 53 | class Layer; |
Ben Murdoch | 0529e5d | 2014-04-24 10:50:13 +0100 | [diff] [blame] | 54 | class UserActivityPowerManagerNotifier; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 55 | } |
| 56 | namespace views { |
| 57 | class NonClientFrameView; |
| 58 | class Widget; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 59 | namespace corewm { |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 60 | class TooltipController; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | namespace wm { |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 65 | class AcceleratorFilter; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 66 | class CompoundEventFilter; |
| 67 | class InputMethodEventFilter; |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 68 | class NestedAcceleratorController; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 69 | class ShadowController; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 70 | class VisibilityController; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 71 | class UserActivityDetector; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 72 | class WindowModalityController; |
| 73 | } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 74 | |
| 75 | namespace ash { |
| 76 | |
| 77 | class AcceleratorController; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 78 | class AccelerometerController; |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 79 | class AccessibilityDelegate; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 80 | class AppListController; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 81 | class AshNativeCursorManager; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 82 | class AutoclickController; |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 83 | class BluetoothNotificationController; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 84 | class CaptureController; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 85 | class DesktopBackgroundController; |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 86 | class DisplayChangeObserver; |
Bo Liu | 5c02ac1 | 2014-05-01 10:37:37 -0700 | [diff] [blame] | 87 | class DisplayConfiguratorAnimation; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 88 | class DisplayController; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 89 | class DisplayErrorObserver; |
| 90 | class DisplayManager; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 91 | class DragDropController; |
| 92 | class EventClientImpl; |
| 93 | class EventRewriterEventFilter; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 94 | class EventTransformationHandler; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 95 | class FirstRunHelper; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 96 | class FocusCycler; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 97 | class GPUSupport; |
| 98 | class HighContrastController; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 99 | class KeyboardUMAEventFilter; |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 100 | class LastWindowClosedLogoutReminder; |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 101 | class LocaleNotificationController; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 102 | class LockStateController; |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 103 | class LogoutConfirmationController; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 104 | class MagnificationController; |
| 105 | class MaximizeModeController; |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 106 | class MaximizeModeWindowManager; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 107 | class MediaDelegate; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 108 | class MouseCursorEventFilter; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 109 | class MruWindowTracker; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 110 | class NewWindowDelegate; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 111 | class OverlayEventFilter; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 112 | class PartialMagnificationController; |
| 113 | class PowerButtonController; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 114 | class PowerEventObserver; |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 115 | class ProjectingObserver; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 116 | class ResizeShadowController; |
Ben Murdoch | ba5b9a6 | 2013-08-12 14:20:17 +0100 | [diff] [blame] | 117 | class ResolutionNotificationController; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 118 | class RootWindowController; |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 119 | class ScopedTargetRootWindow; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 120 | class ScreenAsh; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 121 | class ScreenPositionController; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 122 | class SessionStateDelegate; |
| 123 | class Shelf; |
| 124 | class ShelfDelegate; |
| 125 | class ShelfItemDelegateManager; |
| 126 | class ShelfModel; |
Torne (Richard Coles) | a3f6a49 | 2013-12-18 16:25:09 +0000 | [diff] [blame] | 127 | class ShelfWindowWatcher; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 128 | class ShellDelegate; |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 129 | struct ShellInitParams; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 130 | class ShellObserver; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 131 | class SlowAnimationEventFilter; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 132 | class StatusAreaWidget; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 133 | class StickyKeysController; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 134 | class SystemGestureEventFilter; |
| 135 | class SystemModalContainerEventFilter; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 136 | class SystemTray; |
| 137 | class SystemTrayDelegate; |
| 138 | class SystemTrayNotifier; |
| 139 | class ToplevelWindowEventHandler; |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 140 | class TouchTransformerController; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 141 | class TouchObserverHUD; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 142 | class UserActivityDetector; |
| 143 | class UserWallpaperDelegate; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 144 | class VideoActivityNotifier; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 145 | class VideoDetector; |
| 146 | class WebNotificationTray; |
| 147 | class WindowCycleController; |
| 148 | class WindowPositioner; |
| 149 | class WindowSelectorController; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 150 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 151 | namespace shell { |
| 152 | class WindowWatcher; |
| 153 | } |
| 154 | |
| 155 | namespace test { |
| 156 | class ShellTestApi; |
| 157 | } |
| 158 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 159 | // Shell is a singleton object that presents the Shell API and implements the |
| 160 | // RootWindow's delegate interface. |
| 161 | // |
| 162 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 163 | // takes ownership of the Shell. |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 164 | class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate, |
| 165 | public ui::EventTarget, |
| 166 | public aura::client::ActivationChangeObserver { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 167 | public: |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 168 | typedef std::vector<RootWindowController*> RootWindowControllerList; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 169 | |
| 170 | enum Direction { |
| 171 | FORWARD, |
| 172 | BACKWARD |
| 173 | }; |
| 174 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 175 | // A shell must be explicitly created so that it can call |Init()| with the |
| 176 | // delegate set. |delegate| can be NULL (if not required for initialization). |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 177 | // Takes ownership of |delegate|. |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 178 | static Shell* CreateInstance(const ShellInitParams& init_params); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 179 | |
| 180 | // Should never be called before |CreateInstance()|. |
| 181 | static Shell* GetInstance(); |
| 182 | |
| 183 | // Returns true if the ash shell has been instantiated. |
| 184 | static bool HasInstance(); |
| 185 | |
| 186 | static void DeleteInstance(); |
| 187 | |
| 188 | // Returns the root window controller for the primary root window. |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 189 | // TODO(oshima): move this to |RootWindowController| |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 190 | static RootWindowController* GetPrimaryRootWindowController(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 191 | |
| 192 | // Returns all root window controllers. |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 193 | // TODO(oshima): move this to |RootWindowController| |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 194 | static RootWindowControllerList GetAllRootWindowControllers(); |
| 195 | |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 196 | // Returns the primary root Window. The primary root Window is the one that |
| 197 | // has a launcher. |
| 198 | static aura::Window* GetPrimaryRootWindow(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 199 | |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 200 | // Returns a root Window when used as a target when creating a new window. |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 201 | // The root window of the active window is used in most cases, but can |
| 202 | // be overridden by using ScopedTargetRootWindow(). |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 203 | // If you want to get the root Window of the active window, just use |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 204 | // |wm::GetActiveWindow()->GetRootWindow()|. |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 205 | static aura::Window* GetTargetRootWindow(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 206 | |
| 207 | // Returns the global Screen object that's always active in ash. |
| 208 | static gfx::Screen* GetScreen(); |
| 209 | |
| 210 | // Returns all root windows. |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 211 | static aura::Window::Windows GetAllRootWindows(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 212 | |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 213 | static aura::Window* GetContainer(aura::Window* root_window, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 214 | int container_id); |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 215 | static const aura::Window* GetContainer(const aura::Window* root_window, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 216 | int container_id); |
| 217 | |
| 218 | // Returns the list of containers that match |container_id| in |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 219 | // all root windows. If |priority_root| is given, the container |
| 220 | // in the |priority_root| will be inserted at the top of the list. |
| 221 | static std::vector<aura::Window*> GetContainersFromAllRootWindows( |
| 222 | int container_id, |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 223 | aura::Window* priority_root); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 224 | |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 225 | void set_target_root_window(aura::Window* target_root_window) { |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 226 | target_root_window_ = target_root_window; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 227 | } |
| 228 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 229 | // Shows the context menu for the background and launcher at |
| 230 | // |location_in_screen| (in screen coordinates). |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 231 | void ShowContextMenu(const gfx::Point& location_in_screen, |
| 232 | ui::MenuSourceType source_type); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 233 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 234 | // Toggles the app list. |window| specifies in which display the app |
| 235 | // list should be shown. If this is NULL, the active root window |
| 236 | // will be used. |
| 237 | void ToggleAppList(aura::Window* anchor); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 238 | |
| 239 | // Returns app list target visibility. |
| 240 | bool GetAppListTargetVisibility() const; |
| 241 | |
| 242 | // Returns app list window or NULL if it is not visible. |
| 243 | aura::Window* GetAppListWindow(); |
| 244 | |
Torne (Richard Coles) | 8bcbed8 | 2013-10-22 16:41:35 +0100 | [diff] [blame] | 245 | // Returns app list view or NULL if it is not visible. |
| 246 | app_list::AppListView* GetAppListView(); |
| 247 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 248 | // Returns true if a system-modal dialog window is currently open. |
| 249 | bool IsSystemModalWindowOpen() const; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 250 | |
| 251 | // For testing only: set simulation that a modal window is open |
| 252 | void SimulateModalWindowOpenForTesting(bool modal_window_open) { |
| 253 | simulate_modal_window_open_for_testing_ = modal_window_open; |
| 254 | } |
| 255 | |
| 256 | // Creates a default views::NonClientFrameView for use by windows in the |
| 257 | // Ash environment. |
| 258 | views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 259 | views::Widget* widget); |
| 260 | |
| 261 | // Rotates focus through containers that can receive focus. |
| 262 | void RotateFocus(Direction direction); |
| 263 | |
| 264 | // Sets the work area insets of the display that contains |window|, |
| 265 | // this notifies observers too. |
| 266 | // TODO(sky): this no longer really replicates what happens and is unreliable. |
| 267 | // Remove this. |
| 268 | void SetDisplayWorkAreaInsets(aura::Window* window, |
| 269 | const gfx::Insets& insets); |
| 270 | |
| 271 | // Called when the user logs in. |
| 272 | void OnLoginStateChanged(user::LoginStatus status); |
| 273 | |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 274 | // Called after the logged-in user's profile is ready. |
| 275 | void OnLoginUserProfilePrepared(); |
| 276 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 277 | // Called when the login status changes. |
| 278 | // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. |
| 279 | void UpdateAfterLoginStatusChange(user::LoginStatus status); |
| 280 | |
| 281 | // Called when the application is exiting. |
| 282 | void OnAppTerminating(); |
| 283 | |
| 284 | // Called when the screen is locked (after the lock window is visible) or |
| 285 | // unlocked. |
| 286 | void OnLockStateChanged(bool locked); |
| 287 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 288 | // Called when a casting session is started or stopped. |
| 289 | void OnCastingSessionStartedOrStopped(bool started); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 290 | |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 291 | // Called when the overview mode is about to be started (before the windows |
| 292 | // get re-arranged). |
| 293 | void OnOverviewModeStarting(); |
| 294 | |
| 295 | // Called before the overview mode is ending (before the windows get arranged |
| 296 | // to their final position). |
| 297 | void OnOverviewModeEnding(); |
| 298 | |
| 299 | // Called after maximize mode has started, windows might still animate though. |
| 300 | void OnMaximizeModeStarted(); |
| 301 | |
| 302 | // Called after maximize mode has ended, windows might still be returning to |
| 303 | // their original position. |
| 304 | void OnMaximizeModeEnded(); |
| 305 | |
Ben Murdoch | a02191e | 2014-04-16 11:17:03 +0100 | [diff] [blame] | 306 | // Called when a root window is created. |
| 307 | void OnRootWindowAdded(aura::Window* root_window); |
| 308 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 309 | // Initializes |shelf_|. Does nothing if it's already initialized. |
| 310 | void CreateShelf(); |
| 311 | |
Ben Murdoch | 0529e5d | 2014-04-24 10:50:13 +0100 | [diff] [blame] | 312 | // Called when the shelf is created for |root_window|. |
| 313 | void OnShelfCreatedForRootWindow(aura::Window* root_window); |
| 314 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 315 | // Creates a virtual keyboard. Deletes the old virtual keyboard if it already |
| 316 | // exists. |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 317 | void CreateKeyboard(); |
| 318 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 319 | // Deactivates the virtual keyboard. |
| 320 | void DeactivateKeyboard(); |
| 321 | |
Torne (Richard Coles) | 8bcbed8 | 2013-10-22 16:41:35 +0100 | [diff] [blame] | 322 | // Show shelf view if it was created hidden (before session has started). |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 323 | void ShowShelf(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 324 | |
| 325 | // Adds/removes observer. |
| 326 | void AddShellObserver(ShellObserver* observer); |
| 327 | void RemoveShellObserver(ShellObserver* observer); |
| 328 | |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 329 | // Turn the always maximize mode window manager on or off. |
| 330 | void EnableMaximizeModeWindowManager(bool enable); |
| 331 | |
| 332 | // Test if the MaximizeModeWindowManager is enabled or not. |
| 333 | bool IsMaximizeModeWindowManagerEnabled(); |
| 334 | |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 335 | #if defined(OS_CHROMEOS) |
| 336 | // Test if MaximizeModeWindowManager is not enabled, and if |
| 337 | // MaximizeModeController is not currently setting a display rotation. Or if |
| 338 | // the |resolution_notification_controller_| is not showing its confirmation |
| 339 | // dialog. If true then changes to display settings can be saved. |
| 340 | bool ShouldSaveDisplaySettings(); |
| 341 | #endif |
| 342 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 343 | AcceleratorController* accelerator_controller() { |
| 344 | return accelerator_controller_.get(); |
| 345 | } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 346 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 347 | DisplayManager* display_manager() { return display_manager_.get(); } |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 348 | ::wm::InputMethodEventFilter* input_method_filter() { |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 349 | return input_method_filter_.get(); |
| 350 | } |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 351 | ::wm::CompoundEventFilter* env_filter() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 352 | return env_filter_.get(); |
| 353 | } |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 354 | views::corewm::TooltipController* tooltip_controller() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 355 | return tooltip_controller_.get(); |
| 356 | } |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 357 | OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 358 | DesktopBackgroundController* desktop_background_controller() { |
| 359 | return desktop_background_controller_.get(); |
| 360 | } |
| 361 | PowerButtonController* power_button_controller() { |
| 362 | return power_button_controller_.get(); |
| 363 | } |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 364 | LockStateController* lock_state_controller() { |
| 365 | return lock_state_controller_.get(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 366 | } |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 367 | MruWindowTracker* mru_window_tracker() { |
| 368 | return mru_window_tracker_.get(); |
| 369 | } |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 370 | ::wm::UserActivityDetector* user_activity_detector() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 371 | return user_activity_detector_.get(); |
| 372 | } |
| 373 | VideoDetector* video_detector() { |
| 374 | return video_detector_.get(); |
| 375 | } |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 376 | WindowCycleController* window_cycle_controller() { |
| 377 | return window_cycle_controller_.get(); |
| 378 | } |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 379 | WindowSelectorController* window_selector_controller() { |
| 380 | return window_selector_controller_.get(); |
| 381 | } |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 382 | FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 383 | DisplayController* display_controller() { |
| 384 | return display_controller_.get(); |
| 385 | } |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 386 | #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 387 | TouchTransformerController* touch_transformer_controller() { |
| 388 | return touch_transformer_controller_.get(); |
| 389 | } |
| 390 | #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 391 | MouseCursorEventFilter* mouse_cursor_filter() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 392 | return mouse_cursor_filter_.get(); |
| 393 | } |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 394 | EventTransformationHandler* event_transformation_handler() { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 395 | return event_transformation_handler_.get(); |
| 396 | } |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 397 | ::wm::CursorManager* cursor_manager() { return &cursor_manager_; } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 398 | |
| 399 | ShellDelegate* delegate() { return delegate_.get(); } |
| 400 | |
| 401 | UserWallpaperDelegate* user_wallpaper_delegate() { |
| 402 | return user_wallpaper_delegate_.get(); |
| 403 | } |
| 404 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 405 | SessionStateDelegate* session_state_delegate() { |
| 406 | return session_state_delegate_.get(); |
| 407 | } |
| 408 | |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 409 | AccessibilityDelegate* accessibility_delegate() { |
| 410 | return accessibility_delegate_.get(); |
| 411 | } |
| 412 | |
| 413 | NewWindowDelegate* new_window_delegate() { |
| 414 | return new_window_delegate_.get(); |
| 415 | } |
| 416 | |
Torne (Richard Coles) | 0f1bc08 | 2013-11-06 12:27:47 +0000 | [diff] [blame] | 417 | MediaDelegate* media_delegate() { |
| 418 | return media_delegate_.get(); |
| 419 | } |
| 420 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 421 | HighContrastController* high_contrast_controller() { |
| 422 | return high_contrast_controller_.get(); |
| 423 | } |
| 424 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 425 | MagnificationController* magnification_controller() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 426 | return magnification_controller_.get(); |
| 427 | } |
| 428 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 429 | PartialMagnificationController* partial_magnification_controller() { |
| 430 | return partial_magnification_controller_.get(); |
| 431 | } |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 432 | |
| 433 | AutoclickController* autoclick_controller() { |
| 434 | return autoclick_controller_.get(); |
| 435 | } |
| 436 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 437 | aura::client::ActivationClient* activation_client() { |
| 438 | return activation_client_; |
| 439 | } |
| 440 | |
Torne (Richard Coles) | a3f6a49 | 2013-12-18 16:25:09 +0000 | [diff] [blame] | 441 | ShelfItemDelegateManager* shelf_item_delegate_manager() { |
| 442 | return shelf_item_delegate_manager_.get(); |
Torne (Richard Coles) | 424c4d7 | 2013-08-30 15:14:49 +0100 | [diff] [blame] | 443 | } |
| 444 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 445 | // Force the shelf to query for it's current visibility state. |
| 446 | void UpdateShelfVisibility(); |
| 447 | |
| 448 | // TODO(oshima): Define an interface to access shelf/launcher |
| 449 | // state, or just use Launcher. |
| 450 | |
| 451 | // Sets/gets the shelf auto-hide behavior on |root_window|. |
| 452 | void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 453 | aura::Window* root_window); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 454 | ShelfAutoHideBehavior GetShelfAutoHideBehavior( |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 455 | aura::Window* root_window) const; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 456 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 457 | // Sets/gets shelf's alignment on |root_window|. |
| 458 | void SetShelfAlignment(ShelfAlignment alignment, |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 459 | aura::Window* root_window); |
| 460 | ShelfAlignment GetShelfAlignment(aura::Window* root_window); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 461 | |
| 462 | // Dims or undims the screen. |
| 463 | void SetDimming(bool should_dim); |
| 464 | |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 465 | // Notifies |observers_| when entering or exiting fullscreen mode in |
| 466 | // |root_window|. |
| 467 | void NotifyFullscreenStateChange(bool is_fullscreen, |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 468 | aura::Window* root_window); |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 469 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 470 | // Creates a modal background (a partially-opaque fullscreen window) |
| 471 | // on all displays for |window|. |
| 472 | void CreateModalBackground(aura::Window* window); |
| 473 | |
| 474 | // Called when a modal window is removed. It will activate |
| 475 | // another modal window if any, or remove modal screens |
| 476 | // on all displays. |
| 477 | void OnModalWindowRemoved(aura::Window* removed); |
| 478 | |
| 479 | // Returns WebNotificationTray on the primary root window. |
| 480 | WebNotificationTray* GetWebNotificationTray(); |
| 481 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 482 | // Does the primary display have status area? |
| 483 | bool HasPrimaryStatusArea(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 484 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 485 | // Returns the system tray on primary display. |
| 486 | SystemTray* GetPrimarySystemTray(); |
| 487 | |
| 488 | SystemTrayDelegate* system_tray_delegate() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 489 | return system_tray_delegate_.get(); |
| 490 | } |
| 491 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 492 | SystemTrayNotifier* system_tray_notifier() { |
| 493 | return system_tray_notifier_.get(); |
| 494 | } |
| 495 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 496 | static void set_initially_hide_cursor(bool hide) { |
| 497 | initially_hide_cursor_ = hide; |
| 498 | } |
| 499 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 500 | ResizeShadowController* resize_shadow_controller() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 501 | return resize_shadow_controller_.get(); |
| 502 | } |
| 503 | |
| 504 | // Made available for tests. |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 505 | ::wm::ShadowController* shadow_controller() { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 506 | return shadow_controller_.get(); |
| 507 | } |
| 508 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 509 | // Starts the animation that occurs on first login. |
| 510 | void DoInitialWorkspaceAnimation(); |
| 511 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 512 | AccelerometerController* accelerometer_controller() { |
| 513 | return accelerometer_controller_.get(); |
| 514 | } |
| 515 | |
| 516 | MaximizeModeController* maximize_mode_controller() { |
| 517 | return maximize_mode_controller_.get(); |
| 518 | } |
| 519 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 520 | #if defined(OS_CHROMEOS) |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 521 | // TODO(oshima): Move these objects to DisplayController. |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 522 | ui::DisplayConfigurator* display_configurator() { |
| 523 | return display_configurator_.get(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 524 | } |
Bo Liu | 5c02ac1 | 2014-05-01 10:37:37 -0700 | [diff] [blame] | 525 | DisplayConfiguratorAnimation* display_configurator_animation() { |
| 526 | return display_configurator_animation_.get(); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 527 | } |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 528 | DisplayErrorObserver* display_error_observer() { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 529 | return display_error_observer_.get(); |
| 530 | } |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 531 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 532 | ResolutionNotificationController* resolution_notification_controller() { |
Ben Murdoch | ba5b9a6 | 2013-08-12 14:20:17 +0100 | [diff] [blame] | 533 | return resolution_notification_controller_.get(); |
| 534 | } |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 535 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 536 | LogoutConfirmationController* logout_confirmation_controller() { |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 537 | return logout_confirmation_controller_.get(); |
| 538 | } |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 539 | #endif // defined(OS_CHROMEOS) |
Ben Murdoch | ba5b9a6 | 2013-08-12 14:20:17 +0100 | [diff] [blame] | 540 | |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 541 | ShelfModel* shelf_model() { |
| 542 | return shelf_model_.get(); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 543 | } |
| 544 | |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 545 | WindowPositioner* window_positioner() { |
| 546 | return window_positioner_.get(); |
| 547 | } |
| 548 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 549 | // Returns the launcher delegate, creating if necesary. |
Torne (Richard Coles) | a3f6a49 | 2013-12-18 16:25:09 +0000 | [diff] [blame] | 550 | ShelfDelegate* GetShelfDelegate(); |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 551 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 552 | UserMetricsRecorder* metrics() { |
| 553 | return user_metrics_recorder_.get(); |
| 554 | } |
| 555 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 556 | void SetTouchHudProjectionEnabled(bool enabled); |
| 557 | |
| 558 | bool is_touch_hud_projection_enabled() const { |
| 559 | return is_touch_hud_projection_enabled_; |
| 560 | } |
| 561 | |
Torne (Richard Coles) | 8bcbed8 | 2013-10-22 16:41:35 +0100 | [diff] [blame] | 562 | #if defined(OS_CHROMEOS) |
| 563 | // Creates instance of FirstRunHelper. Caller is responsible for deleting |
| 564 | // returned object. |
| 565 | ash::FirstRunHelper* CreateFirstRunHelper(); |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 566 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 567 | // Toggles cursor compositing on/off. Native cursor is disabled when cursor |
| 568 | // compositing is enabled, and vice versa. |
| 569 | void SetCursorCompositingEnabled(bool enabled); |
| 570 | |
| 571 | StickyKeysController* sticky_keys_controller() { |
| 572 | return sticky_keys_controller_.get(); |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 573 | } |
Torne (Richard Coles) | 8bcbed8 | 2013-10-22 16:41:35 +0100 | [diff] [blame] | 574 | #endif // defined(OS_CHROMEOS) |
| 575 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 576 | GPUSupport* gpu_support() { return gpu_support_.get(); } |
| 577 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 578 | private: |
| 579 | FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); |
| 580 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); |
| 581 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 582 | friend class RootWindowController; |
| 583 | friend class ScopedTargetRootWindow; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 584 | friend class test::ShellTestApi; |
| 585 | friend class shell::WindowWatcher; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 586 | |
| 587 | typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
| 588 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 589 | // Takes ownership of |delegate|. |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 590 | explicit Shell(ShellDelegate* delegate); |
| 591 | virtual ~Shell(); |
| 592 | |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 593 | void Init(const ShellInitParams& init_params); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 594 | |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 595 | // Initializes virtual keyboard controller. |
| 596 | void InitKeyboard(); |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 597 | |
Torne (Richard Coles) | 8bcbed8 | 2013-10-22 16:41:35 +0100 | [diff] [blame] | 598 | // Initializes the root window so that it can host browser windows. |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 599 | void InitRootWindow(aura::Window* root_window); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 600 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 601 | // ash::SystemModalContainerEventFilterDelegate overrides: |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 602 | virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
| 603 | |
| 604 | // Overridden from ui::EventTarget: |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 605 | virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 606 | virtual EventTarget* GetParentTarget() OVERRIDE; |
Torne (Richard Coles) | a3f6a49 | 2013-12-18 16:25:09 +0000 | [diff] [blame] | 607 | virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE; |
| 608 | virtual ui::EventTargeter* GetEventTargeter() OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 609 | virtual void OnEvent(ui::Event* event) OVERRIDE; |
| 610 | |
| 611 | // Overridden from aura::client::ActivationChangeObserver: |
| 612 | virtual void OnWindowActivated(aura::Window* gained_active, |
| 613 | aura::Window* lost_active) OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 614 | |
| 615 | static Shell* instance_; |
| 616 | |
| 617 | // If set before the Shell is initialized, the mouse cursor will be hidden |
| 618 | // when the screen is initially created. |
| 619 | static bool initially_hide_cursor_; |
| 620 | |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 621 | // When no explicit target display/RootWindow is given, new windows are |
| 622 | // created on |scoped_target_root_window_| , unless NULL in |
| 623 | // which case they are created on |target_root_window_|. |
| 624 | // |target_root_window_| never becomes NULL during the session. |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 625 | aura::Window* target_root_window_; |
| 626 | aura::Window* scoped_target_root_window_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 627 | |
| 628 | // The CompoundEventFilter owned by aura::Env object. |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 629 | scoped_ptr< ::wm::CompoundEventFilter> env_filter_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 630 | |
| 631 | std::vector<WindowAndBoundsPair> to_restore_; |
| 632 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 633 | scoped_ptr<UserMetricsRecorder> user_metrics_recorder_; |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 634 | scoped_ptr< ::wm::NestedAcceleratorController> nested_accelerator_controller_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 635 | scoped_ptr<AcceleratorController> accelerator_controller_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 636 | scoped_ptr<ShellDelegate> delegate_; |
| 637 | scoped_ptr<SystemTrayDelegate> system_tray_delegate_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 638 | scoped_ptr<SystemTrayNotifier> system_tray_notifier_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 639 | scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 640 | scoped_ptr<SessionStateDelegate> session_state_delegate_; |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 641 | scoped_ptr<AccessibilityDelegate> accessibility_delegate_; |
| 642 | scoped_ptr<NewWindowDelegate> new_window_delegate_; |
Torne (Richard Coles) | 0f1bc08 | 2013-11-06 12:27:47 +0000 | [diff] [blame] | 643 | scoped_ptr<MediaDelegate> media_delegate_; |
Torne (Richard Coles) | a3f6a49 | 2013-12-18 16:25:09 +0000 | [diff] [blame] | 644 | scoped_ptr<ShelfDelegate> shelf_delegate_; |
| 645 | scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 646 | scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 647 | |
Torne (Richard Coles) | f2477e0 | 2013-11-28 11:55:43 +0000 | [diff] [blame] | 648 | scoped_ptr<ShelfModel> shelf_model_; |
| 649 | scoped_ptr<WindowPositioner> window_positioner_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 650 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 651 | scoped_ptr<AppListController> app_list_controller_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 652 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 653 | scoped_ptr<DragDropController> drag_drop_controller_; |
| 654 | scoped_ptr<ResizeShadowController> resize_shadow_controller_; |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 655 | scoped_ptr< ::wm::ShadowController> shadow_controller_; |
| 656 | scoped_ptr< ::wm::VisibilityController> visibility_controller_; |
| 657 | scoped_ptr< ::wm::WindowModalityController> window_modality_controller_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 658 | scoped_ptr<views::corewm::TooltipController> tooltip_controller_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 659 | scoped_ptr<DesktopBackgroundController> desktop_background_controller_; |
| 660 | scoped_ptr<PowerButtonController> power_button_controller_; |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 661 | scoped_ptr<LockStateController> lock_state_controller_; |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 662 | scoped_ptr<MruWindowTracker> mru_window_tracker_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 663 | scoped_ptr< ::wm::UserActivityDetector> user_activity_detector_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 664 | scoped_ptr<VideoDetector> video_detector_; |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 665 | scoped_ptr<WindowCycleController> window_cycle_controller_; |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 666 | scoped_ptr<WindowSelectorController> window_selector_controller_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 667 | scoped_ptr<FocusCycler> focus_cycler_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 668 | scoped_ptr<DisplayController> display_controller_; |
| 669 | scoped_ptr<HighContrastController> high_contrast_controller_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 670 | scoped_ptr<MagnificationController> magnification_controller_; |
| 671 | scoped_ptr<PartialMagnificationController> partial_magnification_controller_; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 672 | scoped_ptr<AutoclickController> autoclick_controller_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 673 | scoped_ptr<aura::client::FocusClient> focus_client_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 674 | aura::client::ActivationClient* activation_client_; |
Ben Murdoch | a02191e | 2014-04-16 11:17:03 +0100 | [diff] [blame] | 675 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 676 | scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_; |
| 677 | scoped_ptr<ScreenPositionController> screen_position_controller_; |
| 678 | scoped_ptr<SystemModalContainerEventFilter> modality_filter_; |
| 679 | scoped_ptr<EventClientImpl> event_client_; |
| 680 | scoped_ptr<EventTransformationHandler> event_transformation_handler_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 681 | |
| 682 | // An event filter that pre-handles key events while the partial |
| 683 | // screenshot UI or the keyboard overlay is active. |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 684 | scoped_ptr<OverlayEventFilter> overlay_filter_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 685 | |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 686 | // An event filter for logging keyboard-related metrics. |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 687 | scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 688 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 689 | // An event filter which handles moving and resizing windows. |
| 690 | scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_; |
| 691 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 692 | // An event filter which handles system level gestures |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 693 | scoped_ptr<SystemGestureEventFilter> system_gesture_filter_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 694 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 695 | // An event filter that pre-handles global accelerators. |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 696 | scoped_ptr< ::wm::AcceleratorFilter> accelerator_filter_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 697 | |
| 698 | // An event filter that pre-handles all key events to send them to an IME. |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 699 | scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 700 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 701 | scoped_ptr<DisplayManager> display_manager_; |
| 702 | scoped_ptr<base::WeakPtrFactory<DisplayManager> > |
Torne (Richard Coles) | 1e9bf3e | 2013-10-31 11:16:26 +0000 | [diff] [blame] | 703 | weak_display_manager_factory_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 704 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 705 | scoped_ptr<LocaleNotificationController> locale_notification_controller_; |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 706 | |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 707 | // The maximized window manager (if enabled). |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 708 | scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_; |
| 709 | |
| 710 | scoped_ptr<AccelerometerController> accelerometer_controller_; |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 711 | |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 712 | #if defined(OS_CHROMEOS) |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 713 | scoped_ptr<PowerEventObserver> power_event_observer_; |
Ben Murdoch | 0529e5d | 2014-04-24 10:50:13 +0100 | [diff] [blame] | 714 | scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 715 | scoped_ptr<VideoActivityNotifier> video_activity_notifier_; |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 716 | scoped_ptr<StickyKeysController> sticky_keys_controller_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 717 | scoped_ptr<ResolutionNotificationController> |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 718 | resolution_notification_controller_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 719 | scoped_ptr<BluetoothNotificationController> |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 720 | bluetooth_notification_controller_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 721 | scoped_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 722 | scoped_ptr<LastWindowClosedLogoutReminder> |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 723 | last_window_closed_logout_reminder_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 724 | // Controls video output device state. |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 725 | scoped_ptr<ui::DisplayConfigurator> display_configurator_; |
Bo Liu | 5c02ac1 | 2014-05-01 10:37:37 -0700 | [diff] [blame] | 726 | scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 727 | scoped_ptr<DisplayErrorObserver> display_error_observer_; |
| 728 | scoped_ptr<ProjectingObserver> projecting_observer_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 729 | |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 730 | // Listens for output changes and updates the display manager. |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 731 | scoped_ptr<DisplayChangeObserver> display_change_observer_; |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 732 | |
Ben Murdoch | effb81e | 2014-03-31 11:51:25 +0100 | [diff] [blame] | 733 | #if defined(USE_X11) |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 734 | scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_; |
| 735 | scoped_ptr<ui::EventHandler> speech_feedback_handler_; |
Torne (Richard Coles) | cedac22 | 2014-06-03 10:58:34 +0100 | [diff] [blame^] | 736 | scoped_ptr<TouchTransformerController> touch_transformer_controller_; |
Torne (Richard Coles) | 4e180b6 | 2013-10-18 15:46:22 +0100 | [diff] [blame] | 737 | #endif // defined(USE_X11) |
| 738 | #endif // defined(OS_CHROMEOS) |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 739 | |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 740 | scoped_ptr<MaximizeModeController> maximize_mode_controller_; |
| 741 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 742 | // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a |
| 743 | // pointer to vend to test code. |
| 744 | AshNativeCursorManager* native_cursor_manager_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 745 | |
| 746 | // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide |
| 747 | // the cursor on Windows. |
| 748 | #if defined(OS_CHROMEOS) |
| 749 | CursorManager cursor_manager_; |
| 750 | #else // !defined(OS_CHROMEOS) |
Torne (Richard Coles) | a140131 | 2014-03-18 10:20:56 +0000 | [diff] [blame] | 751 | ::wm::CursorManager cursor_manager_; |
Ben Murdoch | c5cede9 | 2014-04-10 11:22:14 +0100 | [diff] [blame] | 752 | #endif // defined(OS_CHROMEOS) |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 753 | |
| 754 | ObserverList<ShellObserver> observers_; |
| 755 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 756 | // For testing only: simulate that a modal window is open |
| 757 | bool simulate_modal_window_open_for_testing_; |
| 758 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 759 | bool is_touch_hud_projection_enabled_; |
| 760 | |
Torne (Richard Coles) | 5d1f7b1 | 2014-02-21 12:16:55 +0000 | [diff] [blame] | 761 | // Injected content::GPUDataManager support. |
| 762 | scoped_ptr<GPUSupport> gpu_support_; |
| 763 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 764 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 765 | }; |
| 766 | |
| 767 | } // namespace ash |
| 768 | |
| 769 | #endif // ASH_SHELL_H_ |