| 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> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 // Enable or disable the partial magnifier. | 205 // Enable or disable the partial magnifier. |
| 206 virtual void SetPartialMagnifierEnabled(bool enabled) = 0; | 206 virtual void SetPartialMagnifierEnabled(bool enabled) = 0; |
| 207 | 207 |
| 208 virtual void CreatePointerWatcherAdapter() = 0; | 208 virtual void CreatePointerWatcherAdapter() = 0; |
| 209 | 209 |
| 210 // Creates an AshWindowTreeHost. A return value of null results in a platform | 210 // Creates an AshWindowTreeHost. A return value of null results in a platform |
| 211 // specific AshWindowTreeHost being created. | 211 // specific AshWindowTreeHost being created. |
| 212 virtual std::unique_ptr<AshWindowTreeHost> CreateAshWindowTreeHost( | 212 virtual std::unique_ptr<AshWindowTreeHost> CreateAshWindowTreeHost( |
| 213 const AshWindowTreeHostInitParams& init_params) = 0; | 213 const AshWindowTreeHostInitParams& init_params) = 0; |
| 214 | 214 |
| 215 // Called after the containers of |root_window_controller| have been created. |
| 216 // Allows ShellPort to install any additional state on the containers. |
| 217 virtual void OnCreatedRootWindowContainers( |
| 218 RootWindowController* root_window_controller) = 0; |
| 219 |
| 215 protected: | 220 protected: |
| 216 ShellPort(); | 221 ShellPort(); |
| 217 | 222 |
| 218 // Called during startup to create the primary WindowTreeHost and | 223 // Called during startup to create the primary WindowTreeHost and |
| 219 // the corresponding RootWindowController. | 224 // the corresponding RootWindowController. |
| 220 virtual void CreatePrimaryHost() = 0; | 225 virtual void CreatePrimaryHost() = 0; |
| 221 virtual void InitHosts(const ShellInitParams& init_params) = 0; | 226 virtual void InitHosts(const ShellInitParams& init_params) = 0; |
| 222 virtual std::unique_ptr<display::NativeDisplayDelegate> | 227 virtual std::unique_ptr<display::NativeDisplayDelegate> |
| 223 CreateNativeDisplayDelegate() = 0; | 228 CreateNativeDisplayDelegate() = 0; |
| 224 | 229 |
| 225 // Called during startup to create the AcceleratorController. | 230 // Called during startup to create the AcceleratorController. |
| 226 virtual std::unique_ptr<AcceleratorController> | 231 virtual std::unique_ptr<AcceleratorController> |
| 227 CreateAcceleratorController() = 0; | 232 CreateAcceleratorController() = 0; |
| 228 | 233 |
| 229 private: | 234 private: |
| 230 friend class AcceleratorControllerTest; | 235 friend class AcceleratorControllerTest; |
| 231 friend class Shell; | 236 friend class Shell; |
| 232 | 237 |
| 233 static ShellPort* instance_; | 238 static ShellPort* instance_; |
| 234 | 239 |
| 235 base::ObserverList<LockStateObserver> lock_state_observers_; | 240 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 236 | 241 |
| 237 bool simulate_modal_window_open_for_testing_ = false; | 242 bool simulate_modal_window_open_for_testing_ = false; |
| 238 }; | 243 }; |
| 239 | 244 |
| 240 } // namespace ash | 245 } // namespace ash |
| 241 | 246 |
| 242 #endif // ASH_SHELL_PORT_H_ | 247 #endif // ASH_SHELL_PORT_H_ |
| OLD | NEW |