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

Unified Diff: mandoline/app/desktop/launcher_process.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 | « no previous file | mojo/runner/android/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/app/desktop/launcher_process.cc
diff --git a/mandoline/app/desktop/launcher_process.cc b/mandoline/app/desktop/launcher_process.cc
index a2b0cc47fbef883ce1ad41fed78b0d13d93ac788..e4a237373b872286bac6d8c4aefe00db0b3bd968 100644
--- a/mandoline/app/desktop/launcher_process.cc
+++ b/mandoline/app/desktop/launcher_process.cc
@@ -76,23 +76,6 @@ void StopTracingAndFlushToDisk() {
flush_complete_event.Wait();
}
-void StartApp(mojo::runner::Context* context) {
- // If a mojo app isn't specified (i.e. for an apptest), run the mojo shell's
- // window manager.
- GURL app_url(GURL("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;
- }
- }
-
- context->Run(app_url);
-}
-
} // namespace
int LauncherProcessMain(int argc, char** argv) {
@@ -122,7 +105,10 @@ int LauncherProcessMain(int argc, char** argv) {
base::TimeDelta::FromSeconds(5));
}
- message_loop.PostTask(FROM_HERE, base::Bind(&StartApp, &shell_context));
+ message_loop.PostTask(FROM_HERE,
+ base::Bind(&mojo::runner::Context::Run,
+ base::Unretained(&shell_context),
+ GURL("mojo:window_manager")));
message_loop.Run();
// Must be called before |message_loop| is destroyed.
« no previous file with comments | « no previous file | mojo/runner/android/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698