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

Side by Side Diff: content/app/android/browser_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/app/android/browser_process_main.h"
6
7 #include "base/android/jni_string.h"
8 #include "base/debug/debugger.h"
9 #include "base/logging.h"
10 #if !defined(ANDROID_UPSTREAM_BRINGUP)
11 #include "content/browser/android/content_startup_flags.h"
12 #include "content/common/android/command_line.h"
13 #endif
14 #include "content/common/android/process_main.h"
15 #include "content/public/common/content_constants.h"
16 #include "jni/browser_process_main_jni.h"
17
18 using base::android::ConvertJavaStringToUTF8;
19
20 static void InitBrowserProcess(JNIEnv* env,
21 jclass clazz,
22 jobject context) {
23 // TODO(michaelbai): This is the common code for all processes, and it
24 // should be moved to content/app/android/content_main.cc once we split
25 // the process specific initialization code out of the
26 // sandboxed_process_service.cc.
27 content::InitProcess(env, context);
28 }
29
30 static void SetCommandLineFlags(JNIEnv*env,
31 jclass clazz,
32 jint max_render_process_count,
33 jstring plugin_descriptor) {
34 std::string plugin_str = ConvertJavaStringToUTF8(env, plugin_descriptor);
35 #if !defined(ANDROID_UPSTREAM_BRINGUP)
36 SetContentCommandLineFlags(max_render_process_count, plugin_str);
37 #endif
38 }
39
40 static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) {
41 #if defined(OFFICIAL_BUILD)
42 return true;
43 #else
44 return false;
45 #endif
46 }
47
48 namespace content {
49
50 bool RegisterBrowserProcessMain(JNIEnv* env) {
51 return RegisterNativesImpl(env);
52 }
53
54 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698