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

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

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « services/ui/service.h ('k') | services/ui/test_wm/test_wm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/ui/service.h" 5 #include "services/ui/service.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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // On non-Linux platforms there will be no DeviceDataManager instance and no 217 // On non-Linux platforms there will be no DeviceDataManager instance and no
218 // purpose in adding the Mojo interface to connect to. 218 // purpose in adding the Mojo interface to connect to.
219 if (input_device_server_.IsRegisteredAsObserver()) 219 if (input_device_server_.IsRegisteredAsObserver())
220 input_device_server_.AddInterface(&registry_); 220 input_device_server_.AddInterface(&registry_);
221 221
222 #if defined(USE_OZONE) 222 #if defined(USE_OZONE)
223 ui::OzonePlatform::GetInstance()->AddInterfaces(&registry_); 223 ui::OzonePlatform::GetInstance()->AddInterfaces(&registry_);
224 #endif 224 #endif
225 } 225 }
226 226
227 void Service::OnBindInterface(const service_manager::ServiceInfo& source_info, 227 void Service::OnBindInterface(
228 const std::string& interface_name, 228 const service_manager::BindSourceInfo& source_info,
229 mojo::ScopedMessagePipeHandle interface_pipe) { 229 const std::string& interface_name,
230 mojo::ScopedMessagePipeHandle interface_pipe) {
230 registry_.BindInterface(source_info.identity, interface_name, 231 registry_.BindInterface(source_info.identity, interface_name,
231 std::move(interface_pipe)); 232 std::move(interface_pipe));
232 } 233 }
233 234
234 void Service::StartDisplayInit() { 235 void Service::StartDisplayInit() {
235 DCHECK(!is_gpu_ready_); // This should only be called once. 236 DCHECK(!is_gpu_ready_); // This should only be called once.
236 is_gpu_ready_ = true; 237 is_gpu_ready_ = true;
237 if (screen_manager_) 238 if (screen_manager_)
238 screen_manager_->Init(window_server_->display_manager()); 239 screen_manager_->Init(window_server_->display_manager());
239 } 240 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 mojom::WindowServerTestRequest request) { 394 mojom::WindowServerTestRequest request) {
394 if (!test_config_) 395 if (!test_config_)
395 return; 396 return;
396 mojo::MakeStrongBinding( 397 mojo::MakeStrongBinding(
397 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), 398 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()),
398 std::move(request)); 399 std::move(request));
399 } 400 }
400 401
401 402
402 } // namespace ui 403 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/service.h ('k') | services/ui/test_wm/test_wm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698