Roll src/third_party/skia 8c9b6f1:0c3f587
[chromium-blink-merge.git] / ash / shell.h
blobcb46540be67024994d76283a444bec82bd950b68
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/geometry/insets.h"
27 #include "ui/gfx/geometry/size.h"
28 #include "ui/gfx/screen.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 UserActivityDetector;
55 class UserActivityPowerManagerNotifier;
57 namespace views {
58 class NonClientFrameView;
59 class Widget;
60 namespace corewm {
61 class TooltipController;
65 namespace wm {
66 class AcceleratorFilter;
67 class CompoundEventFilter;
68 class InputMethodEventFilter;
69 class NestedAcceleratorController;
70 class ShadowController;
71 class VisibilityController;
72 class WindowModalityController;
75 namespace ash {
77 class AcceleratorController;
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 DisplayColorManager;
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 PartialScreenshotController;
114 class PowerButtonController;
115 class PowerEventObserver;
116 class ProjectingObserver;
117 class ResizeShadowController;
118 class ResolutionNotificationController;
119 class RootWindowController;
120 class ScopedTargetRootWindow;
121 class ScreenAsh;
122 class ScreenOrientationController;
123 class ScreenPositionController;
124 class SessionStateDelegate;
125 class Shelf;
126 class ShelfDelegate;
127 class ShelfItemDelegateManager;
128 class ShelfModel;
129 class ShelfWindowWatcher;
130 class ShellDelegate;
131 struct ShellInitParams;
132 class ShellObserver;
133 class SlowAnimationEventFilter;
134 class StatusAreaWidget;
135 class StickyKeysController;
136 class SystemGestureEventFilter;
137 class SystemModalContainerEventFilter;
138 class SystemTray;
139 class SystemTrayDelegate;
140 class SystemTrayNotifier;
141 class ToplevelWindowEventHandler;
142 class TouchTransformerController;
143 class TouchObserverHUD;
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 after overview mode has ended.
304 void OnOverviewModeEnded();
306 // Called after maximize mode has started, windows might still animate though.
307 void OnMaximizeModeStarted();
309 // Called after maximize mode has ended, windows might still be returning to
310 // their original position.
311 void OnMaximizeModeEnded();
313 // Called when a root window is created.
314 void OnRootWindowAdded(aura::Window* root_window);
316 // Initializes |shelf_|. Does nothing if it's already initialized.
317 void CreateShelf();
319 // Called when the shelf is created for |root_window|.
320 void OnShelfCreatedForRootWindow(aura::Window* root_window);
322 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
323 // exists.
324 void CreateKeyboard();
326 // Deactivates the virtual keyboard.
327 void DeactivateKeyboard();
329 // Show shelf view if it was created hidden (before session has started).
330 void ShowShelf();
332 // Adds/removes observer.
333 void AddShellObserver(ShellObserver* observer);
334 void RemoveShellObserver(ShellObserver* observer);
336 #if defined(OS_CHROMEOS)
337 // Test if MaximizeModeWindowManager is not enabled, and if
338 // MaximizeModeController is not currently setting a display rotation. Or if
339 // the |resolution_notification_controller_| is not showing its confirmation
340 // dialog. If true then changes to display settings can be saved.
341 bool ShouldSaveDisplaySettings();
342 #endif
344 AcceleratorController* accelerator_controller() {
345 return accelerator_controller_.get();
348 DisplayManager* display_manager() { return display_manager_.get(); }
349 ::wm::InputMethodEventFilter* input_method_filter() {
350 return input_method_filter_.get();
352 ::wm::CompoundEventFilter* env_filter() {
353 return env_filter_.get();
355 views::corewm::TooltipController* tooltip_controller() {
356 return tooltip_controller_.get();
358 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
359 DesktopBackgroundController* desktop_background_controller() {
360 return desktop_background_controller_.get();
362 PowerButtonController* power_button_controller() {
363 return power_button_controller_.get();
365 LockStateController* lock_state_controller() {
366 return lock_state_controller_.get();
368 MruWindowTracker* mru_window_tracker() {
369 return mru_window_tracker_.get();
371 VideoDetector* video_detector() {
372 return video_detector_.get();
374 WindowCycleController* window_cycle_controller() {
375 return window_cycle_controller_.get();
377 WindowSelectorController* window_selector_controller() {
378 return window_selector_controller_.get();
380 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
381 DisplayController* display_controller() {
382 return display_controller_.get();
384 #if defined(OS_CHROMEOS)
385 PowerEventObserver* power_event_observer() {
386 return power_event_observer_.get();
388 TouchTransformerController* touch_transformer_controller() {
389 return touch_transformer_controller_.get();
391 #endif // defined(OS_CHROMEOS)
392 PartialScreenshotController* partial_screenshot_controller() {
393 return partial_screenshot_controller_.get();
395 MouseCursorEventFilter* mouse_cursor_filter() {
396 return mouse_cursor_filter_.get();
398 EventTransformationHandler* event_transformation_handler() {
399 return event_transformation_handler_.get();
401 ::wm::CursorManager* cursor_manager() { return &cursor_manager_; }
403 ShellDelegate* delegate() { return delegate_.get(); }
405 UserWallpaperDelegate* user_wallpaper_delegate() {
406 return user_wallpaper_delegate_.get();
409 SessionStateDelegate* session_state_delegate() {
410 return session_state_delegate_.get();
413 AccessibilityDelegate* accessibility_delegate() {
414 return accessibility_delegate_.get();
417 NewWindowDelegate* new_window_delegate() {
418 return new_window_delegate_.get();
421 MediaDelegate* media_delegate() {
422 return media_delegate_.get();
425 HighContrastController* high_contrast_controller() {
426 return high_contrast_controller_.get();
429 MagnificationController* magnification_controller() {
430 return magnification_controller_.get();
433 PartialMagnificationController* partial_magnification_controller() {
434 return partial_magnification_controller_.get();
437 AutoclickController* autoclick_controller() {
438 return autoclick_controller_.get();
441 aura::client::ActivationClient* activation_client() {
442 return activation_client_;
445 ShelfItemDelegateManager* shelf_item_delegate_manager() {
446 return shelf_item_delegate_manager_.get();
449 // Force the shelf to query for it's current visibility state.
450 void UpdateShelfVisibility();
452 // TODO(oshima): Define an interface to access shelf/launcher
453 // state, or just use Launcher.
455 // Sets/gets the shelf auto-hide behavior on |root_window|.
456 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
457 aura::Window* root_window);
458 ShelfAutoHideBehavior GetShelfAutoHideBehavior(
459 aura::Window* root_window) const;
461 // Sets/gets shelf's alignment on |root_window|.
462 void SetShelfAlignment(ShelfAlignment alignment,
463 aura::Window* root_window);
464 ShelfAlignment GetShelfAlignment(const aura::Window* root_window);
466 // Dims or undims the screen.
467 void SetDimming(bool should_dim);
469 // Notifies |observers_| when entering or exiting fullscreen mode in
470 // |root_window|.
471 void NotifyFullscreenStateChange(bool is_fullscreen,
472 aura::Window* root_window);
474 // Creates a modal background (a partially-opaque fullscreen window)
475 // on all displays for |window|.
476 void CreateModalBackground(aura::Window* window);
478 // Called when a modal window is removed. It will activate
479 // another modal window if any, or remove modal screens
480 // on all displays.
481 void OnModalWindowRemoved(aura::Window* removed);
483 // Returns WebNotificationTray on the primary root window.
484 WebNotificationTray* GetWebNotificationTray();
486 // Does the primary display have status area?
487 bool HasPrimaryStatusArea();
489 // Returns the system tray on primary display.
490 SystemTray* GetPrimarySystemTray();
492 SystemTrayDelegate* system_tray_delegate() {
493 return system_tray_delegate_.get();
496 SystemTrayNotifier* system_tray_notifier() {
497 return system_tray_notifier_.get();
500 static void set_initially_hide_cursor(bool hide) {
501 initially_hide_cursor_ = hide;
504 ResizeShadowController* resize_shadow_controller() {
505 return resize_shadow_controller_.get();
508 // Made available for tests.
509 ::wm::ShadowController* shadow_controller() {
510 return shadow_controller_.get();
513 // Starts the animation that occurs on first login.
514 void DoInitialWorkspaceAnimation();
516 MaximizeModeController* maximize_mode_controller() {
517 return maximize_mode_controller_.get();
520 #if defined(OS_CHROMEOS)
521 // TODO(oshima): Move these objects to DisplayController.
522 ui::DisplayConfigurator* display_configurator() {
523 return display_configurator_.get();
525 DisplayConfiguratorAnimation* display_configurator_animation() {
526 return display_configurator_animation_.get();
528 DisplayErrorObserver* display_error_observer() {
529 return display_error_observer_.get();
532 ResolutionNotificationController* resolution_notification_controller() {
533 return resolution_notification_controller_.get();
536 LogoutConfirmationController* logout_confirmation_controller() {
537 return logout_confirmation_controller_.get();
540 ScreenOrientationController* screen_orientation_controller() {
541 return screen_orientation_controller_.get();
544 VirtualKeyboardController* virtual_keyboard_controller() {
545 return virtual_keyboard_controller_.get();
547 #endif // defined(OS_CHROMEOS)
549 ShelfModel* shelf_model() {
550 return shelf_model_.get();
553 WindowPositioner* window_positioner() {
554 return window_positioner_.get();
557 // Returns the launcher delegate, creating if necesary.
558 ShelfDelegate* GetShelfDelegate();
560 UserMetricsRecorder* metrics() {
561 return user_metrics_recorder_.get();
564 void SetTouchHudProjectionEnabled(bool enabled);
566 bool is_touch_hud_projection_enabled() const {
567 return is_touch_hud_projection_enabled_;
570 #if defined(OS_CHROMEOS)
571 // Creates instance of FirstRunHelper. Caller is responsible for deleting
572 // returned object.
573 ash::FirstRunHelper* CreateFirstRunHelper();
575 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
576 // compositing is enabled, and vice versa.
577 void SetCursorCompositingEnabled(bool enabled);
579 StickyKeysController* sticky_keys_controller() {
580 return sticky_keys_controller_.get();
582 #endif // defined(OS_CHROMEOS)
584 GPUSupport* gpu_support() { return gpu_support_.get(); }
586 private:
587 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
588 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
589 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
590 friend class RootWindowController;
591 friend class ScopedTargetRootWindow;
592 friend class test::ShellTestApi;
593 friend class shell::WindowWatcher;
595 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
597 // Takes ownership of |delegate|.
598 explicit Shell(ShellDelegate* delegate);
599 ~Shell() override;
601 void Init(const ShellInitParams& init_params);
603 // Initializes virtual keyboard controller.
604 void InitKeyboard();
606 // Initializes the root window so that it can host browser windows.
607 void InitRootWindow(aura::Window* root_window);
609 // ash::SystemModalContainerEventFilterDelegate overrides:
610 bool CanWindowReceiveEvents(aura::Window* window) override;
612 // Overridden from ui::EventTarget:
613 bool CanAcceptEvent(const ui::Event& event) override;
614 EventTarget* GetParentTarget() override;
615 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
616 ui::EventTargeter* GetEventTargeter() override;
617 void OnEvent(ui::Event* event) override;
619 // Overridden from aura::client::ActivationChangeObserver:
620 void OnWindowActivated(aura::Window* gained_active,
621 aura::Window* lost_active) override;
623 static Shell* instance_;
625 // If set before the Shell is initialized, the mouse cursor will be hidden
626 // when the screen is initially created.
627 static bool initially_hide_cursor_;
629 // When no explicit target display/RootWindow is given, new windows are
630 // created on |scoped_target_root_window_| , unless NULL in
631 // which case they are created on |target_root_window_|.
632 // |target_root_window_| never becomes NULL during the session.
633 aura::Window* target_root_window_;
634 aura::Window* scoped_target_root_window_;
636 // The CompoundEventFilter owned by aura::Env object.
637 scoped_ptr< ::wm::CompoundEventFilter> env_filter_;
639 std::vector<WindowAndBoundsPair> to_restore_;
641 scoped_ptr<UserMetricsRecorder> user_metrics_recorder_;
642 scoped_ptr< ::wm::NestedAcceleratorController> nested_accelerator_controller_;
643 scoped_ptr<AcceleratorController> accelerator_controller_;
644 scoped_ptr<ShellDelegate> delegate_;
645 scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
646 scoped_ptr<SystemTrayNotifier> system_tray_notifier_;
647 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
648 scoped_ptr<SessionStateDelegate> session_state_delegate_;
649 scoped_ptr<AccessibilityDelegate> accessibility_delegate_;
650 scoped_ptr<NewWindowDelegate> new_window_delegate_;
651 scoped_ptr<MediaDelegate> media_delegate_;
652 scoped_ptr<ShelfDelegate> shelf_delegate_;
653 scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
654 scoped_ptr<ShelfWindowWatcher> shelf_window_watcher_;
656 scoped_ptr<ShelfModel> shelf_model_;
657 scoped_ptr<WindowPositioner> window_positioner_;
659 scoped_ptr<AppListController> app_list_controller_;
661 scoped_ptr<DragDropController> drag_drop_controller_;
662 scoped_ptr<ResizeShadowController> resize_shadow_controller_;
663 scoped_ptr< ::wm::ShadowController> shadow_controller_;
664 scoped_ptr< ::wm::VisibilityController> visibility_controller_;
665 scoped_ptr< ::wm::WindowModalityController> window_modality_controller_;
666 scoped_ptr<views::corewm::TooltipController> tooltip_controller_;
667 scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
668 scoped_ptr<PowerButtonController> power_button_controller_;
669 scoped_ptr<LockStateController> lock_state_controller_;
670 scoped_ptr<MruWindowTracker> mru_window_tracker_;
671 scoped_ptr<ui::UserActivityDetector> user_activity_detector_;
672 scoped_ptr<VideoDetector> video_detector_;
673 scoped_ptr<WindowCycleController> window_cycle_controller_;
674 scoped_ptr<WindowSelectorController> window_selector_controller_;
675 scoped_ptr<FocusCycler> focus_cycler_;
676 scoped_ptr<DisplayController> display_controller_;
677 scoped_ptr<HighContrastController> high_contrast_controller_;
678 scoped_ptr<MagnificationController> magnification_controller_;
679 scoped_ptr<PartialMagnificationController> partial_magnification_controller_;
680 scoped_ptr<AutoclickController> autoclick_controller_;
681 scoped_ptr<aura::client::FocusClient> focus_client_;
682 aura::client::ActivationClient* activation_client_;
683 scoped_ptr<PartialScreenshotController> partial_screenshot_controller_;
685 scoped_ptr<MouseCursorEventFilter> mouse_cursor_filter_;
686 scoped_ptr<ScreenPositionController> screen_position_controller_;
687 scoped_ptr<SystemModalContainerEventFilter> modality_filter_;
688 scoped_ptr<EventClientImpl> event_client_;
689 scoped_ptr<EventTransformationHandler> event_transformation_handler_;
691 // An event filter that pre-handles key events while the partial
692 // screenshot UI or the keyboard overlay is active.
693 scoped_ptr<OverlayEventFilter> overlay_filter_;
695 // An event filter for logging keyboard-related metrics.
696 scoped_ptr<KeyboardUMAEventFilter> keyboard_metrics_filter_;
698 // An event filter which handles moving and resizing windows.
699 scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
701 // An event filter which handles system level gestures
702 scoped_ptr<SystemGestureEventFilter> system_gesture_filter_;
704 // An event filter that pre-handles global accelerators.
705 scoped_ptr< ::wm::AcceleratorFilter> accelerator_filter_;
707 // An event filter that pre-handles all key events to send them to an IME.
708 scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_;
710 scoped_ptr<DisplayManager> display_manager_;
712 scoped_ptr<LocaleNotificationController> locale_notification_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<DisplayColorManager> display_color_manager_;
730 scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_;
731 scoped_ptr<DisplayErrorObserver> display_error_observer_;
732 scoped_ptr<ProjectingObserver> projecting_observer_;
734 // Listens for output changes and updates the display manager.
735 scoped_ptr<DisplayChangeObserver> display_change_observer_;
737 // Implements content::ScreenOrientationController for ChromeOS
738 scoped_ptr<ScreenOrientationController> screen_orientation_controller_;
740 scoped_ptr<TouchTransformerController> touch_transformer_controller_;
742 scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
743 scoped_ptr<ui::EventHandler> speech_feedback_handler_;
744 #endif // defined(OS_CHROMEOS)
746 scoped_ptr<MaximizeModeController> maximize_mode_controller_;
748 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
749 // pointer to vend to test code.
750 AshNativeCursorManager* native_cursor_manager_;
752 // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
753 // the cursor on Windows.
754 #if defined(OS_CHROMEOS)
755 CursorManager cursor_manager_;
756 #else // !defined(OS_CHROMEOS)
757 ::wm::CursorManager cursor_manager_;
758 #endif // defined(OS_CHROMEOS)
760 ObserverList<ShellObserver> observers_;
762 // For testing only: simulate that a modal window is open
763 bool simulate_modal_window_open_for_testing_;
765 bool is_touch_hud_projection_enabled_;
767 // Injected content::GPUDataManager support.
768 scoped_ptr<GPUSupport> gpu_support_;
770 DISALLOW_COPY_AND_ASSIGN(Shell);
773 } // namespace ash
775 #endif // ASH_SHELL_H_