| Index: content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| index d53701dfa427faf6c748fbfb49a3d8788b1d4b85..96d9727a9285129e9caedd1c96fca7c342a33ea3 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| @@ -61,6 +61,7 @@ public class BrowserStartupController {
|
| private static BrowserStartupController sInstance;
|
|
|
| private static boolean sBrowserMayStartAsynchronously = false;
|
| + private static boolean sStartGpuProcessOnBrowserStartup = true;
|
|
|
| private static void setAsynchronousStartup(boolean enable) {
|
| sBrowserMayStartAsynchronously = enable;
|
| @@ -80,6 +81,11 @@ public class BrowserStartupController {
|
| }
|
| }
|
|
|
| + @CalledByNative
|
| + static boolean startGpuProcessOnBrowserStartup() {
|
| + return sStartGpuProcessOnBrowserStartup;
|
| + }
|
| +
|
| // A list of callbacks that should be called when the async startup of the browser process is
|
| // complete.
|
| private final List<StartupCallback> mAsyncStartupCallbacks;
|
| @@ -146,9 +152,10 @@ public class BrowserStartupController {
|
| * <p/>
|
| * Note that this can only be called on the UI thread.
|
| *
|
| + * @param startGpuProcess Whether to start the GPU process if it is not started.
|
| * @param callback the callback to be called when browser startup is complete.
|
| */
|
| - public void startBrowserProcessesAsync(final StartupCallback callback)
|
| + public void startBrowserProcessesAsync(boolean startGpuProcess, final StartupCallback callback)
|
| throws ProcessInitException {
|
| assert ThreadUtils.runningOnUiThread() : "Tried to start the browser on the wrong thread.";
|
| if (mStartupDone) {
|
| @@ -167,6 +174,7 @@ public class BrowserStartupController {
|
| mHasStartedInitializingBrowserProcess = true;
|
|
|
| setAsynchronousStartup(true);
|
| + sStartGpuProcessOnBrowserStartup = startGpuProcess;
|
| prepareToStartBrowserProcess(false, new Runnable() {
|
| @Override
|
| public void run() {
|
| @@ -290,7 +298,6 @@ public class BrowserStartupController {
|
| if (!mPostResourceExtractionTasksCompleted) {
|
| // TODO(yfriedman): Remove dependency on a command line flag for this.
|
| DeviceUtils.addDeviceSpecificUserAgentSwitch(mContext);
|
| -
|
| nativeSetCommandLineFlags(
|
| singleProcess, nativeIsPluginEnabled() ? getPlugins() : null);
|
| mPostResourceExtractionTasksCompleted = true;
|
|
|