Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Unified Diff: content/common/android/process_main.cc

Issue 10399129: Added browser_process_main. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/android/process_main.cc
diff --git a/content/common/android/process_main.cc b/content/common/android/process_main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..be327064c437ff019c9aafd129d0b3d0eeddf88a
--- /dev/null
+++ b/content/common/android/process_main.cc
@@ -0,0 +1,32 @@
+// 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/common/android/process_main.h"
+
+#include <string>
+
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "base/android/jni_android.h"
+#include "base/android/scoped_java_ref.h"
+#if !defined(ANDROID_UPSTREAM_BRINGUP)
+#include "content/common/android/user_agent.h"
+#endif
+#include "content/public/common/content_switches.h"
+#include "webkit/glue/user_agent.h"
+
+content::ContentMainDelegate* g_content_main_delegate = NULL;
+
+bool InitProcess(JNIEnv* env, jobject context) {
+ if (!g_content_main_delegate) {
+ LOG(ERROR) << "TODO: Need to add the default delegate.";
+ return false;
+ }
+ base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context);
+ base::android::InitApplicationContext(scoped_context);
+#if !defined(ANDROID_UPSTREAM_BRINGUP)
+ webkit_glue::InitUserAgent(GetUserAgentOSInfo());
+#endif
+ return true;
+}

Powered by Google App Engine
This is Rietveld 408576698