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> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/weak_ptr.h" | |
17 #include "services/shell/public/cpp/interface_factory.h" | 16 #include "services/shell/public/cpp/interface_factory.h" |
18 #include "services/shell/public/cpp/service.h" | 17 #include "services/shell/public/cpp/service.h" |
19 #include "services/shell/public/cpp/service_runner.h" | 18 #include "services/shell/public/cpp/service_runner.h" |
20 #include "services/tracing/public/cpp/provider.h" | 19 #include "services/tracing/public/cpp/provider.h" |
21 #include "services/ui/ime/ime_registrar_impl.h" | 20 #include "services/ui/ime/ime_registrar_impl.h" |
22 #include "services/ui/ime/ime_server_impl.h" | 21 #include "services/ui/ime/ime_server_impl.h" |
23 #include "services/ui/input_devices/input_device_server.h" | 22 #include "services/ui/input_devices/input_device_server.h" |
24 #include "services/ui/public/interfaces/accessibility_manager.mojom.h" | 23 #include "services/ui/public/interfaces/accessibility_manager.mojom.h" |
25 #include "services/ui/public/interfaces/clipboard.mojom.h" | 24 #include "services/ui/public/interfaces/clipboard.mojom.h" |
26 #include "services/ui/public/interfaces/display.mojom.h" | 25 #include "services/ui/public/interfaces/display.mojom.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // shell::Service: | 102 // shell::Service: |
104 void OnStart(const shell::Identity& identity) override; | 103 void OnStart(const shell::Identity& identity) override; |
105 bool OnConnect(const shell::Identity& remote_identity, | 104 bool OnConnect(const shell::Identity& remote_identity, |
106 shell::InterfaceRegistry* registry) override; | 105 shell::InterfaceRegistry* registry) override; |
107 | 106 |
108 // WindowServerDelegate: | 107 // WindowServerDelegate: |
109 void OnFirstDisplayReady() override; | 108 void OnFirstDisplayReady() override; |
110 void OnNoMoreDisplays() override; | 109 void OnNoMoreDisplays() override; |
111 bool IsTestConfig() const override; | 110 bool IsTestConfig() const override; |
112 void CreateDefaultDisplays() override; | 111 void CreateDefaultDisplays() override; |
| 112 void UpdateTouchTransforms() override; |
113 | 113 |
114 // shell::InterfaceFactory<mojom::AccessibilityManager> implementation. | 114 // shell::InterfaceFactory<mojom::AccessibilityManager> implementation. |
115 void Create(const shell::Identity& remote_identity, | 115 void Create(const shell::Identity& remote_identity, |
116 mojom::AccessibilityManagerRequest request) override; | 116 mojom::AccessibilityManagerRequest request) override; |
117 | 117 |
118 // shell::InterfaceFactory<mojom::Clipboard> implementation. | 118 // shell::InterfaceFactory<mojom::Clipboard> implementation. |
119 void Create(const shell::Identity& remote_identity, | 119 void Create(const shell::Identity& remote_identity, |
120 mojom::ClipboardRequest request) override; | 120 mojom::ClipboardRequest request) override; |
121 | 121 |
122 // shell::InterfaceFactory<mojom::DisplayManager> implementation. | 122 // shell::InterfaceFactory<mojom::DisplayManager> implementation. |
(...skipping 30 matching lines...) Expand all Loading... |
153 mojom::WindowTreeFactoryRequest request) override; | 153 mojom::WindowTreeFactoryRequest request) override; |
154 | 154 |
155 // shell::InterfaceFactory<mojom::WindowTreeHostFactory>: | 155 // shell::InterfaceFactory<mojom::WindowTreeHostFactory>: |
156 void Create(const shell::Identity& remote_identity, | 156 void Create(const shell::Identity& remote_identity, |
157 mojom::WindowTreeHostFactoryRequest request) override; | 157 mojom::WindowTreeHostFactoryRequest request) override; |
158 | 158 |
159 // shell::InterfaceFactory<mojom::WindowServerTest> implementation. | 159 // shell::InterfaceFactory<mojom::WindowServerTest> implementation. |
160 void Create(const shell::Identity& remote_identity, | 160 void Create(const shell::Identity& remote_identity, |
161 mojom::WindowServerTestRequest request) override; | 161 mojom::WindowServerTestRequest request) override; |
162 | 162 |
163 // Callback for display configuration. |id| is the identifying token for the | |
164 // configured display that will identify a specific physical display across | |
165 // configuration changes. |bounds| is the bounds of the display in screen | |
166 // coordinates. | |
167 void OnCreatedPhysicalDisplay(int64_t id, const gfx::Rect& bounds); | |
168 | |
169 ws::PlatformDisplayInitParams platform_display_init_params_; | |
170 std::unique_ptr<ws::WindowServer> window_server_; | 163 std::unique_ptr<ws::WindowServer> window_server_; |
171 std::unique_ptr<ui::PlatformEventSource> event_source_; | 164 std::unique_ptr<ui::PlatformEventSource> event_source_; |
172 tracing::Provider tracing_; | 165 tracing::Provider tracing_; |
173 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; | 166 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; |
174 PendingRequests pending_requests_; | 167 PendingRequests pending_requests_; |
175 | 168 |
176 UserIdToUserState user_id_to_user_state_; | 169 UserIdToUserState user_id_to_user_state_; |
177 | 170 |
178 // Provides input-device information via Mojo IPC. | 171 // Provides input-device information via Mojo IPC. |
179 InputDeviceServer input_device_server_; | 172 InputDeviceServer input_device_server_; |
180 | 173 |
181 bool test_config_; | 174 bool test_config_; |
182 #if defined(USE_OZONE) | 175 #if defined(USE_OZONE) |
183 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; | 176 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; |
184 #endif | 177 #endif |
185 | 178 |
186 std::unique_ptr<GpuServiceProxy> gpu_proxy_; | 179 std::unique_ptr<GpuServiceProxy> gpu_proxy_; |
187 std::unique_ptr<display::PlatformScreen> platform_screen_; | 180 std::unique_ptr<display::PlatformScreen> platform_screen_; |
188 std::unique_ptr<ws::TouchController> touch_controller_; | 181 std::unique_ptr<ws::TouchController> touch_controller_; |
189 IMERegistrarImpl ime_registrar_; | 182 IMERegistrarImpl ime_registrar_; |
190 IMEServerImpl ime_server_; | 183 IMEServerImpl ime_server_; |
191 | 184 |
192 base::WeakPtrFactory<Service> weak_ptr_factory_; | |
193 | |
194 DISALLOW_COPY_AND_ASSIGN(Service); | 185 DISALLOW_COPY_AND_ASSIGN(Service); |
195 }; | 186 }; |
196 | 187 |
197 } // namespace ui | 188 } // namespace ui |
198 | 189 |
199 #endif // SERVICES_UI_SERVICE_H_ | 190 #endif // SERVICES_UI_SERVICE_H_ |
OLD | NEW |