Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: mojo/shell/public/cpp/lib/connection_impl.cc

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/shell/public/cpp/lib/connection_impl.h ('k') | mojo/shell/public/cpp/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/connection_impl.h ('k') | mojo/shell/public/cpp/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698