| 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 class DisplayInfo; | 27 class DisplayInfo; |
| 28 class FocusCycler; | 28 class FocusCycler; |
| 29 class MruWindowTracker; | 29 class MruWindowTracker; |
| 30 class SessionStateDelegate; | 30 class SessionStateDelegate; |
| 31 class ShellObserver; | 31 class ShellObserver; |
| 32 class SystemTrayDelegate; | 32 class SystemTrayDelegate; |
| 33 class WindowResizer; | 33 class WindowResizer; |
| 34 class WindowSelectorController; | 34 class WindowSelectorController; |
| 35 class WmActivationObserver; | 35 class WmActivationObserver; |
| 36 class WmDisplayObserver; | 36 class WmDisplayObserver; |
| 37 class WmSystemTrayNotifier; | 37 class SystemTrayNotifier; |
| 38 class WmWindow; | 38 class WmWindow; |
| 39 | 39 |
| 40 namespace wm { | 40 namespace wm { |
| 41 class WindowState; | 41 class WindowState; |
| 42 } | 42 } |
| 43 | 43 |
| 44 // Similar to ash::Shell. Eventually the two will be merged. | 44 // Similar to ash::Shell. Eventually the two will be merged. |
| 45 class ASH_EXPORT WmShell { | 45 class ASH_EXPORT WmShell { |
| 46 public: | 46 public: |
| 47 // This is necessary for a handful of places that is difficult to plumb | 47 // This is necessary for a handful of places that is difficult to plumb |
| 48 // through context. | 48 // through context. |
| 49 static void Set(WmShell* instance); | 49 static void Set(WmShell* instance); |
| 50 static WmShell* Get(); | 50 static WmShell* Get(); |
| 51 static bool HasInstance() { return instance_ != nullptr; } | 51 static bool HasInstance() { return instance_ != nullptr; } |
| 52 | 52 |
| 53 FocusCycler* focus_cycler() { return focus_cycler_.get(); } | 53 FocusCycler* focus_cycler() { return focus_cycler_.get(); } |
| 54 | 54 |
| 55 WmSystemTrayNotifier* system_tray_notifier() { | 55 SystemTrayNotifier* system_tray_notifier() { |
| 56 return system_tray_notifier_.get(); | 56 return system_tray_notifier_.get(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 SystemTrayDelegate* system_tray_delegate() { | 59 SystemTrayDelegate* system_tray_delegate() { |
| 60 return system_tray_delegate_.get(); | 60 return system_tray_delegate_.get(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 WindowSelectorController* window_selector_controller() { | 63 WindowSelectorController* window_selector_controller() { |
| 64 return window_selector_controller_.get(); | 64 return window_selector_controller_.get(); |
| 65 } | 65 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); | 170 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); |
| 171 | 171 |
| 172 void DeleteWindowSelectorController(); | 172 void DeleteWindowSelectorController(); |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 friend class Shell; | 175 friend class Shell; |
| 176 | 176 |
| 177 static WmShell* instance_; | 177 static WmShell* instance_; |
| 178 | 178 |
| 179 std::unique_ptr<FocusCycler> focus_cycler_; | 179 std::unique_ptr<FocusCycler> focus_cycler_; |
| 180 std::unique_ptr<WmSystemTrayNotifier> system_tray_notifier_; | 180 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 181 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 181 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 182 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 182 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 183 | 183 |
| 184 bool simulate_modal_window_open_for_testing_ = false; | 184 bool simulate_modal_window_open_for_testing_ = false; |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 } // namespace ash | 187 } // namespace ash |
| 188 | 188 |
| 189 #endif // ASH_COMMON_WM_SHELL_H_ | 189 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |