| [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 | #pragma once |
| 8 | |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 9 | #include <utility> |
| 10 | #include <vector> |
| 11 | |
| [email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 12 | #include "ash/ash_export.h" |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 13 | #include "base/basictypes.h" |
| [email protected] | c45fdc7 | 2012-02-22 22:59:12 | [diff] [blame] | 14 | #include "base/compiler_specific.h" |
| [email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 15 | #include "base/gtest_prod_util.h" |
| [email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 16 | #include "base/memory/scoped_ptr.h" |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 17 | #include "base/observer_list.h" |
| [email protected] | 0c4011b | 2012-02-11 02:10:42 | [diff] [blame] | 18 | #include "ui/gfx/size.h" |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 19 | #include "ui/gfx/insets.h" |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 20 | |
| [email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 21 | class CommandLine; |
| [email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 22 | class SkBitmap; |
| [email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 23 | |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 24 | namespace aura { |
| [email protected] | e29014c | 2011-11-16 18:25:51 | [diff] [blame] | 25 | class EventFilter; |
| [email protected] | e050ef14 | 2012-03-21 01:04:24 | [diff] [blame] | 26 | class Monitor; |
| [email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 27 | class RootWindow; |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 28 | class Window; |
| 29 | } |
| [email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 30 | namespace gfx { |
| [email protected] | b5f3060 | 2012-01-30 15:16:57 | [diff] [blame] | 31 | class Point; |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 32 | class Rect; |
| 33 | } |
| [email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 34 | namespace ui { |
| 35 | class Layer; |
| 36 | } |
| [email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 37 | namespace views { |
| 38 | class NonClientFrameView; |
| 39 | class Widget; |
| 40 | } |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 41 | |
| [email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 42 | namespace ash { |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 43 | |
| [email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 44 | class AcceleratorController; |
| [email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 45 | class DesktopBackgroundController; |
| [email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 46 | class Launcher; |
| [email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 47 | class NestedDispatcherController; |
| [email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 48 | class PowerButtonController; |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 49 | class ScreenAsh; |
| [email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 50 | class ShellDelegate; |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 51 | class ShellObserver; |
| [email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 52 | class SystemTrayDelegate; |
| 53 | class SystemTray; |
| [email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 54 | class VideoDetector; |
| [email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 55 | class WindowCycleController; |
| [email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 56 | |
| 57 | namespace internal { |
| [email protected] | 9fc206d | 2011-12-13 00:05:33 | [diff] [blame] | 58 | class ActivationController; |
| [email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 59 | class AcceleratorFilter; |
| [email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 60 | class AppList; |
| [email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 61 | class DragDropController; |
| [email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 62 | class FocusCycler; |
| [email protected] | 2c45610 | 2011-12-26 06:26:34 | [diff] [blame] | 63 | class InputMethodEventFilter; |
| [email protected] | e050ef14 | 2012-03-21 01:04:24 | [diff] [blame] | 64 | class MonitorController; |
| [email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 65 | class PartialScreenshotEventFilter; |
| [email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 66 | class ResizeShadowController; |
| [email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 67 | class RootWindowEventFilter; |
| [email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 68 | class RootWindowLayoutManager; |
| [email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 69 | class ShadowController; |
| [email protected] | 4e43763 | 2012-02-13 22:39:40 | [diff] [blame] | 70 | class ShelfLayoutManager; |
| [email protected] | ee1e1a2 | 2011-12-15 01:51:10 | [diff] [blame] | 71 | class StackingController; |
| [email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 72 | class TooltipController; |
| [email protected] | ddd91e9 | 2012-01-27 16:03:48 | [diff] [blame] | 73 | class VisibilityController; |
| [email protected] | 8037357 | 2012-01-06 23:14:30 | [diff] [blame] | 74 | class WindowModalityController; |
| [email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 75 | class WorkspaceController; |
| 76 | } |
| [email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 77 | |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 78 | // Shell is a singleton object that presents the Shell API and implements the |
| [email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 79 | // RootWindow's delegate interface. |
| [email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 80 | // |
| 81 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 82 | // takes ownership of the Shell. |
| [email protected] | e050ef14 | 2012-03-21 01:04:24 | [diff] [blame] | 83 | class ASH_EXPORT Shell { |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 84 | public: |
| [email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 85 | enum Direction { |
| 86 | FORWARD, |
| 87 | BACKWARD |
| 88 | }; |
| 89 | |
| [email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 90 | // Accesses private data from a Shell for testing. |
| 91 | class ASH_EXPORT TestApi { |
| 92 | public: |
| 93 | explicit TestApi(Shell* shell); |
| 94 | |
| [email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 95 | internal::RootWindowLayoutManager* root_window_layout(); |
| [email protected] | db913160 | 2012-02-29 19:06:32 | [diff] [blame] | 96 | internal::InputMethodEventFilter* input_method_event_filter(); |
| 97 | internal::WorkspaceController* workspace_controller(); |
| [email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 98 | |
| 99 | private: |
| 100 | Shell* shell_; // not owned |
| 101 | |
| 102 | DISALLOW_COPY_AND_ASSIGN(TestApi); |
| 103 | }; |
| 104 | |
| [email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 105 | // A shell must be explicitly created so that it can call |Init()| with the |
| 106 | // delegate set. |delegate| can be NULL (if not required for initialization). |
| 107 | static Shell* CreateInstance(ShellDelegate* delegate); |
| 108 | |
| 109 | // Should never be called before |CreateInstance()|. |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 110 | static Shell* GetInstance(); |
| [email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 111 | |
| [email protected] | b3b7bcd | 2012-03-06 19:35:45 | [diff] [blame] | 112 | // Returns true if the ash shell has been instantiated. |
| 113 | static bool HasInstance(); |
| 114 | |
| [email protected] | ef589af | 2011-12-03 01:07:15 | [diff] [blame] | 115 | static void DeleteInstance(); |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 116 | |
| [email protected] | 63ef2159 | 2012-03-21 01:15:40 | [diff] [blame] | 117 | // Get the singleton RootWindow used by the Shell. |
| [email protected] | e73bd780 | 2012-02-17 20:10:34 | [diff] [blame] | 118 | static aura::RootWindow* GetRootWindow(); |
| 119 | |
| [email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 120 | internal::RootWindowLayoutManager* root_window_layout() const { |
| 121 | return root_window_layout_; |
| [email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 122 | } |
| 123 | |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 124 | aura::Window* GetContainer(int container_id); |
| 125 | const aura::Window* GetContainer(int container_id) const; |
| 126 | |
| [email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 127 | // Adds or removes |filter| from the RootWindowEventFilter. |
| 128 | void AddRootWindowEventFilter(aura::EventFilter* filter); |
| 129 | void RemoveRootWindowEventFilter(aura::EventFilter* filter); |
| [email protected] | 2c45610 | 2011-12-26 06:26:34 | [diff] [blame] | 130 | size_t GetRootWindowEventFilterCount() const; |
| [email protected] | e29014c | 2011-11-16 18:25:51 | [diff] [blame] | 131 | |
| [email protected] | b5f3060 | 2012-01-30 15:16:57 | [diff] [blame] | 132 | // Shows the background menu over |widget|. |
| 133 | void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location); |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 134 | |
| [email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 135 | // Toggles app list. |
| 136 | void ToggleAppList(); |
| 137 | |
| [email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 138 | // Returns true if the screen is locked. |
| 139 | bool IsScreenLocked() const; |
| 140 | |
| [email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 141 | // Returns true if a modal dialog window is currently open. |
| 142 | bool IsModalWindowOpen() const; |
| 143 | |
| [email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 144 | // Creates a default views::NonClientFrameView for use by windows in the |
| 145 | // Ash environment. |
| 146 | views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 147 | views::Widget* widget); |
| 148 | |
| [email protected] | 63ef2159 | 2012-03-21 01:15:40 | [diff] [blame] | 149 | // Rotate focus through containers that can receive focus. |
| [email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 150 | void RotateFocus(Direction direction); |
| 151 | |
| [email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 152 | // Sets the work area insets of the monitor that contains |window|, |
| 153 | // this notifies observers too. |
| [email protected] | 27f6af6 | 2012-03-21 05:34:40 | [diff] [blame^] | 154 | // TODO(sky): this no longer really replicates what happens and is unreliable. |
| 155 | // Remove this. |
| [email protected] | 8a45c97 | 2012-03-14 18:22:44 | [diff] [blame] | 156 | void SetMonitorWorkAreaInsets(aura::Window* window, |
| 157 | const gfx::Insets& insets); |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 158 | |
| [email protected] | 63ef2159 | 2012-03-21 01:15:40 | [diff] [blame] | 159 | // Add/remove observer. |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 160 | void AddShellObserver(ShellObserver* observer); |
| 161 | void RemoveShellObserver(ShellObserver* observer); |
| 162 | |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 163 | #if !defined(OS_MACOSX) |
| [email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 164 | AcceleratorController* accelerator_controller() { |
| [email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 165 | return accelerator_controller_.get(); |
| 166 | } |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 167 | #endif // !defined(OS_MACOSX) |
| 168 | |
| [email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 169 | internal::RootWindowEventFilter* root_filter() { |
| 170 | return root_filter_; |
| 171 | } |
| [email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 172 | internal::TooltipController* tooltip_controller() { |
| 173 | return tooltip_controller_.get(); |
| [email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 174 | } |
| [email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 175 | internal::PartialScreenshotEventFilter* partial_screenshot_filter() { |
| 176 | return partial_screenshot_filter_.get(); |
| 177 | } |
| [email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 178 | DesktopBackgroundController* desktop_background_controller() { |
| 179 | return desktop_background_controller_.get(); |
| 180 | } |
| [email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 181 | PowerButtonController* power_button_controller() { |
| 182 | return power_button_controller_.get(); |
| 183 | } |
| [email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 184 | VideoDetector* video_detector() { |
| 185 | return video_detector_.get(); |
| 186 | } |
| [email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 187 | WindowCycleController* window_cycle_controller() { |
| 188 | return window_cycle_controller_.get(); |
| 189 | } |
| [email protected] | 2d51154 | 2012-03-07 09:13:34 | [diff] [blame] | 190 | internal::FocusCycler* focus_cycler() { |
| 191 | return focus_cycler_.get(); |
| 192 | } |
| [email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 193 | |
| [email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 194 | ShellDelegate* delegate() { return delegate_.get(); } |
| [email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 195 | SystemTrayDelegate* tray_delegate() { return tray_delegate_.get(); } |
| [email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 196 | |
| [email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 197 | Launcher* launcher() { return launcher_.get(); } |
| 198 | |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 199 | const ScreenAsh* screen() { return screen_; } |
| 200 | |
| [email protected] | 4e43763 | 2012-02-13 22:39:40 | [diff] [blame] | 201 | internal::ShelfLayoutManager* shelf() const { return shelf_; } |
| 202 | |
| [email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 203 | SystemTray* tray() const { return tray_.get(); } |
| 204 | |
| [email protected] | 85d43f0 | 2012-03-14 21:11:19 | [diff] [blame] | 205 | // Returns the size of the grid. |
| 206 | int GetGridSize() const; |
| 207 | |
| [email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 208 | static void set_initially_hide_cursor(bool hide) { |
| 209 | initially_hide_cursor_ = hide; |
| 210 | } |
| 211 | |
| [email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 212 | internal::ResizeShadowController* resize_shadow_controller() { |
| 213 | return resize_shadow_controller_.get(); |
| 214 | } |
| 215 | |
| [email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 216 | // Made available for tests. |
| 217 | internal::ShadowController* shadow_controller() { |
| 218 | return shadow_controller_.get(); |
| 219 | } |
| 220 | |
| [email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame] | 221 | private: |
| [email protected] | ad0c872 | 2012-03-02 20:17:45 | [diff] [blame] | 222 | FRIEND_TEST_ALL_PREFIXES(RootWindowEventFilterTest, MouseEventCursors); |
| 223 | FRIEND_TEST_ALL_PREFIXES(RootWindowEventFilterTest, TransformActivate); |
| 224 | |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 225 | typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
| 226 | |
| [email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 227 | explicit Shell(ShellDelegate* delegate); |
| 228 | virtual ~Shell(); |
| 229 | |
| 230 | void Init(); |
| [email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 231 | |
| [email protected] | c73d133 | 2012-03-08 17:11:04 | [diff] [blame] | 232 | // Initializes the layout managers and event filters. |
| 233 | void InitLayoutManagers(); |
| [email protected] | 1b62b89 | 2012-01-17 17:08:15 | [diff] [blame] | 234 | |
| [email protected] | ad0c872 | 2012-03-02 20:17:45 | [diff] [blame] | 235 | // Disables the workspace grid layout. |
| 236 | void DisableWorkspaceGridLayout(); |
| 237 | |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 238 | static Shell* instance_; |
| 239 | |
| [email protected] | 9488d4d | 2012-02-29 18:32:37 | [diff] [blame] | 240 | // If set before the Shell is initialized, the mouse cursor will be hidden |
| 241 | // when the screen is initially created. |
| 242 | static bool initially_hide_cursor_; |
| 243 | |
| [email protected] | 58482fa | 2012-03-02 14:57:39 | [diff] [blame] | 244 | scoped_ptr<aura::RootWindow> root_window_; |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 245 | ScreenAsh* screen_; |
| [email protected] | 58482fa | 2012-03-02 14:57:39 | [diff] [blame] | 246 | |
| [email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 247 | internal::RootWindowEventFilter* root_filter_; // not owned |
| 248 | |
| [email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 249 | std::vector<WindowAndBoundsPair> to_restore_; |
| 250 | |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 251 | #if !defined(OS_MACOSX) |
| [email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 252 | scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; |
| 253 | |
| [email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 254 | scoped_ptr<AcceleratorController> accelerator_controller_; |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 255 | #endif // !defined(OS_MACOSX) |
| [email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 256 | |
| [email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 257 | scoped_ptr<ShellDelegate> delegate_; |
| [email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 258 | scoped_ptr<SystemTrayDelegate> tray_delegate_; |
| [email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 259 | |
| [email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 260 | scoped_ptr<Launcher> launcher_; |
| 261 | |
| [email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 262 | scoped_ptr<internal::AppList> app_list_; |
| 263 | |
| [email protected] | ee1e1a2 | 2011-12-15 01:51:10 | [diff] [blame] | 264 | scoped_ptr<internal::StackingController> stacking_controller_; |
| [email protected] | 9fc206d | 2011-12-13 00:05:33 | [diff] [blame] | 265 | scoped_ptr<internal::ActivationController> activation_controller_; |
| [email protected] | 8037357 | 2012-01-06 23:14:30 | [diff] [blame] | 266 | scoped_ptr<internal::WindowModalityController> window_modality_controller_; |
| [email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 267 | scoped_ptr<internal::DragDropController> drag_drop_controller_; |
| [email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 268 | scoped_ptr<internal::WorkspaceController> workspace_controller_; |
| [email protected] | e4a181cc | 2012-03-17 02:20:57 | [diff] [blame] | 269 | scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; |
| [email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 270 | scoped_ptr<internal::ShadowController> shadow_controller_; |
| [email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 271 | scoped_ptr<internal::TooltipController> tooltip_controller_; |
| [email protected] | ddd91e9 | 2012-01-27 16:03:48 | [diff] [blame] | 272 | scoped_ptr<internal::VisibilityController> visibility_controller_; |
| [email protected] | e70cf0ed | 2012-03-15 16:24:47 | [diff] [blame] | 273 | scoped_ptr<DesktopBackgroundController> desktop_background_controller_; |
| [email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 274 | scoped_ptr<PowerButtonController> power_button_controller_; |
| [email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 275 | scoped_ptr<VideoDetector> video_detector_; |
| [email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 276 | scoped_ptr<WindowCycleController> window_cycle_controller_; |
| [email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 277 | scoped_ptr<internal::FocusCycler> focus_cycler_; |
| [email protected] | e050ef14 | 2012-03-21 01:04:24 | [diff] [blame] | 278 | scoped_ptr<internal::MonitorController> monitor_controller_; |
| [email protected] | ae18b911 | 2011-11-07 16:59:13 | [diff] [blame] | 279 | |
| [email protected] | 2c45610 | 2011-12-26 06:26:34 | [diff] [blame] | 280 | // An event filter that pre-handles all key events to send them to an IME. |
| 281 | scoped_ptr<internal::InputMethodEventFilter> input_method_filter_; |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 282 | |
| [email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 283 | // An event filter that pre-handles key events while the partial |
| 284 | // screenshot UI is active. |
| 285 | scoped_ptr<internal::PartialScreenshotEventFilter> partial_screenshot_filter_; |
| 286 | |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 287 | #if !defined(OS_MACOSX) |
| [email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 288 | // An event filter that pre-handles global accelerators. |
| [email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 289 | scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; |
| [email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 290 | #endif |
| [email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 291 | |
| [email protected] | 4e43763 | 2012-02-13 22:39:40 | [diff] [blame] | 292 | // The shelf for managing the launcher and the status widget in non-compact |
| 293 | // mode. Shell does not own the shelf. Instead, it is owned by container of |
| 294 | // the status area. |
| 295 | internal::ShelfLayoutManager* shelf_; |
| 296 | |
| [email protected] | 1a2145b | 2012-03-13 21:09:17 | [diff] [blame] | 297 | ObserverList<ShellObserver> observers_; |
| 298 | |
| [email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 299 | // Owned by aura::RootWindow, cached here for type safety. |
| 300 | internal::RootWindowLayoutManager* root_window_layout_; |
| 301 | |
| 302 | // Status area with clock, Wi-Fi signal, etc. |
| 303 | views::Widget* status_widget_; |
| 304 | |
| [email protected] | bfb41131 | 2012-02-27 20:59:27 | [diff] [blame] | 305 | // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for |
| 306 | // |status_widget_|). |
| 307 | scoped_ptr<SystemTray> tray_; |
| 308 | |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 309 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 310 | }; |
| 311 | |
| [email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 312 | } // namespace ash |
| [email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 313 | |
| [email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 314 | #endif // ASH_SHELL_H_ |