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