| 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 #include "content/browser/android/content_startup_flags.h" | |
| 11 #include "content/public/common/content_constants.h" | |
| 12 #include "jni/AndroidBrowserProcess_jni.h" | |
| 13 | |
| 14 using base::android::ConvertJavaStringToUTF8; | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 static void SetCommandLineFlags(JNIEnv*env, | |
| 19 jclass clazz, | |
| 20 jint max_render_process_count, | |
| 21 jstring plugin_descriptor) { | |
| 22 std::string plugin_str = (plugin_descriptor == NULL ? | |
| 23 std::string() : ConvertJavaStringToUTF8(env, plugin_descriptor)); | |
| 24 SetContentCommandLineFlags(max_render_process_count, plugin_str); | |
| 25 } | |
| 26 | |
| 27 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { | |
| 28 #if defined(OFFICIAL_BUILD) | |
| 29 return true; | |
| 30 #else | |
| 31 return false; | |
| 32 #endif | |
| 33 } | |
| 34 | |
| 35 static jboolean IsPluginEnabled(JNIEnv* env, jclass clazz) { | |
| 36 #if defined(ENABLE_PLUGINS) | |
| 37 return true; | |
| 38 #else | |
| 39 return false; | |
| 40 #endif | |
| 41 } | |
| 42 | |
| 43 bool RegisterAndroidBrowserProcess(JNIEnv* env) { | |
| 44 return RegisterNativesImpl(env); | |
| 45 } | |
| 46 | |
| 47 } // namespace | |
| OLD | NEW |