| 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 17 matching lines...) Expand all Loading... |
| 28 class KeyboardBrightnessControlDelegate; | 28 class KeyboardBrightnessControlDelegate; |
| 29 class KeyboardUI; | 29 class KeyboardUI; |
| 30 class MaximizeModeController; | 30 class MaximizeModeController; |
| 31 class MruWindowTracker; | 31 class MruWindowTracker; |
| 32 class ScopedDisableInternalMouseAndKeyboard; | 32 class ScopedDisableInternalMouseAndKeyboard; |
| 33 class SessionStateDelegate; | 33 class SessionStateDelegate; |
| 34 class ShellDelegate; | 34 class ShellDelegate; |
| 35 class ShellObserver; | 35 class ShellObserver; |
| 36 class SystemTrayDelegate; | 36 class SystemTrayDelegate; |
| 37 class SystemTrayNotifier; | 37 class SystemTrayNotifier; |
| 38 class WindowCycleController; |
| 38 class WindowCycleEventFilter; | 39 class WindowCycleEventFilter; |
| 39 class WindowResizer; | 40 class WindowResizer; |
| 40 class WindowSelectorController; | 41 class WindowSelectorController; |
| 41 class WmActivationObserver; | 42 class WmActivationObserver; |
| 42 class WmDisplayObserver; | 43 class WmDisplayObserver; |
| 43 class WmWindow; | 44 class WmWindow; |
| 44 | 45 |
| 45 enum class TaskSwitchSource; | 46 enum class TaskSwitchSource; |
| 46 | 47 |
| 47 namespace wm { | 48 namespace wm { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 MediaDelegate* media_delegate() { return media_delegate_.get(); } | 93 MediaDelegate* media_delegate() { return media_delegate_.get(); } |
| 93 | 94 |
| 94 SystemTrayNotifier* system_tray_notifier() { | 95 SystemTrayNotifier* system_tray_notifier() { |
| 95 return system_tray_notifier_.get(); | 96 return system_tray_notifier_.get(); |
| 96 } | 97 } |
| 97 | 98 |
| 98 SystemTrayDelegate* system_tray_delegate() { | 99 SystemTrayDelegate* system_tray_delegate() { |
| 99 return system_tray_delegate_.get(); | 100 return system_tray_delegate_.get(); |
| 100 } | 101 } |
| 101 | 102 |
| 103 WindowCycleController* window_cycle_controller() { |
| 104 return window_cycle_controller_.get(); |
| 105 } |
| 106 |
| 102 WindowSelectorController* window_selector_controller() { | 107 WindowSelectorController* window_selector_controller() { |
| 103 return window_selector_controller_.get(); | 108 return window_selector_controller_.get(); |
| 104 } | 109 } |
| 105 | 110 |
| 106 // Creates a new window used as a container of other windows. No painting is | 111 // Creates a new window used as a container of other windows. No painting is |
| 107 // done to the created window. | 112 // done to the created window. |
| 108 virtual WmWindow* NewContainerWindow() = 0; | 113 virtual WmWindow* NewContainerWindow() = 0; |
| 109 | 114 |
| 110 virtual WmWindow* GetFocusedWindow() = 0; | 115 virtual WmWindow* GetFocusedWindow() = 0; |
| 111 virtual WmWindow* GetActiveWindow() = 0; | 116 virtual WmWindow* GetActiveWindow() = 0; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 return &shell_observers_; | 242 return &shell_observers_; |
| 238 } | 243 } |
| 239 | 244 |
| 240 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); | 245 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); |
| 241 | 246 |
| 242 // Helpers to set (and initialize) or destroy various delegates. | 247 // Helpers to set (and initialize) or destroy various delegates. |
| 243 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. | 248 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. |
| 244 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); | 249 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); |
| 245 void DeleteSystemTrayDelegate(); | 250 void DeleteSystemTrayDelegate(); |
| 246 | 251 |
| 252 void DeleteWindowCycleController(); |
| 253 |
| 247 void DeleteWindowSelectorController(); | 254 void DeleteWindowSelectorController(); |
| 248 | 255 |
| 249 void CreateMaximizeModeController(); | 256 void CreateMaximizeModeController(); |
| 250 void DeleteMaximizeModeController(); | 257 void DeleteMaximizeModeController(); |
| 251 | 258 |
| 252 void CreateMruWindowTracker(); | 259 void CreateMruWindowTracker(); |
| 253 void DeleteMruWindowTracker(); | 260 void DeleteMruWindowTracker(); |
| 254 | 261 |
| 255 private: | 262 private: |
| 256 friend class AcceleratorControllerTest; | 263 friend class AcceleratorControllerTest; |
| 257 friend class Shell; | 264 friend class Shell; |
| 258 | 265 |
| 259 static WmShell* instance_; | 266 static WmShell* instance_; |
| 260 | 267 |
| 261 base::ObserverList<ShellObserver> shell_observers_; | 268 base::ObserverList<ShellObserver> shell_observers_; |
| 262 std::unique_ptr<ShellDelegate> delegate_; | 269 std::unique_ptr<ShellDelegate> delegate_; |
| 263 | 270 |
| 264 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; | 271 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
| 265 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; | 272 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| 266 std::unique_ptr<FocusCycler> focus_cycler_; | 273 std::unique_ptr<FocusCycler> focus_cycler_; |
| 267 std::unique_ptr<KeyboardBrightnessControlDelegate> | 274 std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 268 keyboard_brightness_control_delegate_; | 275 keyboard_brightness_control_delegate_; |
| 269 std::unique_ptr<KeyboardUI> keyboard_ui_; | 276 std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 270 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; | 277 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; |
| 271 std::unique_ptr<MediaDelegate> media_delegate_; | 278 std::unique_ptr<MediaDelegate> media_delegate_; |
| 272 std::unique_ptr<MruWindowTracker> mru_window_tracker_; | 279 std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
| 273 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; | 280 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 274 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 281 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 282 std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 275 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 283 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 276 | 284 |
| 277 bool simulate_modal_window_open_for_testing_ = false; | 285 bool simulate_modal_window_open_for_testing_ = false; |
| 278 | 286 |
| 279 #if defined(OS_CHROMEOS) | 287 #if defined(OS_CHROMEOS) |
| 280 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 288 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 281 #endif | 289 #endif |
| 282 }; | 290 }; |
| 283 | 291 |
| 284 } // namespace ash | 292 } // namespace ash |
| 285 | 293 |
| 286 #endif // ASH_COMMON_WM_SHELL_H_ | 294 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |