Chromium Code Reviews| Index: content/common/mojo/service_registry_impl.cc |
| diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc |
| index eec7640bc300e15425f9d99c95fccdc3cab5c2a4..a4d6174fec155013d97a2a395a2866c4bdea2775 100644 |
| --- a/content/common/mojo/service_registry_impl.cc |
| +++ b/content/common/mojo/service_registry_impl.cc |
| @@ -21,6 +21,7 @@ ServiceRegistryImpl::~ServiceRegistryImpl() { |
| void ServiceRegistryImpl::Bind( |
| mojo::InterfaceRequest<mojo::ServiceProvider> request) { |
| + binding_.set_error_handler(this); |
|
Ken Rockot(use gerrit already)
2015/05/05 17:59:23
nit: might as well just do this in the ctor
xhwang
2015/05/05 18:09:26
Done.
|
| binding_.Bind(request.Pass()); |
| } |
| @@ -58,6 +59,10 @@ void ServiceRegistryImpl::ConnectToRemoteService( |
| handle.Pass()); |
| } |
| +bool ServiceRegistryImpl::IsBound() const { |
| + return binding_.is_bound(); |
| +} |
| + |
| base::WeakPtr<ServiceRegistry> ServiceRegistryImpl::GetWeakPtr() { |
| return weak_factory_.GetWeakPtr(); |
| } |
| @@ -74,4 +79,8 @@ void ServiceRegistryImpl::ConnectToService( |
| it->second.Run(client_handle.Pass()); |
| } |
| +void ServiceRegistryImpl::OnConnectionError() { |
| + binding_.Close(); |
| +} |
| + |
| } // namespace content |