Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: services/ui/service.h

Issue 2274353003: Add PlatformScreenDelegate and start implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for comments. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // shell::Service: 101 // shell::Service:
103 void OnStart(const shell::Identity& identity) override; 102 void OnStart(const shell::Identity& identity) override;
104 bool OnConnect(const shell::Identity& remote_identity, 103 bool OnConnect(const shell::Identity& remote_identity,
105 shell::InterfaceRegistry* registry) override; 104 shell::InterfaceRegistry* registry) override;
106 105
107 // WindowServerDelegate: 106 // WindowServerDelegate:
108 void OnFirstDisplayReady() override; 107 void OnFirstDisplayReady() override;
109 void OnNoMoreDisplays() override; 108 void OnNoMoreDisplays() override;
110 bool IsTestConfig() const override; 109 bool IsTestConfig() const override;
111 void CreateDefaultDisplays() override; 110 void CreateDefaultDisplays() override;
111 void UpdateTouchTransforms() override;
112 112
113 // shell::InterfaceFactory<mojom::AccessibilityManager> implementation. 113 // shell::InterfaceFactory<mojom::AccessibilityManager> implementation.
114 void Create(const shell::Identity& remote_identity, 114 void Create(const shell::Identity& remote_identity,
115 mojom::AccessibilityManagerRequest request) override; 115 mojom::AccessibilityManagerRequest request) override;
116 116
117 // shell::InterfaceFactory<mojom::Clipboard> implementation. 117 // shell::InterfaceFactory<mojom::Clipboard> implementation.
118 void Create(const shell::Identity& remote_identity, 118 void Create(const shell::Identity& remote_identity,
119 mojom::ClipboardRequest request) override; 119 mojom::ClipboardRequest request) override;
120 120
121 // shell::InterfaceFactory<mojom::DisplayManager> implementation. 121 // shell::InterfaceFactory<mojom::DisplayManager> implementation.
(...skipping 30 matching lines...) Expand all
152 mojom::WindowTreeFactoryRequest request) override; 152 mojom::WindowTreeFactoryRequest request) override;
153 153
154 // shell::InterfaceFactory<mojom::WindowTreeHostFactory>: 154 // shell::InterfaceFactory<mojom::WindowTreeHostFactory>:
155 void Create(const shell::Identity& remote_identity, 155 void Create(const shell::Identity& remote_identity,
156 mojom::WindowTreeHostFactoryRequest request) override; 156 mojom::WindowTreeHostFactoryRequest request) override;
157 157
158 // shell::InterfaceFactory<mojom::WindowServerTest> implementation. 158 // shell::InterfaceFactory<mojom::WindowServerTest> implementation.
159 void Create(const shell::Identity& remote_identity, 159 void Create(const shell::Identity& remote_identity,
160 mojom::WindowServerTestRequest request) override; 160 mojom::WindowServerTestRequest request) override;
161 161
162 // Callback for display configuration. |id| is the identifying token for the
163 // configured display that will identify a specific physical display across
164 // configuration changes. |bounds| is the bounds of the display in screen
165 // coordinates.
166 void OnCreatedPhysicalDisplay(int64_t id, const gfx::Rect& bounds);
167
168 ws::PlatformDisplayInitParams platform_display_init_params_;
169 std::unique_ptr<ws::WindowServer> window_server_; 162 std::unique_ptr<ws::WindowServer> window_server_;
170 std::unique_ptr<ui::PlatformEventSource> event_source_; 163 std::unique_ptr<ui::PlatformEventSource> event_source_;
171 tracing::Provider tracing_; 164 tracing::Provider tracing_;
172 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; 165 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>;
173 PendingRequests pending_requests_; 166 PendingRequests pending_requests_;
174 167
175 UserIdToUserState user_id_to_user_state_; 168 UserIdToUserState user_id_to_user_state_;
176 169
177 // Provides input-device information via Mojo IPC. 170 // Provides input-device information via Mojo IPC.
178 InputDeviceServer input_device_server_; 171 InputDeviceServer input_device_server_;
179 172
180 bool test_config_; 173 bool test_config_;
181 #if defined(USE_OZONE) 174 #if defined(USE_OZONE)
182 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; 175 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
183 #endif 176 #endif
184 177
185 std::unique_ptr<display::PlatformScreen> platform_screen_; 178 std::unique_ptr<display::PlatformScreen> platform_screen_;
186 std::unique_ptr<ws::TouchController> touch_controller_; 179 std::unique_ptr<ws::TouchController> touch_controller_;
187 IMERegistrarImpl ime_registrar_; 180 IMERegistrarImpl ime_registrar_;
188 IMEServerImpl ime_server_; 181 IMEServerImpl ime_server_;
189 182
190 base::WeakPtrFactory<Service> weak_ptr_factory_;
191
192 DISALLOW_COPY_AND_ASSIGN(Service); 183 DISALLOW_COPY_AND_ASSIGN(Service);
193 }; 184 };
194 185
195 } // namespace ui 186 } // namespace ui
196 187
197 #endif // SERVICES_UI_SERVICE_H_ 188 #endif // SERVICES_UI_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698