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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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/common/android/process_main.h"
6
7 #include <string>
8
9 #include "base/command_line.h"
10 #include "base/logging.h"
11 #include "base/android/jni_android.h"
12 #include "base/android/scoped_java_ref.h"
13 #if !defined(ANDROID_UPSTREAM_BRINGUP)
14 #include "content/common/android/user_agent.h"
15 #endif
16 #include "content/public/common/content_switches.h"
17 #include "webkit/glue/user_agent.h"
18
19 content::ContentMainDelegate* g_content_main_delegate = NULL;
20
21 bool InitProcess(JNIEnv* env, jobject context) {
22 if (!g_content_main_delegate) {
23 LOG(ERROR) << "TODO: Need to add the default delegate.";
24 return false;
25 }
26 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context);
27 base::android::InitApplicationContext(scoped_context);
28 #if !defined(ANDROID_UPSTREAM_BRINGUP)
29 webkit_glue::InitUserAgent(GetUserAgentOSInfo());
30 #endif
31 return true;
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698