| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_WM_SHELL_H_ | 5 #ifndef ASH_COMMON_WM_SHELL_H_ |
| 6 #define ASH_COMMON_WM_SHELL_H_ | 6 #define ASH_COMMON_WM_SHELL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 namespace display { | 27 namespace display { |
| 28 class Display; | 28 class Display; |
| 29 class ManagedDisplayInfo; | 29 class ManagedDisplayInfo; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace gfx { | 32 namespace gfx { |
| 33 class Insets; | 33 class Insets; |
| 34 class Point; | 34 class Point; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace shell { |
| 38 class Connector; |
| 39 } |
| 40 |
| 37 namespace views { | 41 namespace views { |
| 38 class PointerWatcher; | 42 class PointerWatcher; |
| 39 enum class PointerWatcherEventTypes; | 43 enum class PointerWatcherEventTypes; |
| 40 } | 44 } |
| 41 | 45 |
| 42 namespace ash { | 46 namespace ash { |
| 43 | 47 |
| 44 class AcceleratorController; | 48 class AcceleratorController; |
| 45 class AccessibilityDelegate; | 49 class AccessibilityDelegate; |
| 46 class BrightnessControlDelegate; | 50 class BrightnessControlDelegate; |
| 47 class FocusCycler; | 51 class FocusCycler; |
| 48 class ImmersiveContextAsh; | 52 class ImmersiveContextAsh; |
| 49 class ImmersiveFullscreenController; | 53 class ImmersiveFullscreenController; |
| 50 class KeyEventWatcher; | 54 class KeyEventWatcher; |
| 51 class KeyboardBrightnessControlDelegate; | 55 class KeyboardBrightnessControlDelegate; |
| 52 class KeyboardUI; | 56 class KeyboardUI; |
| 53 class MaximizeModeController; | 57 class MaximizeModeController; |
| 54 class MruWindowTracker; | 58 class MruWindowTracker; |
| 55 class NewWindowDelegate; | 59 class NewWindowDelegate; |
| 56 class PaletteDelegate; | 60 class PaletteDelegate; |
| 57 class ScopedDisableInternalMouseAndKeyboard; | 61 class ScopedDisableInternalMouseAndKeyboard; |
| 58 class SessionStateDelegate; | 62 class SessionStateDelegate; |
| 59 class ShelfDelegate; | 63 class ShelfDelegate; |
| 60 class ShelfModel; | 64 class ShelfModel; |
| 61 class ShelfWindowWatcher; | 65 class ShelfWindowWatcher; |
| 62 class ShellDelegate; | 66 class ShellDelegate; |
| 63 class ShellObserver; | 67 class ShellObserver; |
| 64 class SystemTrayDelegate; | 68 class SystemTrayDelegate; |
| 69 class SystemTrayController; |
| 65 class SystemTrayNotifier; | 70 class SystemTrayNotifier; |
| 66 class ToastManager; | 71 class ToastManager; |
| 67 class WallpaperController; | 72 class WallpaperController; |
| 68 class WallpaperDelegate; | 73 class WallpaperDelegate; |
| 69 class WindowCycleController; | 74 class WindowCycleController; |
| 70 class WindowCycleEventFilter; | 75 class WindowCycleEventFilter; |
| 71 class WindowResizer; | 76 class WindowResizer; |
| 72 class WindowSelectorController; | 77 class WindowSelectorController; |
| 73 class WmActivationObserver; | 78 class WmActivationObserver; |
| 74 class WmDisplayObserver; | 79 class WmDisplayObserver; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 89 | 94 |
| 90 // Similar to ash::Shell. Eventually the two will be merged. | 95 // Similar to ash::Shell. Eventually the two will be merged. |
| 91 class ASH_EXPORT WmShell { | 96 class ASH_EXPORT WmShell { |
| 92 public: | 97 public: |
| 93 // This is necessary for a handful of places that is difficult to plumb | 98 // This is necessary for a handful of places that is difficult to plumb |
| 94 // through context. | 99 // through context. |
| 95 static void Set(WmShell* instance); | 100 static void Set(WmShell* instance); |
| 96 static WmShell* Get(); | 101 static WmShell* Get(); |
| 97 static bool HasInstance() { return instance_ != nullptr; } | 102 static bool HasInstance() { return instance_ != nullptr; } |
| 98 | 103 |
| 99 void Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool); | 104 void Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool, |
| 105 ::shell::Connector* connector); |
| 100 virtual void Shutdown(); | 106 virtual void Shutdown(); |
| 101 | 107 |
| 102 ShellDelegate* delegate() { return delegate_.get(); } | 108 ShellDelegate* delegate() { return delegate_.get(); } |
| 103 | 109 |
| 104 AcceleratorController* accelerator_controller() { | 110 AcceleratorController* accelerator_controller() { |
| 105 return accelerator_controller_.get(); | 111 return accelerator_controller_.get(); |
| 106 } | 112 } |
| 107 | 113 |
| 108 AccessibilityDelegate* accessibility_delegate() { | 114 AccessibilityDelegate* accessibility_delegate() { |
| 109 return accessibility_delegate_.get(); | 115 return accessibility_delegate_.get(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 137 void set_root_window_for_new_windows(WmWindow* root) { | 143 void set_root_window_for_new_windows(WmWindow* root) { |
| 138 root_window_for_new_windows_ = root; | 144 root_window_for_new_windows_ = root; |
| 139 } | 145 } |
| 140 | 146 |
| 141 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } | 147 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } |
| 142 | 148 |
| 143 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } | 149 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } |
| 144 | 150 |
| 145 ShelfModel* shelf_model() { return shelf_model_.get(); } | 151 ShelfModel* shelf_model() { return shelf_model_.get(); } |
| 146 | 152 |
| 153 SystemTrayController* system_tray_controller() { |
| 154 return system_tray_controller_.get(); |
| 155 } |
| 156 |
| 147 SystemTrayNotifier* system_tray_notifier() { | 157 SystemTrayNotifier* system_tray_notifier() { |
| 148 return system_tray_notifier_.get(); | 158 return system_tray_notifier_.get(); |
| 149 } | 159 } |
| 150 | 160 |
| 151 SystemTrayDelegate* system_tray_delegate() { | 161 SystemTrayDelegate* system_tray_delegate() { |
| 152 return system_tray_delegate_.get(); | 162 return system_tray_delegate_.get(); |
| 153 } | 163 } |
| 154 | 164 |
| 155 ToastManager* toast_manager() { return toast_manager_.get(); } | 165 ToastManager* toast_manager() { return toast_manager_.get(); } |
| 156 | 166 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 keyboard_brightness_control_delegate_; | 456 keyboard_brightness_control_delegate_; |
| 447 std::unique_ptr<KeyboardUI> keyboard_ui_; | 457 std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 448 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; | 458 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; |
| 449 std::unique_ptr<MediaDelegate> media_delegate_; | 459 std::unique_ptr<MediaDelegate> media_delegate_; |
| 450 std::unique_ptr<MruWindowTracker> mru_window_tracker_; | 460 std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
| 451 std::unique_ptr<NewWindowDelegate> new_window_delegate_; | 461 std::unique_ptr<NewWindowDelegate> new_window_delegate_; |
| 452 std::unique_ptr<PaletteDelegate> palette_delegate_; | 462 std::unique_ptr<PaletteDelegate> palette_delegate_; |
| 453 std::unique_ptr<ShelfDelegate> shelf_delegate_; | 463 std::unique_ptr<ShelfDelegate> shelf_delegate_; |
| 454 std::unique_ptr<ShelfModel> shelf_model_; | 464 std::unique_ptr<ShelfModel> shelf_model_; |
| 455 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; | 465 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
| 466 std::unique_ptr<SystemTrayController> system_tray_controller_; |
| 456 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; | 467 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 457 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 468 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 458 std::unique_ptr<ToastManager> toast_manager_; | 469 std::unique_ptr<ToastManager> toast_manager_; |
| 459 std::unique_ptr<WallpaperController> wallpaper_controller_; | 470 std::unique_ptr<WallpaperController> wallpaper_controller_; |
| 460 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; | 471 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; |
| 461 std::unique_ptr<WindowCycleController> window_cycle_controller_; | 472 std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 462 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 473 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 463 | 474 |
| 464 base::ObserverList<LockStateObserver> lock_state_observers_; | 475 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 465 | 476 |
| 466 // See comment for GetRootWindowForNewWindows(). | 477 // See comment for GetRootWindowForNewWindows(). |
| 467 WmWindow* root_window_for_new_windows_ = nullptr; | 478 WmWindow* root_window_for_new_windows_ = nullptr; |
| 468 WmWindow* scoped_root_window_for_new_windows_ = nullptr; | 479 WmWindow* scoped_root_window_for_new_windows_ = nullptr; |
| 469 | 480 |
| 470 bool simulate_modal_window_open_for_testing_ = false; | 481 bool simulate_modal_window_open_for_testing_ = false; |
| 471 | 482 |
| 472 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 483 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 473 | 484 |
| 474 #if defined(OS_CHROMEOS) | 485 #if defined(OS_CHROMEOS) |
| 475 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 486 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 476 #endif | 487 #endif |
| 477 }; | 488 }; |
| 478 | 489 |
| 479 } // namespace ash | 490 } // namespace ash |
| 480 | 491 |
| 481 #endif // ASH_COMMON_WM_SHELL_H_ | 492 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |