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 UserActivityPowerManagerNotifier
;
57 class NonClientFrameView
;
60 class TooltipController
;
65 class AcceleratorFilter
;
66 class CompoundEventFilter
;
67 class InputMethodEventFilter
;
68 class NestedAcceleratorController
;
69 class ShadowController
;
70 class VisibilityController
;
71 class UserActivityDetector
;
72 class WindowModalityController
;
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
;
91 class DragDropController
;
92 class EventClientImpl
;
93 class EventRewriterEventFilter
;
94 class EventTransformationHandler
;
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
;
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
;
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 UserActivityDetector
;
143 class UserWallpaperDelegate
;
144 class VirtualKeyboardController
;
145 class VideoActivityNotifier
;
147 class WebNotificationTray
;
148 class WindowCycleController
;
149 class WindowPositioner
;
150 class WindowSelectorController
;
160 // Shell is a singleton object that presents the Shell API and implements the
161 // RootWindow's delegate interface.
163 // Upon creation, the Shell sets itself as the RootWindow's delegate, which
164 // takes ownership of the Shell.
165 class ASH_EXPORT Shell
: public SystemModalContainerEventFilterDelegate
,
166 public ui::EventTarget
,
167 public aura::client::ActivationChangeObserver
{
169 typedef std::vector
<RootWindowController
*> RootWindowControllerList
;
176 // A shell must be explicitly created so that it can call |Init()| with the
177 // delegate set. |delegate| can be NULL (if not required for initialization).
178 // Takes ownership of |delegate|.
179 static Shell
* CreateInstance(const ShellInitParams
& init_params
);
181 // Should never be called before |CreateInstance()|.
182 static Shell
* GetInstance();
184 // Returns true if the ash shell has been instantiated.
185 static bool HasInstance();
187 static void DeleteInstance();
189 // Returns the root window controller for the primary root window.
190 // TODO(oshima): move this to |RootWindowController|
191 static RootWindowController
* GetPrimaryRootWindowController();
193 // Returns all root window controllers.
194 // TODO(oshima): move this to |RootWindowController|
195 static RootWindowControllerList
GetAllRootWindowControllers();
197 // Returns the primary root Window. The primary root Window is the one that
199 static aura::Window
* GetPrimaryRootWindow();
201 // Returns a root Window when used as a target when creating a new window.
202 // The root window of the active window is used in most cases, but can
203 // be overridden by using ScopedTargetRootWindow().
204 // If you want to get the root Window of the active window, just use
205 // |wm::GetActiveWindow()->GetRootWindow()|.
206 static aura::Window
* GetTargetRootWindow();
208 // Returns the global Screen object that's always active in ash.
209 static gfx::Screen
* GetScreen();
211 // Returns all root windows.
212 static aura::Window::Windows
GetAllRootWindows();
214 static aura::Window
* GetContainer(aura::Window
* root_window
,
216 static const aura::Window
* GetContainer(const aura::Window
* root_window
,
219 // Returns the list of containers that match |container_id| in
220 // all root windows. If |priority_root| is given, the container
221 // in the |priority_root| will be inserted at the top of the list.
222 static std::vector
<aura::Window
*> GetContainersFromAllRootWindows(
224 aura::Window
* priority_root
);
226 void set_target_root_window(aura::Window
* target_root_window
) {
227 target_root_window_
= target_root_window
;
230 // Shows the context menu for the background and launcher at
231 // |location_in_screen| (in screen coordinates).
232 void ShowContextMenu(const gfx::Point
& location_in_screen
,
233 ui::MenuSourceType source_type
);
235 // Shows the app list. |window| specifies in which display the app
236 // list should be shown. If this is NULL, the active root window
238 void ShowAppList(aura::Window
* anchor
);
240 // Dismisses the app list.
241 void DismissAppList();
243 // Shows the app list if it's not visible. Dismisses it otherwise.
244 void ToggleAppList(aura::Window
* anchor
);
246 // Returns app list target visibility.
247 bool GetAppListTargetVisibility() const;
249 // Returns app list window or NULL if it is not visible.
250 aura::Window
* GetAppListWindow();
252 // Returns app list view or NULL if it is not visible.
253 app_list::AppListView
* GetAppListView();
255 // Returns true if a system-modal dialog window is currently open.
256 bool IsSystemModalWindowOpen() const;
258 // For testing only: set simulation that a modal window is open
259 void SimulateModalWindowOpenForTesting(bool modal_window_open
) {
260 simulate_modal_window_open_for_testing_
= modal_window_open
;
263 // Creates a default views::NonClientFrameView for use by windows in the
265 views::NonClientFrameView
* CreateDefaultNonClientFrameView(
266 views::Widget
* widget
);
268 // Rotates focus through containers that can receive focus.
269 void RotateFocus(Direction direction
);
271 // Sets the work area insets of the display that contains |window|,
272 // this notifies observers too.
273 // TODO(sky): this no longer really replicates what happens and is unreliable.
275 void SetDisplayWorkAreaInsets(aura::Window
* window
,
276 const gfx::Insets
& insets
);
278 // Called when the user logs in.
279 void OnLoginStateChanged(user::LoginStatus status
);
281 // Called after the logged-in user's profile is ready.
282 void OnLoginUserProfilePrepared();
284 // Called when the login status changes.
285 // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
286 void UpdateAfterLoginStatusChange(user::LoginStatus status
);
288 // Called when the application is exiting.
289 void OnAppTerminating();
291 // Called when the screen is locked (after the lock window is visible) or
293 void OnLockStateChanged(bool locked
);
295 // Called when a casting session is started or stopped.
296 void OnCastingSessionStartedOrStopped(bool started
);
298 // Called when the overview mode is about to be started (before the windows
300 void OnOverviewModeStarting();
302 // Called before the overview mode is ending (before the windows get arranged
303 // to their final position).
304 void OnOverviewModeEnding();
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.
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
324 void CreateKeyboard();
326 // Deactivates the virtual keyboard.
327 void DeactivateKeyboard();
329 // Show shelf view if it was created hidden (before session has started).
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();
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 TouchTransformerController
* touch_transformer_controller() {
386 return touch_transformer_controller_
.get();
388 #endif // defined(OS_CHROMEOS)
389 MouseCursorEventFilter
* mouse_cursor_filter() {
390 return mouse_cursor_filter_
.get();
392 EventTransformationHandler
* event_transformation_handler() {
393 return event_transformation_handler_
.get();
395 ::wm::CursorManager
* cursor_manager() { return &cursor_manager_
; }
397 ShellDelegate
* delegate() { return delegate_
.get(); }
399 UserWallpaperDelegate
* user_wallpaper_delegate() {
400 return user_wallpaper_delegate_
.get();
403 SessionStateDelegate
* session_state_delegate() {
404 return session_state_delegate_
.get();
407 AccessibilityDelegate
* accessibility_delegate() {
408 return accessibility_delegate_
.get();
411 NewWindowDelegate
* new_window_delegate() {
412 return new_window_delegate_
.get();
415 MediaDelegate
* media_delegate() {
416 return media_delegate_
.get();
419 HighContrastController
* high_contrast_controller() {
420 return high_contrast_controller_
.get();
423 MagnificationController
* magnification_controller() {
424 return magnification_controller_
.get();
427 PartialMagnificationController
* partial_magnification_controller() {
428 return partial_magnification_controller_
.get();
431 AutoclickController
* autoclick_controller() {
432 return autoclick_controller_
.get();
435 aura::client::ActivationClient
* activation_client() {
436 return activation_client_
;
439 ShelfItemDelegateManager
* shelf_item_delegate_manager() {
440 return shelf_item_delegate_manager_
.get();
443 // Force the shelf to query for it's current visibility state.
444 void UpdateShelfVisibility();
446 // TODO(oshima): Define an interface to access shelf/launcher
447 // state, or just use Launcher.
449 // Sets/gets the shelf auto-hide behavior on |root_window|.
450 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior
,
451 aura::Window
* root_window
);
452 ShelfAutoHideBehavior
GetShelfAutoHideBehavior(
453 aura::Window
* root_window
) const;
455 // Sets/gets shelf's alignment on |root_window|.
456 void SetShelfAlignment(ShelfAlignment alignment
,
457 aura::Window
* root_window
);
458 ShelfAlignment
GetShelfAlignment(const aura::Window
* root_window
);
460 // Dims or undims the screen.
461 void SetDimming(bool should_dim
);
463 // Notifies |observers_| when entering or exiting fullscreen mode in
465 void NotifyFullscreenStateChange(bool is_fullscreen
,
466 aura::Window
* root_window
);
468 // Creates a modal background (a partially-opaque fullscreen window)
469 // on all displays for |window|.
470 void CreateModalBackground(aura::Window
* window
);
472 // Called when a modal window is removed. It will activate
473 // another modal window if any, or remove modal screens
475 void OnModalWindowRemoved(aura::Window
* removed
);
477 // Returns WebNotificationTray on the primary root window.
478 WebNotificationTray
* GetWebNotificationTray();
480 // Does the primary display have status area?
481 bool HasPrimaryStatusArea();
483 // Returns the system tray on primary display.
484 SystemTray
* GetPrimarySystemTray();
486 SystemTrayDelegate
* system_tray_delegate() {
487 return system_tray_delegate_
.get();
490 SystemTrayNotifier
* system_tray_notifier() {
491 return system_tray_notifier_
.get();
494 static void set_initially_hide_cursor(bool hide
) {
495 initially_hide_cursor_
= hide
;
498 ResizeShadowController
* resize_shadow_controller() {
499 return resize_shadow_controller_
.get();
502 // Made available for tests.
503 ::wm::ShadowController
* shadow_controller() {
504 return shadow_controller_
.get();
507 // Starts the animation that occurs on first login.
508 void DoInitialWorkspaceAnimation();
510 AccelerometerController
* accelerometer_controller() {
511 return accelerometer_controller_
.get();
514 MaximizeModeController
* maximize_mode_controller() {
515 return maximize_mode_controller_
.get();
518 #if defined(OS_CHROMEOS)
519 // TODO(oshima): Move these objects to DisplayController.
520 ui::DisplayConfigurator
* display_configurator() {
521 return display_configurator_
.get();
523 DisplayConfiguratorAnimation
* display_configurator_animation() {
524 return display_configurator_animation_
.get();
526 DisplayErrorObserver
* display_error_observer() {
527 return display_error_observer_
.get();
530 ResolutionNotificationController
* resolution_notification_controller() {
531 return resolution_notification_controller_
.get();
534 LogoutConfirmationController
* logout_confirmation_controller() {
535 return logout_confirmation_controller_
.get();
538 VirtualKeyboardController
* virtual_keyboard_controller() {
539 return virtual_keyboard_controller_
.get();
541 #endif // defined(OS_CHROMEOS)
543 ShelfModel
* shelf_model() {
544 return shelf_model_
.get();
547 WindowPositioner
* window_positioner() {
548 return window_positioner_
.get();
551 // Returns the launcher delegate, creating if necesary.
552 ShelfDelegate
* GetShelfDelegate();
554 UserMetricsRecorder
* metrics() {
555 return user_metrics_recorder_
.get();
558 void SetTouchHudProjectionEnabled(bool enabled
);
560 bool is_touch_hud_projection_enabled() const {
561 return is_touch_hud_projection_enabled_
;
564 #if defined(OS_CHROMEOS)
565 // Creates instance of FirstRunHelper. Caller is responsible for deleting
567 ash::FirstRunHelper
* CreateFirstRunHelper();
569 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
570 // compositing is enabled, and vice versa.
571 void SetCursorCompositingEnabled(bool enabled
);
573 StickyKeysController
* sticky_keys_controller() {
574 return sticky_keys_controller_
.get();
576 #endif // defined(OS_CHROMEOS)
578 GPUSupport
* gpu_support() { return gpu_support_
.get(); }
581 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest
, TestCursor
);
582 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest
, MouseEventCursors
);
583 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest
, TransformActivate
);
584 friend class RootWindowController
;
585 friend class ScopedTargetRootWindow
;
586 friend class test::ShellTestApi
;
587 friend class shell::WindowWatcher
;
589 typedef std::pair
<aura::Window
*, gfx::Rect
> WindowAndBoundsPair
;
591 // Takes ownership of |delegate|.
592 explicit Shell(ShellDelegate
* delegate
);
595 void Init(const ShellInitParams
& init_params
);
597 // Initializes virtual keyboard controller.
600 // Initializes the root window so that it can host browser windows.
601 void InitRootWindow(aura::Window
* root_window
);
603 // ash::SystemModalContainerEventFilterDelegate overrides:
604 bool CanWindowReceiveEvents(aura::Window
* window
) override
;
606 // Overridden from ui::EventTarget:
607 bool CanAcceptEvent(const ui::Event
& event
) override
;
608 EventTarget
* GetParentTarget() override
;
609 scoped_ptr
<ui::EventTargetIterator
> GetChildIterator() const override
;
610 ui::EventTargeter
* GetEventTargeter() override
;
611 void OnEvent(ui::Event
* event
) override
;
613 // Overridden from aura::client::ActivationChangeObserver:
614 void OnWindowActivated(aura::Window
* gained_active
,
615 aura::Window
* lost_active
) override
;
617 static Shell
* instance_
;
619 // If set before the Shell is initialized, the mouse cursor will be hidden
620 // when the screen is initially created.
621 static bool initially_hide_cursor_
;
623 // When no explicit target display/RootWindow is given, new windows are
624 // created on |scoped_target_root_window_| , unless NULL in
625 // which case they are created on |target_root_window_|.
626 // |target_root_window_| never becomes NULL during the session.
627 aura::Window
* target_root_window_
;
628 aura::Window
* scoped_target_root_window_
;
630 // The CompoundEventFilter owned by aura::Env object.
631 scoped_ptr
< ::wm::CompoundEventFilter
> env_filter_
;
633 std::vector
<WindowAndBoundsPair
> to_restore_
;
635 scoped_ptr
<UserMetricsRecorder
> user_metrics_recorder_
;
636 scoped_ptr
< ::wm::NestedAcceleratorController
> nested_accelerator_controller_
;
637 scoped_ptr
<AcceleratorController
> accelerator_controller_
;
638 scoped_ptr
<ShellDelegate
> delegate_
;
639 scoped_ptr
<SystemTrayDelegate
> system_tray_delegate_
;
640 scoped_ptr
<SystemTrayNotifier
> system_tray_notifier_
;
641 scoped_ptr
<UserWallpaperDelegate
> user_wallpaper_delegate_
;
642 scoped_ptr
<SessionStateDelegate
> session_state_delegate_
;
643 scoped_ptr
<AccessibilityDelegate
> accessibility_delegate_
;
644 scoped_ptr
<NewWindowDelegate
> new_window_delegate_
;
645 scoped_ptr
<MediaDelegate
> media_delegate_
;
646 scoped_ptr
<ShelfDelegate
> shelf_delegate_
;
647 scoped_ptr
<ShelfItemDelegateManager
> shelf_item_delegate_manager_
;
648 scoped_ptr
<ShelfWindowWatcher
> shelf_window_watcher_
;
650 scoped_ptr
<ShelfModel
> shelf_model_
;
651 scoped_ptr
<WindowPositioner
> window_positioner_
;
653 scoped_ptr
<AppListController
> app_list_controller_
;
655 scoped_ptr
<DragDropController
> drag_drop_controller_
;
656 scoped_ptr
<ResizeShadowController
> resize_shadow_controller_
;
657 scoped_ptr
< ::wm::ShadowController
> shadow_controller_
;
658 scoped_ptr
< ::wm::VisibilityController
> visibility_controller_
;
659 scoped_ptr
< ::wm::WindowModalityController
> window_modality_controller_
;
660 scoped_ptr
<views::corewm::TooltipController
> tooltip_controller_
;
661 scoped_ptr
<DesktopBackgroundController
> desktop_background_controller_
;
662 scoped_ptr
<PowerButtonController
> power_button_controller_
;
663 scoped_ptr
<LockStateController
> lock_state_controller_
;
664 scoped_ptr
<MruWindowTracker
> mru_window_tracker_
;
665 scoped_ptr
< ::wm::UserActivityDetector
> user_activity_detector_
;
666 scoped_ptr
<VideoDetector
> video_detector_
;
667 scoped_ptr
<WindowCycleController
> window_cycle_controller_
;
668 scoped_ptr
<WindowSelectorController
> window_selector_controller_
;
669 scoped_ptr
<FocusCycler
> focus_cycler_
;
670 scoped_ptr
<DisplayController
> display_controller_
;
671 scoped_ptr
<HighContrastController
> high_contrast_controller_
;
672 scoped_ptr
<MagnificationController
> magnification_controller_
;
673 scoped_ptr
<PartialMagnificationController
> partial_magnification_controller_
;
674 scoped_ptr
<AutoclickController
> autoclick_controller_
;
675 scoped_ptr
<aura::client::FocusClient
> focus_client_
;
676 aura::client::ActivationClient
* activation_client_
;
678 scoped_ptr
<MouseCursorEventFilter
> mouse_cursor_filter_
;
679 scoped_ptr
<ScreenPositionController
> screen_position_controller_
;
680 scoped_ptr
<SystemModalContainerEventFilter
> modality_filter_
;
681 scoped_ptr
<EventClientImpl
> event_client_
;
682 scoped_ptr
<EventTransformationHandler
> event_transformation_handler_
;
684 // An event filter that pre-handles key events while the partial
685 // screenshot UI or the keyboard overlay is active.
686 scoped_ptr
<OverlayEventFilter
> overlay_filter_
;
688 // An event filter for logging keyboard-related metrics.
689 scoped_ptr
<KeyboardUMAEventFilter
> keyboard_metrics_filter_
;
691 // An event filter which handles moving and resizing windows.
692 scoped_ptr
<ToplevelWindowEventHandler
> toplevel_window_event_handler_
;
694 // An event filter which handles system level gestures
695 scoped_ptr
<SystemGestureEventFilter
> system_gesture_filter_
;
697 // An event filter that pre-handles global accelerators.
698 scoped_ptr
< ::wm::AcceleratorFilter
> accelerator_filter_
;
700 // An event filter that pre-handles all key events to send them to an IME.
701 scoped_ptr
< ::wm::InputMethodEventFilter
> input_method_filter_
;
703 scoped_ptr
<DisplayManager
> display_manager_
;
704 scoped_ptr
<base::WeakPtrFactory
<DisplayManager
> >
705 weak_display_manager_factory_
;
707 scoped_ptr
<LocaleNotificationController
> locale_notification_controller_
;
709 scoped_ptr
<AccelerometerController
> accelerometer_controller_
;
711 #if defined(OS_CHROMEOS)
712 scoped_ptr
<PowerEventObserver
> power_event_observer_
;
713 scoped_ptr
<ui::UserActivityPowerManagerNotifier
> user_activity_notifier_
;
714 scoped_ptr
<VideoActivityNotifier
> video_activity_notifier_
;
715 scoped_ptr
<StickyKeysController
> sticky_keys_controller_
;
716 scoped_ptr
<ResolutionNotificationController
>
717 resolution_notification_controller_
;
718 scoped_ptr
<BluetoothNotificationController
>
719 bluetooth_notification_controller_
;
720 scoped_ptr
<LogoutConfirmationController
> logout_confirmation_controller_
;
721 scoped_ptr
<LastWindowClosedLogoutReminder
>
722 last_window_closed_logout_reminder_
;
723 scoped_ptr
<VirtualKeyboardController
> virtual_keyboard_controller_
;
724 // Controls video output device state.
725 scoped_ptr
<ui::DisplayConfigurator
> display_configurator_
;
726 scoped_ptr
<DisplayConfiguratorAnimation
> display_configurator_animation_
;
727 scoped_ptr
<DisplayErrorObserver
> display_error_observer_
;
728 scoped_ptr
<ProjectingObserver
> projecting_observer_
;
730 // Listens for output changes and updates the display manager.
731 scoped_ptr
<DisplayChangeObserver
> display_change_observer_
;
733 scoped_ptr
<TouchTransformerController
> touch_transformer_controller_
;
736 scoped_ptr
<ui::EventHandler
> magnifier_key_scroll_handler_
;
737 scoped_ptr
<ui::EventHandler
> speech_feedback_handler_
;
738 #endif // defined(USE_X11)
739 #endif // defined(OS_CHROMEOS)
741 scoped_ptr
<MaximizeModeController
> maximize_mode_controller_
;
743 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
744 // pointer to vend to test code.
745 AshNativeCursorManager
* native_cursor_manager_
;
747 // Cursor may be hidden on certain key events in ChromeOS, whereas we never hide
748 // the cursor on Windows.
749 #if defined(OS_CHROMEOS)
750 CursorManager cursor_manager_
;
751 #else // !defined(OS_CHROMEOS)
752 ::wm::CursorManager cursor_manager_
;
753 #endif // defined(OS_CHROMEOS)
755 ObserverList
<ShellObserver
> observers_
;
757 // For testing only: simulate that a modal window is open
758 bool simulate_modal_window_open_for_testing_
;
760 bool is_touch_hud_projection_enabled_
;
762 // Injected content::GPUDataManager support.
763 scoped_ptr
<GPUSupport
> gpu_support_
;
765 DISALLOW_COPY_AND_ASSIGN(Shell
);
770 #endif // ASH_SHELL_H_