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

Side by Side Diff: mojo/public/cpp/application/lib/application_impl.cc

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
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/public/cpp/application/application_impl.h" 5 #include "mojo/public/cpp/application/application_impl.h"
6 6
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/lib/service_registry.h" 8 #include "mojo/public/cpp/application/lib/service_registry.h"
9 #include "mojo/public/cpp/bindings/interface_ptr.h" 9 #include "mojo/public/cpp/bindings/interface_ptr.h"
10 #include "mojo/public/cpp/environment/logging.h" 10 #include "mojo/public/cpp/environment/logging.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void ApplicationImpl::UnbindConnections( 90 void ApplicationImpl::UnbindConnections(
91 InterfaceRequest<Application>* application_request, 91 InterfaceRequest<Application>* application_request,
92 ShellPtr* shell) { 92 ShellPtr* shell) {
93 *application_request = binding_.Unbind(); 93 *application_request = binding_.Unbind();
94 shell->Bind(shell_.PassMessagePipe()); 94 shell->Bind(shell_.PassMessagePipe());
95 } 95 }
96 96
97 void ApplicationImpl::AcceptConnection( 97 void ApplicationImpl::AcceptConnection(
98 const String& requestor_url, 98 const String& requestor_url,
99 InterfaceRequest<ServiceProvider> services, 99 InterfaceRequest<ServiceProvider> services,
100 ServiceProviderPtr exposed_services) { 100 ServiceProviderPtr exposed_services,
101 const String& url) {
101 internal::ServiceRegistry* registry = new internal::ServiceRegistry( 102 internal::ServiceRegistry* registry = new internal::ServiceRegistry(
102 this, requestor_url, exposed_services.Pass(), services.Pass()); 103 this, requestor_url, exposed_services.Pass(), services.Pass());
103 if (!delegate_->ConfigureIncomingConnection(registry)) { 104 if (!delegate_->ConfigureIncomingConnection(registry)) {
104 delete registry; 105 delete registry;
105 return; 106 return;
106 } 107 }
107 incoming_service_registries_.push_back(registry); 108 incoming_service_registries_.push_back(registry);
108 } 109 }
109 110
110 void ApplicationImpl::RequestQuit() { 111 void ApplicationImpl::RequestQuit() {
111 delegate_->Quit(); 112 delegate_->Quit();
112 Terminate(); 113 Terminate();
113 } 114 }
114 115
115 } // namespace mojo 116 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698