| 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/metrics/user_metrics_action.h" | 14 #include "ash/common/metrics/user_metrics_action.h" |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class Rect; | 17 class Rect; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace views { |
| 21 class PointerWatcher; |
| 22 } |
| 23 |
| 20 namespace ash { | 24 namespace ash { |
| 21 | 25 |
| 22 class AccessibilityDelegate; | 26 class AccessibilityDelegate; |
| 23 class FocusCycler; | 27 class FocusCycler; |
| 24 class MruWindowTracker; | 28 class MruWindowTracker; |
| 25 class SessionStateDelegate; | 29 class SessionStateDelegate; |
| 26 class ShellObserver; | 30 class ShellObserver; |
| 27 class SystemTrayDelegate; | 31 class SystemTrayDelegate; |
| 28 class WindowResizer; | 32 class WindowResizer; |
| 29 class WmActivationObserver; | 33 class WmActivationObserver; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 142 |
| 139 virtual void AddActivationObserver(WmActivationObserver* observer) = 0; | 143 virtual void AddActivationObserver(WmActivationObserver* observer) = 0; |
| 140 virtual void RemoveActivationObserver(WmActivationObserver* observer) = 0; | 144 virtual void RemoveActivationObserver(WmActivationObserver* observer) = 0; |
| 141 | 145 |
| 142 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; | 146 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; |
| 143 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; | 147 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; |
| 144 | 148 |
| 145 virtual void AddShellObserver(ShellObserver* observer) = 0; | 149 virtual void AddShellObserver(ShellObserver* observer) = 0; |
| 146 virtual void RemoveShellObserver(ShellObserver* observer) = 0; | 150 virtual void RemoveShellObserver(ShellObserver* observer) = 0; |
| 147 | 151 |
| 152 virtual void AddPointerWatcher(views::PointerWatcher* watcher) = 0; |
| 153 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0; |
| 154 |
| 148 #if defined(OS_CHROMEOS) | 155 #if defined(OS_CHROMEOS) |
| 149 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. | 156 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. |
| 150 virtual void ToggleIgnoreExternalKeyboard() = 0; | 157 virtual void ToggleIgnoreExternalKeyboard() = 0; |
| 151 #endif | 158 #endif |
| 152 | 159 |
| 153 protected: | 160 protected: |
| 154 WmShell(); | 161 WmShell(); |
| 155 virtual ~WmShell(); | 162 virtual ~WmShell(); |
| 156 | 163 |
| 157 // If |delegate| is not null, sets and initializes the delegate. If |delegate| | 164 // If |delegate| is not null, sets and initializes the delegate. If |delegate| |
| 158 // is null, shuts down and destroys the delegate. | 165 // is null, shuts down and destroys the delegate. |
| 159 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); | 166 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); |
| 160 | 167 |
| 161 private: | 168 private: |
| 162 friend class Shell; | 169 friend class Shell; |
| 163 | 170 |
| 164 static WmShell* instance_; | 171 static WmShell* instance_; |
| 165 | 172 |
| 166 std::unique_ptr<FocusCycler> focus_cycler_; | 173 std::unique_ptr<FocusCycler> focus_cycler_; |
| 167 std::unique_ptr<WmSystemTrayNotifier> system_tray_notifier_; | 174 std::unique_ptr<WmSystemTrayNotifier> system_tray_notifier_; |
| 168 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 175 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 169 | 176 |
| 170 bool simulate_modal_window_open_for_testing_ = false; | 177 bool simulate_modal_window_open_for_testing_ = false; |
| 171 }; | 178 }; |
| 172 | 179 |
| 173 } // namespace ash | 180 } // namespace ash |
| 174 | 181 |
| 175 #endif // ASH_COMMON_WM_SHELL_H_ | 182 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |