blob: bb712a4bfcf525a7267b622454f0c95bd97f05c5 [file] [log] [blame]
[email protected]e0d22e82012-01-04 00:46:571// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]87b0d82e2011-10-07 21:02:592// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]b65bdda2011-12-23 23:35:315#ifndef ASH_SHELL_H_
6#define ASH_SHELL_H_
[email protected]87b0d82e2011-10-07 21:02:597
[email protected]cac10fc62011-10-07 23:22:568#include <utility>
9#include <vector>
10
[email protected]b65bdda2011-12-23 23:35:3111#include "ash/ash_export.h"
[email protected]82d3954ae2012-04-20 09:02:2212#include "ash/system/user/login_status.h"
[email protected]4b8003c2012-07-26 00:54:1913#include "ash/wm/cursor_delegate.h"
14#include "ash/wm/cursor_manager.h"
[email protected]812d3d42012-06-27 19:35:3115#include "ash/wm/shelf_types.h"
[email protected]87b0d82e2011-10-07 21:02:5916#include "base/basictypes.h"
[email protected]c45fdc72012-02-22 22:59:1217#include "base/compiler_specific.h"
[email protected]b0639282011-12-22 21:12:2718#include "base/gtest_prod_util.h"
[email protected]2b99f8c2011-10-11 19:42:2419#include "base/memory/scoped_ptr.h"
[email protected]1a2145b2012-03-13 21:09:1720#include "base/observer_list.h"
[email protected]2eb6b892012-05-31 13:28:2121#include "ui/gfx/insets.h"
[email protected]9ec0f452012-05-31 15:58:5322#include "ui/gfx/size.h"
[email protected]87b0d82e2011-10-07 21:02:5923
[email protected]b0639282011-12-22 21:12:2724class CommandLine;
25
[email protected]87b0d82e2011-10-07 21:02:5926namespace aura {
[email protected]e29014c2011-11-16 18:25:5127class EventFilter;
[email protected]a857dbe2012-05-30 22:10:1428class FocusManager;
[email protected]35304ce2011-12-14 23:21:0129class RootWindow;
[email protected]87b0d82e2011-10-07 21:02:5930class Window;
[email protected]c28853612012-05-31 22:43:4431namespace client {
32class UserActionClient;
33}
[email protected]0e46c272012-05-15 18:15:2334namespace shared {
[email protected]1aad3322012-06-06 06:37:0935class CompoundEventFilter;
[email protected]0e46c272012-05-15 18:15:2336class InputMethodEventFilter;
[email protected]0e46c272012-05-15 18:15:2337}
[email protected]87b0d82e2011-10-07 21:02:5938}
[email protected]70b3e7d52012-06-02 22:12:2539namespace chromeos {
40class OutputConfigurator;
41}
[email protected]fa4a45832012-04-12 21:32:4842namespace content {
43class BrowserContext;
44}
45
[email protected]2b99f8c2011-10-11 19:42:2446namespace gfx {
[email protected]9ec0f452012-05-31 15:58:5347class ImageSkia;
[email protected]b5f30602012-01-30 15:16:5748class Point;
[email protected]cac10fc62011-10-07 23:22:5649class Rect;
50}
[email protected]a8bd1cb2012-02-17 23:05:5451namespace ui {
52class Layer;
53}
[email protected]57b8bb352012-01-11 05:11:4654namespace views {
55class NonClientFrameView;
56class Widget;
57}
[email protected]87b0d82e2011-10-07 21:02:5958
[email protected]55f593352011-12-24 05:42:4659namespace ash {
[email protected]87b0d82e2011-10-07 21:02:5960
[email protected]2f744282011-12-23 22:40:5261class AcceleratorController;
[email protected]e70cf0ed2012-03-15 16:24:4762class DesktopBackgroundController;
[email protected]f48075d2012-05-24 11:06:5163class HighContrastController;
[email protected]671a2ae2011-10-13 21:53:2364class Launcher;
[email protected]8f80db0f2012-02-07 14:44:5365class NestedDispatcherController;
[email protected]e0d22e82012-01-04 00:46:5766class PowerButtonController;
[email protected]1a2145b2012-03-13 21:09:1767class ScreenAsh;
[email protected]2b99f8c2011-10-11 19:42:2468class ShellDelegate;
[email protected]1a2145b2012-03-13 21:09:1769class ShellObserver;
[email protected]bfb411312012-02-27 20:59:2770class SystemTrayDelegate;
71class SystemTray;
[email protected]c16b9422012-06-06 21:51:1172class UserActivityDetector;
[email protected]10b22612012-03-22 17:07:5573class UserWallpaperDelegate;
[email protected]6aa614a2012-01-19 22:13:3874class VideoDetector;
[email protected]40c4cbb2012-01-10 23:26:0775class WindowCycleController;
[email protected]60fa9bba2011-10-28 21:21:5176
77namespace internal {
[email protected]2f744282011-12-23 22:40:5278class AcceleratorFilter;
[email protected]0039db92012-05-09 04:11:4579class ActivationController;
80class AppListController;
[email protected]60a978b72012-06-08 00:29:1881class CaptureController;
[email protected]9ae32df2012-07-26 03:25:1882class DisplayController;
[email protected]084b6bb2011-11-17 05:18:1683class DragDropController;
[email protected]b9d224c2012-07-13 01:09:0384class EventRewriterEventFilter;
[email protected]3d29912a2012-02-07 07:41:5185class FocusCycler;
[email protected]c1c670172012-04-26 04:20:2686class MagnificationController;
[email protected]78d96302012-06-22 00:58:0787class MouseCursorEventFilter;
[email protected]196e9452012-08-01 06:42:5188class OutputConfiguratorAnimation;
[email protected]9ae32df2012-07-26 03:25:1889class OverlayEventFilter;
[email protected]7cf8dd62012-04-22 05:14:5890class PanelLayoutManager;
[email protected]e4a181cc2012-03-17 02:20:5791class ResizeShadowController;
[email protected]d90b8392012-06-13 09:34:5692class RootWindowController;
[email protected]b0079a92012-01-25 20:13:3893class RootWindowLayoutManager;
[email protected]8d625fb2012-07-18 16:40:0694class ScreenPositionController;
[email protected]a54e65b2011-11-21 22:03:3495class ShadowController;
[email protected]4e437632012-02-13 22:39:4096class ShelfLayoutManager;
[email protected]0cfc18e2012-04-11 18:17:4797class ShellContextMenu;
[email protected]9861f1752012-06-01 07:16:1498class SlowAnimationEventFilter;
[email protected]ee1e1a22011-12-15 01:51:1099class StackingController;
[email protected]6d6546e2012-05-30 23:12:02100class StatusAreaWidget;
[email protected]9ae32df2012-07-26 03:25:18101class SystemGestureEventFilter;
[email protected]862deef2011-12-15 22:07:33102class TooltipController;
[email protected]73074742012-05-17 01:44:41103class TouchObserverHUD;
[email protected]ddd91e92012-01-27 16:03:48104class VisibilityController;
[email protected]80373572012-01-06 23:14:30105class WindowModalityController;
[email protected]60fa9bba2011-10-28 21:21:51106class WorkspaceController;
107}
[email protected]2b99f8c2011-10-11 19:42:24108
[email protected]87b0d82e2011-10-07 21:02:59109// Shell is a singleton object that presents the Shell API and implements the
[email protected]99f07e02011-12-07 00:02:59110// RootWindow's delegate interface.
[email protected]b0079a92012-01-25 20:13:38111//
112// Upon creation, the Shell sets itself as the RootWindow's delegate, which
113// takes ownership of the Shell.
[email protected]4b8003c2012-07-26 00:54:19114class ASH_EXPORT Shell : ash::CursorDelegate {
[email protected]87b0d82e2011-10-07 21:02:59115 public:
[email protected]be65be362012-06-15 07:38:23116 typedef std::vector<aura::RootWindow*> RootWindowList;
117 typedef std::vector<internal::RootWindowController*> RootWindowControllerList;
118
[email protected]3d29912a2012-02-07 07:41:51119 enum Direction {
120 FORWARD,
121 BACKWARD
122 };
123
[email protected]2b4cd302012-02-24 20:21:13124 // Accesses private data from a Shell for testing.
125 class ASH_EXPORT TestApi {
126 public:
127 explicit TestApi(Shell* shell);
128
[email protected]2b4cd302012-02-24 20:21:13129 internal::RootWindowLayoutManager* root_window_layout();
[email protected]0e46c272012-05-15 18:15:23130 aura::shared::InputMethodEventFilter* input_method_event_filter();
[email protected]435b212e2012-04-05 19:43:37131 internal::SystemGestureEventFilter* system_gesture_event_filter();
[email protected]db9131602012-02-29 19:06:32132 internal::WorkspaceController* workspace_controller();
[email protected]2b4cd302012-02-24 20:21:13133
134 private:
135 Shell* shell_; // not owned
136
137 DISALLOW_COPY_AND_ASSIGN(TestApi);
138 };
139
[email protected]3266c2b92011-11-14 00:06:08140 // 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]cac10fc62011-10-07 23:22:56145 static Shell* GetInstance();
[email protected]3266c2b92011-11-14 00:06:08146
[email protected]b3b7bcd2012-03-06 19:35:45147 // Returns true if the ash shell has been instantiated.
148 static bool HasInstance();
149
[email protected]ef589af2011-12-03 01:07:15150 static void DeleteInstance();
[email protected]cac10fc62011-10-07 23:22:56151
[email protected]d90b8392012-06-13 09:34:56152 // Returns the root window controller for the primary root window.
153 static internal::RootWindowController* GetPrimaryRootWindowController();
154
[email protected]be65be362012-06-15 07:38:23155 // Returns all root window controllers. In non extended desktop
156 // mode, this return a RootWindowController for the primary root window only.
157 static RootWindowControllerList GetAllRootWindowControllers();
158
159 // Returns the primary RootWindow. The primary RootWindow is the one
[email protected]42713f72012-05-25 00:41:50160 // that has a launcher.
161 static aura::RootWindow* GetPrimaryRootWindow();
[email protected]e73bd7802012-02-17 20:10:34162
[email protected]be65be362012-06-15 07:38:23163 // Returns the active RootWindow. The active RootWindow is the one that
[email protected]a857dbe2012-05-30 22:10:14164 // contains the current active window as a decendant child. The active
165 // RootWindow remains the same even when the active window becomes NULL,
166 // until the another window who has a different root window becomes active.
167 static aura::RootWindow* GetActiveRootWindow();
168
[email protected]be65be362012-06-15 07:38:23169 // Returns all root windows. In non extended desktop mode, this
170 // returns the primary root window only.
171 static RootWindowList GetAllRootWindows();
172
[email protected]7b0f7502012-06-11 00:12:39173 static aura::Window* GetContainer(aura::RootWindow* root_window,
174 int container_id);
175
176 // Returns the list of containers that match |container_id| in
177 // all root windows.
178 static std::vector<aura::Window*> GetAllContainers(int container_id);
179
[email protected]a857dbe2012-05-30 22:10:14180 void set_active_root_window(aura::RootWindow* active_root_window) {
181 active_root_window_ = active_root_window;
182 }
183
[email protected]1aad3322012-06-06 06:37:09184 // Adds or removes |filter| from the aura::Env's CompoundEventFilter.
185 void AddEnvEventFilter(aura::EventFilter* filter);
186 void RemoveEnvEventFilter(aura::EventFilter* filter);
187 size_t GetEnvEventFilterCount() const;
[email protected]e29014c2011-11-16 18:25:51188
[email protected]b5f30602012-01-30 15:16:57189 // Shows the background menu over |widget|.
190 void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location);
[email protected]cac10fc62011-10-07 23:22:56191
[email protected]ae4987d2011-11-21 22:52:44192 // Toggles app list.
193 void ToggleAppList();
194
[email protected]7510d1082012-03-30 21:58:34195 // Returns app list target visibility.
196 bool GetAppListTargetVisibility() const;
197
[email protected]1e51a9d2012-04-09 23:31:11198 // Returns app list window or NULL if it is not visible.
199 aura::Window* GetAppListWindow();
200
[email protected]f7eb89c2011-12-13 09:48:54201 // Returns true if the screen is locked.
202 bool IsScreenLocked() const;
203
[email protected]40c4cbb2012-01-10 23:26:07204 // Returns true if a modal dialog window is currently open.
205 bool IsModalWindowOpen() const;
206
[email protected]57b8bb352012-01-11 05:11:46207 // Creates a default views::NonClientFrameView for use by windows in the
208 // Ash environment.
209 views::NonClientFrameView* CreateDefaultNonClientFrameView(
210 views::Widget* widget);
211
[email protected]d9456cb2012-03-21 16:41:04212 // Rotates focus through containers that can receive focus.
[email protected]3d29912a2012-02-07 07:41:51213 void RotateFocus(Direction direction);
214
[email protected]2e236a52012-06-27 22:21:47215 // Sets the work area insets of the display that contains |window|,
[email protected]8a45c972012-03-14 18:22:44216 // this notifies observers too.
[email protected]27f6af62012-03-21 05:34:40217 // TODO(sky): this no longer really replicates what happens and is unreliable.
218 // Remove this.
[email protected]2e236a52012-06-27 22:21:47219 void SetDisplayWorkAreaInsets(aura::Window* window,
[email protected]8a45c972012-03-14 18:22:44220 const gfx::Insets& insets);
[email protected]1a2145b2012-03-13 21:09:17221
[email protected]82d3954ae2012-04-20 09:02:22222 // Called when the user logs in.
223 void OnLoginStateChanged(user::LoginStatus status);
224
225 // Called when the application is exiting.
226 void OnAppTerminating();
227
228 // Called when the screen is locked (after the lock window is visible) or
229 // unlocked.
230 void OnLockStateChanged(bool locked);
231
[email protected]d9456cb2012-03-21 16:41:04232 // Initializes |launcher_|. Does nothing if it's already initialized.
233 void CreateLauncher();
234
[email protected]7e1df2f62012-07-19 19:17:18235 // Show launcher view if it was created hidden (before session has started).
236 void ShowLauncher();
237
[email protected]d9456cb2012-03-21 16:41:04238 // Adds/removes observer.
[email protected]1a2145b2012-03-13 21:09:17239 void AddShellObserver(ShellObserver* observer);
240 void RemoveShellObserver(ShellObserver* observer);
241
[email protected]6e9f6aa2012-02-09 04:16:20242#if !defined(OS_MACOSX)
[email protected]2f744282011-12-23 22:40:52243 AcceleratorController* accelerator_controller() {
[email protected]745816be2011-11-22 05:08:30244 return accelerator_controller_.get();
245 }
[email protected]6e9f6aa2012-02-09 04:16:20246#endif // !defined(OS_MACOSX)
247
[email protected]1aad3322012-06-06 06:37:09248 aura::shared::CompoundEventFilter* env_filter() {
249 return env_filter_;
[email protected]627a62f2012-02-14 22:59:14250 }
[email protected]862deef2011-12-15 22:07:33251 internal::TooltipController* tooltip_controller() {
252 return tooltip_controller_.get();
[email protected]4a229e902011-12-01 21:21:11253 }
[email protected]b9d224c2012-07-13 01:09:03254 internal::EventRewriterEventFilter* event_rewriter_filter() {
255 return event_rewriter_filter_.get();
[email protected]42f06f92012-03-27 00:57:57256 }
[email protected]9ae32df2012-07-26 03:25:18257 internal::OverlayEventFilter* overlay_filter() {
258 return overlay_filter_.get();
[email protected]0b0b0742012-02-16 13:23:45259 }
[email protected]e70cf0ed2012-03-15 16:24:47260 DesktopBackgroundController* desktop_background_controller() {
261 return desktop_background_controller_.get();
262 }
[email protected]e0d22e82012-01-04 00:46:57263 PowerButtonController* power_button_controller() {
264 return power_button_controller_.get();
265 }
[email protected]c16b9422012-06-06 21:51:11266 UserActivityDetector* user_activity_detector() {
267 return user_activity_detector_.get();
268 }
[email protected]6aa614a2012-01-19 22:13:38269 VideoDetector* video_detector() {
270 return video_detector_.get();
271 }
[email protected]40c4cbb2012-01-10 23:26:07272 WindowCycleController* window_cycle_controller() {
273 return window_cycle_controller_.get();
274 }
[email protected]2d511542012-03-07 09:13:34275 internal::FocusCycler* focus_cycler() {
276 return focus_cycler_.get();
277 }
[email protected]2e236a52012-06-27 22:21:47278 internal::DisplayController* display_controller() {
279 return display_controller_.get();
[email protected]3e1cdd312012-06-07 03:48:41280 }
[email protected]4b8003c2012-07-26 00:54:19281 CursorManager* cursor_manager() { return &cursor_manager_; }
[email protected]4a229e902011-12-01 21:21:11282
[email protected]3266c2b92011-11-14 00:06:08283 ShellDelegate* delegate() { return delegate_.get(); }
[email protected]aa54218b2012-06-12 16:51:42284
[email protected]10b22612012-03-22 17:07:55285 UserWallpaperDelegate* user_wallpaper_delegate() {
286 return user_wallpaper_delegate_.get();
287 }
[email protected]35304ce2011-12-14 23:21:01288
[email protected]f48075d2012-05-24 11:06:51289 HighContrastController* high_contrast_controller() {
290 return high_contrast_controller_.get();
291 }
292
[email protected]c1c670172012-04-26 04:20:26293 internal::MagnificationController* magnification_controller() {
294 return magnification_controller_.get();
295 }
[email protected]f48075d2012-05-24 11:06:51296
[email protected]671a2ae2011-10-13 21:53:23297 Launcher* launcher() { return launcher_.get(); }
298
[email protected]1a2145b2012-03-13 21:09:17299 const ScreenAsh* screen() { return screen_; }
300
[email protected]c758fbf2012-03-25 22:53:59301 // Force the shelf to query for it's current visibility state.
302 void UpdateShelfVisibility();
303
[email protected]09f3fc82012-03-26 23:26:56304 // Sets/gets the shelf auto-hide behavior.
305 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior);
306 ShelfAutoHideBehavior GetShelfAutoHideBehavior() const;
[email protected]c758fbf2012-03-25 22:53:59307
[email protected]55444502012-05-10 15:43:53308 void SetShelfAlignment(ShelfAlignment alignment);
309 ShelfAlignment GetShelfAlignment();
310
[email protected]d90b8392012-06-13 09:34:56311 // Dims or undims the screen.
312 void SetDimming(bool should_dim);
313
[email protected]c758fbf2012-03-25 22:53:59314 // TODO(sky): don't expose this!
[email protected]4e437632012-02-13 22:39:40315 internal::ShelfLayoutManager* shelf() const { return shelf_; }
316
[email protected]6d6546e2012-05-30 23:12:02317 internal::StatusAreaWidget* status_area_widget() const {
318 return status_area_widget_;
319 }
320
[email protected]aa54218b2012-06-12 16:51:42321 // Convenience accessor for members of StatusAreaWidget.
322 SystemTrayDelegate* tray_delegate();
323 SystemTray* system_tray();
[email protected]bfb411312012-02-27 20:59:27324
[email protected]85d43f02012-03-14 21:11:19325 // Returns the size of the grid.
326 int GetGridSize() const;
327
[email protected]9488d4d2012-02-29 18:32:37328 static void set_initially_hide_cursor(bool hide) {
329 initially_hide_cursor_ = hide;
330 }
331
[email protected]e4a181cc2012-03-17 02:20:57332 internal::ResizeShadowController* resize_shadow_controller() {
333 return resize_shadow_controller_.get();
334 }
335
[email protected]a54e65b2011-11-21 22:03:34336 // Made available for tests.
337 internal::ShadowController* shadow_controller() {
338 return shadow_controller_.get();
339 }
340
[email protected]fa4a45832012-04-12 21:32:48341 content::BrowserContext* browser_context() { return browser_context_; }
342 void set_browser_context(content::BrowserContext* browser_context) {
343 browser_context_ = browser_context;
344 }
345
[email protected]2e236a52012-06-27 22:21:47346 // Initializes the root window to be used for a secondary display.
347 void InitRootWindowForSecondaryDisplay(aura::RootWindow* root);
[email protected]a857dbe2012-05-30 22:10:14348
[email protected]70b3e7d52012-06-02 22:12:25349#if defined(OS_CHROMEOS)
350 chromeos::OutputConfigurator* output_configurator() {
351 return output_configurator_.get();
352 }
[email protected]196e9452012-08-01 06:42:51353 internal::OutputConfiguratorAnimation* output_configurator_animation() {
354 return output_configurator_animation_.get();
355 }
[email protected]70b3e7d52012-06-02 22:12:25356#endif // defined(OS_CHROMEOS)
357
[email protected]2b4cd302012-02-24 20:21:13358 private:
[email protected]c39be8f2012-06-15 22:58:36359 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
[email protected]1aad3322012-06-06 06:37:09360 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
361 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
[email protected]d90b8392012-06-13 09:34:56362 friend class internal::RootWindowController;
[email protected]ad0c8722012-03-02 20:17:45363
[email protected]cac10fc62011-10-07 23:22:56364 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
365
[email protected]3266c2b92011-11-14 00:06:08366 explicit Shell(ShellDelegate* delegate);
367 virtual ~Shell();
368
369 void Init();
[email protected]b0639282011-12-22 21:12:27370
[email protected]be65be362012-06-15 07:38:23371 // Initializes the root window and root window controller so that it
372 // can host browser windows.
373 void InitRootWindowController(internal::RootWindowController* root);
[email protected]d90b8392012-06-13 09:34:56374
375 // Initializes the layout managers and event filters specific for
376 // primary display.
377 void InitLayoutManagersForPrimaryDisplay(
378 internal::RootWindowController* root_window_controller);
[email protected]1b62b892012-01-17 17:08:15379
[email protected]ad0c8722012-03-02 20:17:45380 // Disables the workspace grid layout.
381 void DisableWorkspaceGridLayout();
382
[email protected]1aad3322012-06-06 06:37:09383 // aura::CursorManager::Delegate overrides:
384 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
385 virtual void ShowCursor(bool visible) OVERRIDE;
386
[email protected]cac10fc62011-10-07 23:22:56387 static Shell* instance_;
388
[email protected]9488d4d2012-02-29 18:32:37389 // If set before the Shell is initialized, the mouse cursor will be hidden
390 // when the screen is initially created.
391 static bool initially_hide_cursor_;
392
[email protected]1a2145b2012-03-13 21:09:17393 ScreenAsh* screen_;
[email protected]58482fa2012-03-02 14:57:39394
[email protected]f634dd32012-07-23 22:49:07395 // Active root window. Never becomes NULL during the session.
[email protected]a857dbe2012-05-30 22:10:14396 aura::RootWindow* active_root_window_;
397
[email protected]1aad3322012-06-06 06:37:09398 // The CompoundEventFilter owned by aura::Env object.
399 aura::shared::CompoundEventFilter* env_filter_;
[email protected]627a62f2012-02-14 22:59:14400
[email protected]cac10fc62011-10-07 23:22:56401 std::vector<WindowAndBoundsPair> to_restore_;
402
[email protected]6e9f6aa2012-02-09 04:16:20403#if !defined(OS_MACOSX)
[email protected]8f80db0f2012-02-07 14:44:53404 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
405
[email protected]2f744282011-12-23 22:40:52406 scoped_ptr<AcceleratorController> accelerator_controller_;
[email protected]6e9f6aa2012-02-09 04:16:20407#endif // !defined(OS_MACOSX)
[email protected]745816be2011-11-22 05:08:30408
[email protected]2b99f8c2011-10-11 19:42:24409 scoped_ptr<ShellDelegate> delegate_;
[email protected]10b22612012-03-22 17:07:55410 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
[email protected]2b99f8c2011-10-11 19:42:24411
[email protected]671a2ae2011-10-13 21:53:23412 scoped_ptr<Launcher> launcher_;
413
[email protected]0039db92012-05-09 04:11:45414 scoped_ptr<internal::AppListController> app_list_controller_;
[email protected]ae4987d2011-11-21 22:52:44415
[email protected]0cfc18e2012-04-11 18:17:47416 scoped_ptr<internal::ShellContextMenu> shell_context_menu_;
[email protected]ee1e1a22011-12-15 01:51:10417 scoped_ptr<internal::StackingController> stacking_controller_;
[email protected]9fc206d2011-12-13 00:05:33418 scoped_ptr<internal::ActivationController> activation_controller_;
[email protected]60a978b72012-06-08 00:29:18419 scoped_ptr<internal::CaptureController> capture_controller_;
[email protected]80373572012-01-06 23:14:30420 scoped_ptr<internal::WindowModalityController> window_modality_controller_;
[email protected]084b6bb2011-11-17 05:18:16421 scoped_ptr<internal::DragDropController> drag_drop_controller_;
[email protected]e4a181cc2012-03-17 02:20:57422 scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_;
[email protected]a54e65b2011-11-21 22:03:34423 scoped_ptr<internal::ShadowController> shadow_controller_;
[email protected]862deef2011-12-15 22:07:33424 scoped_ptr<internal::TooltipController> tooltip_controller_;
[email protected]ddd91e92012-01-27 16:03:48425 scoped_ptr<internal::VisibilityController> visibility_controller_;
[email protected]e70cf0ed2012-03-15 16:24:47426 scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
[email protected]e0d22e82012-01-04 00:46:57427 scoped_ptr<PowerButtonController> power_button_controller_;
[email protected]c16b9422012-06-06 21:51:11428 scoped_ptr<UserActivityDetector> user_activity_detector_;
[email protected]6aa614a2012-01-19 22:13:38429 scoped_ptr<VideoDetector> video_detector_;
[email protected]40c4cbb2012-01-10 23:26:07430 scoped_ptr<WindowCycleController> window_cycle_controller_;
[email protected]3d29912a2012-02-07 07:41:51431 scoped_ptr<internal::FocusCycler> focus_cycler_;
[email protected]2e236a52012-06-27 22:21:47432 scoped_ptr<internal::DisplayController> display_controller_;
[email protected]f48075d2012-05-24 11:06:51433 scoped_ptr<HighContrastController> high_contrast_controller_;
[email protected]c1c670172012-04-26 04:20:26434 scoped_ptr<internal::MagnificationController> magnification_controller_;
[email protected]a857dbe2012-05-30 22:10:14435 scoped_ptr<aura::FocusManager> focus_manager_;
[email protected]c28853612012-05-31 22:43:44436 scoped_ptr<aura::client::UserActionClient> user_action_client_;
[email protected]78d96302012-06-22 00:58:07437 scoped_ptr<internal::MouseCursorEventFilter> mouse_cursor_filter_;
[email protected]8d625fb2012-07-18 16:40:06438 scoped_ptr<internal::ScreenPositionController> screen_position_controller_;
[email protected]ae18b9112011-11-07 16:59:13439
[email protected]b9d224c2012-07-13 01:09:03440 // An event filter that rewrites or drops an event.
441 scoped_ptr<internal::EventRewriterEventFilter> event_rewriter_filter_;
[email protected]6e9f6aa2012-02-09 04:16:20442
[email protected]0b0b0742012-02-16 13:23:45443 // An event filter that pre-handles key events while the partial
[email protected]a1584a712012-07-30 21:02:26444 // screenshot UI or the keyboard overlay is active.
[email protected]9ae32df2012-07-26 03:25:18445 scoped_ptr<internal::OverlayEventFilter> overlay_filter_;
[email protected]0b0b0742012-02-16 13:23:45446
[email protected]435b212e2012-04-05 19:43:37447 // An event filter which handles system level gestures
448 scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_;
449
[email protected]6e9f6aa2012-02-09 04:16:20450#if !defined(OS_MACOSX)
[email protected]745816be2011-11-22 05:08:30451 // An event filter that pre-handles global accelerators.
[email protected]2f744282011-12-23 22:40:52452 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_;
[email protected]6e9f6aa2012-02-09 04:16:20453#endif
[email protected]745816be2011-11-22 05:08:30454
[email protected]42f06f92012-03-27 00:57:57455 // An event filter that pre-handles all key events to send them to an IME.
[email protected]0e46c272012-05-15 18:15:23456 scoped_ptr<aura::shared::InputMethodEventFilter> input_method_filter_;
[email protected]42f06f92012-03-27 00:57:57457
[email protected]73074742012-05-17 01:44:41458 // An event filter that silently keeps track of all touch events and controls
459 // a heads-up display. This is enabled only if --ash-touch-hud flag is used.
460 scoped_ptr<internal::TouchObserverHUD> touch_observer_hud_;
461
[email protected]70b3e7d52012-06-02 22:12:25462#if defined(OS_CHROMEOS)
463 // Controls video output device state.
464 scoped_ptr<chromeos::OutputConfigurator> output_configurator_;
[email protected]196e9452012-08-01 06:42:51465 scoped_ptr<internal::OutputConfiguratorAnimation>
466 output_configurator_animation_;
[email protected]70b3e7d52012-06-02 22:12:25467#endif // defined(OS_CHROMEOS)
468
[email protected]4b8003c2012-07-26 00:54:19469 CursorManager cursor_manager_;
470
[email protected]4e437632012-02-13 22:39:40471 // The shelf for managing the launcher and the status widget in non-compact
472 // mode. Shell does not own the shelf. Instead, it is owned by container of
473 // the status area.
474 internal::ShelfLayoutManager* shelf_;
475
[email protected]7cf8dd62012-04-22 05:14:58476 // Manages layout of panels. Owned by PanelContainer.
477 internal::PanelLayoutManager* panel_layout_manager_;
478
[email protected]1a2145b2012-03-13 21:09:17479 ObserverList<ShellObserver> observers_;
480
[email protected]6d6546e2012-05-30 23:12:02481 // Widget containing system tray.
482 internal::StatusAreaWidget* status_area_widget_;
483
[email protected]fa4a45832012-04-12 21:32:48484 // Used by ash/shell.
485 content::BrowserContext* browser_context_;
486
[email protected]87b0d82e2011-10-07 21:02:59487 DISALLOW_COPY_AND_ASSIGN(Shell);
488};
489
[email protected]55f593352011-12-24 05:42:46490} // namespace ash
[email protected]87b0d82e2011-10-07 21:02:59491
[email protected]b65bdda2011-12-23 23:35:31492#endif // ASH_SHELL_H_