OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 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/browser/android/android_browser_process.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/android_browser_process_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 RegisterAndroidBrowserProcess(JNIEnv* env) { |
| 40 return RegisterNativesImpl(env); |
| 41 } |
| 42 |
| 43 } // namespace |
OLD | NEW |