Index: media/mojo/services/media_service.cc |
diff --git a/media/mojo/services/media_service.cc b/media/mojo/services/media_service.cc |
index 43eace82e7c49002aa41e42222dfa81587edd73a..242040e653e0a97d6f9fa5800237c7f31aa91d33 100644 |
--- a/media/mojo/services/media_service.cc |
+++ b/media/mojo/services/media_service.cc |
@@ -13,7 +13,6 @@ |
#include "mojo/public/cpp/bindings/strong_binding.h" |
#include "services/service_manager/public/cpp/connection.h" |
#include "services/service_manager/public/cpp/connector.h" |
-#include "services/service_manager/public/cpp/interface_registry.h" |
namespace media { |
@@ -22,6 +21,7 @@ MediaService::MediaService(std::unique_ptr<MojoMediaClient> mojo_media_client) |
: mojo_media_client_(std::move(mojo_media_client)), |
media_log_(new MediaLog()) { |
DCHECK(mojo_media_client_); |
+ registry_.AddInterface<mojom::MediaService>(this); |
} |
MediaService::~MediaService() {} |
@@ -33,10 +33,12 @@ void MediaService::OnStart() { |
mojo_media_client_->Initialize(context()->connector()); |
} |
-bool MediaService::OnConnect(const service_manager::ServiceInfo& remote_info, |
- service_manager::InterfaceRegistry* registry) { |
- registry->AddInterface<mojom::MediaService>(this); |
- return true; |
+void MediaService::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)); |
} |
bool MediaService::OnServiceManagerConnectionLost() { |