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

Unified Diff: shell/context.cc

Issue 845593003: Pass ServiceProvider and ServiceProvider& params in Connect (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: services & exposed_services 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: shell/context.cc
diff --git a/shell/context.cc b/shell/context.cc
index c10841c221271419f0fe99dec0dfe86eaaee3606..76a907627e0340764e7ed8d9544aa06204353d86 100644
--- a/shell/context.cc
+++ b/shell/context.cc
@@ -105,12 +105,6 @@ void InitContentHandlers(DynamicApplicationLoader* loader,
}
}
-class EmptyServiceProvider : public InterfaceImpl<ServiceProvider> {
- private:
- void ConnectToService(const mojo::String& service_name,
- ScopedMessagePipeHandle client_handle) override {}
-};
-
bool ConfigureURLMappings(const std::string& mappings,
mojo::shell::MojoURLResolver* resolver) {
base::StringPairs pairs;
@@ -212,12 +206,12 @@ GURL Context::ResolveURL(const GURL& url) {
}
void Context::Run(const GURL& url) {
- EmptyServiceProvider* sp = new EmptyServiceProvider;
- ServiceProviderPtr spp;
- BindToProxy(sp, &spp);
+ ServiceProviderPtr services;
+ ServiceProviderPtr exposed_services;
app_urls_.insert(url);
- application_manager_.ConnectToApplication(url, GURL(), spp.Pass());
+ application_manager_.ConnectToApplication(url, GURL(), GetProxy(&services),
+ exposed_services.Pass());
}
ScopedMessagePipeHandle Context::ConnectToServiceByName(

Powered by Google App Engine
This is Rietveld 408576698