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

Side by Side Diff: mojo/runner/android/main.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 unified diff | Download patch
« no previous file with comments | « mandoline/app/desktop/launcher_process.cc ('k') | mojo/runner/context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/runner/android/main.h" 5 #include "mojo/runner/android/main.h"
6 6
7 #include "base/android/fifo_utils.h" 7 #include "base/android/fifo_utils.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 Java_ShellMain_finishActivity(base::android::AttachCurrentThread(), 92 Java_ShellMain_finishActivity(base::android::AttachCurrentThread(),
93 g_main_activiy.Get().obj()); 93 g_main_activiy.Get().obj());
94 exit(0); 94 exit(0);
95 } 95 }
96 96
97 void MojoShellRunner::Run() { 97 void MojoShellRunner::Run() {
98 base::MessageLoop loop(common::MessagePumpMojo::Create()); 98 base::MessageLoop loop(common::MessagePumpMojo::Create());
99 Context* context = g_context.Pointer()->get(); 99 Context* context = g_context.Pointer()->get();
100 ConfigureAndroidServices(context); 100 ConfigureAndroidServices(context);
101 context->Init(); 101 context->Init();
102 102 context->RunCommandLineApplication();
103 context->Run(GURL("mojo:window_manager"));
104 loop.Run(); 103 loop.Run();
105 104
106 g_java_message_loop.Pointer()->get()->PostTask(FROM_HERE, 105 g_java_message_loop.Pointer()->get()->PostTask(FROM_HERE,
107 base::Bind(&QuitShellThread)); 106 base::Bind(&QuitShellThread));
108 } 107 }
109 108
110 // Initialize stdout redirection if the command line switch is present. 109 // Initialize stdout redirection if the command line switch is present.
111 void InitializeRedirection() { 110 void InitializeRedirection() {
112 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(kFifoPath)) 111 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(kFifoPath))
113 return; 112 return;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 204 }
206 205
207 } // namespace runner 206 } // namespace runner
208 } // namespace mojo 207 } // namespace mojo
209 208
210 // TODO(vtl): Even though main() should never be called, mojo_shell fails to 209 // TODO(vtl): Even though main() should never be called, mojo_shell fails to
211 // link without it. Figure out if we can avoid this. 210 // link without it. Figure out if we can avoid this.
212 int main(int argc, char** argv) { 211 int main(int argc, char** argv) {
213 NOTREACHED(); 212 NOTREACHED();
214 } 213 }
OLDNEW
« no previous file with comments | « mandoline/app/desktop/launcher_process.cc ('k') | mojo/runner/context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698