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

Side by Side Diff: components/mus/mus_app.cc

Issue 2058853002: Enable InputDeviceServer/InputDeviceClient in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_device
Patch Set: Rebase. Created 4 years, 6 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 #include "components/mus/mus_app.h" 5 #include "components/mus/mus_app.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 DCHECK(ui::ClientNativePixmapFactory::GetInstance()); 173 DCHECK(ui::ClientNativePixmapFactory::GetInstance());
174 #endif 174 #endif
175 175
176 // TODO(rjkroege): Enter sandbox here before we start threads in GpuState 176 // TODO(rjkroege): Enter sandbox here before we start threads in GpuState
177 // http://crbug.com/584532 177 // http://crbug.com/584532
178 178
179 #if !defined(OS_ANDROID) 179 #if !defined(OS_ANDROID)
180 event_source_ = ui::PlatformEventSource::CreateDefault(); 180 event_source_ = ui::PlatformEventSource::CreateDefault();
181 #endif 181 #endif
182 182
183 // This needs to happen after DeviceDataManager has been constructed. That
184 // happens either during OzonePlatform or PlatformEventSource initialization,
185 // so keep this line below both of those.
186 input_device_server_.RegisterAsObserver();
187
183 if (use_chrome_gpu_command_buffer_) { 188 if (use_chrome_gpu_command_buffer_) {
184 GpuServiceMus::GetInstance(); 189 GpuServiceMus::GetInstance();
185 } else { 190 } else {
186 // TODO(rjkroege): It is possible that we might want to generalize the 191 // TODO(rjkroege): It is possible that we might want to generalize the
187 // GpuState object. 192 // GpuState object.
188 platform_display_init_params_.gpu_state = new GpuState(); 193 platform_display_init_params_.gpu_state = new GpuState();
189 } 194 }
190 195
191 // Gpu must be running before the PlatformScreen can be initialized. 196 // Gpu must be running before the PlatformScreen can be initialized.
192 platform_screen_->Init(); 197 platform_screen_->Init();
(...skipping 11 matching lines...) Expand all
204 connection->AddInterface<mojom::WindowTreeFactory>(this); 209 connection->AddInterface<mojom::WindowTreeFactory>(this);
205 if (test_config_) 210 if (test_config_)
206 connection->AddInterface<WindowServerTest>(this); 211 connection->AddInterface<WindowServerTest>(this);
207 212
208 if (use_chrome_gpu_command_buffer_) { 213 if (use_chrome_gpu_command_buffer_) {
209 connection->AddInterface<mojom::GpuService>(this); 214 connection->AddInterface<mojom::GpuService>(this);
210 } else { 215 } else {
211 connection->AddInterface<Gpu>(this); 216 connection->AddInterface<Gpu>(this);
212 } 217 }
213 218
219 input_device_server_.RegisterInterface(connection);
220
214 return true; 221 return true;
215 } 222 }
216 223
217 void MusApp::OnFirstDisplayReady() { 224 void MusApp::OnFirstDisplayReady() {
218 PendingRequests requests; 225 PendingRequests requests;
219 requests.swap(pending_requests_); 226 requests.swap(pending_requests_);
220 for (auto& request : requests) 227 for (auto& request : requests)
221 Create(request->connection, std::move(*request->wtf_request)); 228 Create(request->connection, std::move(*request->wtf_request));
222 } 229 }
223 230
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 platform_display_init_params_.display_bounds = bounds; 326 platform_display_init_params_.display_bounds = bounds;
320 platform_display_init_params_.display_id = id; 327 platform_display_init_params_.display_id = id;
321 328
322 // Display manages its own lifetime. 329 // Display manages its own lifetime.
323 ws::Display* host_impl = 330 ws::Display* host_impl =
324 new ws::Display(window_server_.get(), platform_display_init_params_); 331 new ws::Display(window_server_.get(), platform_display_init_params_);
325 host_impl->Init(nullptr); 332 host_impl->Init(nullptr);
326 } 333 }
327 334
328 } // namespace mus 335 } // namespace mus
OLDNEW
« ash/sysui/manifest.json ('K') | « components/mus/mus_app.h ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698