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

Unified Diff: mojo/application_manager/application_manager.cc

Issue 568173003: Add Initialize() method to Application with ability to send args using (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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/application_manager/application_manager.cc
diff --git a/mojo/application_manager/application_manager.cc b/mojo/application_manager/application_manager.cc
index b0a300eb4b6c1b17e237dfc5f77a4129242e4b30..382cb035bcd005c4d7655479785ef39fa1c4f0f9 100644
--- a/mojo/application_manager/application_manager.cc
+++ b/mojo/application_manager/application_manager.cc
@@ -220,9 +220,14 @@ void ApplicationManager::RegisterLoadedApplication(
shell_impl = iter->second;
} else {
MessagePipe pipe;
+ URLToArgsMap::const_iterator args_it = url_to_args_.find(url);
+ Array<String> args;
+ if (args_it != url_to_args_.end())
+ args = Array<String>::From(args_it->second);
shell_impl = WeakBindToPipe(new ShellImpl(this, url), pipe.handle1.Pass());
url_to_shell_impl_[url] = shell_impl;
*shell_handle = pipe.handle0.Pass();
+ shell_impl->client()->Initialize(args.Pass());
}
ConnectToClient(shell_impl, url, requestor_url, service_provider.Pass());
@@ -267,6 +272,11 @@ void ApplicationManager::SetLoaderForScheme(
scheme_to_loader_[scheme] = loader.release();
}
+void ApplicationManager::SetArgsForURL(const std::vector<std::string>& args,
+ const GURL& url) {
+ url_to_args_[url] = args;
+}
+
void ApplicationManager::SetInterceptor(Interceptor* interceptor) {
interceptor_ = interceptor;
}
« no previous file with comments | « mojo/application_manager/application_manager.h ('k') | mojo/application_manager/application_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698