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

Unified Diff: mojo/public/cpp/application/lib/application_impl.cc

Issue 845593003: Pass ServiceProvider and ServiceProvider& params in Connect (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/application/lib/application_impl.cc
diff --git a/mojo/public/cpp/application/lib/application_impl.cc b/mojo/public/cpp/application/lib/application_impl.cc
index 18c78b07ff68c0beb4a7ff83a039915fd2fdb834..892f26a42ac61a5000840dd555f9c86acfdfaff2 100644
--- a/mojo/public/cpp/application/lib/application_impl.cc
+++ b/mojo/public/cpp/application/lib/application_impl.cc
@@ -61,11 +61,13 @@ ApplicationImpl::~ApplicationImpl() {
ApplicationConnection* ApplicationImpl::ConnectToApplication(
const String& application_url) {
MOJO_CHECK(initialized_);
- ServiceProviderPtr out_service_provider;
- shell_->ConnectToApplication(application_url,
- GetProxy(&out_service_provider));
+ ServiceProviderPtr local_services;
+ InterfaceRequest<ServiceProvider> local_request = GetProxy(&local_services);
+ ServiceProviderPtr remote_services;
+ shell_->ConnectToApplication(application_url, GetProxy(&remote_services),
+ local_services.Pass());
internal::ServiceRegistry* registry = new internal::ServiceRegistry(
- this, application_url, out_service_provider.Pass());
+ this, application_url, remote_services.Pass(), local_request.Pass());
if (!delegate_->ConfigureOutgoingConnection(registry)) {
delete registry;
return nullptr;
@@ -99,10 +101,12 @@ void ApplicationImpl::BindShell(ScopedMessagePipeHandle shell_handle) {
shell_.set_error_handler(shell_watch_);
}
-void ApplicationImpl::AcceptConnection(const String& requestor_url,
- ServiceProviderPtr service_provider) {
+void ApplicationImpl::AcceptConnection(
+ const String& requestor_url,
+ InterfaceRequest<ServiceProvider> services,
+ ServiceProviderPtr exported_services) {
internal::ServiceRegistry* registry = new internal::ServiceRegistry(
- this, requestor_url, service_provider.Pass());
+ this, requestor_url, exported_services.Pass(), services.Pass());
if (!delegate_->ConfigureIncomingConnection(registry)) {
delete registry;
return;

Powered by Google App Engine
This is Rietveld 408576698