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

Side by Side Diff: mojo/runner/android/main.cc

Issue 1140553002: Make --wait-for-debugger work for mandoline launcher process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/main.cc ('k') | mojo/runner/child_process.cc » ('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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 std::vector<std::string> parameters; 149 std::vector<std::string> parameters;
150 parameters.push_back( 150 parameters.push_back(
151 base::android::ConvertJavaStringToUTF8(env, mojo_shell_path)); 151 base::android::ConvertJavaStringToUTF8(env, mojo_shell_path));
152 base::android::AppendJavaStringArrayToStringVector(env, jparameters, 152 base::android::AppendJavaStringArrayToStringVector(env, jparameters,
153 &parameters); 153 &parameters);
154 base::CommandLine::Init(0, nullptr); 154 base::CommandLine::Init(0, nullptr);
155 base::CommandLine::ForCurrentProcess()->InitFromArgv(parameters); 155 base::CommandLine::ForCurrentProcess()->InitFromArgv(parameters);
156 g_shell_runner.Get().reset(new MojoShellRunner(parameters)); 156 g_shell_runner.Get().reset(new MojoShellRunner(parameters));
157 157
158 InitializeLogging(); 158 InitializeLogging();
159 mojo::runner::WaitForDebuggerIfNecessary();
159 160
160 InitializeRedirection(); 161 InitializeRedirection();
161 162
162 // We want ~MessageLoop to happen prior to ~Context. Initializing 163 // We want ~MessageLoop to happen prior to ~Context. Initializing
163 // LazyInstances is akin to stack-allocating objects; their destructors 164 // LazyInstances is akin to stack-allocating objects; their destructors
164 // will be invoked first-in-last-out. 165 // will be invoked first-in-last-out.
165 Context* shell_context = new Context(); 166 Context* shell_context = new Context();
166 shell_context->SetShellFileRoot(base::FilePath( 167 shell_context->SetShellFileRoot(base::FilePath(
167 base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory))); 168 base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory)));
168 g_context.Get().reset(shell_context); 169 g_context.Get().reset(shell_context);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 203 }
203 204
204 } // namespace runner 205 } // namespace runner
205 } // namespace mojo 206 } // namespace mojo
206 207
207 // TODO(vtl): Even though main() should never be called, mojo_shell fails to 208 // TODO(vtl): Even though main() should never be called, mojo_shell fails to
208 // link without it. Figure out if we can avoid this. 209 // link without it. Figure out if we can avoid this.
209 int main(int argc, char** argv) { 210 int main(int argc, char** argv) {
210 NOTREACHED(); 211 NOTREACHED();
211 } 212 }
OLDNEW
« no previous file with comments | « mandoline/app/desktop/main.cc ('k') | mojo/runner/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698