| 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 | 9 |
| 10 import org.chromium.base.CalledByNative; | 10 import org.chromium.base.CalledByNative; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 Log.i(TAG, "Initializing chromium process, singleProcess=%b", singleProc
ess); | 275 Log.i(TAG, "Initializing chromium process, singleProcess=%b", singleProc
ess); |
| 276 | 276 |
| 277 // Normally Main.java will have kicked this off asynchronously for Chrom
e. But other | 277 // Normally Main.java will have kicked this off asynchronously for Chrom
e. But other |
| 278 // ContentView apps like tests also need them so we make sure we've extr
acted resources | 278 // ContentView apps like tests also need them so we make sure we've extr
acted resources |
| 279 // here. We can still make it a little async (wait until the library is
loaded). | 279 // here. We can still make it a little async (wait until the library is
loaded). |
| 280 ResourceExtractor resourceExtractor = ResourceExtractor.get(mContext); | 280 ResourceExtractor resourceExtractor = ResourceExtractor.get(mContext); |
| 281 resourceExtractor.startExtractingResources(); | 281 resourceExtractor.startExtractingResources(); |
| 282 | 282 |
| 283 // Normally Main.java will have already loaded the library asynchronousl
y, we only need | 283 // Normally Main.java will have already loaded the library asynchronousl
y, we only need |
| 284 // to load it here if we arrived via another flow, e.g. bookmark access
& sync setup. | 284 // to load it here if we arrived via another flow, e.g. bookmark access
& sync setup. |
| 285 LibraryLoader.get(mLibraryProcessType).ensureInitialized(mContext, true)
; | 285 LibraryLoader.get(mLibraryProcessType).ensureInitialized(mContext); |
| 286 | 286 |
| 287 Runnable postResourceExtraction = new Runnable() { | 287 Runnable postResourceExtraction = new Runnable() { |
| 288 @Override | 288 @Override |
| 289 public void run() { | 289 public void run() { |
| 290 if (!mPostResourceExtractionTasksCompleted) { | 290 if (!mPostResourceExtractionTasksCompleted) { |
| 291 // TODO(yfriedman): Remove dependency on a command line flag
for this. | 291 // TODO(yfriedman): Remove dependency on a command line flag
for this. |
| 292 DeviceUtils.addDeviceSpecificUserAgentSwitch(mContext); | 292 DeviceUtils.addDeviceSpecificUserAgentSwitch(mContext); |
| 293 | 293 |
| 294 ContentMain.initApplicationContext(mContext); | 294 ContentMain.initApplicationContext(mContext); |
| 295 nativeSetCommandLineFlags( | 295 nativeSetCommandLineFlags( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 private static native void nativeSetCommandLineFlags( | 330 private static native void nativeSetCommandLineFlags( |
| 331 boolean singleProcess, String pluginDescriptor); | 331 boolean singleProcess, String pluginDescriptor); |
| 332 | 332 |
| 333 // Is this an official build of Chrome? Only native code knows for sure. Off
icial build | 333 // Is this an official build of Chrome? Only native code knows for sure. Off
icial build |
| 334 // knowledge is needed very early in process startup. | 334 // knowledge is needed very early in process startup. |
| 335 private static native boolean nativeIsOfficialBuild(); | 335 private static native boolean nativeIsOfficialBuild(); |
| 336 | 336 |
| 337 private static native boolean nativeIsPluginEnabled(); | 337 private static native boolean nativeIsPluginEnabled(); |
| 338 } | 338 } |
| OLD | NEW |