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.util.Log; | 9 import android.util.Log; |
10 | 10 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 Log.i(TAG, "Initializing chromium process, renderers=" + maxRendererProc
esses); | 264 Log.i(TAG, "Initializing chromium process, renderers=" + maxRendererProc
esses); |
265 | 265 |
266 // Normally Main.java will have kicked this off asynchronously for Chrom
e. But other | 266 // Normally Main.java will have kicked this off asynchronously for Chrom
e. But other |
267 // ContentView apps like tests also need them so we make sure we've extr
acted resources | 267 // ContentView apps like tests also need them so we make sure we've extr
acted resources |
268 // here. We can still make it a little async (wait until the library is
loaded). | 268 // here. We can still make it a little async (wait until the library is
loaded). |
269 ResourceExtractor resourceExtractor = ResourceExtractor.get(mContext); | 269 ResourceExtractor resourceExtractor = ResourceExtractor.get(mContext); |
270 resourceExtractor.startExtractingResources(); | 270 resourceExtractor.startExtractingResources(); |
271 | 271 |
272 // Normally Main.java will have already loaded the library asynchronousl
y, we only need | 272 // Normally Main.java will have already loaded the library asynchronousl
y, we only need |
273 // to load it here if we arrived via another flow, e.g. bookmark access
& sync setup. | 273 // to load it here if we arrived via another flow, e.g. bookmark access
& sync setup. |
274 LibraryLoader.ensureInitialized(mContext); | 274 LibraryLoader.ensureInitialized(mContext, true); |
275 | 275 |
276 // TODO(yfriedman): Remove dependency on a command line flag for this. | 276 // TODO(yfriedman): Remove dependency on a command line flag for this. |
277 DeviceUtils.addDeviceSpecificUserAgentSwitch(mContext); | 277 DeviceUtils.addDeviceSpecificUserAgentSwitch(mContext); |
278 | 278 |
279 Context appContext = mContext.getApplicationContext(); | 279 Context appContext = mContext.getApplicationContext(); |
280 // Now we really need to have the resources ready. | 280 // Now we really need to have the resources ready. |
281 resourceExtractor.waitForCompletion(); | 281 resourceExtractor.waitForCompletion(); |
282 | 282 |
283 nativeSetCommandLineFlags(maxRendererProcesses, | 283 nativeSetCommandLineFlags(maxRendererProcesses, |
284 nativeIsPluginEnabled() ? getPlugins() : null); | 284 nativeIsPluginEnabled() ? getPlugins() : null); |
(...skipping 19 matching lines...) Expand all Loading... |
304 | 304 |
305 private static native void nativeSetCommandLineFlags(int maxRenderProcesses, | 305 private static native void nativeSetCommandLineFlags(int maxRenderProcesses, |
306 String pluginDescriptor); | 306 String pluginDescriptor); |
307 | 307 |
308 // Is this an official build of Chrome? Only native code knows for sure. Off
icial build | 308 // Is this an official build of Chrome? Only native code knows for sure. Off
icial build |
309 // knowledge is needed very early in process startup. | 309 // knowledge is needed very early in process startup. |
310 private static native boolean nativeIsOfficialBuild(); | 310 private static native boolean nativeIsOfficialBuild(); |
311 | 311 |
312 private static native boolean nativeIsPluginEnabled(); | 312 private static native boolean nativeIsPluginEnabled(); |
313 } | 313 } |
OLD | NEW |