aw: Avoid leaking GL error across android and chromium
[chromium-blink-merge.git] / ash / shell.h
blobe889131b95beca21793ddde3e57a98c6cf693080
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_SHELL_H_
6 #define ASH_SHELL_H_
8 #include <utility>
9 #include <vector>
11 #include "ash/ash_export.h"
12 #include "ash/metrics/user_metrics_recorder.h"
13 #include "ash/shelf/shelf_types.h"
14 #include "ash/system/user/login_status.h"
15 #include "ash/wm/cursor_manager_chromeos.h"
16 #include "ash/wm/system_modal_container_event_filter_delegate.h"
17 #include "base/basictypes.h"
18 #include "base/compiler_specific.h"
19 #include "base/gtest_prod_util.h"
20 #include "base/memory/scoped_ptr.h"
21 #include "base/memory/weak_ptr.h"
22 #include "base/observer_list.h"
23 #include "ui/aura/window.h"
24 #include "ui/base/ui_base_types.h"
25 #include "ui/events/event_target.h"
26 #include "ui/gfx/insets.h"
27 #include "ui/gfx/screen.h"
28 #include "ui/gfx/size.h"
29 #include "ui/wm/core/cursor_manager.h"
30 #include "ui/wm/public/activation_change_observer.h"
32 namespace app_list {
33 class AppListView;
35 namespace aura {
36 class EventFilter;
37 class RootWindow;
38 class Window;
39 namespace client {
40 class ActivationClient;
41 class FocusClient;
45 namespace gfx {
46 class ImageSkia;
47 class Point;
48 class Rect;
51 namespace ui {
52 class DisplayConfigurator;
53 class Layer;
54 class UserActivityPowerManagerNotifier;
56 namespace views {
57 class NonClientFrameView;
58 class Widget;
59 namespace corewm {
60 class TooltipController;
64 namespace wm {
65 class CompoundEventFilter;
66 class InputMethodEventFilter;
67 class ShadowController;
68 class VisibilityController;
69 class UserActivityDetector;
70 class WindowModalityController;
73 namespace ash {
75 class AcceleratorController;
76 class AccelerometerController;
77 class AcceleratorFilter;
78 class AccessibilityDelegate;
79 class AppListController;
80 class AshNativeCursorManager;
81 class AutoclickController;
82 class BluetoothNotificationController;
83 class CaptureController;
84 class DesktopBackgroundController;
85 class DisplayChangeObserver;
86 class DisplayConfiguratorAnimation;
87 class DisplayController;
88 class DisplayErrorObserver;
89 class DisplayManager;
90 class DragDropController;
91 class EventClientImpl;
92 class EventRewriterEventFilter;
93 class EventTransformationHandler;
94 class FirstRunHelper;
95 class FocusCycler;
96 class GPUSupport;
97 class HighContrastController;
98 class KeyboardUMAEventFilter;
99 class LastWindowClosedLogoutReminder;
100 class LocaleNotificationController;
101 class LockStateController;
102 class LogoutConfirmationController;
103 class MagnificationController;
104 class MaximizeModeController;
105 class MaximizeModeWindowManager;
106 class MediaDelegate;
107 class MouseCursorEventFilter;
108 class MruWindowTracker;
109 class NestedDispatcherController;
110 class NewWindowDelegate;
111 class OverlayEventFilter;
112 class PartialMagnificationController;
113 class PowerButtonController;
114 class PowerEventObserver;
115 class ProjectingObserver;
116 class ResizeShadowController;
117 class ResolutionNotificationController;
118 class RootWindowController;
119 class ScopedTargetRootWindow;
120 class ScreenAsh;
121 class ScreenPositionController;
122 class SessionStateDelegate;
123 class Shelf;
124 class ShelfDelegate;
125 class ShelfItemDelegateManager;
126 class ShelfModel;
127 class ShelfWindowWatcher;
128 class ShellDelegate;
129 struct ShellInitParams;
130 class ShellObserver;
131 class SlowAnimationEventFilter;
132 class StatusAreaWidget;
133 class StickyKeysController;
134 class SystemGestureEventFilter;
135 class SystemModalContainerEventFilter;
136 class SystemTray;
137 class SystemTrayDelegate;
138 class SystemTrayNotifier;
139 class ToplevelWindowEventHandler;
140 class TouchTransformerController;
141 class TouchObserverHUD;
142 class UserActivityDetector;
143 class UserWallpaperDelegate;
144 class VideoActivityNotifier;
145 class VideoDetector;
146 class WebNotificationTray;
147 class WindowCycleController;
148 class WindowPositioner;
149 class WindowSelectorController;
151 namespace shell {
152 class WindowWatcher;
155 namespace test {
156 class ShellTestApi;
159 // Shell is a singleton object that presents the Shell API and implements the
160 // RootWindow's delegate interface.
162 // Upon creation, the Shell sets itself as the RootWindow's delegate, which
163 // takes ownership of the Shell.
164 class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
165 public ui::EventTarget,
166 public aura::client::ActivationChangeObserver {
167 public:
168 typedef std::vector<RootWindowController*> RootWindowControllerList;
170 enum Direction {
171 FORWARD,
172 BACKWARD
175 // A shell must be explicitly created so that it can call |Init()| with the
176 // delegate set. |delegate| can be NULL (if not required for initialization).
177 // Takes ownership of |delegate|.
178 static Shell* CreateInstance(const ShellInitParams& init_params);
180 // Should never be called before |CreateInstance()|.
181 static Shell* GetInstance();
183 // Returns true if the ash shell has been instantiated.
184 static bool HasInstance();
186 static void DeleteInstance();
188 // Returns the root window controller for the primary root window.
189 // TODO(oshima): move this to |RootWindowController|
190 static RootWindowController* GetPrimaryRootWindowController();
192 // Returns all root window controllers.
193 // TODO(oshima): move this to |RootWindowController|
194 static RootWindowControllerList GetAllRootWindowControllers();
196 // Returns the primary root Window. The primary root Window is the one that
197 // has a launcher.
198 static aura::Window* GetPrimaryRootWindow();
200 // Returns a root Window when used as a target when creating a new window.
201 // The root window of the active window is used in most cases, but can
202 // be overridden by using ScopedTargetRootWindow().
203 // If you want to get the root Window of the active window, just use
204 // |wm::GetActiveWindow()->GetRootWindow()|.
205 static aura::Window* GetTargetRootWindow();
207 // Returns the global Screen object that's always active in ash.
208 static gfx::Screen* GetScreen();
210 // Returns all root windows.
211 static aura::Window::Windows GetAllRootWindows();
213 static aura::Window* GetContainer(aura::Window* root_window,
214 int container_id);
215 static const aura::Window* GetContainer(const aura::Window* root_window,
216 int container_id);
218 // Returns the list of containers that match |container_id| in
219 // all root windows. If |priority_root| is given, the container
220 // in the |priority_root| will be inserted at the top of the list.
221 static std::vector<aura::Window*> GetContainersFromAllRootWindows(
222 int container_id,
223 aura::Window* priority_root);
225 void set_target_root_window(aura::Window* target_root_window) {
226 target_root_window_ = target_root_window;
229 // Shows the context menu for the background and launcher at
230 // |location_in_screen| (in screen coordinates).
231 void ShowContextMenu(const gfx::Point& location_in_screen,
232 ui::MenuSourceType source_type);
234 // Toggles the app list. |window| specifies in which display the app
235 // list should be shown. If this is NULL, the active root window
236 // will be used.
237 void ToggleAppList(aura::Window* anchor);
239 // Returns app list target visibility.
240 bool GetAppListTargetVisibility() const;
242 // Returns app list window or NULL if it is not visible.
243 aura::Window* GetAppListWindow();
245 // Returns app list view or NULL if it is not visible.
246 app_list::AppListView* GetAppListView();
248 // Returns true if a system-modal dialog window is currently open.
249 bool IsSystemModalWindowOpen() const;
251 // For testing only: set simulation that a modal window is open
252 void SimulateModalWindowOpenForTesting(bool modal_window_open) {
253 simulate_modal_window_open_for_testing_ = modal_window_open;
256 // Creates a default views::NonClientFrameView for use by windows in the
257 // Ash environment.
258 views::NonClientFrameView* CreateDefaultNonClientFrameView(
259 views::Widget* widget);
261 // Rotates focus through containers that can receive focus.
262 void RotateFocus(Direction direction);
264 // Sets the work area insets of the display that contains |window|,
265 // this notifies observers too.
266 // TODO(sky): this no longer really replicates what happens and is unreliable.
267 // Remove this.
268 void SetDisplayWorkAreaInsets(aura::Window* window,
269 const gfx::Insets& insets);
271 // Called when the user logs in.
272 void OnLoginStateChanged(user::LoginStatus status);
274 // Called after the logged-in user's profile is ready.
275 void OnLoginUserProfilePrepared();
277 // Called when the login status changes.
278 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
279 void UpdateAfterLoginStatusChange(user::LoginStatus status);
281 // Called when the application is exiting.
282 void OnAppTerminating();
284 // Called when the screen is locked (after the lock window is visible) or
285 // unlocked.
286 void OnLockStateChanged(bool locked);
288 // Called when a casting session is started or stopped.
289 void OnCastingSessionStartedOrStopped(bool started);
291 // Called when the overview mode is about to be started (before the windows
292 // get re-arranged).
293 void OnOverviewModeStarting();
295 // Called before the overview mode is ending (before the windows get arranged
296 // to their final position).
297 void OnOverviewModeEnding();
299 // Called after maximize mode has started, windows might still animate though.
300 void OnMaximizeModeStarted();
302 // Called after maximize mode has ended, windows might still be returning to
303 // their original position.
304 void OnMaximizeModeEnded();
306 // Called when a root window is created.
307 void OnRootWindowAdded(aura::Window* root_window);
309 // Initializes |shelf_|. Does nothing if it's already initialized.
310 void CreateShelf();
312 // Called when the shelf is created for |root_window|.
313 void OnShelfCreatedForRootWindow(aura::Window* root_window);
315 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
316 // exists.
317 void CreateKeyboard();
319 // Deactivates the virtual keyboard.
320 void DeactivateKeyboard();
322 // Show shelf view if it was created hidden (before session has started).
323 void ShowShelf();
325 // Adds/removes observer.
326 void AddShellObserver(ShellObserver* observer);
327 void RemoveShellObserver(ShellObserver* observer);
329 // Turn the always maximize mode window manager on or off.
330 void EnableMaximizeModeWindowManager(bool enable);
332 // Test if the MaximizeModeWindowManager is enabled or not.
333 bool IsMaximizeModeWindowManagerEnabled();
335 AcceleratorController* accelerator_controller() {
336 return accelerator_controller_.get();
339 DisplayManager* display_manager() { return display_manager_.get(); }
340 ::wm::InputMethodEventFilter* input_method_filter() {
341 return input_method_filter_.get();
343 ::wm::CompoundEventFilter* env_filter() {
344 return env_filter_.get();
346 views::corewm::TooltipController* tooltip_controller() {
347 return tooltip_controller_.get();
349 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
350 DesktopBackgroundController* desktop_background_controller() {
351 return desktop_background_controller_.get();
353 PowerButtonController* power_button_controller() {
354 return power_button_controller_.get();
356 LockStateController* lock_state_controller() {
357 return lock_state_controller_.get();
359 MruWindowTracker* mru_window_tracker() {
360 return mru_window_tracker_.get();
362 ::wm::UserActivityDetector* user_activity_detector() {
363 return user_activity_detector_.get();
365 VideoDetector* video_detector() {
366 return video_detector_.get();
368 WindowCycleController* window_cycle_controller() {
369 return window_cycle_controller_.get();
371 WindowSelectorController* window_selector_controller() {
372 return window_selector_controller_.get();
374 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
375 DisplayController* display_controller() {
376 return display_controller_.get();
378 #if defined(OS_CHROMEOS) && defined(USE_X11)
379 TouchTransformerController* touch_transformer_controller() {
380 return touch_transformer_controller_.get();
382 #endif // defined(OS_CHROMEOS) && defined(USE_X11)
383 MouseCursorEventFilter* mouse_cursor_filter() {
384 return mouse_cursor_filter_.get();
386 EventTransformationHandler* event_transformation_handler() {
387 return event_transformation_handler_.get();
389 ::wm::CursorManager* cursor_manager() { return &cursor_manager_; }
391 ShellDelegate* delegate() { return delegate_.get(); }
393 UserWallpaperDelegate* user_wallpaper_delegate() {
394 return user_wallpaper_delegate_.get();
397 SessionStateDelegate* session_state_delegate() {
398 return session_state_delegate_.get();
401 AccessibilityDelegate* accessibility_delegate() {
402 return accessibility_delegate_.get();
405 NewWindowDelegate* new_window_delegate() {
406 return new_window_delegate_.get();
409 MediaDelegate* media_delegate() {
410 return media_delegate_.get();
413 HighContrastController* high_contrast_controller() {
414 return high_contrast_controller_.get();
417 MagnificationController* magnification_controller() {
418 return magnification_controller_.get();
421 PartialMagnificationController* partial_magnification_controller() {
422 return partial_magnification_controller_.get();
425 AutoclickController* autoclick_controller() {
426 return autoclick_controller_.get();
429 aura::client::ActivationClient* activation_client() {
430 return activation_client_;
433 ShelfItemDelegateManager* shelf_item_delegate_manager() {
434 return shelf_item_delegate_manager_.get();
437 // Force the shelf to query for it's current visibility state.
438 void UpdateShelfVisibility();
440 // TODO(oshima): Define an interface to access shelf/launcher
441 // state, or just use Launcher.
443 // Sets/gets the shelf auto-hide behavior on |root_window|.
444 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
445 aura::Window* root_window);
446 ShelfAutoHideBehavior GetShelfAutoHideBehavior(
447 aura::Window* root_window) const;
449 // Sets/gets shelf's alignment on |root_window|.
450 void SetShelfAlignment(ShelfAlignment alignment,
451 aura::Window* root_window);
452 ShelfAlignment GetShelfAlignment(aura::Window* root_window);
454 // Dims or undims the screen.
455 void SetDimming(bool should_dim);
457 // Notifies |observers_| when entering or exiting fullscreen mode in
458 // |root_window|.
459 void NotifyFullscreenStateChange(bool is_fullscreen,
460 aura::Window* root_window);
462 // Creates a modal background (a partially-opaque fullscreen window)
463 // on all displays for |window|.
464 void CreateModalBackground(aura::Window* window);
466 // Called when a modal window is removed. It will activate
467 // another modal window if any, or remove modal screens
468 // on all displays.
469 void OnModalWindowRemoved(aura::Window* removed);
471 // Returns WebNotificationTray on the primary root window.
472 WebNotificationTray* GetWebNotificationTray();
474 // Does the primary display have status area?
475 bool HasPrimaryStatusArea();
477 // Returns the system tray on primary display.
478 SystemTray* GetPrimarySystemTray();
480 SystemTrayDelegate* system_tray_delegate() {
481 return system_tray_delegate_.get();
484 SystemTrayNotifier* system_tray_notifier() {
485 return system_tray_notifier_.get();
488 static void set_initially_hide_cursor(bool hide) {
489 initially_hide_cursor_ = hide;
492 ResizeShadowController* resize_shadow_controller() {
493 return resize_shadow_controller_.get();
496 // Made available for tests.
497 ::wm::ShadowController* shadow_controller() {
498 return shadow_controller_.get();
501 // Starts the animation that occurs on first login.
502 void DoInitialWorkspaceAnimation();
504 AccelerometerController* accelerometer_controller() {
505 return accelerometer_controller_.get();
508 MaximizeModeController* maximize_mode_controller() {
509 return maximize_mode_controller_.get();
512 #if defined(OS_CHROMEOS)
513 // TODO(oshima): Move these objects to DisplayController.
514 ui::DisplayConfigurator* display_configurator() {
515 return display_configurator_.get();
517 DisplayConfiguratorAnimation* display_configurator_animation() {
518 return display_configurator_animation_.get();
520 DisplayErrorObserver* display_error_observer() {
521 return display_error_observer_.get();
524 ResolutionNotificationController* resolution_notification_controller() {
525 return resolution_notification_controller_.get();
528 LogoutConfirmationController* logout_confirmation_controller() {
529 return logout_confirmation_controller_.get();
531 #endif // defined(OS_CHROMEOS)
533 ShelfModel* shelf_model() {
534 return shelf_model_.get();
537 WindowPositioner* window_positioner() {
538 return window_positioner_.get();
541 // Returns the launcher delegate, creating if necesary.
542 ShelfDelegate* GetShelfDelegate();
544 UserMetricsRecorder* metrics() {
545 return user_metrics_recorder_.get();
548 void SetTouchHudProjectionEnabled(bool enabled);
550 bool is_touch_hud_projection_enabled() const {
551 return is_touch_hud_projection_enabled_;
554 #if defined(OS_CHROMEOS)
555 // Creates instance of FirstRunHelper. Caller is responsible for deleting
556 // returned object.
557 ash::FirstRunHelper* CreateFirstRunHelper();
559 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
560 // compositing is enabled, and vice versa.
561 void SetCursorCompositingEnabled(bool enabled);
563 StickyKeysController* sticky_keys_controller() {
564 return sticky_keys_controller_.get();
566 #endif // defined(OS_CHROMEOS)
568 GPUSupport* gpu_support() { return gpu_support_.get(); }
570 private:
571 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
572 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
573 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
574 friend class RootWindowController;
575 friend class ScopedTargetRootWindow;
576 friend class test::ShellTestApi;
577 friend class shell::WindowWatcher;
579 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
581 // Takes ownership of |delegate|.
582 explicit Shell(ShellDelegate* delegate);
583 virtual ~Shell();
585 void Init(const ShellInitParams& init_params);
587 // Initializes virtual keyboard controller.
588 void InitKeyboard();
590 // Initializes the root window so that it can host browser windows.
591 void InitRootWindow(aura::Window* root_window);
593 // ash::SystemModalContainerEventFilterDelegate overrides:
594 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE;
596 // Overridden from ui::EventTarget:
597 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
598 virtual EventTarget* GetParentTarget() OVERRIDE;
599 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
600 virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
601 virtual void OnEvent(ui::Event* event) OVERRIDE;
603 // Overridden from aura::client::ActivationChangeObserver:
604 virtual void OnWindowActivated(aura::Window* gained_active,
605 aura::Window* lost_active) OVERRIDE;
607 static Shell* instance_;
609 // If set before the Shell is initialized, the mouse cursor will be hidden
610 // when the screen is initially created.
611 static bool initially_hide_cursor_;
613 // When no explicit target display/RootWindow is given, new windows are
614 // created on |scoped_target_root_window_| , unless NULL in
615 // which case they are created on |target_root_window_|.
616 // |target_root_window_| never becomes NULL during the session.
617 aura::Window* target_root_window_;
618 aura::Window* scoped_target_root_window_;
620 // The CompoundEventFilter owned by aura::Env object.
621 scoped_ptr< ::wm::CompoundEventFilter> env_filter_;
623 std::vector<WindowAndBoundsPair> to_restore_;
625 scoped_ptr<UserMetricsRecorder> user_metrics_recorder_;
626 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
627 scoped_ptr<AcceleratorController> accelerator_controller_;
628 scoped_ptr<ShellDelegate> delegate_;
629 scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
630 scoped_ptr<SystemTrayNotifier> system_tray_notifier_;
631 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
632 scoped_ptr<SessionStateDelegate> session_state_delegate_;
633 scoped_ptr<AccessibilityDelegate> accessibility_delegate_;
634 scoped_ptr<NewWindowDelegate> new_window_delegate_;
635 scoped_ptr<MediaDelegate> media_delegate_;
636 scoped_ptr<ShelfDelegate> shelf_delegate_;
637 scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
638 scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_;
640 scoped_ptr<ShelfModel> shelf_model_;
641 scoped_ptr<WindowPositioner> window_positioner_;
643 scoped_ptr<AppListController> app_list_controller_;
645 scoped_ptr<DragDropController> drag_drop_controller_;
646 scoped_ptr<ResizeShadowController> resize_shadow_controller_;
647 scoped_ptr< ::wm::ShadowController> shadow_controller_;
648 scoped_ptr< ::wm::VisibilityController> visibility_controller_;
649 scoped_ptr< ::wm::WindowModalityController> window_modality_controller_;
650 scoped_ptr<views::corewm::TooltipController> tooltip_controller_;
651 scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
652 scoped_ptr<PowerButtonController> power_button_controller_;
653 scoped_ptr<LockStateController> lock_state_controller_;
654 scoped_ptr<MruWindowTracker> mru_window_tracker_;
655 scoped_ptr< ::wm::UserActivityDetector> user_activity_detector_;
656 scoped_ptr<VideoDetector> video_detector_;
657 scoped_ptr<WindowCycleController> window_cycle_controller_;
658 scoped_ptr<WindowSelectorController> window_selector_controller_;
659 scoped_ptr<FocusCycler> focus_cycler_;
660 scoped_ptr<DisplayController> display_controller_;
661 scoped_ptr<HighContrastController> high_contrast_controller_;
662 scoped_ptr<MagnificationController> magnification_controller_;
663 scoped_ptr<PartialMagnificationController> partial_magnification_controller_;
664 scoped_ptr<AutoclickController> autoclick_controller_;
665 scoped_ptr<aura::client::FocusClient> focus_client_;
666 aura::client::ActivationClient* activation_client_;
668 scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
669 scoped_ptr<ScreenPositionController> screen_position_controller_;
670 scoped_ptr<SystemModalContainerEventFilter> modality_filter_;
671 scoped_ptr<EventClientImpl> event_client_;
672 scoped_ptr<EventTransformationHandler> event_transformation_handler_;
674 // An event filter that pre-handles key events while the partial
675 // screenshot UI or the keyboard overlay is active.
676 scoped_ptr<OverlayEventFilter> overlay_filter_;
678 // An event filter for logging keyboard-related metrics.
679 scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_;
681 // An event filter which handles moving and resizing windows.
682 scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
684 // An event filter which handles system level gestures
685 scoped_ptr<SystemGestureEventFilter> system_gesture_filter_;
687 // An event filter that pre-handles global accelerators.
688 scoped_ptr<AcceleratorFilter> accelerator_filter_;
690 // An event filter that pre-handles all key events to send them to an IME.
691 scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_;
693 scoped_ptr<DisplayManager> display_manager_;
694 scoped_ptr<base::WeakPtrFactory<DisplayManager> >
695 weak_display_manager_factory_;
697 scoped_ptr<LocaleNotificationController> locale_notification_controller_;
699 // The maximized window manager (if enabled).
700 scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_;
702 scoped_ptr<AccelerometerController> accelerometer_controller_;
704 #if defined(OS_CHROMEOS)
705 scoped_ptr<PowerEventObserver> power_event_observer_;
706 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
707 scoped_ptr<VideoActivityNotifier> video_activity_notifier_;
708 scoped_ptr<StickyKeysController> sticky_keys_controller_;
709 scoped_ptr<ResolutionNotificationController>
710 resolution_notification_controller_;
711 scoped_ptr<BluetoothNotificationController>
712 bluetooth_notification_controller_;
713 scoped_ptr<LogoutConfirmationController> logout_confirmation_controller_;
714 scoped_ptr<LastWindowClosedLogoutReminder>
715 last_window_closed_logout_reminder_;
716 // Controls video output device state.
717 scoped_ptr<ui::DisplayConfigurator> display_configurator_;
718 scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_;
719 scoped_ptr<DisplayErrorObserver> display_error_observer_;
720 scoped_ptr<ProjectingObserver> projecting_observer_;
722 // Listens for output changes and updates the display manager.
723 scoped_ptr<DisplayChangeObserver> display_change_observer_;
725 #if defined(USE_X11)
726 scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
727 scoped_ptr<ui::EventHandler> speech_feedback_handler_;
728 scoped_ptr<TouchTransformerController> touch_transformer_controller_;
729 #endif // defined(USE_X11)
730 #endif // defined(OS_CHROMEOS)
732 scoped_ptr<MaximizeModeController> maximize_mode_controller_;
734 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
735 // pointer to vend to test code.
736 AshNativeCursorManager* native_cursor_manager_;
738 // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
739 // the cursor on Windows.
740 #if defined(OS_CHROMEOS)
741 CursorManager cursor_manager_;
742 #else // !defined(OS_CHROMEOS)
743 ::wm::CursorManager cursor_manager_;
744 #endif // defined(OS_CHROMEOS)
746 ObserverList<ShellObserver> observers_;
748 // For testing only: simulate that a modal window is open
749 bool simulate_modal_window_open_for_testing_;
751 bool is_touch_hud_projection_enabled_;
753 // Injected content::GPUDataManager support.
754 scoped_ptr<GPUSupport> gpu_support_;
756 DISALLOW_COPY_AND_ASSIGN(Shell);
759 } // namespace ash
761 #endif // ASH_SHELL_H_