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

Side by Side Diff: content/browser/android/browser_startup_controller.cc

Issue 1936353002: Add a flag to not start GPU process on browser startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ContentShellTestApk Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/android/browser_startup_controller.h" 5 #include "content/browser/android/browser_startup_controller.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "content/browser/android/content_startup_flags.h" 9 #include "content/browser/android/content_startup_flags.h"
10 10
11 #include "jni/BrowserStartupController_jni.h" 11 #include "jni/BrowserStartupController_jni.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 bool BrowserMayStartAsynchronously() { 15 bool BrowserMayStartAsynchronously() {
16 JNIEnv* env = base::android::AttachCurrentThread(); 16 JNIEnv* env = base::android::AttachCurrentThread();
17 return Java_BrowserStartupController_browserMayStartAsynchonously(env); 17 return Java_BrowserStartupController_browserMayStartAsynchonously(env);
18 } 18 }
19 19
20 void BrowserStartupComplete(int result) { 20 void BrowserStartupComplete(int result) {
21 JNIEnv* env = base::android::AttachCurrentThread(); 21 JNIEnv* env = base::android::AttachCurrentThread();
22 Java_BrowserStartupController_browserStartupComplete(env, result); 22 Java_BrowserStartupController_browserStartupComplete(env, result);
23 } 23 }
24 24
25 bool ShouldStartGpuProcessOnBrowserStartup() {
26 JNIEnv* env = base::android::AttachCurrentThread();
27 return Java_BrowserStartupController_shouldStartGpuProcessOnBrowserStartup(
28 env);
29 }
30
25 bool RegisterBrowserStartupController(JNIEnv* env) { 31 bool RegisterBrowserStartupController(JNIEnv* env) {
26 return RegisterNativesImpl(env); 32 return RegisterNativesImpl(env);
27 } 33 }
28 34
29 static void SetCommandLineFlags( 35 static void SetCommandLineFlags(
30 JNIEnv* env, 36 JNIEnv* env,
31 const JavaParamRef<jclass>& clazz, 37 const JavaParamRef<jclass>& clazz,
32 jboolean single_process, 38 jboolean single_process,
33 const JavaParamRef<jstring>& plugin_descriptor) { 39 const JavaParamRef<jstring>& plugin_descriptor) {
34 std::string plugin_str = 40 std::string plugin_str =
(...skipping 15 matching lines...) Expand all
50 static jboolean IsPluginEnabled(JNIEnv* env, 56 static jboolean IsPluginEnabled(JNIEnv* env,
51 const JavaParamRef<jclass>& clazz) { 57 const JavaParamRef<jclass>& clazz) {
52 #if defined(ENABLE_PLUGINS) 58 #if defined(ENABLE_PLUGINS)
53 return true; 59 return true;
54 #else 60 #else
55 return false; 61 return false;
56 #endif 62 #endif
57 } 63 }
58 64
59 } // namespace content 65 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/browser_startup_controller.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698