| 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 15 matching lines...) Expand all Loading... |
| 26 class AccessibilityDelegate; | 26 class AccessibilityDelegate; |
| 27 class BrightnessControlDelegate; | 27 class BrightnessControlDelegate; |
| 28 class DisplayInfo; | 28 class DisplayInfo; |
| 29 class FocusCycler; | 29 class FocusCycler; |
| 30 class KeyboardBrightnessControlDelegate; | 30 class KeyboardBrightnessControlDelegate; |
| 31 class KeyboardUI; | 31 class KeyboardUI; |
| 32 class MaximizeModeController; | 32 class MaximizeModeController; |
| 33 class MruWindowTracker; | 33 class MruWindowTracker; |
| 34 class ScopedDisableInternalMouseAndKeyboard; | 34 class ScopedDisableInternalMouseAndKeyboard; |
| 35 class SessionStateDelegate; | 35 class SessionStateDelegate; |
| 36 class ShelfDelegate; |
| 36 class ShelfModel; | 37 class ShelfModel; |
| 37 class ShellDelegate; | 38 class ShellDelegate; |
| 38 class ShellObserver; | 39 class ShellObserver; |
| 39 class SystemTrayDelegate; | 40 class SystemTrayDelegate; |
| 40 class SystemTrayNotifier; | 41 class SystemTrayNotifier; |
| 41 class ToastManager; | 42 class ToastManager; |
| 42 class WindowCycleController; | 43 class WindowCycleController; |
| 43 class WindowCycleEventFilter; | 44 class WindowCycleEventFilter; |
| 44 class WindowResizer; | 45 class WindowResizer; |
| 45 class WindowSelectorController; | 46 class WindowSelectorController; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); } | 94 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); } |
| 94 | 95 |
| 95 MaximizeModeController* maximize_mode_controller() { | 96 MaximizeModeController* maximize_mode_controller() { |
| 96 return maximize_mode_controller_.get(); | 97 return maximize_mode_controller_.get(); |
| 97 } | 98 } |
| 98 | 99 |
| 99 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } | 100 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } |
| 100 | 101 |
| 101 MediaDelegate* media_delegate() { return media_delegate_.get(); } | 102 MediaDelegate* media_delegate() { return media_delegate_.get(); } |
| 102 | 103 |
| 104 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } |
| 105 |
| 103 ShelfModel* shelf_model() { return shelf_model_.get(); } | 106 ShelfModel* shelf_model() { return shelf_model_.get(); } |
| 104 | 107 |
| 105 SystemTrayNotifier* system_tray_notifier() { | 108 SystemTrayNotifier* system_tray_notifier() { |
| 106 return system_tray_notifier_.get(); | 109 return system_tray_notifier_.get(); |
| 107 } | 110 } |
| 108 | 111 |
| 109 SystemTrayDelegate* system_tray_delegate() { | 112 SystemTrayDelegate* system_tray_delegate() { |
| 110 return system_tray_delegate_.get(); | 113 return system_tray_delegate_.get(); |
| 111 } | 114 } |
| 112 | 115 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 void RemoveShellObserver(ShellObserver* observer); | 254 void RemoveShellObserver(ShellObserver* observer); |
| 252 | 255 |
| 253 virtual void AddPointerWatcher(views::PointerWatcher* watcher) = 0; | 256 virtual void AddPointerWatcher(views::PointerWatcher* watcher) = 0; |
| 254 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0; | 257 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0; |
| 255 | 258 |
| 256 // TODO: Move these back to LockStateController when that has been moved. | 259 // TODO: Move these back to LockStateController when that has been moved. |
| 257 void OnLockStateEvent(LockStateObserver::EventType event); | 260 void OnLockStateEvent(LockStateObserver::EventType event); |
| 258 void AddLockStateObserver(LockStateObserver* observer); | 261 void AddLockStateObserver(LockStateObserver* observer); |
| 259 void RemoveLockStateObserver(LockStateObserver* observer); | 262 void RemoveLockStateObserver(LockStateObserver* observer); |
| 260 | 263 |
| 264 void SetShelfDelegateForTesting(std::unique_ptr<ShelfDelegate> test_delegate); |
| 265 |
| 261 #if defined(OS_CHROMEOS) | 266 #if defined(OS_CHROMEOS) |
| 262 LogoutConfirmationController* logout_confirmation_controller() { | 267 LogoutConfirmationController* logout_confirmation_controller() { |
| 263 return logout_confirmation_controller_.get(); | 268 return logout_confirmation_controller_.get(); |
| 264 } | 269 } |
| 265 | 270 |
| 266 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. | 271 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. |
| 267 virtual void ToggleIgnoreExternalKeyboard() = 0; | 272 virtual void ToggleIgnoreExternalKeyboard() = 0; |
| 268 #endif | 273 #endif |
| 269 | 274 |
| 270 protected: | 275 protected: |
| 271 explicit WmShell(std::unique_ptr<ShellDelegate> shell_delegate); | 276 explicit WmShell(std::unique_ptr<ShellDelegate> shell_delegate); |
| 272 virtual ~WmShell(); | 277 virtual ~WmShell(); |
| 273 | 278 |
| 274 base::ObserverList<ShellObserver>* shell_observers() { | 279 base::ObserverList<ShellObserver>* shell_observers() { |
| 275 return &shell_observers_; | 280 return &shell_observers_; |
| 276 } | 281 } |
| 277 | 282 |
| 278 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); | 283 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); |
| 279 | 284 |
| 280 // Helpers to set (and initialize) or destroy various delegates. | 285 // Helpers to set (and initialize) or destroy various delegates. |
| 281 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. | 286 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. |
| 282 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); | 287 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); |
| 283 void DeleteSystemTrayDelegate(); | 288 void DeleteSystemTrayDelegate(); |
| 284 | 289 |
| 290 void CreateShelfDelegate(); |
| 291 |
| 285 void DeleteWindowCycleController(); | 292 void DeleteWindowCycleController(); |
| 286 | 293 |
| 287 void DeleteWindowSelectorController(); | 294 void DeleteWindowSelectorController(); |
| 288 | 295 |
| 289 void CreateMaximizeModeController(); | 296 void CreateMaximizeModeController(); |
| 290 void DeleteMaximizeModeController(); | 297 void DeleteMaximizeModeController(); |
| 291 | 298 |
| 292 void CreateMruWindowTracker(); | 299 void CreateMruWindowTracker(); |
| 293 void DeleteMruWindowTracker(); | 300 void DeleteMruWindowTracker(); |
| 294 | 301 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 309 std::unique_ptr<AcceleratorController> accelerator_controller_; | 316 std::unique_ptr<AcceleratorController> accelerator_controller_; |
| 310 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; | 317 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
| 311 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; | 318 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| 312 std::unique_ptr<FocusCycler> focus_cycler_; | 319 std::unique_ptr<FocusCycler> focus_cycler_; |
| 313 std::unique_ptr<KeyboardBrightnessControlDelegate> | 320 std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 314 keyboard_brightness_control_delegate_; | 321 keyboard_brightness_control_delegate_; |
| 315 std::unique_ptr<KeyboardUI> keyboard_ui_; | 322 std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 316 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; | 323 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; |
| 317 std::unique_ptr<MediaDelegate> media_delegate_; | 324 std::unique_ptr<MediaDelegate> media_delegate_; |
| 318 std::unique_ptr<MruWindowTracker> mru_window_tracker_; | 325 std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
| 326 std::unique_ptr<ShelfDelegate> shelf_delegate_; |
| 319 std::unique_ptr<ShelfModel> shelf_model_; | 327 std::unique_ptr<ShelfModel> shelf_model_; |
| 320 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; | 328 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 321 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 329 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 322 std::unique_ptr<ToastManager> toast_manager_; | 330 std::unique_ptr<ToastManager> toast_manager_; |
| 323 std::unique_ptr<WindowCycleController> window_cycle_controller_; | 331 std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 324 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 332 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 325 | 333 |
| 326 base::ObserverList<LockStateObserver> lock_state_observers_; | 334 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 327 | 335 |
| 328 bool simulate_modal_window_open_for_testing_ = false; | 336 bool simulate_modal_window_open_for_testing_ = false; |
| 329 | 337 |
| 330 #if defined(OS_CHROMEOS) | 338 #if defined(OS_CHROMEOS) |
| 331 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 339 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 332 #endif | 340 #endif |
| 333 }; | 341 }; |
| 334 | 342 |
| 335 } // namespace ash | 343 } // namespace ash |
| 336 | 344 |
| 337 #endif // ASH_COMMON_WM_SHELL_H_ | 345 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |