OLD | NEW |
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 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.os.Handler; | 8 import android.os.Handler; |
9 import android.os.StrictMode; | 9 import android.os.StrictMode; |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 private static final boolean NOT_ALREADY_STARTED = false; | 54 private static final boolean NOT_ALREADY_STARTED = false; |
55 | 55 |
56 // Helper constants for {@link #executeEnqueuedCallbacks(int, boolean)}. | 56 // Helper constants for {@link #executeEnqueuedCallbacks(int, boolean)}. |
57 @VisibleForTesting | 57 @VisibleForTesting |
58 static final int STARTUP_SUCCESS = -1; | 58 static final int STARTUP_SUCCESS = -1; |
59 @VisibleForTesting | 59 @VisibleForTesting |
60 static final int STARTUP_FAILURE = 1; | 60 static final int STARTUP_FAILURE = 1; |
61 | 61 |
62 private static BrowserStartupController sInstance; | 62 private static BrowserStartupController sInstance; |
63 | 63 |
64 private static boolean sBrowserMayStartAsynchronously = false; | 64 private static boolean sBrowserMayStartAsynchronously; |
65 private static boolean sShouldStartGpuProcessOnBrowserStartup = true; | 65 private static boolean sShouldStartGpuProcessOnBrowserStartup = true; |
66 | 66 |
67 private static void setAsynchronousStartup(boolean enable) { | 67 private static void setAsynchronousStartup(boolean enable) { |
68 sBrowserMayStartAsynchronously = enable; | 68 sBrowserMayStartAsynchronously = enable; |
69 } | 69 } |
70 | 70 |
71 private static void setShouldStartGpuProcessOnBrowserStartup(boolean enable)
{ | 71 private static void setShouldStartGpuProcessOnBrowserStartup(boolean enable)
{ |
72 sShouldStartGpuProcessOnBrowserStartup = enable; | 72 sShouldStartGpuProcessOnBrowserStartup = enable; |
73 } | 73 } |
74 | 74 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 private static native void nativeSetCommandLineFlags( | 349 private static native void nativeSetCommandLineFlags( |
350 boolean singleProcess, String pluginDescriptor); | 350 boolean singleProcess, String pluginDescriptor); |
351 | 351 |
352 // Is this an official build of Chrome? Only native code knows for sure. Off
icial build | 352 // Is this an official build of Chrome? Only native code knows for sure. Off
icial build |
353 // knowledge is needed very early in process startup. | 353 // knowledge is needed very early in process startup. |
354 private static native boolean nativeIsOfficialBuild(); | 354 private static native boolean nativeIsOfficialBuild(); |
355 | 355 |
356 private static native boolean nativeIsPluginEnabled(); | 356 private static native boolean nativeIsPluginEnabled(); |
357 } | 357 } |
OLD | NEW |