Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ash / shell.h
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.
4
5 #ifndef ASH_SHELL_H_
6 #define ASH_SHELL_H_
7
8 #include <utility>
9 #include <vector>
10
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/system_modal_container_event_filter_delegate.h"
16 #include "base/basictypes.h"
17 #include "base/compiler_specific.h"
18 #include "base/gtest_prod_util.h"
19 #include "base/memory/scoped_ptr.h"
20 #include "base/memory/weak_ptr.h"
21 #include "base/observer_list.h"
22 #include "ui/aura/client/activation_change_observer.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/views/corewm/cursor_manager.h"
30
31 class CommandLine;
32
33 namespace app_list {
34 class AppListView;
35 }
36 namespace aura {
37 class EventFilter;
38 class RootWindow;
39 class Window;
40 namespace client {
41 class ActivationClient;
42 class FocusClient;
43 class UserActionClient;
44 }
45 }
46 namespace chromeos {
47 class OutputConfigurator;
48 }
49
50 namespace gfx {
51 class ImageSkia;
52 class Point;
53 class Rect;
54 }
55
56 namespace keyboard {
57 class KeyboardController;
58 }
59
60 namespace ui {
61 class Layer;
62 }
63 namespace views {
64 class NonClientFrameView;
65 class Widget;
66 namespace corewm {
67 class CompoundEventFilter;
68 class InputMethodEventFilter;
69 class ShadowController;
70 class TooltipController;
71 class VisibilityController;
72 class WindowModalityController;
73 }
74 }
75
76 namespace ash {
77
78 class AcceleratorController;
79 class AccessibilityDelegate;
80 class AshNativeCursorManager;
81 class AutoclickController;
82 class CapsLockDelegate;
83 class DesktopBackgroundController;
84 class DisplayController;
85 class FirstRunHelper;
86 class GPUSupport;
87 class HighContrastController;
88 class LockStateController;
89 class MagnificationController;
90 class MediaDelegate;
91 class MruWindowTracker;
92 class NestedDispatcherController;
93 class NewWindowDelegate;
94 class PartialMagnificationController;
95 class PowerButtonController;
96 class WindowTreeHostFactory;
97 class ScreenAsh;
98 class SessionStateDelegate;
99 class Shelf;
100 class ShelfDelegate;
101 class ShelfItemDelegateManager;
102 class ShelfModel;
103 class ShellDelegate;
104 class ShellObserver;
105 class StickyKeysController;
106 class SystemTray;
107 class SystemTrayDelegate;
108 class SystemTrayNotifier;
109 class ToplevelWindowEventHandler;
110 class UserActivityDetector;
111 class UserWallpaperDelegate;
112 class VideoDetector;
113 class WebNotificationTray;
114 class WindowCycleController;
115 class WindowPositioner;
116 class WindowSelectorController;
117
118 namespace internal {
119 class AcceleratorFilter;
120 class AppListController;
121 class CaptureController;
122 class DisplayChangeObserver;
123 class DisplayErrorObserver;
124 class DisplayManager;
125 class DragDropController;
126 class EventClientImpl;
127 class EventRewriterEventFilter;
128 class EventTransformationHandler;
129 class FocusCycler;
130 class KeyboardUMAEventFilter;
131 class LocaleNotificationController;
132 class MouseCursorEventFilter;
133 class OutputConfiguratorAnimation;
134 class OverlayEventFilter;
135 class PowerEventObserver;
136 class ProjectingObserver;
137 class ResizeShadowController;
138 class ResolutionNotificationController;
139 class RootWindowController;
140 class ScopedTargetRootWindow;
141 class ScreenPositionController;
142 class ShelfWindowWatcher;
143 class SlowAnimationEventFilter;
144 class StatusAreaWidget;
145 class SystemGestureEventFilter;
146 class SystemModalContainerEventFilter;
147 class TouchObserverHUD;
148 class UserActivityNotifier;
149 class VideoActivityNotifier;
150 }
151
152 namespace shell {
153 class WindowWatcher;
154 }
155
156 namespace test {
157 class ShellTestApi;
158 }
159
160 // Shell is a singleton object that presents the Shell API and implements the
161 // RootWindow's delegate interface.
162 //
163 // Upon creation, the Shell sets itself as the RootWindow's delegate, which
164 // takes ownership of the Shell.
165 class ASH_EXPORT Shell
166     : public internal::SystemModalContainerEventFilterDelegate,
167       public ui::EventTarget,
168       public aura::client::ActivationChangeObserver {
169  public:
170   typedef std::vector<internal::RootWindowController*> RootWindowControllerList;
171
172   enum Direction {
173     FORWARD,
174     BACKWARD
175   };
176
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(ShellDelegate* delegate);
181
182   // Should never be called before |CreateInstance()|.
183   static Shell* GetInstance();
184
185   // Returns true if the ash shell has been instantiated.
186   static bool HasInstance();
187
188   static void DeleteInstance();
189
190   // Returns the root window controller for the primary root window.
191   // TODO(oshima): move this to |RootWindowController|
192   static internal::RootWindowController* GetPrimaryRootWindowController();
193
194   // Returns all root window controllers.
195   // TODO(oshima): move this to |RootWindowController|
196   static RootWindowControllerList GetAllRootWindowControllers();
197
198   // Returns the primary root Window. The primary root Window is the one that
199   // has a launcher.
200   static aura::Window* GetPrimaryRootWindow();
201
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();
208
209   // Returns the global Screen object that's always active in ash.
210   static gfx::Screen* GetScreen();
211
212   // Returns all root windows.
213   static aura::Window::Windows GetAllRootWindows();
214
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);
219
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);
226
227   void set_target_root_window(aura::Window* target_root_window) {
228     target_root_window_ = target_root_window;
229   }
230
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);
235
236   // Toggles 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 ToggleAppList(aura::Window* anchor);
240
241   // Returns app list target visibility.
242   bool GetAppListTargetVisibility() const;
243
244   // Returns app list window or NULL if it is not visible.
245   aura::Window* GetAppListWindow();
246
247   // Returns app list view or NULL if it is not visible.
248   app_list::AppListView* GetAppListView();
249
250   // Returns true if a system-modal dialog window is currently open.
251   bool IsSystemModalWindowOpen() const;
252
253   // For testing only: set simulation that a modal window is open
254   void SimulateModalWindowOpenForTesting(bool modal_window_open) {
255     simulate_modal_window_open_for_testing_ = modal_window_open;
256   }
257
258   // Creates a default views::NonClientFrameView for use by windows in the
259   // Ash environment.
260   views::NonClientFrameView* CreateDefaultNonClientFrameView(
261       views::Widget* widget);
262
263   // Rotates focus through containers that can receive focus.
264   void RotateFocus(Direction direction);
265
266   // Sets the work area insets of the display that contains |window|,
267   // this notifies observers too.
268   // TODO(sky): this no longer really replicates what happens and is unreliable.
269   // Remove this.
270   void SetDisplayWorkAreaInsets(aura::Window* window,
271                                 const gfx::Insets& insets);
272
273   // Called when the user logs in.
274   void OnLoginStateChanged(user::LoginStatus status);
275
276   // Called after the logged-in user's profile is ready.
277   void OnLoginUserProfilePrepared();
278
279   // Called when the login status changes.
280   // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
281   void UpdateAfterLoginStatusChange(user::LoginStatus status);
282
283   // Called when the application is exiting.
284   void OnAppTerminating();
285
286   // Called when the screen is locked (after the lock window is visible) or
287   // unlocked.
288   void OnLockStateChanged(bool locked);
289
290   // Called when a casting session is started or stopped.
291   void OnCastingSessionStartedOrStopped(bool started);
292
293   // Initializes |shelf_|.  Does nothing if it's already initialized.
294   void CreateShelf();
295
296   // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
297   // exists.
298   void CreateKeyboard();
299
300   // Deactivates the virtual keyboard.
301   void DeactivateKeyboard();
302
303   // Show shelf view if it was created hidden (before session has started).
304   void ShowShelf();
305
306   // Adds/removes observer.
307   void AddShellObserver(ShellObserver* observer);
308   void RemoveShellObserver(ShellObserver* observer);
309
310   keyboard::KeyboardController* keyboard_controller() {
311     return keyboard_controller_.get();
312   }
313
314   AcceleratorController* accelerator_controller() {
315     return accelerator_controller_.get();
316   }
317
318   internal::DisplayManager* display_manager() {
319     return display_manager_.get();
320   }
321   views::corewm::InputMethodEventFilter* input_method_filter() {
322     return input_method_filter_.get();
323   }
324   views::corewm::CompoundEventFilter* env_filter() {
325     return env_filter_.get();
326   }
327   views::corewm::TooltipController* tooltip_controller() {
328     return tooltip_controller_.get();
329   }
330   internal::OverlayEventFilter* overlay_filter() {
331     return overlay_filter_.get();
332   }
333   DesktopBackgroundController* desktop_background_controller() {
334     return desktop_background_controller_.get();
335   }
336   PowerButtonController* power_button_controller() {
337     return power_button_controller_.get();
338   }
339   LockStateController* lock_state_controller() {
340     return lock_state_controller_.get();
341   }
342   MruWindowTracker* mru_window_tracker() {
343     return mru_window_tracker_.get();
344   }
345   UserActivityDetector* user_activity_detector() {
346     return user_activity_detector_.get();
347   }
348   VideoDetector* video_detector() {
349     return video_detector_.get();
350   }
351   WindowCycleController* window_cycle_controller() {
352     return window_cycle_controller_.get();
353   }
354   WindowSelectorController* window_selector_controller() {
355     return window_selector_controller_.get();
356   }
357   internal::FocusCycler* focus_cycler() {
358     return focus_cycler_.get();
359   }
360   DisplayController* display_controller() {
361     return display_controller_.get();
362   }
363   internal::MouseCursorEventFilter* mouse_cursor_filter() {
364     return mouse_cursor_filter_.get();
365   }
366   internal::EventTransformationHandler* event_transformation_handler() {
367     return event_transformation_handler_.get();
368   }
369   views::corewm::CursorManager* cursor_manager() { return &cursor_manager_; }
370
371   ShellDelegate* delegate() { return delegate_.get(); }
372
373   UserWallpaperDelegate* user_wallpaper_delegate() {
374     return user_wallpaper_delegate_.get();
375   }
376
377   CapsLockDelegate* caps_lock_delegate() {
378     return caps_lock_delegate_.get();
379   }
380
381   SessionStateDelegate* session_state_delegate() {
382     return session_state_delegate_.get();
383   }
384
385   AccessibilityDelegate* accessibility_delegate() {
386     return accessibility_delegate_.get();
387   }
388
389   NewWindowDelegate* new_window_delegate() {
390     return new_window_delegate_.get();
391   }
392
393   MediaDelegate* media_delegate() {
394     return media_delegate_.get();
395   }
396
397   HighContrastController* high_contrast_controller() {
398     return high_contrast_controller_.get();
399   }
400
401   MagnificationController* magnification_controller() {
402     return magnification_controller_.get();
403   }
404
405   PartialMagnificationController* partial_magnification_controller() {
406     return partial_magnification_controller_.get();
407   }
408
409   AutoclickController* autoclick_controller() {
410     return autoclick_controller_.get();
411   }
412
413   aura::client::ActivationClient* activation_client() {
414     return activation_client_;
415   }
416
417   ShelfItemDelegateManager* shelf_item_delegate_manager() {
418     return shelf_item_delegate_manager_.get();
419   }
420
421   // Force the shelf to query for it's current visibility state.
422   void UpdateShelfVisibility();
423
424   // TODO(oshima): Define an interface to access shelf/launcher
425   // state, or just use Launcher.
426
427   // Sets/gets the shelf auto-hide behavior on |root_window|.
428   void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
429                                 aura::Window* root_window);
430   ShelfAutoHideBehavior GetShelfAutoHideBehavior(
431       aura::Window* root_window) const;
432
433   // Sets/gets shelf's alignment on |root_window|.
434   void SetShelfAlignment(ShelfAlignment alignment,
435                          aura::Window* root_window);
436   ShelfAlignment GetShelfAlignment(aura::Window* root_window);
437
438   // Dims or undims the screen.
439   void SetDimming(bool should_dim);
440
441   // Notifies |observers_| when entering or exiting fullscreen mode in
442   // |root_window|.
443   void NotifyFullscreenStateChange(bool is_fullscreen,
444                                    aura::Window* root_window);
445
446   // Creates a modal background (a partially-opaque fullscreen window)
447   // on all displays for |window|.
448   void CreateModalBackground(aura::Window* window);
449
450   // Called when a modal window is removed. It will activate
451   // another modal window if any, or remove modal screens
452   // on all displays.
453   void OnModalWindowRemoved(aura::Window* removed);
454
455   // Returns WebNotificationTray on the primary root window.
456   WebNotificationTray* GetWebNotificationTray();
457
458   // Does the primary display have status area?
459   bool HasPrimaryStatusArea();
460
461   // Returns the system tray on primary display.
462   SystemTray* GetPrimarySystemTray();
463
464   SystemTrayDelegate* system_tray_delegate() {
465     return system_tray_delegate_.get();
466   }
467
468   SystemTrayNotifier* system_tray_notifier() {
469     return system_tray_notifier_.get();
470   }
471
472   static void set_initially_hide_cursor(bool hide) {
473     initially_hide_cursor_ = hide;
474   }
475
476   internal::ResizeShadowController* resize_shadow_controller() {
477     return resize_shadow_controller_.get();
478   }
479
480   // Made available for tests.
481   views::corewm::ShadowController* shadow_controller() {
482     return shadow_controller_.get();
483   }
484
485   // Starts the animation that occurs on first login.
486   void DoInitialWorkspaceAnimation();
487
488 #if defined(OS_CHROMEOS)
489 #if defined(USE_X11)
490   // TODO(oshima): Move these objects to DisplayController.
491   chromeos::OutputConfigurator* output_configurator() {
492     return output_configurator_.get();
493   }
494   internal::OutputConfiguratorAnimation* output_configurator_animation() {
495     return output_configurator_animation_.get();
496   }
497   internal::DisplayErrorObserver* display_error_observer() {
498     return display_error_observer_.get();
499   }
500 #endif  // defined(USE_X11)
501
502   internal::ResolutionNotificationController*
503       resolution_notification_controller() {
504     return resolution_notification_controller_.get();
505   }
506 #endif  // defined(OS_CHROMEOS)
507
508   WindowTreeHostFactory* window_tree_host_factory() {
509     return window_tree_host_factory_.get();
510   }
511
512   ShelfModel* shelf_model() {
513     return shelf_model_.get();
514   }
515
516   WindowPositioner* window_positioner() {
517     return window_positioner_.get();
518   }
519
520   // Returns the launcher delegate, creating if necesary.
521   ShelfDelegate* GetShelfDelegate();
522
523   UserMetricsRecorder* metrics() {
524     return user_metrics_recorder_.get();
525   }
526
527   void SetTouchHudProjectionEnabled(bool enabled);
528
529   bool is_touch_hud_projection_enabled() const {
530     return is_touch_hud_projection_enabled_;
531   }
532
533 #if defined(OS_CHROMEOS)
534   // Creates instance of FirstRunHelper. Caller is responsible for deleting
535   // returned object.
536   ash::FirstRunHelper* CreateFirstRunHelper();
537
538   // Toggles cursor compositing on/off. Native cursor is disabled when cursor
539   // compositing is enabled, and vice versa.
540   void SetCursorCompositingEnabled(bool enabled);
541
542   StickyKeysController* sticky_keys_controller() {
543     return sticky_keys_controller_.get();
544   }
545 #endif  // defined(OS_CHROMEOS)
546
547   GPUSupport* gpu_support() { return gpu_support_.get(); }
548
549  private:
550   FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
551   FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
552   FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
553   friend class internal::RootWindowController;
554   friend class internal::ScopedTargetRootWindow;
555   friend class test::ShellTestApi;
556   friend class shell::WindowWatcher;
557
558   typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
559
560   // Takes ownership of |delegate|.
561   explicit Shell(ShellDelegate* delegate);
562   virtual ~Shell();
563
564   void Init();
565
566   // Initializes virtual keyboard controller.
567   void InitKeyboard();
568
569   // Initializes the root window so that it can host browser windows.
570   void InitRootWindow(aura::Window* root_window);
571
572   // ash::internal::SystemModalContainerEventFilterDelegate overrides:
573   virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE;
574
575   // Overridden from ui::EventTarget:
576   virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
577   virtual EventTarget* GetParentTarget() OVERRIDE;
578   virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
579   virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
580   virtual void OnEvent(ui::Event* event) OVERRIDE;
581
582   // Overridden from aura::client::ActivationChangeObserver:
583   virtual void OnWindowActivated(aura::Window* gained_active,
584                                  aura::Window* lost_active) OVERRIDE;
585
586   static Shell* instance_;
587
588   // If set before the Shell is initialized, the mouse cursor will be hidden
589   // when the screen is initially created.
590   static bool initially_hide_cursor_;
591
592   // When no explicit target display/RootWindow is given, new windows are
593   // created on |scoped_target_root_window_| , unless NULL in
594   // which case they are created on |target_root_window_|.
595   // |target_root_window_| never becomes NULL during the session.
596   aura::Window* target_root_window_;
597   aura::Window* scoped_target_root_window_;
598
599   // The CompoundEventFilter owned by aura::Env object.
600   scoped_ptr<views::corewm::CompoundEventFilter> env_filter_;
601
602   std::vector<WindowAndBoundsPair> to_restore_;
603
604   scoped_ptr<UserMetricsRecorder> user_metrics_recorder_;
605   scoped_ptr<keyboard::KeyboardController> keyboard_controller_;
606   scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
607   scoped_ptr<AcceleratorController> accelerator_controller_;
608   scoped_ptr<ShellDelegate> delegate_;
609   scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
610   scoped_ptr<SystemTrayNotifier> system_tray_notifier_;
611   scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
612   scoped_ptr<CapsLockDelegate> caps_lock_delegate_;
613   scoped_ptr<SessionStateDelegate> session_state_delegate_;
614   scoped_ptr<AccessibilityDelegate> accessibility_delegate_;
615   scoped_ptr<NewWindowDelegate> new_window_delegate_;
616   scoped_ptr<MediaDelegate> media_delegate_;
617   scoped_ptr<ShelfDelegate> shelf_delegate_;
618   scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
619   scoped_ptr<internal::ShelfWindowWatcher> shelf_window_watcher_;
620
621   scoped_ptr<ShelfModel> shelf_model_;
622   scoped_ptr<WindowPositioner> window_positioner_;
623
624   scoped_ptr<internal::AppListController> app_list_controller_;
625
626   scoped_ptr<internal::DragDropController> drag_drop_controller_;
627   scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_;
628   scoped_ptr<views::corewm::ShadowController> shadow_controller_;
629   scoped_ptr<views::corewm::VisibilityController> visibility_controller_;
630   scoped_ptr<views::corewm::WindowModalityController>
631       window_modality_controller_;
632   scoped_ptr<views::corewm::TooltipController> tooltip_controller_;
633   scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
634   scoped_ptr<PowerButtonController> power_button_controller_;
635   scoped_ptr<LockStateController> lock_state_controller_;
636   scoped_ptr<MruWindowTracker> mru_window_tracker_;
637   scoped_ptr<UserActivityDetector> user_activity_detector_;
638   scoped_ptr<VideoDetector> video_detector_;
639   scoped_ptr<WindowCycleController> window_cycle_controller_;
640   scoped_ptr<WindowSelectorController> window_selector_controller_;
641   scoped_ptr<internal::FocusCycler> focus_cycler_;
642   scoped_ptr<DisplayController> display_controller_;
643   scoped_ptr<HighContrastController> high_contrast_controller_;
644   scoped_ptr<MagnificationController> magnification_controller_;
645   scoped_ptr<PartialMagnificationController> partial_magnification_controller_;
646   scoped_ptr<AutoclickController> autoclick_controller_;
647   scoped_ptr<aura::client::FocusClient> focus_client_;
648   scoped_ptr<aura::client::UserActionClient> user_action_client_;
649   aura::client::ActivationClient* activation_client_;
650   scoped_ptr<internal::MouseCursorEventFilter> mouse_cursor_filter_;
651   scoped_ptr<internal::ScreenPositionController> screen_position_controller_;
652   scoped_ptr<internal::SystemModalContainerEventFilter> modality_filter_;
653   scoped_ptr<internal::EventClientImpl> event_client_;
654   scoped_ptr<internal::EventTransformationHandler>
655       event_transformation_handler_;
656   scoped_ptr<WindowTreeHostFactory> window_tree_host_factory_;
657
658   // An event filter that pre-handles key events while the partial
659   // screenshot UI or the keyboard overlay is active.
660   scoped_ptr<internal::OverlayEventFilter> overlay_filter_;
661
662   // An event filter for logging keyboard-related metrics.
663   scoped_ptr<internal::KeyboardUMAEventFilter> keyboard_metrics_filter_;
664
665   // An event filter which handles moving and resizing windows.
666   scoped_ptr<ToplevelWindowEventHandler> toplevel_window_event_handler_;
667
668   // An event filter which handles system level gestures
669   scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_;
670
671   // An event filter that pre-handles global accelerators.
672   scoped_ptr<internal::AcceleratorFilter> accelerator_filter_;
673
674   // An event filter that pre-handles all key events to send them to an IME.
675   scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_;
676
677   scoped_ptr<internal::DisplayManager> display_manager_;
678   scoped_ptr<base::WeakPtrFactory<internal::DisplayManager> >
679       weak_display_manager_factory_;
680
681   scoped_ptr<internal::LocaleNotificationController>
682       locale_notification_controller_;
683
684 #if defined(OS_CHROMEOS)
685   scoped_ptr<internal::PowerEventObserver> power_event_observer_;
686   scoped_ptr<internal::UserActivityNotifier> user_activity_notifier_;
687   scoped_ptr<internal::VideoActivityNotifier> video_activity_notifier_;
688   scoped_ptr<StickyKeysController> sticky_keys_controller_;
689   scoped_ptr<internal::ResolutionNotificationController>
690       resolution_notification_controller_;
691 #if defined(USE_X11)
692   // Controls video output device state.
693   scoped_ptr<chromeos::OutputConfigurator> output_configurator_;
694   scoped_ptr<internal::OutputConfiguratorAnimation>
695       output_configurator_animation_;
696   scoped_ptr<internal::DisplayErrorObserver> display_error_observer_;
697   scoped_ptr<internal::ProjectingObserver> projecting_observer_;
698
699   // Listens for output changes and updates the display manager.
700   scoped_ptr<internal::DisplayChangeObserver> display_change_observer_;
701
702   scoped_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
703   scoped_ptr<ui::EventHandler> speech_feedback_handler_;
704 #endif  // defined(USE_X11)
705 #endif  // defined(OS_CHROMEOS)
706
707   // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
708   // pointer to vend to test code.
709   AshNativeCursorManager* native_cursor_manager_;
710   views::corewm::CursorManager cursor_manager_;
711
712   ObserverList<ShellObserver> observers_;
713
714   // For testing only: simulate that a modal window is open
715   bool simulate_modal_window_open_for_testing_;
716
717   bool is_touch_hud_projection_enabled_;
718
719   // Injected content::GPUDataManager support.
720   scoped_ptr<GPUSupport> gpu_support_;
721
722   DISALLOW_COPY_AND_ASSIGN(Shell);
723 };
724
725 }  // namespace ash
726
727 #endif  // ASH_SHELL_H_