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

Unified Diff: mojo/runner/context.cc

Issue 1134713003: Make Android Mojo Runner respect command line apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 5 years, 7 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
« no previous file with comments | « mojo/runner/context.h ('k') | mojo/runner/desktop/launcher_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/context.cc
diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc
index b22d8057427fa0125ea11724cb242e0c906af56a..19915f06cb236324b44c874737960412e3ac7ecf 100644
--- a/mojo/runner/context.cc
+++ b/mojo/runner/context.cc
@@ -318,6 +318,21 @@ void Context::Run(const GURL& url) {
base::Bind(&Context::OnApplicationEnd, base::Unretained(this), url));
}
+void Context::RunCommandLineApplication() {
+ // If an app isn't specified (i.e. for an apptest), run the window manager.
+ GURL app_url("mojo:window_manager");
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ base::CommandLine::StringVector args = command_line->GetArgs();
+ for (size_t i = 0; i < args.size(); ++i) {
+ GURL possible_app(args[i]);
+ if (possible_app.SchemeIs("mojo")) {
+ app_url = possible_app;
+ break;
+ }
+ }
+ Run(app_url);
+}
+
void Context::OnApplicationEnd(const GURL& url) {
if (app_urls_.find(url) != app_urls_.end()) {
app_urls_.erase(url);
« no previous file with comments | « mojo/runner/context.h ('k') | mojo/runner/desktop/launcher_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698