IDB: Show blob path on chrome://indexeddb-internals
[chromium-blink-merge.git] / ash / shell.h
blob028609705d7405ce3e6579a25f3444abdb95d0a9
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 AcceleratorFilter;
66 class CompoundEventFilter;
67 class InputMethodEventFilter;
68 class NestedAcceleratorController;
69 class ShadowController;
70 class VisibilityController;
71 class UserActivityDetector;
72 class WindowModalityController;
75 namespace ash {
77 class AcceleratorController;
78 class AccelerometerController;
79 class AccessibilityDelegate;
80 class AppListController;
81 class AshNativeCursorManager;
82 class AutoclickController;
83 class BluetoothNotificationController;
84 class CaptureController;
85 class DesktopBackgroundController;
86 class DisplayChangeObserver;
87 class DisplayConfiguratorAnimation;
88 class DisplayController;
89 class DisplayErrorObserver;
90 class DisplayManager;
91 class DragDropController;
92 class EventClientImpl;
93 class EventRewriterEventFilter;
94 class EventTransformationHandler;
95 class FirstRunHelper;
96 class FocusCycler;
97 class GPUSupport;
98 class HighContrastController;
99 class KeyboardUMAEventFilter;
100 class LastWindowClosedLogoutReminder;
101 class LocaleNotificationController;
102 class LockStateController;
103 class LogoutConfirmationController;
104 class MagnificationController;
105 class MaximizeModeController;
106 class MaximizeModeWindowManager;
107 class MediaDelegate;
108 class MouseCursorEventFilter;
109 class MruWindowTracker;
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 ScreenOrientationDelegate;
122 class ScreenPositionController;
123 class SessionStateDelegate;
124 class Shelf;
125 class ShelfDelegate;
126 class ShelfItemDelegateManager;
127 class ShelfModel;
128 class ShelfWindowWatcher;
129 class ShellDelegate;
130 struct ShellInitParams;
131 class ShellObserver;
132 class SlowAnimationEventFilter;
133 class StatusAreaWidget;
134 class StickyKeysController;
135 class SystemGestureEventFilter;
136 class SystemModalContainerEventFilter;
137 class SystemTray;
138 class SystemTrayDelegate;
139 class SystemTrayNotifier;
140 class ToplevelWindowEventHandler;
141 class TouchTransformerController;
142 class TouchObserverHUD;
143 class UserActivityDetector;
144 class UserWallpaperDelegate;
145 class VirtualKeyboardController;
146 class VideoActivityNotifier;
147 class VideoDetector;
148 class WebNotificationTray;
149 class WindowCycleController;
150 class WindowPositioner;
151 class WindowSelectorController;
153 namespace shell {
154 class WindowWatcher;
157 namespace test {
158 class ShellTestApi;
161 // Shell is a singleton object that presents the Shell API and implements the
162 // RootWindow's delegate interface.
164 // Upon creation, the Shell sets itself as the RootWindow's delegate, which
165 // takes ownership of the Shell.
166 class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
167 public ui::EventTarget,
168 public aura::client::ActivationChangeObserver {
169 public:
170 typedef std::vector<RootWindowController*> RootWindowControllerList;
172 enum Direction {
173 FORWARD,
174 BACKWARD
177 // A shell must be explicitly created so that it can call |Init()| with the
178 // delegate set. |delegate| can be NULL (if not required for initialization).
179 // Takes ownership of |delegate|.
180 static Shell* CreateInstance(const ShellInitParams& init_params);
182 // Should never be called before |CreateInstance()|.
183 static Shell* GetInstance();
185 // Returns true if the ash shell has been instantiated.
186 static bool HasInstance();
188 static void DeleteInstance();
190 // Returns the root window controller for the primary root window.
191 // TODO(oshima): move this to |RootWindowController|
192 static RootWindowController* GetPrimaryRootWindowController();
194 // Returns all root window controllers.
195 // TODO(oshima): move this to |RootWindowController|
196 static RootWindowControllerList GetAllRootWindowControllers();
198 // Returns the primary root Window. The primary root Window is the one that
199 // has a launcher.
200 static aura::Window* GetPrimaryRootWindow();
202 // Returns a root Window when used as a target when creating a new window.
203 // The root window of the active window is used in most cases, but can
204 // be overridden by using ScopedTargetRootWindow().
205 // If you want to get the root Window of the active window, just use
206 // |wm::GetActiveWindow()->GetRootWindow()|.
207 static aura::Window* GetTargetRootWindow();
209 // Returns the global Screen object that's always active in ash.
210 static gfx::Screen* GetScreen();
212 // Returns all root windows.
213 static aura::Window::Windows GetAllRootWindows();
215 static aura::Window* GetContainer(aura::Window* root_window,
216 int container_id);
217 static const aura::Window* GetContainer(const aura::Window* root_window,
218 int container_id);
220 // Returns the list of containers that match |container_id| in
221 // all root windows. If |priority_root| is given, the container
222 // in the |priority_root| will be inserted at the top of the list.
223 static std::vector<aura::Window*> GetContainersFromAllRootWindows(
224 int container_id,
225 aura::Window* priority_root);
227 void set_target_root_window(aura::Window* target_root_window) {
228 target_root_window_ = target_root_window;
231 // Shows the context menu for the background and launcher at
232 // |location_in_screen| (in screen coordinates).
233 void ShowContextMenu(const gfx::Point& location_in_screen,
234 ui::MenuSourceType source_type);
236 // Shows the app list. |window| specifies in which display the app
237 // list should be shown. If this is NULL, the active root window
238 // will be used.
239 void ShowAppList(aura::Window* anchor);
241 // Dismisses the app list.
242 void DismissAppList();
244 // Shows the app list if it's not visible. Dismisses it otherwise.
245 void ToggleAppList(aura::Window* anchor);
247 // Returns app list target visibility.
248 bool GetAppListTargetVisibility() const;
250 // Returns app list window or NULL if it is not visible.
251 aura::Window* GetAppListWindow();
253 // Returns app list view or NULL if it is not visible.
254 app_list::AppListView* GetAppListView();
256 // Returns true if a system-modal dialog window is currently open.
257 bool IsSystemModalWindowOpen() const;
259 // For testing only: set simulation that a modal window is open
260 void SimulateModalWindowOpenForTesting(bool modal_window_open) {
261 simulate_modal_window_open_for_testing_ = modal_window_open;
264 // Creates a default views::NonClientFrameView for use by windows in the
265 // Ash environment.
266 views::NonClientFrameView* CreateDefaultNonClientFrameView(
267 views::Widget* widget);
269 // Rotates focus through containers that can receive focus.
270 void RotateFocus(Direction direction);
272 // Sets the work area insets of the display that contains |window|,
273 // this notifies observers too.
274 // TODO(sky): this no longer really replicates what happens and is unreliable.
275 // Remove this.
276 void SetDisplayWorkAreaInsets(aura::Window* window,
277 const gfx::Insets& insets);
279 // Called when the user logs in.
280 void OnLoginStateChanged(user::LoginStatus status);
282 // Called after the logged-in user's profile is ready.
283 void OnLoginUserProfilePrepared();
285 // Called when the login status changes.
286 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
287 void UpdateAfterLoginStatusChange(user::LoginStatus status);
289 // Called when the application is exiting.
290 void OnAppTerminating();
292 // Called when the screen is locked (after the lock window is visible) or
293 // unlocked.
294 void OnLockStateChanged(bool locked);
296 // Called when a casting session is started or stopped.
297 void OnCastingSessionStartedOrStopped(bool started);
299 // Called when the overview mode is about to be started (before the windows
300 // get re-arranged).
301 void OnOverviewModeStarting();
303 // Called before the overview mode is ending (before the windows get arranged
304 // to their final position).
305 void OnOverviewModeEnding();
307 // Called after maximize mode has started, windows might still animate though.
308 void OnMaximizeModeStarted();
310 // Called after maximize mode has ended, windows might still be returning to
311 // their original position.
312 void OnMaximizeModeEnded();
314 // Called when a root window is created.
315 void OnRootWindowAdded(aura::Window* root_window);
317 // Initializes |shelf_|. Does nothing if it's already initialized.
318 void CreateShelf();
320 // Called when the shelf is created for |root_window|.
321 void OnShelfCreatedForRootWindow(aura::Window* root_window);
323 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
324 // exists.
325 void CreateKeyboard();
327 // Deactivates the virtual keyboard.
328 void DeactivateKeyboard();
330 // Show shelf view if it was created hidden (before session has started).
331 void ShowShelf();
333 // Adds/removes observer.
334 void AddShellObserver(ShellObserver* observer);
335 void RemoveShellObserver(ShellObserver* observer);
337 #if defined(OS_CHROMEOS)
338 // Test if MaximizeModeWindowManager is not enabled, and if
339 // MaximizeModeController is not currently setting a display rotation. Or if
340 // the |resolution_notification_controller_| is not showing its confirmation
341 // dialog. If true then changes to display settings can be saved.
342 bool ShouldSaveDisplaySettings();
343 #endif
345 AcceleratorController* accelerator_controller() {
346 return accelerator_controller_.get();
349 DisplayManager* display_manager() { return display_manager_.get(); }
350 ::wm::InputMethodEventFilter* input_method_filter() {
351 return input_method_filter_.get();
353 ::wm::CompoundEventFilter* env_filter() {
354 return env_filter_.get();
356 views::corewm::TooltipController* tooltip_controller() {
357 return tooltip_controller_.get();
359 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
360 DesktopBackgroundController* desktop_background_controller() {
361 return desktop_background_controller_.get();
363 PowerButtonController* power_button_controller() {
364 return power_button_controller_.get();
366 LockStateController* lock_state_controller() {
367 return lock_state_controller_.get();
369 MruWindowTracker* mru_window_tracker() {
370 return mru_window_tracker_.get();
372 VideoDetector* video_detector() {
373 return video_detector_.get();
375 WindowCycleController* window_cycle_controller() {
376 return window_cycle_controller_.get();
378 WindowSelectorController* window_selector_controller() {
379 return window_selector_controller_.get();
381 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
382 DisplayController* display_controller() {
383 return display_controller_.get();
385 #if defined(OS_CHROMEOS)
386 TouchTransformerController* touch_transformer_controller() {
387 return touch_transformer_controller_.get();
389 #endif // defined(OS_CHROMEOS)
390 MouseCursorEventFilter* mouse_cursor_filter() {
391 return mouse_cursor_filter_.get();
393 EventTransformationHandler* event_transformation_handler() {
394 return event_transformation_handler_.get();
396 ::wm::CursorManager* cursor_manager() { return &cursor_manager_; }
398 ShellDelegate* delegate() { return delegate_.get(); }
400 UserWallpaperDelegate* user_wallpaper_delegate() {
401 return user_wallpaper_delegate_.get();
404 SessionStateDelegate* session_state_delegate() {
405 return session_state_delegate_.get();
408 AccessibilityDelegate* accessibility_delegate() {
409 return accessibility_delegate_.get();
412 NewWindowDelegate* new_window_delegate() {
413 return new_window_delegate_.get();
416 MediaDelegate* media_delegate() {
417 return media_delegate_.get();
420 HighContrastController* high_contrast_controller() {
421 return high_contrast_controller_.get();
424 MagnificationController* magnification_controller() {
425 return magnification_controller_.get();
428 PartialMagnificationController* partial_magnification_controller() {
429 return partial_magnification_controller_.get();
432 AutoclickController* autoclick_controller() {
433 return autoclick_controller_.get();
436 aura::client::ActivationClient* activation_client() {
437 return activation_client_;
440 ShelfItemDelegateManager* shelf_item_delegate_manager() {
441 return shelf_item_delegate_manager_.get();
444 // Force the shelf to query for it's current visibility state.
445 void UpdateShelfVisibility();
447 // TODO(oshima): Define an interface to access shelf/launcher
448 // state, or just use Launcher.
450 // Sets/gets the shelf auto-hide behavior on |root_window|.
451 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
452 aura::Window* root_window);
453 ShelfAutoHideBehavior GetShelfAutoHideBehavior(
454 aura::Window* root_window) const;
456 // Sets/gets shelf's alignment on |root_window|.
457 void SetShelfAlignment(ShelfAlignment alignment,
458 aura::Window* root_window);
459 ShelfAlignment GetShelfAlignment(const aura::Window* root_window);
461 // Dims or undims the screen.
462 void SetDimming(bool should_dim);
464 // Notifies |observers_| when entering or exiting fullscreen mode in
465 // |root_window|.
466 void NotifyFullscreenStateChange(bool is_fullscreen,
467 aura::Window* root_window);
469 // Creates a modal background (a partially-opaque fullscreen window)
470 // on all displays for |window|.
471 void CreateModalBackground(aura::Window* window);
473 // Called when a modal window is removed. It will activate
474 // another modal window if any, or remove modal screens
475 // on all displays.
476 void OnModalWindowRemoved(aura::Window* removed);
478 // Returns WebNotificationTray on the primary root window.
479 WebNotificationTray* GetWebNotificationTray();
481 // Does the primary display have status area?
482 bool HasPrimaryStatusArea();
484 // Returns the system tray on primary display.
485 SystemTray* GetPrimarySystemTray();
487 SystemTrayDelegate* system_tray_delegate() {
488 return system_tray_delegate_.get();
491 SystemTrayNotifier* system_tray_notifier() {
492 return system_tray_notifier_.get();
495 static void set_initially_hide_cursor(bool hide) {
496 initially_hide_cursor_ = hide;
499 ResizeShadowController* resize_shadow_controller() {
500 return resize_shadow_controller_.get();
503 // Made available for tests.
504 ::wm::ShadowController* shadow_controller() {
505 return shadow_controller_.get();
508 // Starts the animation that occurs on first login.
509 void DoInitialWorkspaceAnimation();
511 AccelerometerController* accelerometer_controller() {
512 return accelerometer_controller_.get();
515 MaximizeModeController* maximize_mode_controller() {
516 return maximize_mode_controller_.get();
519 #if defined(OS_CHROMEOS)
520 // TODO(oshima): Move these objects to DisplayController.
521 ui::DisplayConfigurator* display_configurator() {
522 return display_configurator_.get();
524 DisplayConfiguratorAnimation* display_configurator_animation() {
525 return display_configurator_animation_.get();
527 DisplayErrorObserver* display_error_observer() {
528 return display_error_observer_.get();
531 ResolutionNotificationController* resolution_notification_controller() {
532 return resolution_notification_controller_.get();
535 LogoutConfirmationController* logout_confirmation_controller() {
536 return logout_confirmation_controller_.get();
539 ScreenOrientationDelegate* screen_orientation_delegate() {
540 return screen_orientation_delegate_.get();
543 VirtualKeyboardController* virtual_keyboard_controller() {
544 return virtual_keyboard_controller_.get();
546 #endif // defined(OS_CHROMEOS)
548 ShelfModel* shelf_model() {
549 return shelf_model_.get();
552 WindowPositioner* window_positioner() {
553 return window_positioner_.get();
556 // Returns the launcher delegate, creating if necesary.
557 ShelfDelegate* GetShelfDelegate();
559 UserMetricsRecorder* metrics() {
560 return user_metrics_recorder_.get();
563 void SetTouchHudProjectionEnabled(bool enabled);
565 bool is_touch_hud_projection_enabled() const {
566 return is_touch_hud_projection_enabled_;
569 #if defined(OS_CHROMEOS)
570 // Creates instance of FirstRunHelper. Caller is responsible for deleting
571 // returned object.
572 ash::FirstRunHelper* CreateFirstRunHelper();
574 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
575 // compositing is enabled, and vice versa.
576 void SetCursorCompositingEnabled(bool enabled);
578 StickyKeysController* sticky_keys_controller() {
579 return sticky_keys_controller_.get();
581 #endif // defined(OS_CHROMEOS)
583 GPUSupport* gpu_support() { return gpu_support_.get(); }
585 private:
586 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
587 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
588 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
589 friend class RootWindowController;
590 friend class ScopedTargetRootWindow;
591 friend class test::ShellTestApi;
592 friend class shell::WindowWatcher;
594 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
596 // Takes ownership of |delegate|.
597 explicit Shell(ShellDelegate* delegate);
598 ~Shell() override;
600 void Init(const ShellInitParams& init_params);
602 // Initializes virtual keyboard controller.
603 void InitKeyboard();
605 // Initializes the root window so that it can host browser windows.
606 void InitRootWindow(aura::Window* root_window);
608 // ash::SystemModalContainerEventFilterDelegate overrides:
609 bool CanWindowReceiveEvents(aura::Window* window) override;
611 // Overridden from ui::EventTarget:
612 bool CanAcceptEvent(const ui::Event& event) override;
613 EventTarget* GetParentTarget() override;
614 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
615 ui::EventTargeter* GetEventTargeter() override;
616 void OnEvent(ui::Event* event) override;
618 // Overridden from aura::client::ActivationChangeObserver:
619 void OnWindowActivated(aura::Window* gained_active,
620 aura::Window* lost_active) override;
622 static Shell* instance_;
624 // If set before the Shell is initialized, the mouse cursor will be hidden
625 // when the screen is initially created.
626 static bool initially_hide_cursor_;
628 // When no explicit target display/RootWindow is given, new windows are
629 // created on |scoped_target_root_window_| , unless NULL in
630 // which case they are created on |target_root_window_|.
631 // |target_root_window_| never becomes NULL during the session.
632 aura::Window* target_root_window_;
633 aura::Window* scoped_target_root_window_;
635 // The CompoundEventFilter owned by aura::Env object.
636 scoped_ptr< ::wm::CompoundEventFilter> env_filter_;
638 std::vector<WindowAndBoundsPair> to_restore_;
640 scoped_ptr<UserMetricsRecorder> user_metrics_recorder_;
641 scoped_ptr< ::wm::NestedAcceleratorController> nested_accelerator_controller_;
642 scoped_ptr<AcceleratorController> accelerator_controller_;
643 scoped_ptr<ShellDelegate> delegate_;
644 scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
645 scoped_ptr<SystemTrayNotifier> system_tray_notifier_;
646 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
647 scoped_ptr<SessionStateDelegate> session_state_delegate_;
648 scoped_ptr<AccessibilityDelegate> accessibility_delegate_;
649 scoped_ptr<NewWindowDelegate> new_window_delegate_;
650 scoped_ptr<MediaDelegate> media_delegate_;
651 scoped_ptr<ShelfDelegate> shelf_delegate_;
652 scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
653 scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_;
655 scoped_ptr<ShelfModel> shelf_model_;
656 scoped_ptr<WindowPositioner> window_positioner_;
658 scoped_ptr<AppListController> app_list_controller_;
660 scoped_ptr<DragDropController> drag_drop_controller_;
661 scoped_ptr<ResizeShadowController> resize_shadow_controller_;
662 scoped_ptr< ::wm::ShadowController> shadow_controller_;
663 scoped_ptr< ::wm::VisibilityController> visibility_controller_;
664 scoped_ptr< ::wm::WindowModalityController> window_modality_controller_;
665 scoped_ptr<views::corewm::TooltipController> tooltip_controller_;
666 scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
667 scoped_ptr<PowerButtonController> power_button_controller_;
668 scoped_ptr<LockStateController> lock_state_controller_;
669 scoped_ptr<MruWindowTracker> mru_window_tracker_;
670 scoped_ptr< ::wm::UserActivityDetector> user_activity_detector_;
671 scoped_ptr<VideoDetector> video_detector_;
672 scoped_ptr<WindowCycleController> window_cycle_controller_;
673 scoped_ptr<WindowSelectorController> window_selector_controller_;
674 scoped_ptr<FocusCycler> focus_cycler_;
675 scoped_ptr<DisplayController> display_controller_;
676 scoped_ptr<HighContrastController> high_contrast_controller_;
677 scoped_ptr<MagnificationController> magnification_controller_;
678 scoped_ptr<PartialMagnificationController> partial_magnification_controller_;
679 scoped_ptr<AutoclickController> autoclick_controller_;
680 scoped_ptr<aura::client::FocusClient> focus_client_;
681 aura::client::ActivationClient* activation_client_;
683 scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
684 scoped_ptr<ScreenPositionController> screen_position_controller_;
685 scoped_ptr<SystemModalContainerEventFilter> modality_filter_;
686 scoped_ptr<EventClientImpl> event_client_;
687 scoped_ptr<EventTransformationHandler> event_transformation_handler_;
689 // An event filter that pre-handles key events while the partial
690 // screenshot UI or the keyboard overlay is active.
691 scoped_ptr<OverlayEventFilter> overlay_filter_;
693 // An event filter for logging keyboard-related metrics.
694 scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_;
696 // An event filter which handles moving and resizing windows.
697 scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
699 // An event filter which handles system level gestures
700 scoped_ptr<SystemGestureEventFilter> system_gesture_filter_;
702 // An event filter that pre-handles global accelerators.
703 scoped_ptr< ::wm::AcceleratorFilter> accelerator_filter_;
705 // An event filter that pre-handles all key events to send them to an IME.
706 scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_;
708 scoped_ptr<DisplayManager> display_manager_;
710 scoped_ptr<LocaleNotificationController> locale_notification_controller_;
712 scoped_ptr<AccelerometerController> accelerometer_controller_;
714 #if defined(OS_CHROMEOS)
715 scoped_ptr<PowerEventObserver> power_event_observer_;
716 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
717 scoped_ptr<VideoActivityNotifier> video_activity_notifier_;
718 scoped_ptr<StickyKeysController> sticky_keys_controller_;
719 scoped_ptr<ResolutionNotificationController>
720 resolution_notification_controller_;
721 scoped_ptr<BluetoothNotificationController>
722 bluetooth_notification_controller_;
723 scoped_ptr<LogoutConfirmationController> logout_confirmation_controller_;
724 scoped_ptr<LastWindowClosedLogoutReminder>
725 last_window_closed_logout_reminder_;
726 scoped_ptr<VirtualKeyboardController> virtual_keyboard_controller_;
727 // Controls video output device state.
728 scoped_ptr<ui::DisplayConfigurator> display_configurator_;
729 scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_;
730 scoped_ptr<DisplayErrorObserver> display_error_observer_;
731 scoped_ptr<ProjectingObserver> projecting_observer_;
733 // Listens for output changes and updates the display manager.
734 scoped_ptr<DisplayChangeObserver> display_change_observer_;
736 // Implements content::ScreenOrientationDelegate for ChromeOS
737 scoped_ptr<ScreenOrientationDelegate> screen_orientation_delegate_;
739 scoped_ptr<TouchTransformerController> touch_transformer_controller_;
741 #if defined(USE_X11)
742 scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
743 scoped_ptr<ui::EventHandler> speech_feedback_handler_;
744 #endif // defined(USE_X11)
745 #endif // defined(OS_CHROMEOS)
747 scoped_ptr<MaximizeModeController> maximize_mode_controller_;
749 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
750 // pointer to vend to test code.
751 AshNativeCursorManager* native_cursor_manager_;
753 // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
754 // the cursor on Windows.
755 #if defined(OS_CHROMEOS)
756 CursorManager cursor_manager_;
757 #else // !defined(OS_CHROMEOS)
758 ::wm::CursorManager cursor_manager_;
759 #endif // defined(OS_CHROMEOS)
761 ObserverList<ShellObserver> observers_;
763 // For testing only: simulate that a modal window is open
764 bool simulate_modal_window_open_for_testing_;
766 bool is_touch_hud_projection_enabled_;
768 // Injected content::GPUDataManager support.
769 scoped_ptr<GPUSupport> gpu_support_;
771 DISALLOW_COPY_AND_ASSIGN(Shell);
774 } // namespace ash
776 #endif // ASH_SHELL_H_