OLD | NEW |
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 "mojo/application/public/cpp/lib/service_registry.h" | 5 #include "mojo/application/public/cpp/lib/service_registry.h" |
6 | 6 |
7 #include "mojo/application/public/cpp/application_connection.h" | 7 #include "mojo/application/public/cpp/application_connection.h" |
8 #include "mojo/application/public/cpp/application_impl.h" | 8 #include "mojo/application/public/cpp/application_impl.h" |
9 #include "mojo/application/public/cpp/service_connector.h" | 9 #include "mojo/application/public/cpp/service_connector.h" |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 const std::string& ServiceRegistry::GetRemoteApplicationURL() { | 58 const std::string& ServiceRegistry::GetRemoteApplicationURL() { |
59 return remote_url_; | 59 return remote_url_; |
60 } | 60 } |
61 | 61 |
62 ServiceProvider* ServiceRegistry::GetServiceProvider() { | 62 ServiceProvider* ServiceRegistry::GetServiceProvider() { |
63 return remote_service_provider_.get(); | 63 return remote_service_provider_.get(); |
64 } | 64 } |
65 | 65 |
| 66 void ServiceRegistry::OnCloseConnection() { |
| 67 if (application_impl_) |
| 68 application_impl_->CloseConnection(this); |
| 69 } |
| 70 |
66 void ServiceRegistry::ConnectToService(const mojo::String& service_name, | 71 void ServiceRegistry::ConnectToService(const mojo::String& service_name, |
67 ScopedMessagePipeHandle client_handle) { | 72 ScopedMessagePipeHandle client_handle) { |
68 service_connector_registry_.ConnectToService(this, service_name, | 73 service_connector_registry_.ConnectToService(this, service_name, |
69 client_handle.Pass()); | 74 client_handle.Pass()); |
70 } | 75 } |
71 | 76 |
72 } // namespace internal | 77 } // namespace internal |
73 } // namespace mojo | 78 } // namespace mojo |
OLD | NEW |