Index: content/browser/android/android_browser_process.cc |
diff --git a/content/browser/android/android_browser_process.cc b/content/browser/android/android_browser_process.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2ac511b590f27a75b3fd36e4e61649c60fdb9b1a |
--- /dev/null |
+++ b/content/browser/android/android_browser_process.cc |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/browser/android/android_browser_process.h" |
+ |
+#include "base/android/jni_string.h" |
+#include "base/debug/debugger.h" |
+#include "base/logging.h" |
+#if !defined(ANDROID_UPSTREAM_BRINGUP) |
+#include "content/browser/android/content_startup_flags.h" |
+#include "content/common/android/command_line.h" |
+#endif |
+#include "content/public/common/content_constants.h" |
+#include "jni/android_browser_process_jni.h" |
+ |
+using base::android::ConvertJavaStringToUTF8; |
+ |
+static void SetCommandLineFlags(JNIEnv*env, |
+ jclass clazz, |
+ jint max_render_process_count, |
+ jstring plugin_descriptor) { |
+ std::string plugin_str = ConvertJavaStringToUTF8(env, plugin_descriptor); |
+#if !defined(ANDROID_UPSTREAM_BRINGUP) |
+ SetContentCommandLineFlags(max_render_process_count, plugin_str); |
+#endif |
+} |
+ |
+static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { |
+#if defined(OFFICIAL_BUILD) |
+ return true; |
+#else |
+ return false; |
+#endif |
+} |
+ |
+namespace content { |
+ |
+bool RegisterAndroidBrowserProcess(JNIEnv* env) { |
+ return RegisterNativesImpl(env); |
+} |
+ |
+} // namespace |