Index: services/ui/service.cc |
diff --git a/services/ui/service.cc b/services/ui/service.cc |
index 9b4991dccf24dc8da486b75fe3262e2e7667b548..60db35581ea01357f7e79b03aa2019a28b302c1f 100644 |
--- a/services/ui/service.cc |
+++ b/services/ui/service.cc |
@@ -195,39 +195,41 @@ void Service::OnStart() { |
discardable_shared_memory_manager_ = |
base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>(); |
-} |
-bool Service::OnConnect(const service_manager::ServiceInfo& remote_info, |
- service_manager::InterfaceRegistry* registry) { |
- registry->AddInterface<mojom::AccessibilityManager>(this); |
- registry->AddInterface<mojom::Clipboard>(this); |
- registry->AddInterface<mojom::DisplayManager>(this); |
- registry->AddInterface<mojom::Gpu>(this); |
- registry->AddInterface<mojom::IMERegistrar>(this); |
- registry->AddInterface<mojom::IMEServer>(this); |
- registry->AddInterface<mojom::UserAccessManager>(this); |
- registry->AddInterface<mojom::UserActivityMonitor>(this); |
- registry->AddInterface<WindowTreeHostFactory>(this); |
- registry->AddInterface<mojom::WindowManagerWindowTreeFactory>(this); |
- registry->AddInterface<mojom::WindowTreeFactory>(this); |
- registry |
- ->AddInterface<discardable_memory::mojom::DiscardableSharedMemoryManager>( |
+ registry_.AddInterface<mojom::AccessibilityManager>(this); |
+ registry_.AddInterface<mojom::Clipboard>(this); |
+ registry_.AddInterface<mojom::DisplayManager>(this); |
+ registry_.AddInterface<mojom::Gpu>(this); |
+ registry_.AddInterface<mojom::IMERegistrar>(this); |
+ registry_.AddInterface<mojom::IMEServer>(this); |
+ registry_.AddInterface<mojom::UserAccessManager>(this); |
+ registry_.AddInterface<mojom::UserActivityMonitor>(this); |
+ registry_.AddInterface<WindowTreeHostFactory>(this); |
+ registry_.AddInterface<mojom::WindowManagerWindowTreeFactory>(this); |
+ registry_.AddInterface<mojom::WindowTreeFactory>(this); |
+ registry_ |
+ .AddInterface<discardable_memory::mojom::DiscardableSharedMemoryManager>( |
this); |
if (test_config_) |
- registry->AddInterface<WindowServerTest>(this); |
+ registry_.AddInterface<WindowServerTest>(this); |
// On non-Linux platforms there will be no DeviceDataManager instance and no |
// purpose in adding the Mojo interface to connect to. |
if (input_device_server_.IsRegisteredAsObserver()) |
- input_device_server_.AddInterface(registry); |
+ input_device_server_.AddInterface(®istry_); |
- screen_manager_->AddInterfaces(registry); |
+ screen_manager_->AddInterfaces(®istry_); |
#if defined(USE_OZONE) |
- ui::OzonePlatform::GetInstance()->AddInterfaces(registry); |
+ ui::OzonePlatform::GetInstance()->AddInterfaces(®istry_); |
#endif |
+} |
- return true; |
+void Service::OnBindInterface(const service_manager::ServiceInfo& source_info, |
+ const std::string& interface_name, |
+ mojo::ScopedMessagePipeHandle interface_pipe) { |
+ registry_.BindInterface(source_info.identity, interface_name, |
+ std::move(interface_pipe)); |
} |
void Service::StartDisplayInit() { |