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_SHELL_PORT_H_ | 5 #ifndef ASH_SHELL_PORT_H_ |
6 #define ASH_SHELL_PORT_H_ | 6 #define ASH_SHELL_PORT_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/metrics/gesture_action_type.h" | 14 #include "ash/metrics/gesture_action_type.h" |
15 #include "ash/metrics/user_metrics_action.h" | 15 #include "ash/metrics/user_metrics_action.h" |
16 #include "ash/wm/lock_state_observer.h" | 16 #include "ash/wm/lock_state_observer.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "ui/base/ui_base_types.h" | 18 #include "ui/base/ui_base_types.h" |
19 #include "ui/compositor/layer_type.h" | 19 #include "ui/compositor/layer_type.h" |
20 #include "ui/wm/public/activation_change_observer.h" | 20 #include "ui/wm/public/activation_change_observer.h" |
21 #include "ui/wm/public/window_types.h" | 21 #include "ui/wm/public/window_types.h" |
22 | 22 |
23 namespace display { | 23 namespace display { |
24 class Display; | 24 class Display; |
25 class ManagedDisplayInfo; | 25 class ManagedDisplayInfo; |
26 class NativeDisplayDelegate; | |
26 } | 27 } |
27 | 28 |
28 namespace gfx { | 29 namespace gfx { |
29 class Insets; | 30 class Insets; |
30 class Point; | 31 class Point; |
31 } | 32 } |
32 | 33 |
33 namespace views { | 34 namespace views { |
34 class PointerWatcher; | 35 class PointerWatcher; |
35 enum class PointerWatcherEventTypes; | 36 enum class PointerWatcherEventTypes; |
36 } | 37 } |
37 | 38 |
38 namespace ash { | 39 namespace ash { |
39 class AcceleratorController; | 40 class AcceleratorController; |
41 class AshWindowTreeHost; | |
42 struct AshWindowTreeHostInitParams; | |
40 class ImmersiveFullscreenController; | 43 class ImmersiveFullscreenController; |
41 class KeyEventWatcher; | 44 class KeyEventWatcher; |
42 class KeyboardUI; | 45 class KeyboardUI; |
43 class RootWindowController; | 46 class RootWindowController; |
44 class ScopedDisableInternalMouseAndKeyboard; | 47 class ScopedDisableInternalMouseAndKeyboard; |
45 class SessionStateDelegate; | 48 class SessionStateDelegate; |
46 struct ShellInitParams; | 49 struct ShellInitParams; |
47 class WindowCycleEventFilter; | 50 class WindowCycleEventFilter; |
48 class WindowResizer; | 51 class WindowResizer; |
49 class WmDisplayObserver; | 52 class WmDisplayObserver; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 virtual void ToggleIgnoreExternalKeyboard() = 0; | 200 virtual void ToggleIgnoreExternalKeyboard() = 0; |
198 | 201 |
199 // Enable or disable the laser pointer. | 202 // Enable or disable the laser pointer. |
200 virtual void SetLaserPointerEnabled(bool enabled) = 0; | 203 virtual void SetLaserPointerEnabled(bool enabled) = 0; |
201 | 204 |
202 // Enable or disable the partial magnifier. | 205 // Enable or disable the partial magnifier. |
203 virtual void SetPartialMagnifierEnabled(bool enabled) = 0; | 206 virtual void SetPartialMagnifierEnabled(bool enabled) = 0; |
204 | 207 |
205 virtual void CreatePointerWatcherAdapter() = 0; | 208 virtual void CreatePointerWatcherAdapter() = 0; |
206 | 209 |
210 // Creates an AshWindowTreeHost. A return value of null results in a platform | |
211 // specific AshWindowTreeHost being created. | |
212 virtual AshWindowTreeHost* CreateAshWindowTreeHost( | |
James Cook
2017/04/18 00:43:39
I think this would be better if it returned unique
| |
213 const AshWindowTreeHostInitParams& init_params) = 0; | |
214 | |
207 protected: | 215 protected: |
208 ShellPort(); | 216 ShellPort(); |
209 | 217 |
210 // Called during startup to create the primary WindowTreeHost and | 218 // Called during startup to create the primary WindowTreeHost and |
211 // the corresponding RootWindowController. | 219 // the corresponding RootWindowController. |
212 virtual void CreatePrimaryHost() = 0; | 220 virtual void CreatePrimaryHost() = 0; |
213 virtual void InitHosts(const ShellInitParams& init_params) = 0; | 221 virtual void InitHosts(const ShellInitParams& init_params) = 0; |
222 virtual std::unique_ptr<display::NativeDisplayDelegate> | |
223 CreateNativeDisplayDelegate() = 0; | |
214 | 224 |
215 // Called during startup to create the AcceleratorController. | 225 // Called during startup to create the AcceleratorController. |
216 virtual std::unique_ptr<AcceleratorController> | 226 virtual std::unique_ptr<AcceleratorController> |
217 CreateAcceleratorController() = 0; | 227 CreateAcceleratorController() = 0; |
218 | 228 |
219 private: | 229 private: |
220 friend class AcceleratorControllerTest; | 230 friend class AcceleratorControllerTest; |
221 friend class Shell; | 231 friend class Shell; |
222 | 232 |
223 static ShellPort* instance_; | 233 static ShellPort* instance_; |
224 | 234 |
225 base::ObserverList<LockStateObserver> lock_state_observers_; | 235 base::ObserverList<LockStateObserver> lock_state_observers_; |
226 | 236 |
227 bool simulate_modal_window_open_for_testing_ = false; | 237 bool simulate_modal_window_open_for_testing_ = false; |
228 }; | 238 }; |
229 | 239 |
230 } // namespace ash | 240 } // namespace ash |
231 | 241 |
232 #endif // ASH_SHELL_PORT_H_ | 242 #endif // ASH_SHELL_PORT_H_ |
OLD | NEW |