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/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"
40 class ActivationClient
;
52 class DisplayConfigurator
;
54 class UserActivityNotifier
;
57 class NonClientFrameView
;
60 class TooltipController
;
65 class CompoundEventFilter
;
66 class InputMethodEventFilter
;
67 class ShadowController
;
68 class VisibilityController
;
69 class UserActivityDetector
;
70 class WindowModalityController
;
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 DisplayController
;
87 class DisplayErrorObserver
;
89 class DragDropController
;
90 class EventClientImpl
;
91 class EventRewriterEventFilter
;
92 class EventTransformationHandler
;
96 class HighContrastController
;
97 class KeyboardUMAEventFilter
;
98 class LastWindowClosedLogoutReminder
;
99 class LocaleNotificationController
;
100 class LockStateController
;
101 class LogoutConfirmationController
;
102 class MagnificationController
;
103 class MaximizeModeController
;
104 class MaximizeModeWindowManager
;
106 class MouseCursorEventFilter
;
107 class MruWindowTracker
;
108 class NestedDispatcherController
;
109 class NewWindowDelegate
;
110 class OutputConfiguratorAnimation
;
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
;
121 class ScreenPositionController
;
122 class SessionStateDelegate
;
125 class ShelfItemDelegateManager
;
127 class ShelfWindowWatcher
;
130 class SlowAnimationEventFilter
;
131 class StatusAreaWidget
;
132 class StickyKeysController
;
133 class SystemGestureEventFilter
;
134 class SystemModalContainerEventFilter
;
136 class SystemTrayDelegate
;
137 class SystemTrayNotifier
;
138 class ToplevelWindowEventHandler
;
139 class TouchObserverHUD
;
140 class UserActivityDetector
;
141 class UserWallpaperDelegate
;
142 class VideoActivityNotifier
;
144 class WebNotificationTray
;
145 class WindowCycleController
;
146 class WindowPositioner
;
147 class WindowSelectorController
;
157 // Shell is a singleton object that presents the Shell API and implements the
158 // RootWindow's delegate interface.
160 // Upon creation, the Shell sets itself as the RootWindow's delegate, which
161 // takes ownership of the Shell.
162 class ASH_EXPORT Shell
: public SystemModalContainerEventFilterDelegate
,
163 public ui::EventTarget
,
164 public aura::client::ActivationChangeObserver
{
166 typedef std::vector
<RootWindowController
*> RootWindowControllerList
;
173 // A shell must be explicitly created so that it can call |Init()| with the
174 // delegate set. |delegate| can be NULL (if not required for initialization).
175 // Takes ownership of |delegate|.
176 static Shell
* CreateInstance(ShellDelegate
* delegate
);
178 // Should never be called before |CreateInstance()|.
179 static Shell
* GetInstance();
181 // Returns true if the ash shell has been instantiated.
182 static bool HasInstance();
184 static void DeleteInstance();
186 // Returns the root window controller for the primary root window.
187 // TODO(oshima): move this to |RootWindowController|
188 static RootWindowController
* GetPrimaryRootWindowController();
190 // Returns all root window controllers.
191 // TODO(oshima): move this to |RootWindowController|
192 static RootWindowControllerList
GetAllRootWindowControllers();
194 // Returns the primary root Window. The primary root Window is the one that
196 static aura::Window
* GetPrimaryRootWindow();
198 // Returns a root Window when used as a target when creating a new window.
199 // The root window of the active window is used in most cases, but can
200 // be overridden by using ScopedTargetRootWindow().
201 // If you want to get the root Window of the active window, just use
202 // |wm::GetActiveWindow()->GetRootWindow()|.
203 static aura::Window
* GetTargetRootWindow();
205 // Returns the global Screen object that's always active in ash.
206 static gfx::Screen
* GetScreen();
208 // Returns all root windows.
209 static aura::Window::Windows
GetAllRootWindows();
211 static aura::Window
* GetContainer(aura::Window
* root_window
,
213 static const aura::Window
* GetContainer(const aura::Window
* root_window
,
216 // Returns the list of containers that match |container_id| in
217 // all root windows. If |priority_root| is given, the container
218 // in the |priority_root| will be inserted at the top of the list.
219 static std::vector
<aura::Window
*> GetContainersFromAllRootWindows(
221 aura::Window
* priority_root
);
223 void set_target_root_window(aura::Window
* target_root_window
) {
224 target_root_window_
= target_root_window
;
227 // Shows the context menu for the background and launcher at
228 // |location_in_screen| (in screen coordinates).
229 void ShowContextMenu(const gfx::Point
& location_in_screen
,
230 ui::MenuSourceType source_type
);
232 // Toggles the app list. |window| specifies in which display the app
233 // list should be shown. If this is NULL, the active root window
235 void ToggleAppList(aura::Window
* anchor
);
237 // Returns app list target visibility.
238 bool GetAppListTargetVisibility() const;
240 // Returns app list window or NULL if it is not visible.
241 aura::Window
* GetAppListWindow();
243 // Returns app list view or NULL if it is not visible.
244 app_list::AppListView
* GetAppListView();
246 // Returns true if a system-modal dialog window is currently open.
247 bool IsSystemModalWindowOpen() const;
249 // For testing only: set simulation that a modal window is open
250 void SimulateModalWindowOpenForTesting(bool modal_window_open
) {
251 simulate_modal_window_open_for_testing_
= modal_window_open
;
254 // Creates a default views::NonClientFrameView for use by windows in the
256 views::NonClientFrameView
* CreateDefaultNonClientFrameView(
257 views::Widget
* widget
);
259 // Rotates focus through containers that can receive focus.
260 void RotateFocus(Direction direction
);
262 // Sets the work area insets of the display that contains |window|,
263 // this notifies observers too.
264 // TODO(sky): this no longer really replicates what happens and is unreliable.
266 void SetDisplayWorkAreaInsets(aura::Window
* window
,
267 const gfx::Insets
& insets
);
269 // Called when the user logs in.
270 void OnLoginStateChanged(user::LoginStatus status
);
272 // Called after the logged-in user's profile is ready.
273 void OnLoginUserProfilePrepared();
275 // Called when the login status changes.
276 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
277 void UpdateAfterLoginStatusChange(user::LoginStatus status
);
279 // Called when the application is exiting.
280 void OnAppTerminating();
282 // Called when the screen is locked (after the lock window is visible) or
284 void OnLockStateChanged(bool locked
);
286 // Called when a casting session is started or stopped.
287 void OnCastingSessionStartedOrStopped(bool started
);
289 // Called when the overview mode is about to be started (before the windows
291 void OnOverviewModeStarting();
293 // Called before the overview mode is ending (before the windows get arranged
294 // to their final position).
295 void OnOverviewModeEnding();
297 // Called after maximize mode has started, windows might still animate though.
298 void OnMaximizeModeStarted();
300 // Called after maximize mode has ended, windows might still be returning to
301 // their original position.
302 void OnMaximizeModeEnded();
304 // Called when a root window is created.
305 void OnRootWindowAdded(aura::Window
* root_window
);
307 // Initializes |shelf_|. Does nothing if it's already initialized.
310 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
312 void CreateKeyboard();
314 // Deactivates the virtual keyboard.
315 void DeactivateKeyboard();
317 // Show shelf view if it was created hidden (before session has started).
320 // Adds/removes observer.
321 void AddShellObserver(ShellObserver
* observer
);
322 void RemoveShellObserver(ShellObserver
* observer
);
324 // Turn the always maximize mode window manager on or off.
325 void EnableMaximizeModeWindowManager(bool enable
);
327 // Test if the MaximizeModeWindowManager is enabled or not.
328 bool IsMaximizeModeWindowManagerEnabled();
330 AcceleratorController
* accelerator_controller() {
331 return accelerator_controller_
.get();
334 DisplayManager
* display_manager() { return display_manager_
.get(); }
335 ::wm::InputMethodEventFilter
* input_method_filter() {
336 return input_method_filter_
.get();
338 ::wm::CompoundEventFilter
* env_filter() {
339 return env_filter_
.get();
341 views::corewm::TooltipController
* tooltip_controller() {
342 return tooltip_controller_
.get();
344 OverlayEventFilter
* overlay_filter() { return overlay_filter_
.get(); }
345 DesktopBackgroundController
* desktop_background_controller() {
346 return desktop_background_controller_
.get();
348 PowerButtonController
* power_button_controller() {
349 return power_button_controller_
.get();
351 LockStateController
* lock_state_controller() {
352 return lock_state_controller_
.get();
354 MruWindowTracker
* mru_window_tracker() {
355 return mru_window_tracker_
.get();
357 ::wm::UserActivityDetector
* user_activity_detector() {
358 return user_activity_detector_
.get();
360 VideoDetector
* video_detector() {
361 return video_detector_
.get();
363 WindowSelectorController
* window_selector_controller() {
364 return window_selector_controller_
.get();
366 FocusCycler
* focus_cycler() { return focus_cycler_
.get(); }
367 DisplayController
* display_controller() {
368 return display_controller_
.get();
370 MouseCursorEventFilter
* mouse_cursor_filter() {
371 return mouse_cursor_filter_
.get();
373 EventTransformationHandler
* event_transformation_handler() {
374 return event_transformation_handler_
.get();
376 ::wm::CursorManager
* cursor_manager() { return &cursor_manager_
; }
378 ShellDelegate
* delegate() { return delegate_
.get(); }
380 UserWallpaperDelegate
* user_wallpaper_delegate() {
381 return user_wallpaper_delegate_
.get();
384 SessionStateDelegate
* session_state_delegate() {
385 return session_state_delegate_
.get();
388 AccessibilityDelegate
* accessibility_delegate() {
389 return accessibility_delegate_
.get();
392 NewWindowDelegate
* new_window_delegate() {
393 return new_window_delegate_
.get();
396 MediaDelegate
* media_delegate() {
397 return media_delegate_
.get();
400 HighContrastController
* high_contrast_controller() {
401 return high_contrast_controller_
.get();
404 MagnificationController
* magnification_controller() {
405 return magnification_controller_
.get();
408 PartialMagnificationController
* partial_magnification_controller() {
409 return partial_magnification_controller_
.get();
412 AutoclickController
* autoclick_controller() {
413 return autoclick_controller_
.get();
416 aura::client::ActivationClient
* activation_client() {
417 return activation_client_
;
420 ShelfItemDelegateManager
* shelf_item_delegate_manager() {
421 return shelf_item_delegate_manager_
.get();
424 // Force the shelf to query for it's current visibility state.
425 void UpdateShelfVisibility();
427 // TODO(oshima): Define an interface to access shelf/launcher
428 // state, or just use Launcher.
430 // Sets/gets the shelf auto-hide behavior on |root_window|.
431 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior
,
432 aura::Window
* root_window
);
433 ShelfAutoHideBehavior
GetShelfAutoHideBehavior(
434 aura::Window
* root_window
) const;
436 // Sets/gets shelf's alignment on |root_window|.
437 void SetShelfAlignment(ShelfAlignment alignment
,
438 aura::Window
* root_window
);
439 ShelfAlignment
GetShelfAlignment(aura::Window
* root_window
);
441 // Dims or undims the screen.
442 void SetDimming(bool should_dim
);
444 // Notifies |observers_| when entering or exiting fullscreen mode in
446 void NotifyFullscreenStateChange(bool is_fullscreen
,
447 aura::Window
* root_window
);
449 // Creates a modal background (a partially-opaque fullscreen window)
450 // on all displays for |window|.
451 void CreateModalBackground(aura::Window
* window
);
453 // Called when a modal window is removed. It will activate
454 // another modal window if any, or remove modal screens
456 void OnModalWindowRemoved(aura::Window
* removed
);
458 // Returns WebNotificationTray on the primary root window.
459 WebNotificationTray
* GetWebNotificationTray();
461 // Does the primary display have status area?
462 bool HasPrimaryStatusArea();
464 // Returns the system tray on primary display.
465 SystemTray
* GetPrimarySystemTray();
467 SystemTrayDelegate
* system_tray_delegate() {
468 return system_tray_delegate_
.get();
471 SystemTrayNotifier
* system_tray_notifier() {
472 return system_tray_notifier_
.get();
475 static void set_initially_hide_cursor(bool hide
) {
476 initially_hide_cursor_
= hide
;
479 ResizeShadowController
* resize_shadow_controller() {
480 return resize_shadow_controller_
.get();
483 // Made available for tests.
484 ::wm::ShadowController
* shadow_controller() {
485 return shadow_controller_
.get();
488 // Starts the animation that occurs on first login.
489 void DoInitialWorkspaceAnimation();
491 AccelerometerController
* accelerometer_controller() {
492 return accelerometer_controller_
.get();
495 MaximizeModeController
* maximize_mode_controller() {
496 return maximize_mode_controller_
.get();
499 #if defined(OS_CHROMEOS)
500 // TODO(oshima): Move these objects to DisplayController.
501 ui::DisplayConfigurator
* display_configurator() {
502 return display_configurator_
.get();
504 OutputConfiguratorAnimation
* output_configurator_animation() {
505 return output_configurator_animation_
.get();
507 DisplayErrorObserver
* display_error_observer() {
508 return display_error_observer_
.get();
511 ResolutionNotificationController
* resolution_notification_controller() {
512 return resolution_notification_controller_
.get();
515 LogoutConfirmationController
* logout_confirmation_controller() {
516 return logout_confirmation_controller_
.get();
518 #endif // defined(OS_CHROMEOS)
520 ShelfModel
* shelf_model() {
521 return shelf_model_
.get();
524 WindowPositioner
* window_positioner() {
525 return window_positioner_
.get();
528 // Returns the launcher delegate, creating if necesary.
529 ShelfDelegate
* GetShelfDelegate();
531 UserMetricsRecorder
* metrics() {
532 return user_metrics_recorder_
.get();
535 void SetTouchHudProjectionEnabled(bool enabled
);
537 bool is_touch_hud_projection_enabled() const {
538 return is_touch_hud_projection_enabled_
;
541 #if defined(OS_CHROMEOS)
542 // Creates instance of FirstRunHelper. Caller is responsible for deleting
544 ash::FirstRunHelper
* CreateFirstRunHelper();
546 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
547 // compositing is enabled, and vice versa.
548 void SetCursorCompositingEnabled(bool enabled
);
550 StickyKeysController
* sticky_keys_controller() {
551 return sticky_keys_controller_
.get();
553 #endif // defined(OS_CHROMEOS)
555 GPUSupport
* gpu_support() { return gpu_support_
.get(); }
558 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest
, TestCursor
);
559 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest
, MouseEventCursors
);
560 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest
, TransformActivate
);
561 friend class RootWindowController
;
562 friend class ScopedTargetRootWindow
;
563 friend class test::ShellTestApi
;
564 friend class shell::WindowWatcher
;
566 typedef std::pair
<aura::Window
*, gfx::Rect
> WindowAndBoundsPair
;
568 // Takes ownership of |delegate|.
569 explicit Shell(ShellDelegate
* delegate
);
574 // Initializes virtual keyboard controller.
577 // Initializes the root window so that it can host browser windows.
578 void InitRootWindow(aura::Window
* root_window
);
580 // ash::SystemModalContainerEventFilterDelegate overrides:
581 virtual bool CanWindowReceiveEvents(aura::Window
* window
) OVERRIDE
;
583 // Overridden from ui::EventTarget:
584 virtual bool CanAcceptEvent(const ui::Event
& event
) OVERRIDE
;
585 virtual EventTarget
* GetParentTarget() OVERRIDE
;
586 virtual scoped_ptr
<ui::EventTargetIterator
> GetChildIterator() const OVERRIDE
;
587 virtual ui::EventTargeter
* GetEventTargeter() OVERRIDE
;
588 virtual void OnEvent(ui::Event
* event
) OVERRIDE
;
590 // Overridden from aura::client::ActivationChangeObserver:
591 virtual void OnWindowActivated(aura::Window
* gained_active
,
592 aura::Window
* lost_active
) OVERRIDE
;
594 static Shell
* instance_
;
596 // If set before the Shell is initialized, the mouse cursor will be hidden
597 // when the screen is initially created.
598 static bool initially_hide_cursor_
;
600 // When no explicit target display/RootWindow is given, new windows are
601 // created on |scoped_target_root_window_| , unless NULL in
602 // which case they are created on |target_root_window_|.
603 // |target_root_window_| never becomes NULL during the session.
604 aura::Window
* target_root_window_
;
605 aura::Window
* scoped_target_root_window_
;
607 // The CompoundEventFilter owned by aura::Env object.
608 scoped_ptr
< ::wm::CompoundEventFilter
> env_filter_
;
610 std::vector
<WindowAndBoundsPair
> to_restore_
;
612 scoped_ptr
<UserMetricsRecorder
> user_metrics_recorder_
;
613 scoped_ptr
<NestedDispatcherController
> nested_dispatcher_controller_
;
614 scoped_ptr
<AcceleratorController
> accelerator_controller_
;
615 scoped_ptr
<ShellDelegate
> delegate_
;
616 scoped_ptr
<SystemTrayDelegate
> system_tray_delegate_
;
617 scoped_ptr
<SystemTrayNotifier
> system_tray_notifier_
;
618 scoped_ptr
<UserWallpaperDelegate
> user_wallpaper_delegate_
;
619 scoped_ptr
<SessionStateDelegate
> session_state_delegate_
;
620 scoped_ptr
<AccessibilityDelegate
> accessibility_delegate_
;
621 scoped_ptr
<NewWindowDelegate
> new_window_delegate_
;
622 scoped_ptr
<MediaDelegate
> media_delegate_
;
623 scoped_ptr
<ShelfDelegate
> shelf_delegate_
;
624 scoped_ptr
<ShelfItemDelegateManager
> shelf_item_delegate_manager_
;
625 scoped_ptr
<ShelfWindowWatcher
> shelf_window_watcher_
;
627 scoped_ptr
<ShelfModel
> shelf_model_
;
628 scoped_ptr
<WindowPositioner
> window_positioner_
;
630 scoped_ptr
<AppListController
> app_list_controller_
;
632 scoped_ptr
<DragDropController
> drag_drop_controller_
;
633 scoped_ptr
<ResizeShadowController
> resize_shadow_controller_
;
634 scoped_ptr
< ::wm::ShadowController
> shadow_controller_
;
635 scoped_ptr
< ::wm::VisibilityController
> visibility_controller_
;
636 scoped_ptr
< ::wm::WindowModalityController
> window_modality_controller_
;
637 scoped_ptr
<views::corewm::TooltipController
> tooltip_controller_
;
638 scoped_ptr
<DesktopBackgroundController
> desktop_background_controller_
;
639 scoped_ptr
<PowerButtonController
> power_button_controller_
;
640 scoped_ptr
<LockStateController
> lock_state_controller_
;
641 scoped_ptr
<MruWindowTracker
> mru_window_tracker_
;
642 scoped_ptr
< ::wm::UserActivityDetector
> user_activity_detector_
;
643 scoped_ptr
<VideoDetector
> video_detector_
;
644 scoped_ptr
<WindowSelectorController
> window_selector_controller_
;
645 scoped_ptr
<FocusCycler
> focus_cycler_
;
646 scoped_ptr
<DisplayController
> display_controller_
;
647 scoped_ptr
<HighContrastController
> high_contrast_controller_
;
648 scoped_ptr
<MagnificationController
> magnification_controller_
;
649 scoped_ptr
<PartialMagnificationController
> partial_magnification_controller_
;
650 scoped_ptr
<AutoclickController
> autoclick_controller_
;
651 scoped_ptr
<aura::client::FocusClient
> focus_client_
;
652 aura::client::ActivationClient
* activation_client_
;
654 scoped_ptr
<MouseCursorEventFilter
> mouse_cursor_filter_
;
655 scoped_ptr
<ScreenPositionController
> screen_position_controller_
;
656 scoped_ptr
<SystemModalContainerEventFilter
> modality_filter_
;
657 scoped_ptr
<EventClientImpl
> event_client_
;
658 scoped_ptr
<EventTransformationHandler
> event_transformation_handler_
;
660 // An event filter that pre-handles key events while the partial
661 // screenshot UI or the keyboard overlay is active.
662 scoped_ptr
<OverlayEventFilter
> overlay_filter_
;
664 // An event filter for logging keyboard-related metrics.
665 scoped_ptr
<KeyboardUMAEventFilter
> keyboard_metrics_filter_
;
667 // An event filter which handles moving and resizing windows.
668 scoped_ptr
<ToplevelWindowEventHandler
> toplevel_window_event_handler_
;
670 // An event filter which handles system level gestures
671 scoped_ptr
<SystemGestureEventFilter
> system_gesture_filter_
;
673 // An event filter that pre-handles global accelerators.
674 scoped_ptr
<AcceleratorFilter
> accelerator_filter_
;
676 // An event filter that pre-handles all key events to send them to an IME.
677 scoped_ptr
< ::wm::InputMethodEventFilter
> input_method_filter_
;
679 scoped_ptr
<DisplayManager
> display_manager_
;
680 scoped_ptr
<base::WeakPtrFactory
<DisplayManager
> >
681 weak_display_manager_factory_
;
683 scoped_ptr
<LocaleNotificationController
> locale_notification_controller_
;
685 // The maximized window manager (if enabled).
686 scoped_ptr
<MaximizeModeWindowManager
> maximize_mode_window_manager_
;
688 scoped_ptr
<AccelerometerController
> accelerometer_controller_
;
690 #if defined(OS_CHROMEOS)
691 scoped_ptr
<PowerEventObserver
> power_event_observer_
;
692 scoped_ptr
<ui::UserActivityNotifier
> user_activity_notifier_
;
693 scoped_ptr
<VideoActivityNotifier
> video_activity_notifier_
;
694 scoped_ptr
<StickyKeysController
> sticky_keys_controller_
;
695 scoped_ptr
<ResolutionNotificationController
>
696 resolution_notification_controller_
;
697 scoped_ptr
<BluetoothNotificationController
>
698 bluetooth_notification_controller_
;
699 scoped_ptr
<LogoutConfirmationController
> logout_confirmation_controller_
;
700 scoped_ptr
<LastWindowClosedLogoutReminder
>
701 last_window_closed_logout_reminder_
;
702 // Controls video output device state.
703 scoped_ptr
<ui::DisplayConfigurator
> display_configurator_
;
704 scoped_ptr
<OutputConfiguratorAnimation
> output_configurator_animation_
;
705 scoped_ptr
<DisplayErrorObserver
> display_error_observer_
;
706 scoped_ptr
<ProjectingObserver
> projecting_observer_
;
708 // Listens for output changes and updates the display manager.
709 scoped_ptr
<DisplayChangeObserver
> display_change_observer_
;
712 scoped_ptr
<ui::EventHandler
> magnifier_key_scroll_handler_
;
713 scoped_ptr
<ui::EventHandler
> speech_feedback_handler_
;
714 #endif // defined(USE_X11)
715 #endif // defined(OS_CHROMEOS)
717 scoped_ptr
<MaximizeModeController
> maximize_mode_controller_
;
719 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
720 // pointer to vend to test code.
721 AshNativeCursorManager
* native_cursor_manager_
;
723 // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
724 // the cursor on Windows.
725 #if defined(OS_CHROMEOS)
726 CursorManager cursor_manager_
;
727 #else // !defined(OS_CHROMEOS)
728 ::wm::CursorManager cursor_manager_
;
729 #endif // defined(OS_CHROMEOS)
731 ObserverList
<ShellObserver
> observers_
;
733 // For testing only: simulate that a modal window is open
734 bool simulate_modal_window_open_for_testing_
;
736 bool is_touch_hud_projection_enabled_
;
738 // Injected content::GPUDataManager support.
739 scoped_ptr
<GPUSupport
> gpu_support_
;
741 DISALLOW_COPY_AND_ASSIGN(Shell
);
746 #endif // ASH_SHELL_H_