[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] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 12 | #include "ash/shelf/shelf_types.h" |
[email protected] | 82d3954ae | 2012-04-20 09:02:22 | [diff] [blame] | 13 | #include "ash/system/user/login_status.h" |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 14 | #include "ash/wm/system_modal_container_event_filter_delegate.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 15 | #include "base/basictypes.h" |
[email protected] | c45fdc7 | 2012-02-22 22:59:12 | [diff] [blame] | 16 | #include "base/compiler_specific.h" |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 17 | #include "base/gtest_prod_util.h" |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 18 | #include "base/memory/scoped_ptr.h" |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 19 | #include "base/observer_list.h" |
[email protected] | 1ae36165 | 2012-12-12 22:39:51 | [diff] [blame] | 20 | #include "ui/aura/client/activation_change_observer.h" |
[email protected] | 940fb1c | 2013-06-18 16:54:28 | [diff] [blame] | 21 | #include "ui/base/ui_base_types.h" |
[email protected] | 86ccbd4 | 2013-09-18 18:11:54 | [diff] [blame] | 22 | #include "ui/events/event_target.h" |
[email protected] | 2eb6b89 | 2012-05-31 13:28:21 | [diff] [blame] | 23 | #include "ui/gfx/insets.h" |
[email protected] | ffabb1e | 2012-10-12 19:51:17 | [diff] [blame] | 24 | #include "ui/gfx/screen.h" |
[email protected] | 9ec0f45 | 2012-05-31 15:58:53 | [diff] [blame] | 25 | #include "ui/gfx/size.h" |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 26 | #include "ui/views/corewm/cursor_manager.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 27 | |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 28 | class CommandLine; |
| 29 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 30 | namespace aura { |
[email protected] | e29014c | 2011-11-16 18:25:51 | [diff] [blame] | 31 | class EventFilter; |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 32 | class RootWindow; |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 33 | class Window; |
[email protected] | c2885361 | 2012-05-31 22:43:44 | [diff] [blame] | 34 | namespace client { |
[email protected] | 39718b5 | 2012-12-03 17:24:56 | [diff] [blame] | 35 | class ActivationClient; |
[email protected] | 8cfb672 | 2012-11-28 03:28:46 | [diff] [blame] | 36 | class FocusClient; |
[email protected] | c2885361 | 2012-05-31 22:43:44 | [diff] [blame] | 37 | class UserActionClient; |
| 38 | } |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 39 | } |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 40 | namespace chromeos { |
| 41 | class OutputConfigurator; |
| 42 | } |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 43 | namespace content { |
| 44 | class BrowserContext; |
| 45 | } |
| 46 | |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 47 | namespace gfx { |
[email protected] | 9ec0f45 | 2012-05-31 15:58:53 | [diff] [blame] | 48 | class ImageSkia; |
[email protected] | b5f3060 | 2012-01-30 15:16:57 | [diff] [blame] | 49 | class Point; |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 50 | class Rect; |
| 51 | } |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 52 | namespace ui { |
| 53 | class Layer; |
| 54 | } |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 55 | namespace views { |
| 56 | class NonClientFrameView; |
| 57 | class Widget; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 58 | namespace corewm { |
| 59 | class CompoundEventFilter; |
| 60 | class InputMethodEventFilter; |
[email protected] | 86f2b5e | 2012-11-14 20:37:00 | [diff] [blame] | 61 | class ShadowController; |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 62 | class TooltipController; |
[email protected] | b5756e2 | 2012-11-30 01:32:02 | [diff] [blame] | 63 | class VisibilityController; |
[email protected] | 0c2dc01 | 2012-12-02 00:00:23 | [diff] [blame] | 64 | class WindowModalityController; |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 65 | } |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 66 | } |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 67 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 68 | namespace ash { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 69 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 70 | class AcceleratorController; |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 71 | class AshNativeCursorManager; |
[email protected] | f4c92b38 | 2012-08-28 00:59:59 | [diff] [blame] | 72 | class CapsLockDelegate; |
[email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 73 | class DesktopBackgroundController; |
[email protected] | edbfb8d | 2012-09-03 08:33:43 | [diff] [blame] | 74 | class DisplayController; |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 75 | class HighContrastController; |
[email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 76 | class Launcher; |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [diff] [blame] | 77 | class LauncherDelegate; |
[email protected] | cc29ba1 | 2013-08-28 05:22:34 | [diff] [blame] | 78 | class LauncherItemDelegateManager; |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [diff] [blame] | 79 | class LauncherModel; |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 80 | class MagnificationController; |
[email protected] | 66c5c411 | 2013-07-31 07:10:59 | [diff] [blame] | 81 | class MruWindowTracker; |
[email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 82 | class NestedDispatcherController; |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 83 | class PartialMagnificationController; |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 84 | class PowerButtonController; |
[email protected] | fca90ea | 2012-12-14 04:13:30 | [diff] [blame] | 85 | class RootWindowHostFactory; |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 86 | class ScreenAsh; |
[email protected] | ab4f8c9 | 2013-05-30 19:07:47 | [diff] [blame] | 87 | class LockStateController; |
[email protected] | fcb123d | 2013-04-17 15:58:49 | [diff] [blame] | 88 | class SessionStateDelegate; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 89 | class ShellDelegate; |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 90 | class ShellObserver; |
[email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 91 | class SystemTray; |
[email protected] | 51ed599 | 2012-11-07 10:14:39 | [diff] [blame] | 92 | class SystemTrayDelegate; |
[email protected] | 83b2b84c | 2012-11-14 01:11:00 | [diff] [blame] | 93 | class SystemTrayNotifier; |
[email protected] | c16b942 | 2012-06-06 21:51:11 | [diff] [blame] | 94 | class UserActivityDetector; |
[email protected] | 10b2261 | 2012-03-22 17:07:55 | [diff] [blame] | 95 | class UserWallpaperDelegate; |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 96 | class VideoDetector; |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [diff] [blame] | 97 | class WebNotificationTray; |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 98 | class WindowCycleController; |
[email protected] | d24ce2c | 2013-08-01 15:14:19 | [diff] [blame] | 99 | class WindowSelectorController; |
[email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 100 | |
| 101 | namespace internal { |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 102 | class AcceleratorFilter; |
[email protected] | 0039db9 | 2012-05-09 04:11:45 | [diff] [blame] | 103 | class AppListController; |
[email protected] | 976624f | 2013-09-19 21:58:49 | [diff] [blame] | 104 | class AppListShelfItemDelegate; |
[email protected] | 60a978b7 | 2012-06-08 00:29:18 | [diff] [blame] | 105 | class CaptureController; |
[email protected] | c1234a4 | 2013-08-20 09:35:40 | [diff] [blame] | 106 | class DisplayChangeObserver; |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 107 | class DisplayErrorObserver; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 108 | class DisplayManager; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 109 | class DragDropController; |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 110 | class EventClientImpl; |
[email protected] | b9d224c | 2012-07-13 01:09:03 | [diff] [blame] | 111 | class EventRewriterEventFilter; |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 112 | class EventTransformationHandler; |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 113 | class FocusCycler; |
[email protected] | a9a4046 | 2013-07-31 06:22:56 | [diff] [blame] | 114 | class LocaleNotificationController; |
[email protected] | 78d9630 | 2012-06-22 00:58:07 | [diff] [blame] | 115 | class MouseCursorEventFilter; |
[email protected] | 196e945 | 2012-08-01 06:42:51 | [diff] [blame] | 116 | class OutputConfiguratorAnimation; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 117 | class OverlayEventFilter; |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 118 | class ResizeShadowController; |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 119 | class ResolutionNotificationController; |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 120 | class RootWindowController; |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 121 | class RootWindowLayoutManager; |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 122 | class ScopedTargetRootWindow; |
[email protected] | 8d625fb | 2012-07-18 16:40:06 | [diff] [blame] | 123 | class ScreenPositionController; |
[email protected] | 9861f175 | 2012-06-01 07:16:14 | [diff] [blame] | 124 | class SlowAnimationEventFilter; |
[email protected] | 6d6546e | 2012-05-30 23:12:02 | [diff] [blame] | 125 | class StatusAreaWidget; |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 126 | class SystemGestureEventFilter; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 127 | class SystemModalContainerEventFilter; |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 128 | class TouchObserverHUD; |
[email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 129 | } |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 130 | |
[email protected] | 0af5804 | 2012-12-13 03:21:35 | [diff] [blame] | 131 | namespace shell { |
| 132 | class WindowWatcher; |
| 133 | } |
| 134 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 135 | namespace test { |
| 136 | class ShellTestApi; |
| 137 | } |
| 138 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 139 | // Shell is a singleton object that presents the Shell API and implements the |
[email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 140 | // RootWindow's delegate interface. |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 141 | // |
| 142 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 143 | // takes ownership of the Shell. |
[email protected] | 1ae36165 | 2012-12-12 22:39:51 | [diff] [blame] | 144 | class ASH_EXPORT Shell |
| 145 | : public internal::SystemModalContainerEventFilterDelegate, |
| 146 | public ui::EventTarget, |
| 147 | public aura::client::ActivationChangeObserver { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 148 | public: |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 149 | typedef std::vector<aura::RootWindow*> RootWindowList; |
| 150 | typedef std::vector<internal::RootWindowController*> RootWindowControllerList; |
| 151 | |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 152 | enum Direction { |
| 153 | FORWARD, |
| 154 | BACKWARD |
| 155 | }; |
| 156 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 157 | // A shell must be explicitly created so that it can call |Init()| with the |
| 158 | // delegate set. |delegate| can be NULL (if not required for initialization). |
[email protected] | 09464c7 | 2013-04-26 07:31:28 | [diff] [blame] | 159 | // Takes ownership of |delegate|. |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 160 | static Shell* CreateInstance(ShellDelegate* delegate); |
| 161 | |
| 162 | // Should never be called before |CreateInstance()|. |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 163 | static Shell* GetInstance(); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 164 | |
[email protected] | b3b7bcd | 2012-03-06 19:35:45 | [diff] [blame] | 165 | // Returns true if the ash shell has been instantiated. |
| 166 | static bool HasInstance(); |
| 167 | |
[email protected] | ef589af | 2011-12-03 01:07:15 | [diff] [blame] | 168 | static void DeleteInstance(); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 169 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 170 | // Returns the root window controller for the primary root window. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 171 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 172 | static internal::RootWindowController* GetPrimaryRootWindowController(); |
| 173 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 174 | // Returns all root window controllers. |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 175 | // TODO(oshima): move this to |RootWindowController| |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 176 | static RootWindowControllerList GetAllRootWindowControllers(); |
| 177 | |
| 178 | // Returns the primary RootWindow. The primary RootWindow is the one |
[email protected] | 42713f7 | 2012-05-25 00:41:50 | [diff] [blame] | 179 | // that has a launcher. |
| 180 | static aura::RootWindow* GetPrimaryRootWindow(); |
[email protected] | e73bd780 | 2012-02-17 20:10:34 | [diff] [blame] | 181 | |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 182 | // Returns a RootWindow when used as a target when creating a new window. |
| 183 | // The root window of the active window is used in most cases, but can |
| 184 | // be overridden by using ScopedTargetRootWindow(). |
| 185 | // If you want to get a RootWindow of the active window, just use |
| 186 | // |wm::GetActiveWindow()->GetRootWindow()|. |
[email protected] | d17642d | 2013-09-12 23:44:38 | [diff] [blame] | 187 | static aura::RootWindow* GetTargetRootWindow(); |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 188 | |
[email protected] | ffabb1e | 2012-10-12 19:51:17 | [diff] [blame] | 189 | // Returns the global Screen object that's always active in ash. |
| 190 | static gfx::Screen* GetScreen(); |
| 191 | |
[email protected] | cf1c70e | 2012-08-30 01:13:02 | [diff] [blame] | 192 | // Returns all root windows. |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 193 | static RootWindowList GetAllRootWindows(); |
| 194 | |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 195 | static aura::Window* GetContainer(aura::RootWindow* root_window, |
| 196 | int container_id); |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 197 | static const aura::Window* GetContainer(const aura::RootWindow* root_window, |
| 198 | int container_id); |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 199 | |
| 200 | // Returns the list of containers that match |container_id| in |
[email protected] | 429433f | 2012-12-28 20:14:46 | [diff] [blame] | 201 | // all root windows. If |priority_root| is given, the container |
| 202 | // in the |priority_root| will be inserted at the top of the list. |
| 203 | static std::vector<aura::Window*> GetContainersFromAllRootWindows( |
| 204 | int container_id, |
| 205 | aura::RootWindow* priority_root); |
[email protected] | 7b0f750 | 2012-06-11 00:12:39 | [diff] [blame] | 206 | |
[email protected] | a4016f1 | 2013-05-02 07:53:47 | [diff] [blame] | 207 | // True if an experimental maximize mode is enabled which forces browser and |
| 208 | // application windows to be maximized only. |
| 209 | static bool IsForcedMaximizeMode(); |
| 210 | |
[email protected] | d17642d | 2013-09-12 23:44:38 | [diff] [blame] | 211 | void set_target_root_window(aura::RootWindow* target_root_window) { |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 212 | target_root_window_ = target_root_window; |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 213 | } |
| 214 | |
[email protected] | cb054f97 | 2012-10-11 20:27:28 | [diff] [blame] | 215 | // Shows the context menu for the background and launcher at |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 216 | // |location_in_screen| (in screen coordinates). |
[email protected] | 940fb1c | 2013-06-18 16:54:28 | [diff] [blame] | 217 | void ShowContextMenu(const gfx::Point& location_in_screen, |
| 218 | ui::MenuSourceType source_type); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 219 | |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [diff] [blame] | 220 | // Toggles the app list. |window| specifies in which display the app |
| 221 | // list should be shown. If this is NULL, the active root window |
| 222 | // will be used. |
| 223 | void ToggleAppList(aura::Window* anchor); |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 224 | |
[email protected] | 7510d108 | 2012-03-30 21:58:34 | [diff] [blame] | 225 | // Returns app list target visibility. |
| 226 | bool GetAppListTargetVisibility() const; |
| 227 | |
[email protected] | 1e51a9d | 2012-04-09 23:31:11 | [diff] [blame] | 228 | // Returns app list window or NULL if it is not visible. |
| 229 | aura::Window* GetAppListWindow(); |
| 230 | |
[email protected] | dc0973937 | 2012-11-15 20:17:39 | [diff] [blame] | 231 | // Returns true if a system-modal dialog window is currently open. |
| 232 | bool IsSystemModalWindowOpen() const; |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 233 | |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 234 | // For testing only: set simulation that a modal window is open |
| 235 | void SimulateModalWindowOpenForTesting(bool modal_window_open) { |
| 236 | simulate_modal_window_open_for_testing_ = modal_window_open; |
| 237 | } |
| 238 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 239 | // Creates a default views::NonClientFrameView for use by windows in the |
| 240 | // Ash environment. |
| 241 | views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 242 | views::Widget* widget); |
| 243 | |
[email protected] | d9456cb | 2012-03-21 16:41:04 | [diff] [blame] | 244 | // Rotates focus through containers that can receive focus. |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 245 | void RotateFocus(Direction direction); |
| 246 | |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 247 | // Sets the work area insets of the display that contains |window|, |
[email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 248 | // this notifies observers too. |
[email protected] | 27f6af6 | 2012-03-21 05:34:40 | [diff] [blame] | 249 | // TODO(sky): this no longer really replicates what happens and is unreliable. |
| 250 | // Remove this. |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 251 | void SetDisplayWorkAreaInsets(aura::Window* window, |
[email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 252 | const gfx::Insets& insets); |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 253 | |
[email protected] | 82d3954ae | 2012-04-20 09:02:22 | [diff] [blame] | 254 | // Called when the user logs in. |
| 255 | void OnLoginStateChanged(user::LoginStatus status); |
| 256 | |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [diff] [blame] | 257 | // Called when the login status changes. |
| 258 | // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|. |
| 259 | void UpdateAfterLoginStatusChange(user::LoginStatus status); |
| 260 | |
[email protected] | 82d3954ae | 2012-04-20 09:02:22 | [diff] [blame] | 261 | // Called when the application is exiting. |
| 262 | void OnAppTerminating(); |
| 263 | |
| 264 | // Called when the screen is locked (after the lock window is visible) or |
| 265 | // unlocked. |
| 266 | void OnLockStateChanged(bool locked); |
| 267 | |
[email protected] | d9456cb | 2012-03-21 16:41:04 | [diff] [blame] | 268 | // Initializes |launcher_|. Does nothing if it's already initialized. |
| 269 | void CreateLauncher(); |
| 270 | |
[email protected] | 7e1df2f6 | 2012-07-19 19:17:18 | [diff] [blame] | 271 | // Show launcher view if it was created hidden (before session has started). |
| 272 | void ShowLauncher(); |
| 273 | |
[email protected] | d9456cb | 2012-03-21 16:41:04 | [diff] [blame] | 274 | // Adds/removes observer. |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 275 | void AddShellObserver(ShellObserver* observer); |
| 276 | void RemoveShellObserver(ShellObserver* observer); |
| 277 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 278 | AcceleratorController* accelerator_controller() { |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 279 | return accelerator_controller_.get(); |
| 280 | } |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 281 | |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 282 | internal::DisplayManager* display_manager() { |
| 283 | return display_manager_.get(); |
| 284 | } |
[email protected] | f1d5c3a | 2013-04-23 17:42:56 | [diff] [blame] | 285 | views::corewm::InputMethodEventFilter* input_method_filter() { |
| 286 | return input_method_filter_.get(); |
| 287 | } |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 288 | views::corewm::CompoundEventFilter* env_filter() { |
[email protected] | 492533b3 | 2012-09-21 19:06:14 | [diff] [blame] | 289 | return env_filter_.get(); |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 290 | } |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 291 | views::corewm::TooltipController* tooltip_controller() { |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 292 | return tooltip_controller_.get(); |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 293 | } |
[email protected] | b9d224c | 2012-07-13 01:09:03 | [diff] [blame] | 294 | internal::EventRewriterEventFilter* event_rewriter_filter() { |
| 295 | return event_rewriter_filter_.get(); |
[email protected] | 42f06f9 | 2012-03-27 00:57:57 | [diff] [blame] | 296 | } |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 297 | internal::OverlayEventFilter* overlay_filter() { |
| 298 | return overlay_filter_.get(); |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 299 | } |
[email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 300 | DesktopBackgroundController* desktop_background_controller() { |
| 301 | return desktop_background_controller_.get(); |
| 302 | } |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 303 | PowerButtonController* power_button_controller() { |
| 304 | return power_button_controller_.get(); |
| 305 | } |
[email protected] | ab4f8c9 | 2013-05-30 19:07:47 | [diff] [blame] | 306 | LockStateController* lock_state_controller() { |
| 307 | return lock_state_controller_.get(); |
[email protected] | 222f40c | 2012-10-18 08:58:13 | [diff] [blame] | 308 | } |
[email protected] | 66c5c411 | 2013-07-31 07:10:59 | [diff] [blame] | 309 | MruWindowTracker* mru_window_tracker() { |
| 310 | return mru_window_tracker_.get(); |
| 311 | } |
[email protected] | c16b942 | 2012-06-06 21:51:11 | [diff] [blame] | 312 | UserActivityDetector* user_activity_detector() { |
| 313 | return user_activity_detector_.get(); |
| 314 | } |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 315 | VideoDetector* video_detector() { |
| 316 | return video_detector_.get(); |
| 317 | } |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 318 | WindowCycleController* window_cycle_controller() { |
| 319 | return window_cycle_controller_.get(); |
| 320 | } |
[email protected] | d24ce2c | 2013-08-01 15:14:19 | [diff] [blame] | 321 | WindowSelectorController* window_selector_controller() { |
| 322 | return window_selector_controller_.get(); |
| 323 | } |
[email protected] | 2d51154 | 2012-03-07 09:13:34 | [diff] [blame] | 324 | internal::FocusCycler* focus_cycler() { |
| 325 | return focus_cycler_.get(); |
| 326 | } |
[email protected] | edbfb8d | 2012-09-03 08:33:43 | [diff] [blame] | 327 | DisplayController* display_controller() { |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 328 | return display_controller_.get(); |
[email protected] | 3e1cdd31 | 2012-06-07 03:48:41 | [diff] [blame] | 329 | } |
[email protected] | 8b7ba87b | 2012-09-01 00:40:40 | [diff] [blame] | 330 | internal::MouseCursorEventFilter* mouse_cursor_filter() { |
| 331 | return mouse_cursor_filter_.get(); |
| 332 | } |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 333 | internal::EventTransformationHandler* event_transformation_handler() { |
| 334 | return event_transformation_handler_.get(); |
| 335 | } |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 336 | views::corewm::CursorManager* cursor_manager() { return &cursor_manager_; } |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 337 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 338 | ShellDelegate* delegate() { return delegate_.get(); } |
[email protected] | aa54218b | 2012-06-12 16:51:42 | [diff] [blame] | 339 | |
[email protected] | 10b2261 | 2012-03-22 17:07:55 | [diff] [blame] | 340 | UserWallpaperDelegate* user_wallpaper_delegate() { |
| 341 | return user_wallpaper_delegate_.get(); |
| 342 | } |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 343 | |
[email protected] | f4c92b38 | 2012-08-28 00:59:59 | [diff] [blame] | 344 | CapsLockDelegate* caps_lock_delegate() { |
| 345 | return caps_lock_delegate_.get(); |
| 346 | } |
| 347 | |
[email protected] | fcb123d | 2013-04-17 15:58:49 | [diff] [blame] | 348 | SessionStateDelegate* session_state_delegate() { |
| 349 | return session_state_delegate_.get(); |
| 350 | } |
| 351 | |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 352 | HighContrastController* high_contrast_controller() { |
| 353 | return high_contrast_controller_.get(); |
| 354 | } |
| 355 | |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 356 | MagnificationController* magnification_controller() { |
[email protected] | c1c67017 | 2012-04-26 04:20:26 | [diff] [blame] | 357 | return magnification_controller_.get(); |
| 358 | } |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 359 | |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 360 | PartialMagnificationController* partial_magnification_controller() { |
| 361 | return partial_magnification_controller_.get(); |
| 362 | } |
[email protected] | d219a19 | 2012-12-14 00:08:18 | [diff] [blame] | 363 | aura::client::ActivationClient* activation_client() { |
| 364 | return activation_client_; |
| 365 | } |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 366 | |
[email protected] | cc29ba1 | 2013-08-28 05:22:34 | [diff] [blame] | 367 | LauncherItemDelegateManager* launcher_item_delegate_manager() { |
| 368 | return launcher_item_delegate_manager_.get(); |
| 369 | } |
| 370 | |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 371 | ScreenAsh* screen() { return screen_; } |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 372 | |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 373 | // Force the shelf to query for it's current visibility state. |
| 374 | void UpdateShelfVisibility(); |
| 375 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 376 | // TODO(oshima): Define an interface to access shelf/launcher |
| 377 | // state, or just use Launcher. |
[email protected] | c758fbf | 2012-03-25 22:53:59 | [diff] [blame] | 378 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 379 | // Sets/gets the shelf auto-hide behavior on |root_window|. |
| 380 | void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
| 381 | aura::RootWindow* root_window); |
| 382 | ShelfAutoHideBehavior GetShelfAutoHideBehavior( |
| 383 | aura::RootWindow* root_window) const; |
| 384 | |
[email protected] | 431552c | 2012-10-23 00:38:33 | [diff] [blame] | 385 | // Sets/gets shelf's alignment on |root_window|. |
| 386 | void SetShelfAlignment(ShelfAlignment alignment, |
| 387 | aura::RootWindow* root_window); |
| 388 | ShelfAlignment GetShelfAlignment(aura::RootWindow* root_window); |
[email protected] | 5544450 | 2012-05-10 15:43:53 | [diff] [blame] | 389 | |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 390 | // Dims or undims the screen. |
| 391 | void SetDimming(bool should_dim); |
| 392 | |
[email protected] | 090c4f1 | 2012-10-29 18:56:42 | [diff] [blame] | 393 | // Creates a modal background (a partially-opaque fullscreen window) |
| 394 | // on all displays for |window|. |
| 395 | void CreateModalBackground(aura::Window* window); |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 396 | |
| 397 | // Called when a modal window is removed. It will activate |
| 398 | // another modal window if any, or remove modal screens |
| 399 | // on all displays. |
| 400 | void OnModalWindowRemoved(aura::Window* removed); |
| 401 | |
[email protected] | 88d7112 | 2012-10-18 07:11:01 | [diff] [blame] | 402 | // Returns WebNotificationTray on the primary root window. |
| 403 | WebNotificationTray* GetWebNotificationTray(); |
[email protected] | 6d6546e | 2012-05-30 23:12:02 | [diff] [blame] | 404 | |
[email protected] | a0afeb1 | 2012-12-10 22:57:09 | [diff] [blame] | 405 | // Does the primary display have status area? |
| 406 | bool HasPrimaryStatusArea(); |
| 407 | |
| 408 | // Returns the system tray on primary display. |
| 409 | SystemTray* GetPrimarySystemTray(); |
[email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 410 | |
[email protected] | 945f9cae | 2012-12-12 09:54:29 | [diff] [blame] | 411 | SystemTrayDelegate* system_tray_delegate() { |
[email protected] | 51ed599 | 2012-11-07 10:14:39 | [diff] [blame] | 412 | return system_tray_delegate_.get(); |
| 413 | } |
| 414 | |
[email protected] | 83b2b84c | 2012-11-14 01:11:00 | [diff] [blame] | 415 | SystemTrayNotifier* system_tray_notifier() { |
| 416 | return system_tray_notifier_.get(); |
| 417 | } |
| 418 | |
[email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 419 | static void set_initially_hide_cursor(bool hide) { |
| 420 | initially_hide_cursor_ = hide; |
| 421 | } |
| 422 | |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 423 | internal::ResizeShadowController* resize_shadow_controller() { |
| 424 | return resize_shadow_controller_.get(); |
| 425 | } |
| 426 | |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 427 | // Made available for tests. |
[email protected] | 86f2b5e | 2012-11-14 20:37:00 | [diff] [blame] | 428 | views::corewm::ShadowController* shadow_controller() { |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 429 | return shadow_controller_.get(); |
| 430 | } |
| 431 | |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 432 | content::BrowserContext* browser_context() { return browser_context_; } |
| 433 | void set_browser_context(content::BrowserContext* browser_context) { |
| 434 | browser_context_ = browser_context; |
| 435 | } |
| 436 | |
[email protected] | 2e236a5 | 2012-06-27 22:21:47 | [diff] [blame] | 437 | // Initializes the root window to be used for a secondary display. |
| 438 | void InitRootWindowForSecondaryDisplay(aura::RootWindow* root); |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 439 | |
[email protected] | f946670 | 2012-09-17 16:35:27 | [diff] [blame] | 440 | // Starts the animation that occurs on first login. |
| 441 | void DoInitialWorkspaceAnimation(); |
| 442 | |
[email protected] | 117542c | 2013-04-30 20:27:21 | [diff] [blame] | 443 | #if defined(OS_CHROMEOS) && defined(USE_X11) |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 444 | // TODO(oshima): Move these objects to DisplayController. |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 445 | chromeos::OutputConfigurator* output_configurator() { |
| 446 | return output_configurator_.get(); |
| 447 | } |
[email protected] | 196e945 | 2012-08-01 06:42:51 | [diff] [blame] | 448 | internal::OutputConfiguratorAnimation* output_configurator_animation() { |
| 449 | return output_configurator_animation_.get(); |
| 450 | } |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 451 | internal::DisplayErrorObserver* display_error_observer() { |
| 452 | return display_error_observer_.get(); |
| 453 | } |
[email protected] | 117542c | 2013-04-30 20:27:21 | [diff] [blame] | 454 | #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 455 | |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 456 | internal::ResolutionNotificationController* |
| 457 | resolution_notification_controller() { |
| 458 | return resolution_notification_controller_.get(); |
| 459 | } |
| 460 | |
[email protected] | 8393aa6 | 2013-01-23 19:40:10 | [diff] [blame] | 461 | RootWindowHostFactory* root_window_host_factory() { |
| 462 | return root_window_host_factory_.get(); |
| 463 | } |
| 464 | |
[email protected] | 478c6c3 | 2013-03-09 02:50:58 | [diff] [blame] | 465 | LauncherModel* launcher_model() { |
| 466 | return launcher_model_.get(); |
| 467 | } |
| 468 | |
| 469 | // Returns the launcher delegate, creating if necesary. |
| 470 | LauncherDelegate* GetLauncherDelegate(); |
| 471 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 472 | void SetTouchHudProjectionEnabled(bool enabled); |
| 473 | |
| 474 | bool is_touch_hud_projection_enabled() const { |
| 475 | return is_touch_hud_projection_enabled_; |
| 476 | } |
| 477 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 478 | private: |
[email protected] | c39be8f | 2012-06-15 22:58:36 | [diff] [blame] | 479 | FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 480 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); |
| 481 | FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 482 | friend class internal::RootWindowController; |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 483 | friend class internal::ScopedTargetRootWindow; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 484 | friend class test::ShellTestApi; |
[email protected] | 0af5804 | 2012-12-13 03:21:35 | [diff] [blame] | 485 | friend class shell::WindowWatcher; |
[email protected] | ad0c872 | 2012-03-02 20:17:45 | [diff] [blame] | 486 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 487 | typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
| 488 | |
[email protected] | 09464c7 | 2013-04-26 07:31:28 | [diff] [blame] | 489 | // Takes ownership of |delegate|. |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 490 | explicit Shell(ShellDelegate* delegate); |
| 491 | virtual ~Shell(); |
| 492 | |
| 493 | void Init(); |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 494 | |
[email protected] | be65be36 | 2012-06-15 07:38:23 | [diff] [blame] | 495 | // Initializes the root window and root window controller so that it |
[email protected] | 756bda1 | 2013-07-03 08:17:06 | [diff] [blame] | 496 | // can host browser windows. |first_run_after_boot| is true for the |
| 497 | // primary display only first time after boot. |
| 498 | void InitRootWindowController(internal::RootWindowController* root, |
| 499 | bool first_run_after_boot); |
[email protected] | d90b839 | 2012-06-13 09:34:56 | [diff] [blame] | 500 | |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 501 | // ash::internal::SystemModalContainerEventFilterDelegate overrides: |
| 502 | virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
| 503 | |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 504 | // Overridden from ui::EventTarget: |
[email protected] | 869f635 | 2012-12-06 20:47:17 | [diff] [blame] | 505 | virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 506 | virtual EventTarget* GetParentTarget() OVERRIDE; |
[email protected] | 049cf34b | 2012-12-07 17:15:48 | [diff] [blame] | 507 | virtual void OnEvent(ui::Event* event) OVERRIDE; |
[email protected] | 5097e69 | 2012-10-30 22:08:41 | [diff] [blame] | 508 | |
[email protected] | 1ae36165 | 2012-12-12 22:39:51 | [diff] [blame] | 509 | // Overridden from aura::client::ActivationChangeObserver: |
| 510 | virtual void OnWindowActivated(aura::Window* gained_active, |
| 511 | aura::Window* lost_active) OVERRIDE; |
| 512 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 513 | static Shell* instance_; |
| 514 | |
[email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 515 | // If set before the Shell is initialized, the mouse cursor will be hidden |
| 516 | // when the screen is initially created. |
| 517 | static bool initially_hide_cursor_; |
| 518 | |
[email protected] | b0a8faa | 2012-10-19 03:22:22 | [diff] [blame] | 519 | ScreenAsh* screen_; |
[email protected] | 58482fa | 2012-03-02 14:57:39 | [diff] [blame] | 520 | |
[email protected] | b42910f | 2013-08-01 11:45:29 | [diff] [blame] | 521 | // When no explicit target display/RootWindow is given, new windows are |
| 522 | // created on |scoped_target_root_window_| , unless NULL in |
| 523 | // which case they are created on |target_root_window_|. |
| 524 | // |target_root_window_| never becomes NULL during the session. |
| 525 | aura::RootWindow* target_root_window_; |
| 526 | aura::RootWindow* scoped_target_root_window_; |
[email protected] | a857dbe | 2012-05-30 22:10:14 | [diff] [blame] | 527 | |
[email protected] | 1aad332 | 2012-06-06 06:37:09 | [diff] [blame] | 528 | // The CompoundEventFilter owned by aura::Env object. |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 529 | scoped_ptr<views::corewm::CompoundEventFilter> env_filter_; |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 530 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 531 | std::vector<WindowAndBoundsPair> to_restore_; |
| 532 | |
[email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 533 | scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 534 | scoped_ptr<AcceleratorController> accelerator_controller_; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 535 | scoped_ptr<ShellDelegate> delegate_; |
[email protected] | 51ed599 | 2012-11-07 10:14:39 | [diff] [blame] | 536 | scoped_ptr<SystemTrayDelegate> system_tray_delegate_; |
[email protected] | 83b2b84c | 2012-11-14 01:11:00 | [diff] [blame] | 537 | scoped_ptr<SystemTrayNotifier> system_tray_notifier_; |
[email protected] | 10b2261 | 2012-03-22 17:07:55 | [diff] [blame] | 538 | scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; |
[email protected] | f4c92b38 | 2012-08-28 00:59:59 | [diff] [blame] | 539 | scoped_ptr<CapsLockDelegate> caps_lock_delegate_; |
[email protected] | fcb123d | 2013-04-17 15:58:49 | [diff] [blame] | 540 | scoped_ptr<SessionStateDelegate> session_state_delegate_; |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [diff] [blame] | 541 | scoped_ptr<LauncherDelegate> launcher_delegate_; |
[email protected] | cc29ba1 | 2013-08-28 05:22:34 | [diff] [blame] | 542 | scoped_ptr<LauncherItemDelegateManager> launcher_item_delegate_manager_; |
[email protected] | 976624f | 2013-09-19 21:58:49 | [diff] [blame] | 543 | scoped_ptr<internal::AppListShelfItemDelegate> |
| 544 | app_list_shelf_item_delegate_; |
[email protected] | b913a3a | 2012-12-11 13:07:19 | [diff] [blame] | 545 | |
| 546 | scoped_ptr<LauncherModel> launcher_model_; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 547 | |
[email protected] | 0039db9 | 2012-05-09 04:11:45 | [diff] [blame] | 548 | scoped_ptr<internal::AppListController> app_list_controller_; |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 549 | |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 550 | scoped_ptr<internal::DragDropController> drag_drop_controller_; |
[email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 551 | scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; |
[email protected] | 86f2b5e | 2012-11-14 20:37:00 | [diff] [blame] | 552 | scoped_ptr<views::corewm::ShadowController> shadow_controller_; |
[email protected] | b5756e2 | 2012-11-30 01:32:02 | [diff] [blame] | 553 | scoped_ptr<views::corewm::VisibilityController> visibility_controller_; |
[email protected] | 0c2dc01 | 2012-12-02 00:00:23 | [diff] [blame] | 554 | scoped_ptr<views::corewm::WindowModalityController> |
| 555 | window_modality_controller_; |
[email protected] | a1b7a82 | 2013-02-23 19:08:04 | [diff] [blame] | 556 | scoped_ptr<views::corewm::TooltipController> tooltip_controller_; |
[email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 557 | scoped_ptr<DesktopBackgroundController> desktop_background_controller_; |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 558 | scoped_ptr<PowerButtonController> power_button_controller_; |
[email protected] | ab4f8c9 | 2013-05-30 19:07:47 | [diff] [blame] | 559 | scoped_ptr<LockStateController> lock_state_controller_; |
[email protected] | 66c5c411 | 2013-07-31 07:10:59 | [diff] [blame] | 560 | scoped_ptr<MruWindowTracker> mru_window_tracker_; |
[email protected] | c16b942 | 2012-06-06 21:51:11 | [diff] [blame] | 561 | scoped_ptr<UserActivityDetector> user_activity_detector_; |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 562 | scoped_ptr<VideoDetector> video_detector_; |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 563 | scoped_ptr<WindowCycleController> window_cycle_controller_; |
[email protected] | d24ce2c | 2013-08-01 15:14:19 | [diff] [blame] | 564 | scoped_ptr<WindowSelectorController> window_selector_controller_; |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 565 | scoped_ptr<internal::FocusCycler> focus_cycler_; |
[email protected] | edbfb8d | 2012-09-03 08:33:43 | [diff] [blame] | 566 | scoped_ptr<DisplayController> display_controller_; |
[email protected] | f48075d | 2012-05-24 11:06:51 | [diff] [blame] | 567 | scoped_ptr<HighContrastController> high_contrast_controller_; |
[email protected] | 77f7c13 | 2012-11-15 06:52:54 | [diff] [blame] | 568 | scoped_ptr<MagnificationController> magnification_controller_; |
| 569 | scoped_ptr<PartialMagnificationController> partial_magnification_controller_; |
[email protected] | 8cfb672 | 2012-11-28 03:28:46 | [diff] [blame] | 570 | scoped_ptr<aura::client::FocusClient> focus_client_; |
[email protected] | c2885361 | 2012-05-31 22:43:44 | [diff] [blame] | 571 | scoped_ptr<aura::client::UserActionClient> user_action_client_; |
[email protected] | 39718b5 | 2012-12-03 17:24:56 | [diff] [blame] | 572 | aura::client::ActivationClient* activation_client_; |
[email protected] | 78d9630 | 2012-06-22 00:58:07 | [diff] [blame] | 573 | scoped_ptr<internal::MouseCursorEventFilter> mouse_cursor_filter_; |
[email protected] | 8d625fb | 2012-07-18 16:40:06 | [diff] [blame] | 574 | scoped_ptr<internal::ScreenPositionController> screen_position_controller_; |
[email protected] | c0ce80e | 2012-10-05 23:28:27 | [diff] [blame] | 575 | scoped_ptr<internal::SystemModalContainerEventFilter> modality_filter_; |
[email protected] | e67291f1 | 2012-10-10 05:52:38 | [diff] [blame] | 576 | scoped_ptr<internal::EventClientImpl> event_client_; |
[email protected] | 682990f | 2013-01-10 06:49:11 | [diff] [blame] | 577 | scoped_ptr<internal::EventTransformationHandler> |
| 578 | event_transformation_handler_; |
[email protected] | fca90ea | 2012-12-14 04:13:30 | [diff] [blame] | 579 | scoped_ptr<RootWindowHostFactory> root_window_host_factory_; |
[email protected] | ae18b911 | 2011-11-07 16:59:13 | [diff] [blame] | 580 | |
[email protected] | b9d224c | 2012-07-13 01:09:03 | [diff] [blame] | 581 | // An event filter that rewrites or drops an event. |
| 582 | scoped_ptr<internal::EventRewriterEventFilter> event_rewriter_filter_; |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 583 | |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 584 | // An event filter that pre-handles key events while the partial |
[email protected] | a1584a71 | 2012-07-30 21:02:26 | [diff] [blame] | 585 | // screenshot UI or the keyboard overlay is active. |
[email protected] | 9ae32df | 2012-07-26 03:25:18 | [diff] [blame] | 586 | scoped_ptr<internal::OverlayEventFilter> overlay_filter_; |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 587 | |
[email protected] | 435b212e | 2012-04-05 19:43:37 | [diff] [blame] | 588 | // An event filter which handles system level gestures |
| 589 | scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_; |
| 590 | |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 591 | // An event filter that pre-handles global accelerators. |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 592 | scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 593 | |
[email protected] | 42f06f9 | 2012-03-27 00:57:57 | [diff] [blame] | 594 | // An event filter that pre-handles all key events to send them to an IME. |
[email protected] | 4a59e4e | 2012-11-12 21:15:40 | [diff] [blame] | 595 | scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_; |
[email protected] | 42f06f9 | 2012-03-27 00:57:57 | [diff] [blame] | 596 | |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 597 | scoped_ptr<internal::DisplayManager> display_manager_; |
| 598 | |
[email protected] | a9a4046 | 2013-07-31 06:22:56 | [diff] [blame] | 599 | scoped_ptr<internal::LocaleNotificationController> |
| 600 | locale_notification_controller_; |
| 601 | |
[email protected] | 117542c | 2013-04-30 20:27:21 | [diff] [blame] | 602 | #if defined(OS_CHROMEOS) && defined(USE_X11) |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 603 | // Controls video output device state. |
| 604 | scoped_ptr<chromeos::OutputConfigurator> output_configurator_; |
[email protected] | 196e945 | 2012-08-01 06:42:51 | [diff] [blame] | 605 | scoped_ptr<internal::OutputConfiguratorAnimation> |
| 606 | output_configurator_animation_; |
[email protected] | 18b21b2e | 2013-03-01 20:56:23 | [diff] [blame] | 607 | scoped_ptr<internal::DisplayErrorObserver> display_error_observer_; |
[email protected] | 6bdf795 | 2012-11-14 10:10:58 | [diff] [blame] | 608 | |
[email protected] | c1234a4 | 2013-08-20 09:35:40 | [diff] [blame] | 609 | // Listens for output changes and updates the display manager. |
| 610 | scoped_ptr<internal::DisplayChangeObserver> display_change_observer_; |
[email protected] | 117542c | 2013-04-30 20:27:21 | [diff] [blame] | 611 | #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
[email protected] | 70b3e7d5 | 2012-06-02 22:12:25 | [diff] [blame] | 612 | |
[email protected] | 6ef71d7 | 2013-08-10 18:13:44 | [diff] [blame] | 613 | scoped_ptr<internal::ResolutionNotificationController> |
| 614 | resolution_notification_controller_; |
| 615 | |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 616 | // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a |
| 617 | // pointer to vend to test code. |
| 618 | AshNativeCursorManager* native_cursor_manager_; |
| 619 | views::corewm::CursorManager cursor_manager_; |
[email protected] | 4b8003c | 2012-07-26 00:54:19 | [diff] [blame] | 620 | |
[email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 621 | ObserverList<ShellObserver> observers_; |
| 622 | |
[email protected] | fa4a4583 | 2012-04-12 21:32:48 | [diff] [blame] | 623 | // Used by ash/shell. |
| 624 | content::BrowserContext* browser_context_; |
| 625 | |
[email protected] | 852a55d | 2012-10-17 13:30:30 | [diff] [blame] | 626 | // For testing only: simulate that a modal window is open |
| 627 | bool simulate_modal_window_open_for_testing_; |
| 628 | |
[email protected] | 2b8a9bb | 2013-07-01 22:43:40 | [diff] [blame] | 629 | bool is_touch_hud_projection_enabled_; |
| 630 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 631 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 632 | }; |
| 633 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 634 | } // namespace ash |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 635 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 636 | #endif // ASH_SHELL_H_ |