Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
jam
2012/06/01 23:40:00
it's not clear to me why this file is in content/a
jam
2012/06/01 23:40:51
to be clear: this seems analogous to BrowserMain,
michaelbai
2012/06/04 17:39:36
The code in this file can not move to content/Brow
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/app/android/browser_process_main.h" | |
| 6 | |
| 7 #include "base/android/jni_string.h" | |
| 8 #include "base/debug/debugger.h" | |
| 9 #include "base/logging.h" | |
| 10 #if !defined(ANDROID_UPSTREAM_BRINGUP) | |
| 11 #include "content/browser/android/content_startup_flags.h" | |
| 12 #include "content/common/android/command_line.h" | |
| 13 #endif | |
| 14 #include "content/public/common/content_constants.h" | |
| 15 #include "jni/browser_process_main_jni.h" | |
| 16 | |
| 17 using base::android::ConvertJavaStringToUTF8; | |
| 18 | |
| 19 static void SetCommandLineFlags(JNIEnv*env, | |
| 20 jclass clazz, | |
| 21 jint max_render_process_count, | |
| 22 jstring plugin_descriptor) { | |
| 23 std::string plugin_str = ConvertJavaStringToUTF8(env, plugin_descriptor); | |
| 24 #if !defined(ANDROID_UPSTREAM_BRINGUP) | |
| 25 SetContentCommandLineFlags(max_render_process_count, plugin_str); | |
| 26 #endif | |
| 27 } | |
| 28 | |
| 29 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { | |
| 30 #if defined(OFFICIAL_BUILD) | |
| 31 return true; | |
| 32 #else | |
| 33 return false; | |
| 34 #endif | |
| 35 } | |
| 36 | |
| 37 namespace content { | |
| 38 | |
| 39 bool RegisterBrowserProcessMain(JNIEnv* env) { | |
| 40 return RegisterNativesImpl(env); | |
| 41 } | |
| 42 | |
| 43 } // namespace | |
| OLD | NEW |