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/connection_impl.h" | 5 #include "mojo/shell/public/cpp/lib/connection_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 const std::string& ConnectionImpl::GetConnectionURL() { | 89 const std::string& ConnectionImpl::GetConnectionURL() { |
90 return connection_url_; | 90 return connection_url_; |
91 } | 91 } |
92 | 92 |
93 const std::string& ConnectionImpl::GetRemoteApplicationURL() { | 93 const std::string& ConnectionImpl::GetRemoteApplicationURL() { |
94 return remote_url_; | 94 return remote_url_; |
95 } | 95 } |
96 | 96 |
97 ServiceProvider* ConnectionImpl::GetServiceProvider() { | 97 ServiceProvider* ConnectionImpl::GetRemoteInterfaces() { |
98 return remote_service_provider_.get(); | 98 return remote_service_provider_.get(); |
99 } | 99 } |
100 | 100 |
101 ServiceProvider* ConnectionImpl::GetLocalServiceProvider() { | 101 ServiceProvider* ConnectionImpl::GetLocalInterfaces() { |
102 return this; | 102 return this; |
103 } | 103 } |
104 | 104 |
105 void ConnectionImpl::SetRemoteServiceProviderConnectionErrorHandler( | 105 void ConnectionImpl::SetRemoteServiceProviderConnectionErrorHandler( |
106 const Closure& handler) { | 106 const Closure& handler) { |
107 remote_service_provider_.set_connection_error_handler(handler); | 107 remote_service_provider_.set_connection_error_handler(handler); |
108 } | 108 } |
109 | 109 |
110 bool ConnectionImpl::GetRemoteApplicationID(uint32_t* remote_id) const { | 110 bool ConnectionImpl::GetRemoteApplicationID(uint32_t* remote_id) const { |
111 if (!remote_ids_valid_) | 111 if (!remote_ids_valid_) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 remote_id_ = target_application_id; | 168 remote_id_ = target_application_id; |
169 content_handler_id_ = content_handler_id; | 169 content_handler_id_ = content_handler_id; |
170 std::vector<Closure> callbacks; | 170 std::vector<Closure> callbacks; |
171 callbacks.swap(remote_id_callbacks_); | 171 callbacks.swap(remote_id_callbacks_); |
172 for (auto callback : callbacks) | 172 for (auto callback : callbacks) |
173 callback.Run(); | 173 callback.Run(); |
174 } | 174 } |
175 | 175 |
176 } // namespace internal | 176 } // namespace internal |
177 } // namespace mojo | 177 } // namespace mojo |
OLD | NEW |