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

Side by Side Diff: content/common/android/process_main.cc

Issue 10444121: Added android_browser_process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Init Created 8 years, 6 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 #if !defined(ANDROID_UPSTREAM_BRINGUP)
18 #include "webkit/glue/user_agent.h"
19 #endif
20
21 namespace content {
22
23 ContentMainDelegate* g_content_main_delegate = NULL;
24
25 bool InitProcess(JNIEnv* env, jobject context) {
26 if (!g_content_main_delegate) {
27 LOG(ERROR) << "TODO: Need to add the default delegate.";
28 return false;
29 }
30 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context);
31 base::android::InitApplicationContext(scoped_context);
32 #if !defined(ANDROID_UPSTREAM_BRINGUP)
33 webkit_glue::InitUserAgent(GetUserAgentOSInfo());
34 #endif
35 return true;
36 }
37
38 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698