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

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: Fixes for comments. 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 10 matching lines...) Expand all
203 connection->AddInterface<mojom::WindowTreeFactory>(this); 208 connection->AddInterface<mojom::WindowTreeFactory>(this);
204 if (test_config_) 209 if (test_config_)
205 connection->AddInterface<WindowServerTest>(this); 210 connection->AddInterface<WindowServerTest>(this);
206 211
207 if (use_chrome_gpu_command_buffer_) { 212 if (use_chrome_gpu_command_buffer_) {
208 connection->AddInterface<mojom::GpuService>(this); 213 connection->AddInterface<mojom::GpuService>(this);
209 } else { 214 } else {
210 connection->AddInterface<Gpu>(this); 215 connection->AddInterface<Gpu>(this);
211 } 216 }
212 217
218 input_device_server_.RegisterInterface(connection);
219
213 return true; 220 return true;
214 } 221 }
215 222
216 void MusApp::OnFirstDisplayReady() { 223 void MusApp::OnFirstDisplayReady() {
217 PendingRequests requests; 224 PendingRequests requests;
218 requests.swap(pending_requests_); 225 requests.swap(pending_requests_);
219 for (auto& request : requests) 226 for (auto& request : requests)
220 Create(request->connection, std::move(*request->wtf_request)); 227 Create(request->connection, std::move(*request->wtf_request));
221 } 228 }
222 229
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 platform_display_init_params_.display_bounds = bounds; 325 platform_display_init_params_.display_bounds = bounds;
319 platform_display_init_params_.display_id = id; 326 platform_display_init_params_.display_id = id;
320 327
321 // Display manages its own lifetime. 328 // Display manages its own lifetime.
322 ws::Display* host_impl = 329 ws::Display* host_impl =
323 new ws::Display(window_server_.get(), platform_display_init_params_); 330 new ws::Display(window_server_.get(), platform_display_init_params_);
324 host_impl->Init(nullptr); 331 host_impl->Init(nullptr);
325 } 332 }
326 333
327 } // namespace mus 334 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698