| 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/shell/public/cpp/lib/service_registry.h" | 5 #include "mojo/shell/public/cpp/lib/service_registry.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 ServiceRegistry::ServiceRegistry() | 41 ServiceRegistry::ServiceRegistry() |
| 42 : local_binding_(this), | 42 : local_binding_(this), |
| 43 allow_all_interfaces_(true), | 43 allow_all_interfaces_(true), |
| 44 weak_factory_(this) { | 44 weak_factory_(this) { |
| 45 } | 45 } |
| 46 | 46 |
| 47 ServiceRegistry::~ServiceRegistry() { | 47 ServiceRegistry::~ServiceRegistry() { |
| 48 } | 48 } |
| 49 | 49 |
| 50 Shell::ConnectToApplicationCallback | 50 shell::mojom::Shell::ConnectToApplicationCallback |
| 51 ServiceRegistry::GetConnectToApplicationCallback() { | 51 ServiceRegistry::GetConnectToApplicationCallback() { |
| 52 return base::Bind(&ServiceRegistry::OnGotRemoteIDs, | 52 return base::Bind(&ServiceRegistry::OnGotRemoteIDs, |
| 53 weak_factory_.GetWeakPtr()); | 53 weak_factory_.GetWeakPtr()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void ServiceRegistry::SetServiceConnector(ServiceConnector* connector) { | 56 void ServiceRegistry::SetServiceConnector(ServiceConnector* connector) { |
| 57 service_connector_registry_.set_service_connector(connector); | 57 service_connector_registry_.set_service_connector(connector); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool ServiceRegistry::SetServiceConnectorForName( | 60 bool ServiceRegistry::SetServiceConnectorForName( |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 void ServiceRegistry::ConnectToService(const mojo::String& service_name, | 145 void ServiceRegistry::ConnectToService(const mojo::String& service_name, |
| 146 ScopedMessagePipeHandle client_handle) { | 146 ScopedMessagePipeHandle client_handle) { |
| 147 service_connector_registry_.ConnectToService(this, service_name, | 147 service_connector_registry_.ConnectToService(this, service_name, |
| 148 std::move(client_handle)); | 148 std::move(client_handle)); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace internal | 151 } // namespace internal |
| 152 } // namespace mojo | 152 } // namespace mojo |
| OLD | NEW |