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.
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"
40 class ActivationClient
;
52 class DisplayConfigurator
;
54 class UserActivityDetector
;
55 class UserActivityPowerManagerNotifier
;
58 class NonClientFrameView
;
61 class TooltipController
;
66 class AcceleratorFilter
;
67 class CompoundEventFilter
;
68 class InputMethodEventFilter
;
69 class NestedAcceleratorController
;
70 class ShadowController
;
71 class VisibilityController
;
72 class WindowModalityController
;
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 DisplayConfiguratorAnimation
;
87 class DisplayController
;
88 class DisplayErrorObserver
;
90 class DragDropController
;
91 class EventClientImpl
;
92 class EventRewriterEventFilter
;
93 class EventTransformationHandler
;
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
;
107 class MouseCursorEventFilter
;
108 class MruWindowTracker
;
109 class NewWindowDelegate
;
110 class OverlayEventFilter
;
111 class PartialMagnificationController
;
112 class PowerButtonController
;
113 class PowerEventObserver
;
114 class ProjectingObserver
;
115 class ResizeShadowController
;
116 class ResolutionNotificationController
;
117 class RootWindowController
;
118 class ScopedTargetRootWindow
;
120 class ScreenOrientationController
;
121 class ScreenPositionController
;
122 class SessionStateDelegate
;
125 class ShelfItemDelegateManager
;
127 class ShelfWindowWatcher
;
129 struct ShellInitParams
;
131 class SlowAnimationEventFilter
;
132 class StatusAreaWidget
;
133 class StickyKeysController
;
134 class SystemGestureEventFilter
;
135 class SystemModalContainerEventFilter
;
137 class SystemTrayDelegate
;
138 class SystemTrayNotifier
;
139 class ToplevelWindowEventHandler
;
140 class TouchTransformerController
;
141 class TouchObserverHUD
;
142 class UserWallpaperDelegate
;
143 class VirtualKeyboardController
;
144 class VideoActivityNotifier
;
146 class WebNotificationTray
;
147 class WindowCycleController
;
148 class WindowPositioner
;
149 class WindowSelectorController
;
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
{
168 typedef std::vector
<RootWindowController
*> RootWindowControllerList
;
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
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
,
215 static const aura::Window
* GetContainer(const aura::Window
* root_window
,
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(
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 // Shows the app list. |window| specifies in which display the app
235 // list should be shown. If this is NULL, the active root window
237 void ShowAppList(aura::Window
* anchor
);
239 // Dismisses the app list.
240 void DismissAppList();
242 // Shows the app list if it's not visible. Dismisses it otherwise.
243 void ToggleAppList(aura::Window
* anchor
);
245 // Returns app list target visibility.
246 bool GetAppListTargetVisibility() const;
248 // Returns app list window or NULL if it is not visible.
249 aura::Window
* GetAppListWindow();
251 // Returns app list view or NULL if it is not visible.
252 app_list::AppListView
* GetAppListView();
254 // Returns true if a system-modal dialog window is currently open.
255 bool IsSystemModalWindowOpen() const;
257 // For testing only: set simulation that a modal window is open
258 void SimulateModalWindowOpenForTesting(bool modal_window_open
) {
259 simulate_modal_window_open_for_testing_
= modal_window_open
;
262 // Creates a default views::NonClientFrameView for use by windows in the
264 views::NonClientFrameView
* CreateDefaultNonClientFrameView(
265 views::Widget
* widget
);
267 // Rotates focus through containers that can receive focus.
268 void RotateFocus(Direction direction
);
270 // Sets the work area insets of the display that contains |window|,
271 // this notifies observers too.
272 // TODO(sky): this no longer really replicates what happens and is unreliable.
274 void SetDisplayWorkAreaInsets(aura::Window
* window
,
275 const gfx::Insets
& insets
);
277 // Called when the user logs in.
278 void OnLoginStateChanged(user::LoginStatus status
);
280 // Called after the logged-in user's profile is ready.
281 void OnLoginUserProfilePrepared();
283 // Called when the login status changes.
284 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
285 void UpdateAfterLoginStatusChange(user::LoginStatus status
);
287 // Called when the application is exiting.
288 void OnAppTerminating();
290 // Called when the screen is locked (after the lock window is visible) or
292 void OnLockStateChanged(bool locked
);
294 // Called when a casting session is started or stopped.
295 void OnCastingSessionStartedOrStopped(bool started
);
297 // Called when the overview mode is about to be started (before the windows
299 void OnOverviewModeStarting();
301 // Called after overview mode has ended.
302 void OnOverviewModeEnded();
304 // Called after maximize mode has started, windows might still animate though.
305 void OnMaximizeModeStarted();
307 // Called after maximize mode has ended, windows might still be returning to
308 // their original position.
309 void OnMaximizeModeEnded();
311 // Called when a root window is created.
312 void OnRootWindowAdded(aura::Window
* root_window
);
314 // Initializes |shelf_|. Does nothing if it's already initialized.
317 // Called when the shelf is created for |root_window|.
318 void OnShelfCreatedForRootWindow(aura::Window
* root_window
);
320 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
322 void CreateKeyboard();
324 // Deactivates the virtual keyboard.
325 void DeactivateKeyboard();
327 // Show shelf view if it was created hidden (before session has started).
330 // Adds/removes observer.
331 void AddShellObserver(ShellObserver
* observer
);
332 void RemoveShellObserver(ShellObserver
* observer
);
334 #if defined(OS_CHROMEOS)
335 // Test if MaximizeModeWindowManager is not enabled, and if
336 // MaximizeModeController is not currently setting a display rotation. Or if
337 // the |resolution_notification_controller_| is not showing its confirmation
338 // dialog. If true then changes to display settings can be saved.
339 bool ShouldSaveDisplaySettings();
342 AcceleratorController
* accelerator_controller() {
343 return accelerator_controller_
.get();
346 DisplayManager
* display_manager() { return display_manager_
.get(); }
347 ::wm::InputMethodEventFilter
* input_method_filter() {
348 return input_method_filter_
.get();
350 ::wm::CompoundEventFilter
* env_filter() {
351 return env_filter_
.get();
353 views::corewm::TooltipController
* tooltip_controller() {
354 return tooltip_controller_
.get();
356 OverlayEventFilter
* overlay_filter() { return overlay_filter_
.get(); }
357 DesktopBackgroundController
* desktop_background_controller() {
358 return desktop_background_controller_
.get();
360 PowerButtonController
* power_button_controller() {
361 return power_button_controller_
.get();
363 LockStateController
* lock_state_controller() {
364 return lock_state_controller_
.get();
366 MruWindowTracker
* mru_window_tracker() {
367 return mru_window_tracker_
.get();
369 VideoDetector
* video_detector() {
370 return video_detector_
.get();
372 WindowCycleController
* window_cycle_controller() {
373 return window_cycle_controller_
.get();
375 WindowSelectorController
* window_selector_controller() {
376 return window_selector_controller_
.get();
378 FocusCycler
* focus_cycler() { return focus_cycler_
.get(); }
379 DisplayController
* display_controller() {
380 return display_controller_
.get();
382 #if defined(OS_CHROMEOS)
383 TouchTransformerController
* touch_transformer_controller() {
384 return touch_transformer_controller_
.get();
386 #endif // defined(OS_CHROMEOS)
387 MouseCursorEventFilter
* mouse_cursor_filter() {
388 return mouse_cursor_filter_
.get();
390 EventTransformationHandler
* event_transformation_handler() {
391 return event_transformation_handler_
.get();
393 ::wm::CursorManager
* cursor_manager() { return &cursor_manager_
; }
395 ShellDelegate
* delegate() { return delegate_
.get(); }
397 UserWallpaperDelegate
* user_wallpaper_delegate() {
398 return user_wallpaper_delegate_
.get();
401 SessionStateDelegate
* session_state_delegate() {
402 return session_state_delegate_
.get();
405 AccessibilityDelegate
* accessibility_delegate() {
406 return accessibility_delegate_
.get();
409 NewWindowDelegate
* new_window_delegate() {
410 return new_window_delegate_
.get();
413 MediaDelegate
* media_delegate() {
414 return media_delegate_
.get();
417 HighContrastController
* high_contrast_controller() {
418 return high_contrast_controller_
.get();
421 MagnificationController
* magnification_controller() {
422 return magnification_controller_
.get();
425 PartialMagnificationController
* partial_magnification_controller() {
426 return partial_magnification_controller_
.get();
429 AutoclickController
* autoclick_controller() {
430 return autoclick_controller_
.get();
433 aura::client::ActivationClient
* activation_client() {
434 return activation_client_
;
437 ShelfItemDelegateManager
* shelf_item_delegate_manager() {
438 return shelf_item_delegate_manager_
.get();
441 // Force the shelf to query for it's current visibility state.
442 void UpdateShelfVisibility();
444 // TODO(oshima): Define an interface to access shelf/launcher
445 // state, or just use Launcher.
447 // Sets/gets the shelf auto-hide behavior on |root_window|.
448 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior
,
449 aura::Window
* root_window
);
450 ShelfAutoHideBehavior
GetShelfAutoHideBehavior(
451 aura::Window
* root_window
) const;
453 // Sets/gets shelf's alignment on |root_window|.
454 void SetShelfAlignment(ShelfAlignment alignment
,
455 aura::Window
* root_window
);
456 ShelfAlignment
GetShelfAlignment(const aura::Window
* root_window
);
458 // Dims or undims the screen.
459 void SetDimming(bool should_dim
);
461 // Notifies |observers_| when entering or exiting fullscreen mode in
463 void NotifyFullscreenStateChange(bool is_fullscreen
,
464 aura::Window
* root_window
);
466 // Creates a modal background (a partially-opaque fullscreen window)
467 // on all displays for |window|.
468 void CreateModalBackground(aura::Window
* window
);
470 // Called when a modal window is removed. It will activate
471 // another modal window if any, or remove modal screens
473 void OnModalWindowRemoved(aura::Window
* removed
);
475 // Returns WebNotificationTray on the primary root window.
476 WebNotificationTray
* GetWebNotificationTray();
478 // Does the primary display have status area?
479 bool HasPrimaryStatusArea();
481 // Returns the system tray on primary display.
482 SystemTray
* GetPrimarySystemTray();
484 SystemTrayDelegate
* system_tray_delegate() {
485 return system_tray_delegate_
.get();
488 SystemTrayNotifier
* system_tray_notifier() {
489 return system_tray_notifier_
.get();
492 static void set_initially_hide_cursor(bool hide
) {
493 initially_hide_cursor_
= hide
;
496 ResizeShadowController
* resize_shadow_controller() {
497 return resize_shadow_controller_
.get();
500 // Made available for tests.
501 ::wm::ShadowController
* shadow_controller() {
502 return shadow_controller_
.get();
505 // Starts the animation that occurs on first login.
506 void DoInitialWorkspaceAnimation();
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();
532 ScreenOrientationController
* screen_orientation_controller() {
533 return screen_orientation_controller_
.get();
536 VirtualKeyboardController
* virtual_keyboard_controller() {
537 return virtual_keyboard_controller_
.get();
539 #endif // defined(OS_CHROMEOS)
541 ShelfModel
* shelf_model() {
542 return shelf_model_
.get();
545 WindowPositioner
* window_positioner() {
546 return window_positioner_
.get();
549 // Returns the launcher delegate, creating if necesary.
550 ShelfDelegate
* GetShelfDelegate();
552 UserMetricsRecorder
* metrics() {
553 return user_metrics_recorder_
.get();
556 void SetTouchHudProjectionEnabled(bool enabled
);
558 bool is_touch_hud_projection_enabled() const {
559 return is_touch_hud_projection_enabled_
;
562 #if defined(OS_CHROMEOS)
563 // Creates instance of FirstRunHelper. Caller is responsible for deleting
565 ash::FirstRunHelper
* CreateFirstRunHelper();
567 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
568 // compositing is enabled, and vice versa.
569 void SetCursorCompositingEnabled(bool enabled
);
571 StickyKeysController
* sticky_keys_controller() {
572 return sticky_keys_controller_
.get();
574 #endif // defined(OS_CHROMEOS)
576 GPUSupport
* gpu_support() { return gpu_support_
.get(); }
579 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest
, TestCursor
);
580 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest
, MouseEventCursors
);
581 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest
, TransformActivate
);
582 friend class RootWindowController
;
583 friend class ScopedTargetRootWindow
;
584 friend class test::ShellTestApi
;
585 friend class shell::WindowWatcher
;
587 typedef std::pair
<aura::Window
*, gfx::Rect
> WindowAndBoundsPair
;
589 // Takes ownership of |delegate|.
590 explicit Shell(ShellDelegate
* delegate
);
593 void Init(const ShellInitParams
& init_params
);
595 // Initializes virtual keyboard controller.
598 // Initializes the root window so that it can host browser windows.
599 void InitRootWindow(aura::Window
* root_window
);
601 // ash::SystemModalContainerEventFilterDelegate overrides:
602 bool CanWindowReceiveEvents(aura::Window
* window
) override
;
604 // Overridden from ui::EventTarget:
605 bool CanAcceptEvent(const ui::Event
& event
) override
;
606 EventTarget
* GetParentTarget() override
;
607 scoped_ptr
<ui::EventTargetIterator
> GetChildIterator() const override
;
608 ui::EventTargeter
* GetEventTargeter() override
;
609 void OnEvent(ui::Event
* event
) override
;
611 // Overridden from aura::client::ActivationChangeObserver:
612 void OnWindowActivated(aura::Window
* gained_active
,
613 aura::Window
* lost_active
) override
;
615 static Shell
* instance_
;
617 // If set before the Shell is initialized, the mouse cursor will be hidden
618 // when the screen is initially created.
619 static bool initially_hide_cursor_
;
621 // When no explicit target display/RootWindow is given, new windows are
622 // created on |scoped_target_root_window_| , unless NULL in
623 // which case they are created on |target_root_window_|.
624 // |target_root_window_| never becomes NULL during the session.
625 aura::Window
* target_root_window_
;
626 aura::Window
* scoped_target_root_window_
;
628 // The CompoundEventFilter owned by aura::Env object.
629 scoped_ptr
< ::wm::CompoundEventFilter
> env_filter_
;
631 std::vector
<WindowAndBoundsPair
> to_restore_
;
633 scoped_ptr
<UserMetricsRecorder
> user_metrics_recorder_
;
634 scoped_ptr
< ::wm::NestedAcceleratorController
> nested_accelerator_controller_
;
635 scoped_ptr
<AcceleratorController
> accelerator_controller_
;
636 scoped_ptr
<ShellDelegate
> delegate_
;
637 scoped_ptr
<SystemTrayDelegate
> system_tray_delegate_
;
638 scoped_ptr
<SystemTrayNotifier
> system_tray_notifier_
;
639 scoped_ptr
<UserWallpaperDelegate
> user_wallpaper_delegate_
;
640 scoped_ptr
<SessionStateDelegate
> session_state_delegate_
;
641 scoped_ptr
<AccessibilityDelegate
> accessibility_delegate_
;
642 scoped_ptr
<NewWindowDelegate
> new_window_delegate_
;
643 scoped_ptr
<MediaDelegate
> media_delegate_
;
644 scoped_ptr
<ShelfDelegate
> shelf_delegate_
;
645 scoped_ptr
<ShelfItemDelegateManager
> shelf_item_delegate_manager_
;
646 scoped_ptr
<ShelfWindowWatcher
> shelf_window_watcher_
;
648 scoped_ptr
<ShelfModel
> shelf_model_
;
649 scoped_ptr
<WindowPositioner
> window_positioner_
;
651 scoped_ptr
<AppListController
> app_list_controller_
;
653 scoped_ptr
<DragDropController
> drag_drop_controller_
;
654 scoped_ptr
<ResizeShadowController
> resize_shadow_controller_
;
655 scoped_ptr
< ::wm::ShadowController
> shadow_controller_
;
656 scoped_ptr
< ::wm::VisibilityController
> visibility_controller_
;
657 scoped_ptr
< ::wm::WindowModalityController
> window_modality_controller_
;
658 scoped_ptr
<views::corewm::TooltipController
> tooltip_controller_
;
659 scoped_ptr
<DesktopBackgroundController
> desktop_background_controller_
;
660 scoped_ptr
<PowerButtonController
> power_button_controller_
;
661 scoped_ptr
<LockStateController
> lock_state_controller_
;
662 scoped_ptr
<MruWindowTracker
> mru_window_tracker_
;
663 scoped_ptr
<ui::UserActivityDetector
> user_activity_detector_
;
664 scoped_ptr
<VideoDetector
> video_detector_
;
665 scoped_ptr
<WindowCycleController
> window_cycle_controller_
;
666 scoped_ptr
<WindowSelectorController
> window_selector_controller_
;
667 scoped_ptr
<FocusCycler
> focus_cycler_
;
668 scoped_ptr
<DisplayController
> display_controller_
;
669 scoped_ptr
<HighContrastController
> high_contrast_controller_
;
670 scoped_ptr
<MagnificationController
> magnification_controller_
;
671 scoped_ptr
<PartialMagnificationController
> partial_magnification_controller_
;
672 scoped_ptr
<AutoclickController
> autoclick_controller_
;
673 scoped_ptr
<aura::client::FocusClient
> focus_client_
;
674 aura::client::ActivationClient
* activation_client_
;
676 scoped_ptr
<MouseCursorEventFilter
> mouse_cursor_filter_
;
677 scoped_ptr
<ScreenPositionController
> screen_position_controller_
;
678 scoped_ptr
<SystemModalContainerEventFilter
> modality_filter_
;
679 scoped_ptr
<EventClientImpl
> event_client_
;
680 scoped_ptr
<EventTransformationHandler
> event_transformation_handler_
;
682 // An event filter that pre-handles key events while the partial
683 // screenshot UI or the keyboard overlay is active.
684 scoped_ptr
<OverlayEventFilter
> overlay_filter_
;
686 // An event filter for logging keyboard-related metrics.
687 scoped_ptr
<KeyboardUMAEventFilter
> keyboard_metrics_filter_
;
689 // An event filter which handles moving and resizing windows.
690 scoped_ptr
<ToplevelWindowEventHandler
> toplevel_window_event_handler_
;
692 // An event filter which handles system level gestures
693 scoped_ptr
<SystemGestureEventFilter
> system_gesture_filter_
;
695 // An event filter that pre-handles global accelerators.
696 scoped_ptr
< ::wm::AcceleratorFilter
> accelerator_filter_
;
698 // An event filter that pre-handles all key events to send them to an IME.
699 scoped_ptr
< ::wm::InputMethodEventFilter
> input_method_filter_
;
701 scoped_ptr
<DisplayManager
> display_manager_
;
703 scoped_ptr
<LocaleNotificationController
> locale_notification_controller_
;
705 #if defined(OS_CHROMEOS)
706 scoped_ptr
<PowerEventObserver
> power_event_observer_
;
707 scoped_ptr
<ui::UserActivityPowerManagerNotifier
> user_activity_notifier_
;
708 scoped_ptr
<VideoActivityNotifier
> video_activity_notifier_
;
709 scoped_ptr
<StickyKeysController
> sticky_keys_controller_
;
710 scoped_ptr
<ResolutionNotificationController
>
711 resolution_notification_controller_
;
712 scoped_ptr
<BluetoothNotificationController
>
713 bluetooth_notification_controller_
;
714 scoped_ptr
<LogoutConfirmationController
> logout_confirmation_controller_
;
715 scoped_ptr
<LastWindowClosedLogoutReminder
>
716 last_window_closed_logout_reminder_
;
717 scoped_ptr
<VirtualKeyboardController
> virtual_keyboard_controller_
;
718 // Controls video output device state.
719 scoped_ptr
<ui::DisplayConfigurator
> display_configurator_
;
720 scoped_ptr
<DisplayConfiguratorAnimation
> display_configurator_animation_
;
721 scoped_ptr
<DisplayErrorObserver
> display_error_observer_
;
722 scoped_ptr
<ProjectingObserver
> projecting_observer_
;
724 // Listens for output changes and updates the display manager.
725 scoped_ptr
<DisplayChangeObserver
> display_change_observer_
;
727 // Implements content::ScreenOrientationController for ChromeOS
728 scoped_ptr
<ScreenOrientationController
> screen_orientation_controller_
;
730 scoped_ptr
<TouchTransformerController
> touch_transformer_controller_
;
732 scoped_ptr
<ui::EventHandler
> magnifier_key_scroll_handler_
;
733 scoped_ptr
<ui::EventHandler
> speech_feedback_handler_
;
734 #endif // defined(OS_CHROMEOS)
736 scoped_ptr
<MaximizeModeController
> maximize_mode_controller_
;
738 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
739 // pointer to vend to test code.
740 AshNativeCursorManager
* native_cursor_manager_
;
742 // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
743 // the cursor on Windows.
744 #if defined(OS_CHROMEOS)
745 CursorManager cursor_manager_
;
746 #else // !defined(OS_CHROMEOS)
747 ::wm::CursorManager cursor_manager_
;
748 #endif // defined(OS_CHROMEOS)
750 ObserverList
<ShellObserver
> observers_
;
752 // For testing only: simulate that a modal window is open
753 bool simulate_modal_window_open_for_testing_
;
755 bool is_touch_hud_projection_enabled_
;
757 // Injected content::GPUDataManager support.
758 scoped_ptr
<GPUSupport
> gpu_support_
;
760 DISALLOW_COPY_AND_ASSIGN(Shell
);
765 #endif // ASH_SHELL_H_