Index: content/app/android/browser_process_main.cc |
diff --git a/content/app/android/browser_process_main.cc b/content/app/android/browser_process_main.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..99e3a7b348ab002223311a567d8994a75f3455ba |
--- /dev/null |
+++ b/content/app/android/browser_process_main.cc |
@@ -0,0 +1,43 @@ |
+// 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
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/app/android/browser_process_main.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/browser_process_main_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 RegisterBrowserProcessMain(JNIEnv* env) { |
+ return RegisterNativesImpl(env); |
+} |
+ |
+} // namespace |