[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 5 | #ifndef ASH_SHELL_H_ |
| 6 | #define ASH_SHELL_H_ |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 7 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 8 | #include <utility> |
| 9 | #include <vector> |
| 10 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 11 | #include "ash/ash_export.h" |
[email protected] | 5d2ea36 | 2013-12-13 08:10:18 | [diff] [blame] | 12 | #include "ash/metrics/user_metrics_recorder.h" |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 13 | #include "ash/shelf/shelf_types.h" |
[email protected] | 82d3954ae | 2012-04-20 09:02:22 | [diff] [blame] | 14 | #include "ash/system/user/login_status.h" |
[email protected] | e76096a5f | 2014-04-08 04:08:03 | [diff] [blame] | 15 | #include "ash/wm/cursor_manager_chromeos.h" |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 16 | #include "ash/wm/system_modal_container_event_filter_delegate.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 17 | #include "base/basictypes.h" |
[email protected] | c45fdc7 | 2012-02-22 22:59:12 | [diff] [blame] | 18 | #include "base/compiler_specific.h" |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 19 | #include "base/gtest_prod_util.h" |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 20 | #include "base/memory/scoped_ptr.h" |
[email protected] | 6f67df5 | 2013-10-29 01:07:15 | [diff] [blame] | 21 | #include "base/memory/weak_ptr.h" |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 22 | #include "base/observer_list.h" |
[email protected] | c9390bd | 2013-11-08 20:33:13 | [diff] [blame] | 23 | #include "ui/aura/window.h" |
[email protected] | 940fb1c | 2013-06-18 16:54:28 | [diff] [blame] | 24 | #include "ui/base/ui_base_types.h" |
[email protected] | 86ccbd4 | 2013-09-18 18:11:54 | [diff] [blame] | 25 | #include "ui/events/event_target.h" |
[email protected] | 2eb6b89 | 2012-05-31 13:28:21 | [diff] [blame] | 26 | #include "ui/gfx/insets.h" |
[email protected] | ffabb1e | 2012-10-12 19:51:17 | [diff] [blame] | 27 | #include "ui/gfx/screen.h" |
[email protected] | 9ec0f45 | 2012-05-31 15:58:53 | [diff] [blame] | 28 | #include "ui/gfx/size.h" |
[email protected] | ee3ed1077 | 2014-03-11 22:02:01 | [diff] [blame] | 29 | #include "ui/wm/core/cursor_manager.h" |
[email protected] | af4552b2 | 2014-03-21 19:45:01 | [diff] [blame] | 30 | #include "ui/wm/public/activation_change_observer.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 31 | |
[email protected] | 59ccade | 2013-10-17 17:56:40 | [diff] [blame] | 32 | namespace app_list { |
| 33 | class AppListView; |
| 34 | } |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 35 | namespace aura { |
[email protected] | e29014c | 2011-11-16 18:25:51 | [diff] [blame] | 36 | class EventFilter; |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 37 | class RootWindow; |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 38 | class Window; |
[email protected] | c2885361 | 2012-05-31 22:43:44 | [diff] [blame] | 39 | namespace client { |
[email protected] | 39718b5 | 2012-12-03 17:24:56 | [diff] [blame] | 40 | class ActivationClient; |
[email protected] | 8cfb672 | 2012-11-28 03:28:46 | [diff] [blame] | 41 | class FocusClient; |
[email protected] | c2885361 | 2012-05-31 22:43:44 | [diff] [blame] | 42 | } |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 43 | } |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 44 | |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 45 | namespace gfx { |
[email protected] | 9ec0f45 | 2012-05-31 15:58:53 | [diff] [blame] | 46 | class ImageSkia; |
[email protected] | b5f3060 | 2012-01-30 15:16:57 | [diff] [blame] | 47 | class Point; |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 48 | class Rect; |
| 49 | } |
[email protected] | b6ba05d90 | 2013-10-04 21:38:45 | [diff] [blame] | 50 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 51 | namespace ui { |
[email protected] | 1e31cbd | 2014-04-07 20:06:11 | [diff] [blame] | 52 | class DisplayConfigurator; |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 53 | class Layer; |
[email protected] | b0fa701 | 2014-04-16 12:50:57 | [diff] [blame] | 54 | class UserActivityPowerManagerNotifier; |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 55 | } |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 56 | namespace views { |
| 57 | class NonClientFrameView; |
| 58 | class Widget; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 59 | namespace corewm { |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 60 | class TooltipController; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | namespace wm { |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 65 | class CompoundEventFilter; |
| 66 | class InputMethodEventFilter; |
[email protected] | 86f2b5e | 2012-11-14 20:37:00 | [diff] [blame] | 67 | class ShadowController; |
[email protected] | b5756e2 | 2012-11-30 01:32:02 | [diff] [blame] | 68 | class VisibilityController; |
[email protected] | f0f61238 | 2014-04-03 15:11:49 | [diff] [blame] | 69 | class UserActivityDetector; |
[email protected] | 0c2dc01 | 2012-12-02 00:00:23 | [diff] [blame] | 70 | class WindowModalityController; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 71 | } |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 72 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 73 | namespace ash { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 74 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 75 | class AcceleratorController; |
[email protected] | cc4fc3b | 2014-04-03 08:07:09 | [diff] [blame] | 76 | class AccelerometerController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 77 | class AcceleratorFilter; |
[email protected] | f3ab6eff5 | 2013-10-24 03:29:38 | [diff] [blame] | 78 | class AccessibilityDelegate; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 79 | class AppListController; |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 80 | class AshNativeCursorManager; |
[email protected] | 55398d2 | 2013-10-10 19:49:20 | [diff] [blame] | 81 | class AutoclickController; |
[email protected] | b314272 | 2014-03-04 06:59:50 | [diff] [blame] | 82 | class BluetoothNotificationController; |
[email protected] | 60a978b7 | 2012-06-08 00:29:18 | [diff] [blame] | 83 | class CaptureController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 84 | class DesktopBackgroundController; |
[email protected] | c1234a4 | 2013-08-20 09:35:40 | [diff] [blame] | 85 | class DisplayChangeObserver; |
[email protected] | 129aad8 | 2014-04-24 23:17:04 | [diff] [blame] | 86 | class DisplayConfiguratorAnimation; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 87 | class DisplayController; |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 88 | class DisplayErrorObserver; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 89 | class DisplayManager; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 90 | class DragDropController; |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 91 | class EventClientImpl; |
[email protected] | b9d224c | 2012-07-13 01:09:03 | [diff] [blame] | 92 | class EventRewriterEventFilter; |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 93 | class EventTransformationHandler; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 94 | class FirstRunHelper; |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 95 | class FocusCycler; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 96 | class GPUSupport; |
| 97 | class HighContrastController; |
[email protected] | 7a80cdd | 2013-09-26 09:20:53 | [diff] [blame] | 98 | class KeyboardUMAEventFilter; |
[email protected] | ded3249 | 2014-03-14 10:09:28 | [diff] [blame] | 99 | class LastWindowClosedLogoutReminder; |
[email protected] | a9a4046 | 2013-07-31 06:22:56 | [diff] [blame] | 100 | class LocaleNotificationController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 101 | class LockStateController; |
[email protected] | 7b3f91ee | 2014-03-06 11:41:40 | [diff] [blame] | 102 | class LogoutConfirmationController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 103 | class MagnificationController; |
[email protected] | 58fb353d | 2014-04-04 03:28:05 | [diff] [blame] | 104 | class MaximizeModeController; |
[email protected] | e55b7345 | 2014-02-20 13:18:04 | [diff] [blame] | 105 | class MaximizeModeWindowManager; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 106 | class MediaDelegate; |
[email protected] | 78d9630 | 2012-06-22 00:58:07 | [diff] [blame] | 107 | class MouseCursorEventFilter; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 108 | class MruWindowTracker; |
| 109 | class NestedDispatcherController; |
| 110 | class NewWindowDelegate; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 111 | class OverlayEventFilter; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 112 | class PartialMagnificationController; |
| 113 | class PowerButtonController; |
[email protected] | 5162505 | 2013-10-10 01:40:16 | [diff] [blame] | 114 | class PowerEventObserver; |
[email protected] | 72bce52 | 2014-02-10 21:11:26 | [diff] [blame] | 115 | class ProjectingObserver; |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 116 | class ResizeShadowController; |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 117 | class ResolutionNotificationController; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 118 | class RootWindowController; |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 119 | class ScopedTargetRootWindow; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 120 | class ScreenAsh; |
[email protected] | 8d625fb | 2012-07-18 16:40:06 | [diff] [blame] | 121 | class ScreenPositionController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 122 | class SessionStateDelegate; |
| 123 | class Shelf; |
| 124 | class ShelfDelegate; |
| 125 | class ShelfItemDelegateManager; |
| 126 | class ShelfModel; |
[email protected] | 055a56d | 2013-12-06 12:13:36 | [diff] [blame] | 127 | class ShelfWindowWatcher; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 128 | class ShellDelegate; |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame^] | 129 | struct ShellInitParams; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 130 | class ShellObserver; |
[email protected] | 9861f175 | 2012-06-01 07:16:14 | [diff] [blame] | 131 | class SlowAnimationEventFilter; |
[email protected] | 6d6546e | 2012-05-30 23:12:02 | [diff] [blame] | 132 | class StatusAreaWidget; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 133 | class StickyKeysController; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 134 | class SystemGestureEventFilter; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 135 | class SystemModalContainerEventFilter; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 136 | class SystemTray; |
| 137 | class SystemTrayDelegate; |
| 138 | class SystemTrayNotifier; |
| 139 | class ToplevelWindowEventHandler; |
[email protected] | 03122891a | 2014-05-13 23:56:49 | [diff] [blame] | 140 | class TouchTransformerController; |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 141 | class TouchObserverHUD; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 142 | class UserActivityDetector; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 143 | class UserWallpaperDelegate; |
[email protected] | ded58fd | 2013-10-09 07:56:55 | [diff] [blame] | 144 | class VideoActivityNotifier; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 145 | class VideoDetector; |
| 146 | class WebNotificationTray; |
| 147 | class WindowCycleController; |
| 148 | class WindowPositioner; |
| 149 | class WindowSelectorController; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 150 | |
[email protected] | 0af5804 | 2012-12-13 03:21:35 | [diff] [blame] | 151 | namespace shell { |
| 152 | class WindowWatcher; |
| 153 | } |
| 154 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 155 | namespace test { |
| 156 | class ShellTestApi; |
| 157 | } |
| 158 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 159 | // Shell is a singleton object that presents the Shell API and implements the |
[email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 160 | // RootWindow's delegate interface. |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 161 | // |
| 162 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 163 | // takes ownership of the Shell. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 164 | class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate, |
| 165 | public ui::EventTarget, |
| 166 | public aura::client::ActivationChangeObserver { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 167 | public: |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 168 | typedef std::vector<RootWindowController*> RootWindowControllerList; |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 169 | |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 170 | enum Direction { |
| 171 | FORWARD, |
| 172 | BACKWARD |
| 173 | }; |
| 174 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [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). |
[email protected] | 09464c7 | 2013-04-26 07:31:28 | [diff] [blame] | 177 | // Takes ownership of |delegate|. |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame^] | 178 | static Shell* CreateInstance(const ShellInitParams& init_params); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 179 | |
| 180 | // Should never be called before |CreateInstance()|. |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 181 | static Shell* GetInstance(); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 182 | |
[email protected] | b3b7bcd | 2012-03-06 19:35:45 | [diff] [blame] | 183 | // Returns true if the ash shell has been instantiated. |
| 184 | static bool HasInstance(); |
| 185 | |
[email protected] | ef589af | 2011-12-03 01:07:15 | [diff] [blame] | 186 | static void DeleteInstance(); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 187 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 188 | // Returns the root window controller for the primary root window. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 189 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 190 | static RootWindowController* GetPrimaryRootWindowController(); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 191 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 192 | // Returns all root window controllers. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 193 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 194 | static RootWindowControllerList GetAllRootWindowControllers(); |
| 195 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [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(); |
[email protected] | e73bd780 | 2012-02-17 20:10:34 | [diff] [blame] | 199 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 200 | // Returns a root Window when used as a target when creating a new window. |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 201 | // The root window of the active window is used in most cases, but can |
| 202 | // be overridden by using ScopedTargetRootWindow(). |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 203 | // If you want to get the root Window of the active window, just use |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 204 | // |wm::GetActiveWindow()->GetRootWindow()|. |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 205 | static aura::Window* GetTargetRootWindow(); |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 206 | |
[email protected] | ffabb1e | 2012-10-12 19:51:17 | [diff] [blame] | 207 | // Returns the global Screen object that's always active in ash. |
| 208 | static gfx::Screen* GetScreen(); |
| 209 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 210 | // Returns all root windows. |
[email protected] | c9390bd | 2013-11-08 20:33:13 | [diff] [blame] | 211 | static aura::Window::Windows GetAllRootWindows(); |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 212 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 213 | static aura::Window* GetContainer(aura::Window* root_window, |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 214 | int container_id); |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 215 | static const aura::Window* GetContainer(const aura::Window* root_window, |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 216 | int container_id); |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 217 | |
| 218 | // Returns the list of containers that match |container_id| in |
[email protected] | 429433f | 2012-12-28 20:14:46 | [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, |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 223 | aura::Window* priority_root); |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 224 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 225 | void set_target_root_window(aura::Window* target_root_window) { |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 226 | target_root_window_ = target_root_window; |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 227 | } |
| 228 | |
[email protected] | cb054f97 | 2012-10-11 20:27:28 | [diff] [blame] | 229 | // Shows the context menu for the background and launcher at |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 230 | // |location_in_screen| (in screen coordinates). |
[email protected] | 940fb1c | 2013-06-18 16:54:28 | [diff] [blame] | 231 | void ShowContextMenu(const gfx::Point& location_in_screen, |
| 232 | ui::MenuSourceType source_type); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 233 | |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [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); |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 238 | |
[email protected] | 7510d108 | 2012-03-30 21:58:34 | [diff] [blame] | 239 | // Returns app list target visibility. |
| 240 | bool GetAppListTargetVisibility() const; |
| 241 | |
[email protected] | 1e51a9d | 2012-04-09 23:31:11 | [diff] [blame] | 242 | // Returns app list window or NULL if it is not visible. |
| 243 | aura::Window* GetAppListWindow(); |
| 244 | |
[email protected] | 59ccade | 2013-10-17 17:56:40 | [diff] [blame] | 245 | // Returns app list view or NULL if it is not visible. |
| 246 | app_list::AppListView* GetAppListView(); |
| 247 | |
[email protected] | dc0973937 | 2012-11-15 20:17:39 | [diff] [blame] | 248 | // Returns true if a system-modal dialog window is currently open. |
| 249 | bool IsSystemModalWindowOpen() const; |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 250 | |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 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 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 256 | // Creates a default views::NonClientFrameView for use by windows in the |
| 257 | // Ash environment. |
| 258 | views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 259 | views::Widget* widget); |
| 260 | |
[email protected] | d9456cb | 2012-03-21 16:41:04 | [diff] [blame] | 261 | // Rotates focus through containers that can receive focus. |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 262 | void RotateFocus(Direction direction); |
| 263 | |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 264 | // Sets the work area insets of the display that contains |window|, |
[email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 265 | // this notifies observers too. |
[email protected] | 27f6af6 | 2012-03-21 05:34:40 | [diff] [blame] | 266 | // TODO(sky): this no longer really replicates what happens and is unreliable. |
| 267 | // Remove this. |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 268 | void SetDisplayWorkAreaInsets(aura::Window* window, |
[email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 269 | const gfx::Insets& insets); |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 270 | |
[email protected] | 82d3954ae | 2012-04-20 09:02:22 | [diff] [blame] | 271 | // Called when the user logs in. |
| 272 | void OnLoginStateChanged(user::LoginStatus status); |
| 273 | |
[email protected] | 51f43811 | 2013-11-18 19:32:50 | [diff] [blame] | 274 | // Called after the logged-in user's profile is ready. |
| 275 | void OnLoginUserProfilePrepared(); |
| 276 | |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [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 | |
[email protected] | 82d3954ae | 2012-04-20 09:02:22 | [diff] [blame] | 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 | |
[email protected] | 58868abf | 2014-01-17 23:45:33 | [diff] [blame] | 288 | // Called when a casting session is started or stopped. |
| 289 | void OnCastingSessionStartedOrStopped(bool started); |
| 290 | |
[email protected] | de42bcc | 2014-03-04 05:17:00 | [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 | |
[email protected] | 02a8005 | 2014-03-14 05:45:23 | [diff] [blame] | 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 | |
[email protected] | 0e3e7cb | 2014-04-12 05:18:25 | [diff] [blame] | 306 | // Called when a root window is created. |
| 307 | void OnRootWindowAdded(aura::Window* root_window); |
| 308 | |
[email protected] | 864b5855 | 2013-12-19 04:19:38 | [diff] [blame] | 309 | // Initializes |shelf_|. Does nothing if it's already initialized. |
| 310 | void CreateShelf(); |
[email protected] | d9456cb | 2012-03-21 16:41:04 | [diff] [blame] | 311 | |
[email protected] | b8642ec | 2014-04-17 05:20:39 | [diff] [blame] | 312 | // Called when the shelf is created for |root_window|. |
| 313 | void OnShelfCreatedForRootWindow(aura::Window* root_window); |
| 314 | |
[email protected] | e1b299b | 2014-01-29 23:53:41 | [diff] [blame] | 315 | // Creates a virtual keyboard. Deletes the old virtual keyboard if it already |
| 316 | // exists. |
[email protected] | 51f43811 | 2013-11-18 19:32:50 | [diff] [blame] | 317 | void CreateKeyboard(); |
| 318 | |
[email protected] | e1b299b | 2014-01-29 23:53:41 | [diff] [blame] | 319 | // Deactivates the virtual keyboard. |
| 320 | void DeactivateKeyboard(); |
| 321 | |
[email protected] | 99c5ed8 | 2013-10-18 01:30:04 | [diff] [blame] | 322 | // Show shelf view if it was created hidden (before session has started). |
[email protected] | 864b5855 | 2013-12-19 04:19:38 | [diff] [blame] | 323 | void ShowShelf(); |
[email protected] | 7e1df2f6 | 2012-07-19 19:17:18 | [diff] [blame] | 324 | |
[email protected] | d9456cb | 2012-03-21 16:41:04 | [diff] [blame] | 325 | // Adds/removes observer. |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 326 | void AddShellObserver(ShellObserver* observer); |
| 327 | void RemoveShellObserver(ShellObserver* observer); |
| 328 | |
[email protected] | e55b7345 | 2014-02-20 13:18:04 | [diff] [blame] | 329 | // Turn the always maximize mode window manager on or off. |
| 330 | void EnableMaximizeModeWindowManager(bool enable); |
| 331 | |
[email protected] | b19b09a | 2014-02-26 05:34:34 | [diff] [blame] | 332 | // Test if the MaximizeModeWindowManager is enabled or not. |
| 333 | bool IsMaximizeModeWindowManagerEnabled(); |
| 334 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 335 | AcceleratorController* accelerator_controller() { |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 336 | return accelerator_controller_.get(); |
| 337 | } |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 338 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 339 | DisplayManager* display_manager() { return display_manager_.get(); } |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 340 | ::wm::InputMethodEventFilter* input_method_filter() { |
[email protected] | f1d5c3a | 2013-04-23 17:42:56 | [diff] [blame] | 341 | return input_method_filter_.get(); |
| 342 | } |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 343 | ::wm::CompoundEventFilter* env_filter() { |
[email protected] | 492533b3 | 2012-09-21 19:06:14 | [diff] [blame] | 344 | return env_filter_.get(); |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 345 | } |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 346 | views::corewm::TooltipController* tooltip_controller() { |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 347 | return tooltip_controller_.get(); |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 348 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 349 | OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); } |
[email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 350 | DesktopBackgroundController* desktop_background_controller() { |
| 351 | return desktop_background_controller_.get(); |
| 352 | } |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 353 | PowerButtonController* power_button_controller() { |
| 354 | return power_button_controller_.get(); |
| 355 | } |
[email protected] | ab4f8c9 | 2013-05-30 19:07:47 | [diff] [blame] | 356 | LockStateController* lock_state_controller() { |
| 357 | return lock_state_controller_.get(); |
[email protected] | 222f40c | 2012-10-18 08:58:13 | [diff] [blame] | 358 | } |
[email protected] | 66c5c411 | 2013-07-31 07:10:59 | [diff] [blame] | 359 | MruWindowTracker* mru_window_tracker() { |
| 360 | return mru_window_tracker_.get(); |
| 361 | } |
[email protected] | f0f61238 | 2014-04-03 15:11:49 | [diff] [blame] | 362 | ::wm::UserActivityDetector* user_activity_detector() { |
[email protected] | c16b942 | 2012-06-06 21:51:11 | [diff] [blame] | 363 | return user_activity_detector_.get(); |
| 364 | } |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 365 | VideoDetector* video_detector() { |
| 366 | return video_detector_.get(); |
| 367 | } |
[email protected] | dd1e1ac | 2014-05-13 03:44:09 | [diff] [blame] | 368 | WindowCycleController* window_cycle_controller() { |
| 369 | return window_cycle_controller_.get(); |
| 370 | } |
[email protected] | d24ce2c | 2013-08-01 15:14:19 | [diff] [blame] | 371 | WindowSelectorController* window_selector_controller() { |
| 372 | return window_selector_controller_.get(); |
| 373 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 374 | FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
[email protected] | edbfb8d | 2012-09-03 08:33:43 | [diff] [blame] | 375 | DisplayController* display_controller() { |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 376 | return display_controller_.get(); |
[email protected] | 3e1cdd31 | 2012-06-07 03:48:41 | [diff] [blame] | 377 | } |
[email protected] | 03122891a | 2014-05-13 23:56:49 | [diff] [blame] | 378 | #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 379 | TouchTransformerController* touch_transformer_controller() { |
| 380 | return touch_transformer_controller_.get(); |
| 381 | } |
| 382 | #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 383 | MouseCursorEventFilter* mouse_cursor_filter() { |
[email protected] | 8b7ba87b | 2012-09-01 00:40:40 | [diff] [blame] | 384 | return mouse_cursor_filter_.get(); |
| 385 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 386 | EventTransformationHandler* event_transformation_handler() { |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 387 | return event_transformation_handler_.get(); |
| 388 | } |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 389 | ::wm::CursorManager* cursor_manager() { return &cursor_manager_; } |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 390 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 391 | ShellDelegate* delegate() { return delegate_.get(); } |
[email protected] | aa54218b | 2012-06-12 16:51:42 | [diff] [blame] | 392 | |
[email protected] | 10b2261 | 2012-03-22 17:07:55 | [diff] [blame] | 393 | UserWallpaperDelegate* user_wallpaper_delegate() { |
| 394 | return user_wallpaper_delegate_.get(); |
| 395 | } |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 396 | |
[email protected] | fcb123d | 2013-04-17 15:58:49 | [diff] [blame] | 397 | SessionStateDelegate* session_state_delegate() { |
| 398 | return session_state_delegate_.get(); |
| 399 | } |
| 400 | |
[email protected] | f3ab6eff5 | 2013-10-24 03:29:38 | [diff] [blame] | 401 | AccessibilityDelegate* accessibility_delegate() { |
| 402 | return accessibility_delegate_.get(); |
| 403 | } |
| 404 | |
[email protected] | 47686c4 | 2013-10-25 01:49:17 | [diff] [blame] | 405 | NewWindowDelegate* new_window_delegate() { |
| 406 | return new_window_delegate_.get(); |
| 407 | } |
| 408 | |
[email protected] | efc897f7 | 2013-11-01 11:43:07 | [diff] [blame] | 409 | MediaDelegate* media_delegate() { |
| 410 | return media_delegate_.get(); |
| 411 | } |
| 412 | |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 413 | HighContrastController* high_contrast_controller() { |
| 414 | return high_contrast_controller_.get(); |
| 415 | } |
| 416 | |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 417 | MagnificationController* magnification_controller() { |
[email protected] | c1c67017 | 2012-04-26 04:20:26 | [diff] [blame] | 418 | return magnification_controller_.get(); |
| 419 | } |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 420 | |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 421 | PartialMagnificationController* partial_magnification_controller() { |
| 422 | return partial_magnification_controller_.get(); |
| 423 | } |
[email protected] | 55398d2 | 2013-10-10 19:49:20 | [diff] [blame] | 424 | |
| 425 | AutoclickController* autoclick_controller() { |
| 426 | return autoclick_controller_.get(); |
| 427 | } |
| 428 | |
[email protected] | d219a19 | 2012-12-14 00:08:18 | [diff] [blame] | 429 | aura::client::ActivationClient* activation_client() { |
| 430 | return activation_client_; |
| 431 | } |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 432 | |
[email protected] | c25ff50 | 2013-12-04 13:52:48 | [diff] [blame] | 433 | ShelfItemDelegateManager* shelf_item_delegate_manager() { |
| 434 | return shelf_item_delegate_manager_.get(); |
[email protected] | cc29ba1 | 2013-08-28 05:22:34 | [diff] [blame] | 435 | } |
| 436 | |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 437 | // Force the shelf to query for it's current visibility state. |
| 438 | void UpdateShelfVisibility(); |
| 439 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 440 | // TODO(oshima): Define an interface to access shelf/launcher |
| 441 | // state, or just use Launcher. |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 442 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 443 | // Sets/gets the shelf auto-hide behavior on |root_window|. |
| 444 | void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 445 | aura::Window* root_window); |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 446 | ShelfAutoHideBehavior GetShelfAutoHideBehavior( |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 447 | aura::Window* root_window) const; |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 448 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 449 | // Sets/gets shelf's alignment on |root_window|. |
| 450 | void SetShelfAlignment(ShelfAlignment alignment, |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 451 | aura::Window* root_window); |
| 452 | ShelfAlignment GetShelfAlignment(aura::Window* root_window); |
[email protected] | 5544450 | 2012-05-10 15:43:53 | [diff] [blame] | 453 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 454 | // Dims or undims the screen. |
| 455 | void SetDimming(bool should_dim); |
| 456 | |
[email protected] | 375069e | 2013-10-04 13:54:31 | [diff] [blame] | 457 | // Notifies |observers_| when entering or exiting fullscreen mode in |
| 458 | // |root_window|. |
| 459 | void NotifyFullscreenStateChange(bool is_fullscreen, |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 460 | aura::Window* root_window); |
[email protected] | 375069e | 2013-10-04 13:54:31 | [diff] [blame] | 461 | |
[email protected] | 090c4f1 | 2012-10-29 18:56:42 | [diff] [blame] | 462 | // Creates a modal background (a partially-opaque fullscreen window) |
| 463 | // on all displays for |window|. |
| 464 | void CreateModalBackground(aura::Window* window); |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 465 | |
| 466 | // Called when a modal window is removed. It will activate |
| 467 | // another modal window if any, or remove modal screens |
| 468 | // on all displays. |
| 469 | void OnModalWindowRemoved(aura::Window* removed); |
| 470 | |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [diff] [blame] | 471 | // Returns WebNotificationTray on the primary root window. |
| 472 | WebNotificationTray* GetWebNotificationTray(); |
[email protected] | 6d6546e | 2012-05-30 23:12:02 | [diff] [blame] | 473 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 474 | // Does the primary display have status area? |
| 475 | bool HasPrimaryStatusArea(); |
| 476 | |
| 477 | // Returns the system tray on primary display. |
| 478 | SystemTray* GetPrimarySystemTray(); |
[email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 479 | |
[email protected] | 945f9cae | 2012-12-12 09:54:29 | [diff] [blame] | 480 | SystemTrayDelegate* system_tray_delegate() { |
[email protected] | 51ed599 | 2012-11-07 10:14:39 | [diff] [blame] | 481 | return system_tray_delegate_.get(); |
| 482 | } |
| 483 | |
[email protected] | 83b2b84c | 2012-11-14 01:11:00 | [diff] [blame] | 484 | SystemTrayNotifier* system_tray_notifier() { |
| 485 | return system_tray_notifier_.get(); |
| 486 | } |
| 487 | |
[email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 488 | static void set_initially_hide_cursor(bool hide) { |
| 489 | initially_hide_cursor_ = hide; |
| 490 | } |
| 491 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 492 | ResizeShadowController* resize_shadow_controller() { |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 493 | return resize_shadow_controller_.get(); |
| 494 | } |
| 495 | |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 496 | // Made available for tests. |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 497 | ::wm::ShadowController* shadow_controller() { |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 498 | return shadow_controller_.get(); |
| 499 | } |
| 500 | |
[email protected] | f946670 | 2012-09-17 16:35:27 | [diff] [blame] | 501 | // Starts the animation that occurs on first login. |
| 502 | void DoInitialWorkspaceAnimation(); |
| 503 | |
[email protected] | cc4fc3b | 2014-04-03 08:07:09 | [diff] [blame] | 504 | AccelerometerController* accelerometer_controller() { |
| 505 | return accelerometer_controller_.get(); |
| 506 | } |
| 507 | |
[email protected] | 58fb353d | 2014-04-04 03:28:05 | [diff] [blame] | 508 | MaximizeModeController* maximize_mode_controller() { |
| 509 | return maximize_mode_controller_.get(); |
| 510 | } |
| 511 | |
[email protected] | 7bc49bd | 2014-01-22 09:30:34 | [diff] [blame] | 512 | #if defined(OS_CHROMEOS) |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 513 | // TODO(oshima): Move these objects to DisplayController. |
[email protected] | 1e31cbd | 2014-04-07 20:06:11 | [diff] [blame] | 514 | ui::DisplayConfigurator* display_configurator() { |
| 515 | return display_configurator_.get(); |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 516 | } |
[email protected] | 129aad8 | 2014-04-24 23:17:04 | [diff] [blame] | 517 | DisplayConfiguratorAnimation* display_configurator_animation() { |
| 518 | return display_configurator_animation_.get(); |
[email protected] | 196e945 | 2012-08-01 06:42:51 | [diff] [blame] | 519 | } |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 520 | DisplayErrorObserver* display_error_observer() { |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 521 | return display_error_observer_.get(); |
| 522 | } |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 523 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 524 | ResolutionNotificationController* resolution_notification_controller() { |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 525 | return resolution_notification_controller_.get(); |
| 526 | } |
[email protected] | 0dc8551 | 2014-03-13 13:26:41 | [diff] [blame] | 527 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 528 | LogoutConfirmationController* logout_confirmation_controller() { |
[email protected] | 0dc8551 | 2014-03-13 13:26:41 | [diff] [blame] | 529 | return logout_confirmation_controller_.get(); |
| 530 | } |
[email protected] | 7bc49bd | 2014-01-22 09:30:34 | [diff] [blame] | 531 | #endif // defined(OS_CHROMEOS) |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 532 | |
[email protected] | 64936bf | 2013-11-14 19:48:36 | [diff] [blame] | 533 | ShelfModel* shelf_model() { |
| 534 | return shelf_model_.get(); |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 535 | } |
| 536 | |
[email protected] | e9a7131 | 2013-10-04 03:20:01 | [diff] [blame] | 537 | WindowPositioner* window_positioner() { |
| 538 | return window_positioner_.get(); |
| 539 | } |
| 540 | |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 541 | // Returns the launcher delegate, creating if necesary. |
[email protected] | 8b57e94 | 2013-12-09 19:39:20 | [diff] [blame] | 542 | ShelfDelegate* GetShelfDelegate(); |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 543 | |
[email protected] | 5d2ea36 | 2013-12-13 08:10:18 | [diff] [blame] | 544 | UserMetricsRecorder* metrics() { |
| 545 | return user_metrics_recorder_.get(); |
| 546 | } |
| 547 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 548 | void SetTouchHudProjectionEnabled(bool enabled); |
| 549 | |
| 550 | bool is_touch_hud_projection_enabled() const { |
| 551 | return is_touch_hud_projection_enabled_; |
| 552 | } |
| 553 | |
[email protected] | 59ccade | 2013-10-17 17:56:40 | [diff] [blame] | 554 | #if defined(OS_CHROMEOS) |
| 555 | // Creates instance of FirstRunHelper. Caller is responsible for deleting |
| 556 | // returned object. |
| 557 | ash::FirstRunHelper* CreateFirstRunHelper(); |
[email protected] | f94c6aa | 2013-11-08 01:18:54 | [diff] [blame] | 558 | |
[email protected] | 87ec220 | 2014-02-06 06:24:27 | [diff] [blame] | 559 | // Toggles cursor compositing on/off. Native cursor is disabled when cursor |
| 560 | // compositing is enabled, and vice versa. |
| 561 | void SetCursorCompositingEnabled(bool enabled); |
| 562 | |
[email protected] | 08bdabed | 2013-12-20 07:52:28 | [diff] [blame] | 563 | StickyKeysController* sticky_keys_controller() { |
| 564 | return sticky_keys_controller_.get(); |
[email protected] | f94c6aa | 2013-11-08 01:18:54 | [diff] [blame] | 565 | } |
[email protected] | 59ccade | 2013-10-17 17:56:40 | [diff] [blame] | 566 | #endif // defined(OS_CHROMEOS) |
| 567 | |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 568 | GPUSupport* gpu_support() { return gpu_support_.get(); } |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 569 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 570 | private: |
[email protected] | c39be8f | 2012-06-15 22:58:36 | [diff] [blame] | 571 | FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 572 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); |
| 573 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 574 | friend class RootWindowController; |
| 575 | friend class ScopedTargetRootWindow; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 576 | friend class test::ShellTestApi; |
[email protected] | 0af5804 | 2012-12-13 03:21:35 | [diff] [blame] | 577 | friend class shell::WindowWatcher; |
[email protected] | ad0c872 | 2012-03-02 20:17:45 | [diff] [blame] | 578 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 579 | typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
| 580 | |
[email protected] | 09464c7 | 2013-04-26 07:31:28 | [diff] [blame] | 581 | // Takes ownership of |delegate|. |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 582 | explicit Shell(ShellDelegate* delegate); |
| 583 | virtual ~Shell(); |
| 584 | |
[email protected] | 1b4c747 | 2014-05-15 18:32:23 | [diff] [blame^] | 585 | void Init(const ShellInitParams& init_params); |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 586 | |
[email protected] | 51f43811 | 2013-11-18 19:32:50 | [diff] [blame] | 587 | // Initializes virtual keyboard controller. |
| 588 | void InitKeyboard(); |
[email protected] | b6ba05d90 | 2013-10-04 21:38:45 | [diff] [blame] | 589 | |
[email protected] | a273d33a | 2013-10-17 12:41:21 | [diff] [blame] | 590 | // Initializes the root window so that it can host browser windows. |
[email protected] | 41baaed | 2013-11-09 04:18:26 | [diff] [blame] | 591 | void InitRootWindow(aura::Window* root_window); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 592 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 593 | // ash::SystemModalContainerEventFilterDelegate overrides: |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 594 | virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
| 595 | |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 596 | // Overridden from ui::EventTarget: |
[email protected] | 869f635 | 2012-12-06 20:47:17 | [diff] [blame] | 597 | virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 598 | virtual EventTarget* GetParentTarget() OVERRIDE; |
[email protected] | 3e670aa | 2013-12-02 19:04:32 | [diff] [blame] | 599 | virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE; |
| 600 | virtual ui::EventTargeter* GetEventTargeter() OVERRIDE; |
[email protected] | 049cf34b | 2012-12-07 17:15:48 | [diff] [blame] | 601 | virtual void OnEvent(ui::Event* event) OVERRIDE; |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 602 | |
[email protected] | 1ae36165 | 2012-12-12 22:39:51 | [diff] [blame] | 603 | // Overridden from aura::client::ActivationChangeObserver: |
| 604 | virtual void OnWindowActivated(aura::Window* gained_active, |
| 605 | aura::Window* lost_active) OVERRIDE; |
| 606 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 607 | static Shell* instance_; |
| 608 | |
[email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 609 | // If set before the Shell is initialized, the mouse cursor will be hidden |
| 610 | // when the screen is initially created. |
| 611 | static bool initially_hide_cursor_; |
| 612 | |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 613 | // When no explicit target display/RootWindow is given, new windows are |
| 614 | // created on |scoped_target_root_window_| , unless NULL in |
| 615 | // which case they are created on |target_root_window_|. |
| 616 | // |target_root_window_| never becomes NULL during the session. |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 617 | aura::Window* target_root_window_; |
| 618 | aura::Window* scoped_target_root_window_; |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 619 | |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 620 | // The CompoundEventFilter owned by aura::Env object. |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 621 | scoped_ptr< ::wm::CompoundEventFilter> env_filter_; |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 622 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 623 | std::vector<WindowAndBoundsPair> to_restore_; |
| 624 | |
[email protected] | 5d2ea36 | 2013-12-13 08:10:18 | [diff] [blame] | 625 | scoped_ptr<UserMetricsRecorder> user_metrics_recorder_; |
[email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 626 | scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 627 | scoped_ptr<AcceleratorController> accelerator_controller_; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 628 | scoped_ptr<ShellDelegate> delegate_; |
[email protected] | 51ed599 | 2012-11-07 10:14:39 | [diff] [blame] | 629 | scoped_ptr<SystemTrayDelegate> system_tray_delegate_; |
[email protected] | 83b2b84c | 2012-11-14 01:11:00 | [diff] [blame] | 630 | scoped_ptr<SystemTrayNotifier> system_tray_notifier_; |
[email protected] | 10b2261 | 2012-03-22 17:07:55 | [diff] [blame] | 631 | scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; |
[email protected] | fcb123d | 2013-04-17 15:58:49 | [diff] [blame] | 632 | scoped_ptr<SessionStateDelegate> session_state_delegate_; |
[email protected] | f3ab6eff5 | 2013-10-24 03:29:38 | [diff] [blame] | 633 | scoped_ptr<AccessibilityDelegate> accessibility_delegate_; |
[email protected] | 47686c4 | 2013-10-25 01:49:17 | [diff] [blame] | 634 | scoped_ptr<NewWindowDelegate> new_window_delegate_; |
[email protected] | efc897f7 | 2013-11-01 11:43:07 | [diff] [blame] | 635 | scoped_ptr<MediaDelegate> media_delegate_; |
[email protected] | 8b57e94 | 2013-12-09 19:39:20 | [diff] [blame] | 636 | scoped_ptr<ShelfDelegate> shelf_delegate_; |
[email protected] | c25ff50 | 2013-12-04 13:52:48 | [diff] [blame] | 637 | scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 638 | scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [diff] [blame] | 639 | |
[email protected] | 64936bf | 2013-11-14 19:48:36 | [diff] [blame] | 640 | scoped_ptr<ShelfModel> shelf_model_; |
| 641 | scoped_ptr<WindowPositioner> window_positioner_; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 642 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 643 | scoped_ptr<AppListController> app_list_controller_; |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 644 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 645 | scoped_ptr<DragDropController> drag_drop_controller_; |
| 646 | scoped_ptr<ResizeShadowController> resize_shadow_controller_; |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 647 | scoped_ptr< ::wm::ShadowController> shadow_controller_; |
| 648 | scoped_ptr< ::wm::VisibilityController> visibility_controller_; |
| 649 | scoped_ptr< ::wm::WindowModalityController> window_modality_controller_; |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 650 | scoped_ptr<views::corewm::TooltipController> tooltip_controller_; |
[email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 651 | scoped_ptr<DesktopBackgroundController> desktop_background_controller_; |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 652 | scoped_ptr<PowerButtonController> power_button_controller_; |
[email protected] | ab4f8c9 | 2013-05-30 19:07:47 | [diff] [blame] | 653 | scoped_ptr<LockStateController> lock_state_controller_; |
[email protected] | 66c5c411 | 2013-07-31 07:10:59 | [diff] [blame] | 654 | scoped_ptr<MruWindowTracker> mru_window_tracker_; |
[email protected] | f0f61238 | 2014-04-03 15:11:49 | [diff] [blame] | 655 | scoped_ptr< ::wm::UserActivityDetector> user_activity_detector_; |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 656 | scoped_ptr<VideoDetector> video_detector_; |
[email protected] | dd1e1ac | 2014-05-13 03:44:09 | [diff] [blame] | 657 | scoped_ptr<WindowCycleController> window_cycle_controller_; |
[email protected] | d24ce2c | 2013-08-01 15:14:19 | [diff] [blame] | 658 | scoped_ptr<WindowSelectorController> window_selector_controller_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 659 | scoped_ptr<FocusCycler> focus_cycler_; |
[email protected] | edbfb8d | 2012-09-03 08:33:43 | [diff] [blame] | 660 | scoped_ptr<DisplayController> display_controller_; |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 661 | scoped_ptr<HighContrastController> high_contrast_controller_; |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 662 | scoped_ptr<MagnificationController> magnification_controller_; |
| 663 | scoped_ptr<PartialMagnificationController> partial_magnification_controller_; |
[email protected] | 55398d2 | 2013-10-10 19:49:20 | [diff] [blame] | 664 | scoped_ptr<AutoclickController> autoclick_controller_; |
[email protected] | 8cfb672 | 2012-11-28 03:28:46 | [diff] [blame] | 665 | scoped_ptr<aura::client::FocusClient> focus_client_; |
[email protected] | 39718b5 | 2012-12-03 17:24:56 | [diff] [blame] | 666 | aura::client::ActivationClient* activation_client_; |
[email protected] | f5c9dbc | 2014-04-11 08:13:45 | [diff] [blame] | 667 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 668 | scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_; |
| 669 | scoped_ptr<ScreenPositionController> screen_position_controller_; |
| 670 | scoped_ptr<SystemModalContainerEventFilter> modality_filter_; |
| 671 | scoped_ptr<EventClientImpl> event_client_; |
| 672 | scoped_ptr<EventTransformationHandler> event_transformation_handler_; |
[email protected] | ae18b911 | 2011-11-07 16:59:13 | [diff] [blame] | 673 | |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 674 | // An event filter that pre-handles key events while the partial |
[email protected] | a1584a71 | 2012-07-30 21:02:26 | [diff] [blame] | 675 | // screenshot UI or the keyboard overlay is active. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 676 | scoped_ptr<OverlayEventFilter> overlay_filter_; |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 677 | |
[email protected] | 7a80cdd | 2013-09-26 09:20:53 | [diff] [blame] | 678 | // An event filter for logging keyboard-related metrics. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 679 | scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_; |
[email protected] | 7a80cdd | 2013-09-26 09:20:53 | [diff] [blame] | 680 | |
[email protected] | 3537d47 | 2014-01-15 05:45:31 | [diff] [blame] | 681 | // An event filter which handles moving and resizing windows. |
| 682 | scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_; |
| 683 | |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 684 | // An event filter which handles system level gestures |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 685 | scoped_ptr<SystemGestureEventFilter> system_gesture_filter_; |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 686 | |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 687 | // An event filter that pre-handles global accelerators. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 688 | scoped_ptr<AcceleratorFilter> accelerator_filter_; |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 689 | |
[email protected] | 42f06f9 | 2012-03-27 00:57:57 | [diff] [blame] | 690 | // An event filter that pre-handles all key events to send them to an IME. |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 691 | scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_; |
[email protected] | 42f06f9 | 2012-03-27 00:57:57 | [diff] [blame] | 692 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 693 | scoped_ptr<DisplayManager> display_manager_; |
| 694 | scoped_ptr<base::WeakPtrFactory<DisplayManager> > |
[email protected] | 6f67df5 | 2013-10-29 01:07:15 | [diff] [blame] | 695 | weak_display_manager_factory_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 696 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 697 | scoped_ptr<LocaleNotificationController> locale_notification_controller_; |
[email protected] | a9a4046 | 2013-07-31 06:22:56 | [diff] [blame] | 698 | |
[email protected] | e55b7345 | 2014-02-20 13:18:04 | [diff] [blame] | 699 | // The maximized window manager (if enabled). |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 700 | scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_; |
[email protected] | e55b7345 | 2014-02-20 13:18:04 | [diff] [blame] | 701 | |
[email protected] | cc4fc3b | 2014-04-03 08:07:09 | [diff] [blame] | 702 | scoped_ptr<AccelerometerController> accelerometer_controller_; |
| 703 | |
[email protected] | ded58fd | 2013-10-09 07:56:55 | [diff] [blame] | 704 | #if defined(OS_CHROMEOS) |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 705 | scoped_ptr<PowerEventObserver> power_event_observer_; |
[email protected] | b0fa701 | 2014-04-16 12:50:57 | [diff] [blame] | 706 | scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 707 | scoped_ptr<VideoActivityNotifier> video_activity_notifier_; |
[email protected] | 08bdabed | 2013-12-20 07:52:28 | [diff] [blame] | 708 | scoped_ptr<StickyKeysController> sticky_keys_controller_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 709 | scoped_ptr<ResolutionNotificationController> |
[email protected] | 7bc49bd | 2014-01-22 09:30:34 | [diff] [blame] | 710 | resolution_notification_controller_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 711 | scoped_ptr<BluetoothNotificationController> |
[email protected] | b314272 | 2014-03-04 06:59:50 | [diff] [blame] | 712 | bluetooth_notification_controller_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 713 | scoped_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 714 | scoped_ptr<LastWindowClosedLogoutReminder> |
[email protected] | ded3249 | 2014-03-14 10:09:28 | [diff] [blame] | 715 | last_window_closed_logout_reminder_; |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 716 | // Controls video output device state. |
[email protected] | 1e31cbd | 2014-04-07 20:06:11 | [diff] [blame] | 717 | scoped_ptr<ui::DisplayConfigurator> display_configurator_; |
[email protected] | 129aad8 | 2014-04-24 23:17:04 | [diff] [blame] | 718 | scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 719 | scoped_ptr<DisplayErrorObserver> display_error_observer_; |
| 720 | scoped_ptr<ProjectingObserver> projecting_observer_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 721 | |
[email protected] | c1234a4 | 2013-08-20 09:35:40 | [diff] [blame] | 722 | // Listens for output changes and updates the display manager. |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 723 | scoped_ptr<DisplayChangeObserver> display_change_observer_; |
[email protected] | 3dff2ef | 2014-02-09 22:50:39 | [diff] [blame] | 724 | |
[email protected] | 94545ca9 | 2014-03-29 01:17:59 | [diff] [blame] | 725 | #if defined(USE_X11) |
[email protected] | e4ea5236 | 2014-02-15 03:21:06 | [diff] [blame] | 726 | scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_; |
| 727 | scoped_ptr<ui::EventHandler> speech_feedback_handler_; |
[email protected] | 03122891a | 2014-05-13 23:56:49 | [diff] [blame] | 728 | scoped_ptr<TouchTransformerController> touch_transformer_controller_; |
[email protected] | ded58fd | 2013-10-09 07:56:55 | [diff] [blame] | 729 | #endif // defined(USE_X11) |
| 730 | #endif // defined(OS_CHROMEOS) |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 731 | |
[email protected] | 58fb353d | 2014-04-04 03:28:05 | [diff] [blame] | 732 | scoped_ptr<MaximizeModeController> maximize_mode_controller_; |
| 733 | |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 734 | // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a |
| 735 | // pointer to vend to test code. |
| 736 | AshNativeCursorManager* native_cursor_manager_; |
[email protected] | e76096a5f | 2014-04-08 04:08:03 | [diff] [blame] | 737 | |
| 738 | // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide |
| 739 | // the cursor on Windows. |
| 740 | #if defined(OS_CHROMEOS) |
| 741 | CursorManager cursor_manager_; |
| 742 | #else // !defined(OS_CHROMEOS) |
[email protected] | e319c7e | 2014-03-14 19:56:14 | [diff] [blame] | 743 | ::wm::CursorManager cursor_manager_; |
[email protected] | e76096a5f | 2014-04-08 04:08:03 | [diff] [blame] | 744 | #endif // defined(OS_CHROMEOS) |
[email protected] | 4b8003c | 2012-07-26 00:54:19 | [diff] [blame] | 745 | |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 746 | ObserverList<ShellObserver> observers_; |
| 747 | |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 748 | // For testing only: simulate that a modal window is open |
| 749 | bool simulate_modal_window_open_for_testing_; |
| 750 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 751 | bool is_touch_hud_projection_enabled_; |
| 752 | |
[email protected] | 1d2a721 | 2014-01-16 06:09:48 | [diff] [blame] | 753 | // Injected content::GPUDataManager support. |
| 754 | scoped_ptr<GPUSupport> gpu_support_; |
| 755 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 756 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 757 | }; |
| 758 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 759 | } // namespace ash |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 760 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 761 | #endif // ASH_SHELL_H_ |