summaryrefslogtreecommitdiffstats
path: root/mojo/runner/desktop/launcher_process.cc
diff options
context:
space:
mode:
authormsw <msw@chromium.org>2015-05-14 16:17:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-14 23:17:40 +0000
commit1a4bbd1c973adbeeb9c9b4db061186a89fabbf0d (patch)
tree00262f6317878029cd44eb24c8aff267e4459728 /mojo/runner/desktop/launcher_process.cc
parent56de5c361e59b039c7347441da6fb5f5b8ee32ee (diff)
downloadchromium_src-1a4bbd1c973adbeeb9c9b4db061186a89fabbf0d.zip
chromium_src-1a4bbd1c973adbeeb9c9b4db061186a89fabbf0d.tar.gz
chromium_src-1a4bbd1c973adbeeb9c9b4db061186a89fabbf0d.tar.bz2
Make Android Mojo Runner respect command line apps.
Make Mandoline always run the mojo:window_manager. (afaik we don't want to specify other command line apps) Make Mojo Runner run the command line app (fallback on WM). (The Android impl wasn't respecting the command line app) Consolidate on Context::RunCommandLineApplication helper. BUG=486220 TEST=Android mojo shell and apptest runner can run non-WM apps (eg. apptests). R=sky@chromium.org Review URL: https://codereview.chromium.org/1134713003 Cr-Commit-Position: refs/heads/master@{#329970}
Diffstat (limited to 'mojo/runner/desktop/launcher_process.cc')
-rw-r--r--mojo/runner/desktop/launcher_process.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/mojo/runner/desktop/launcher_process.cc b/mojo/runner/desktop/launcher_process.cc
index d8d9f9a..204b3f7 100644
--- a/mojo/runner/desktop/launcher_process.cc
+++ b/mojo/runner/desktop/launcher_process.cc
@@ -75,23 +75,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) {
@@ -120,7 +103,9 @@ 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(&Context::RunCommandLineApplication,
+ base::Unretained(&shell_context)));
message_loop.Run();
// Must be called before |message_loop| is destroyed.