| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_UI_SERVICE_H_ | 5 #ifndef SERVICES_UI_SERVICE_H_ |
| 6 #define SERVICES_UI_SERVICE_H_ | 6 #define SERVICES_UI_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 class WindowServer; | 59 class WindowServer; |
| 60 } | 60 } |
| 61 | 61 |
| 62 class Service : public service_manager::Service, | 62 class Service : public service_manager::Service, |
| 63 public ws::WindowServerDelegate { | 63 public ws::WindowServerDelegate { |
| 64 public: | 64 public: |
| 65 Service(); | 65 Service(); |
| 66 ~Service() override; | 66 ~Service() override; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 // How the ScreenManager is configured. | |
| 70 enum ScreenManagerConfig { | |
| 71 // Initial state. | |
| 72 UNKNOWN, | |
| 73 | |
| 74 // ScreenManager runs locally. | |
| 75 INTERNAL, | |
| 76 | |
| 77 // Used when the window manager supplies a value of false for | |
| 78 // |automatically_create_display_roots|. In this config the ScreenManager | |
| 79 // is configured to forward calls. | |
| 80 FORWARDING, | |
| 81 }; | |
| 82 | |
| 83 // Holds InterfaceRequests received before the first WindowTreeHost Display | 69 // Holds InterfaceRequests received before the first WindowTreeHost Display |
| 84 // has been established. | 70 // has been established. |
| 85 struct PendingRequest; | 71 struct PendingRequest; |
| 86 struct UserState; | 72 struct UserState; |
| 87 | 73 |
| 88 using UserIdToUserState = std::map<ws::UserId, std::unique_ptr<UserState>>; | 74 using UserIdToUserState = std::map<ws::UserId, std::unique_ptr<UserState>>; |
| 89 | 75 |
| 90 // Attempts to initialize the resource bundle. Returns true if successful, | 76 // Attempts to initialize the resource bundle. Returns true if successful, |
| 91 // otherwise false if resources cannot be loaded. | 77 // otherwise false if resources cannot be loaded. |
| 92 bool InitializeResources(service_manager::Connector* connector); | 78 bool InitializeResources(service_manager::Connector* connector); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 IMERegistrarImpl ime_registrar_; | 171 IMERegistrarImpl ime_registrar_; |
| 186 IMEServerImpl ime_server_; | 172 IMEServerImpl ime_server_; |
| 187 | 173 |
| 188 std::unique_ptr<discardable_memory::DiscardableSharedMemoryManager> | 174 std::unique_ptr<discardable_memory::DiscardableSharedMemoryManager> |
| 189 discardable_shared_memory_manager_; | 175 discardable_shared_memory_manager_; |
| 190 | 176 |
| 191 service_manager::BinderRegistry registry_; | 177 service_manager::BinderRegistry registry_; |
| 192 | 178 |
| 193 // Set to true in StartDisplayInit(). | 179 // Set to true in StartDisplayInit(). |
| 194 bool is_gpu_ready_ = false; | 180 bool is_gpu_ready_ = false; |
| 195 ScreenManagerConfig screen_manager_config_ = ScreenManagerConfig::UNKNOWN; | |
| 196 | 181 |
| 197 DISALLOW_COPY_AND_ASSIGN(Service); | 182 DISALLOW_COPY_AND_ASSIGN(Service); |
| 198 }; | 183 }; |
| 199 | 184 |
| 200 } // namespace ui | 185 } // namespace ui |
| 201 | 186 |
| 202 #endif // SERVICES_UI_SERVICE_H_ | 187 #endif // SERVICES_UI_SERVICE_H_ |
| OLD | NEW |