| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
| 14 #include "ash/common/media_delegate.h" | 14 #include "ash/common/media_delegate.h" |
| 15 #include "ash/common/metrics/user_metrics_action.h" | 15 #include "ash/common/metrics/user_metrics_action.h" |
| 16 #include "ash/common/wm/lock_state_observer.h" | 16 #include "ash/common/wm/lock_state_observer.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 | 18 |
| 19 namespace views { | 19 namespace views { |
| 20 class PointerDownWatcher; | 20 class PointerDownWatcher; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 | 24 |
| 25 class AcceleratorController; |
| 25 class AccessibilityDelegate; | 26 class AccessibilityDelegate; |
| 26 class BrightnessControlDelegate; | 27 class BrightnessControlDelegate; |
| 27 class DisplayInfo; | 28 class DisplayInfo; |
| 28 class FocusCycler; | 29 class FocusCycler; |
| 29 class KeyboardBrightnessControlDelegate; | 30 class KeyboardBrightnessControlDelegate; |
| 30 class KeyboardUI; | 31 class KeyboardUI; |
| 31 class MaximizeModeController; | 32 class MaximizeModeController; |
| 32 class MruWindowTracker; | 33 class MruWindowTracker; |
| 33 class ScopedDisableInternalMouseAndKeyboard; | 34 class ScopedDisableInternalMouseAndKeyboard; |
| 34 class SessionStateDelegate; | 35 class SessionStateDelegate; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 64 // through context. | 65 // through context. |
| 65 static void Set(WmShell* instance); | 66 static void Set(WmShell* instance); |
| 66 static WmShell* Get(); | 67 static WmShell* Get(); |
| 67 static bool HasInstance() { return instance_ != nullptr; } | 68 static bool HasInstance() { return instance_ != nullptr; } |
| 68 | 69 |
| 69 void Initialize(); | 70 void Initialize(); |
| 70 virtual void Shutdown(); | 71 virtual void Shutdown(); |
| 71 | 72 |
| 72 ShellDelegate* delegate() { return delegate_.get(); } | 73 ShellDelegate* delegate() { return delegate_.get(); } |
| 73 | 74 |
| 75 AcceleratorController* accelerator_controller() { |
| 76 return accelerator_controller_.get(); |
| 77 } |
| 78 |
| 74 AccessibilityDelegate* accessibility_delegate() { | 79 AccessibilityDelegate* accessibility_delegate() { |
| 75 return accessibility_delegate_.get(); | 80 return accessibility_delegate_.get(); |
| 76 } | 81 } |
| 77 | 82 |
| 78 BrightnessControlDelegate* brightness_control_delegate() { | 83 BrightnessControlDelegate* brightness_control_delegate() { |
| 79 return brightness_control_delegate_.get(); | 84 return brightness_control_delegate_.get(); |
| 80 } | 85 } |
| 81 | 86 |
| 82 FocusCycler* focus_cycler() { return focus_cycler_.get(); } | 87 FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
| 83 | 88 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 void DeleteWindowSelectorController(); | 287 void DeleteWindowSelectorController(); |
| 283 | 288 |
| 284 void CreateMaximizeModeController(); | 289 void CreateMaximizeModeController(); |
| 285 void DeleteMaximizeModeController(); | 290 void DeleteMaximizeModeController(); |
| 286 | 291 |
| 287 void CreateMruWindowTracker(); | 292 void CreateMruWindowTracker(); |
| 288 void DeleteMruWindowTracker(); | 293 void DeleteMruWindowTracker(); |
| 289 | 294 |
| 290 void DeleteToastManager(); | 295 void DeleteToastManager(); |
| 291 | 296 |
| 297 void SetAcceleratorController( |
| 298 std::unique_ptr<AcceleratorController> accelerator_controller); |
| 299 |
| 292 private: | 300 private: |
| 293 friend class AcceleratorControllerTest; | 301 friend class AcceleratorControllerTest; |
| 294 friend class Shell; | 302 friend class Shell; |
| 295 | 303 |
| 296 static WmShell* instance_; | 304 static WmShell* instance_; |
| 297 | 305 |
| 298 base::ObserverList<ShellObserver> shell_observers_; | 306 base::ObserverList<ShellObserver> shell_observers_; |
| 299 std::unique_ptr<ShellDelegate> delegate_; | 307 std::unique_ptr<ShellDelegate> delegate_; |
| 300 | 308 |
| 309 std::unique_ptr<AcceleratorController> accelerator_controller_; |
| 301 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; | 310 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
| 302 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; | 311 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| 303 std::unique_ptr<FocusCycler> focus_cycler_; | 312 std::unique_ptr<FocusCycler> focus_cycler_; |
| 304 std::unique_ptr<KeyboardBrightnessControlDelegate> | 313 std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 305 keyboard_brightness_control_delegate_; | 314 keyboard_brightness_control_delegate_; |
| 306 std::unique_ptr<KeyboardUI> keyboard_ui_; | 315 std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 307 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; | 316 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; |
| 308 std::unique_ptr<MediaDelegate> media_delegate_; | 317 std::unique_ptr<MediaDelegate> media_delegate_; |
| 309 std::unique_ptr<MruWindowTracker> mru_window_tracker_; | 318 std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
| 310 std::unique_ptr<ShelfModel> shelf_model_; | 319 std::unique_ptr<ShelfModel> shelf_model_; |
| 311 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; | 320 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 312 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 321 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 313 std::unique_ptr<ToastManager> toast_manager_; | 322 std::unique_ptr<ToastManager> toast_manager_; |
| 314 std::unique_ptr<WindowCycleController> window_cycle_controller_; | 323 std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 315 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 324 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 316 | 325 |
| 317 base::ObserverList<LockStateObserver> lock_state_observers_; | 326 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 318 | 327 |
| 319 bool simulate_modal_window_open_for_testing_ = false; | 328 bool simulate_modal_window_open_for_testing_ = false; |
| 320 | 329 |
| 321 #if defined(OS_CHROMEOS) | 330 #if defined(OS_CHROMEOS) |
| 322 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 331 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 323 #endif | 332 #endif |
| 324 }; | 333 }; |
| 325 | 334 |
| 326 } // namespace ash | 335 } // namespace ash |
| 327 | 336 |
| 328 #endif // ASH_COMMON_WM_SHELL_H_ | 337 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |