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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java

Issue 2017963003: Upstream: ChildProcessLauncher connects renderer processes of WebAPKs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
(...skipping 14 matching lines...) Expand all
25 import org.chromium.base.ApplicationStatus.ApplicationStateListener; 25 import org.chromium.base.ApplicationStatus.ApplicationStateListener;
26 import org.chromium.base.CommandLine; 26 import org.chromium.base.CommandLine;
27 import org.chromium.base.CommandLineInitUtil; 27 import org.chromium.base.CommandLineInitUtil;
28 import org.chromium.base.ContextUtils; 28 import org.chromium.base.ContextUtils;
29 import org.chromium.base.ResourceExtractor; 29 import org.chromium.base.ResourceExtractor;
30 import org.chromium.base.ThreadUtils; 30 import org.chromium.base.ThreadUtils;
31 import org.chromium.base.TraceEvent; 31 import org.chromium.base.TraceEvent;
32 import org.chromium.base.VisibleForTesting; 32 import org.chromium.base.VisibleForTesting;
33 import org.chromium.base.annotations.CalledByNative; 33 import org.chromium.base.annotations.CalledByNative;
34 import org.chromium.base.annotations.SuppressFBWarnings; 34 import org.chromium.base.annotations.SuppressFBWarnings;
35 import org.chromium.base.library_loader.LibraryProcessType;
35 import org.chromium.base.library_loader.ProcessInitException; 36 import org.chromium.base.library_loader.ProcessInitException;
36 import org.chromium.base.metrics.RecordHistogram; 37 import org.chromium.base.metrics.RecordHistogram;
37 import org.chromium.chrome.R; 38 import org.chromium.chrome.R;
38 import org.chromium.chrome.browser.accessibility.FontSizePrefs; 39 import org.chromium.chrome.browser.accessibility.FontSizePrefs;
39 import org.chromium.chrome.browser.banners.AppBannerManager; 40 import org.chromium.chrome.browser.banners.AppBannerManager;
40 import org.chromium.chrome.browser.banners.AppDetailsDelegate; 41 import org.chromium.chrome.browser.banners.AppDetailsDelegate;
41 import org.chromium.chrome.browser.customtabs.CustomTabsConnection; 42 import org.chromium.chrome.browser.customtabs.CustomTabsConnection;
42 import org.chromium.chrome.browser.datausage.ExternalDataUseObserver; 43 import org.chromium.chrome.browser.datausage.ExternalDataUseObserver;
43 import org.chromium.chrome.browser.document.DocumentActivity; 44 import org.chromium.chrome.browser.document.DocumentActivity;
44 import org.chromium.chrome.browser.document.IncognitoDocumentActivity; 45 import org.chromium.chrome.browser.document.IncognitoDocumentActivity;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 private boolean mIsProcessInitialized; 188 private boolean mIsProcessInitialized;
188 189
189 private ChromeLifetimeController mChromeLifetimeController; 190 private ChromeLifetimeController mChromeLifetimeController;
190 private PrintingController mPrintingController; 191 private PrintingController mPrintingController;
191 192
192 /** 193 /**
193 * This is called during early initialization in order to set up ChildProces sLauncher 194 * This is called during early initialization in order to set up ChildProces sLauncher
194 * for certain Chrome packaging configurations 195 * for certain Chrome packaging configurations
195 */ 196 */
196 public ChildProcessCreationParams getChildProcessCreationParams() { 197 public ChildProcessCreationParams getChildProcessCreationParams() {
197 return null; 198 return new ChildProcessCreationParams(ContextUtils.getApplicationContext ().getPackageName(),
199 0, LibraryProcessType.PROCESS_CHILD);
198 } 200 }
199 201
200 /** 202 /**
201 * This is called once per ChromeApplication instance, which get created per process 203 * This is called once per ChromeApplication instance, which get created per process
202 * (browser OR renderer). Don't stick anything in here that shouldn't be ca lled multiple times 204 * (browser OR renderer). Don't stick anything in here that shouldn't be ca lled multiple times
203 * during Chrome's lifetime. 205 * during Chrome's lifetime.
204 */ 206 */
205 @Override 207 @Override
206 public void onCreate() { 208 public void onCreate() {
207 UmaUtils.recordMainEntryPointTime(); 209 UmaUtils.recordMainEntryPointTime();
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 * Caches flags that are needed by Activities that launch before the native library is loaded 851 * Caches flags that are needed by Activities that launch before the native library is loaded
850 * and stores them in SharedPreferences. Because this function is called dur ing launch after the 852 * and stores them in SharedPreferences. Because this function is called dur ing launch after the
851 * library has loaded, they won't affect the next launch until Chrome is res tarted. 853 * library has loaded, they won't affect the next launch until Chrome is res tarted.
852 */ 854 */
853 private void cacheNativeFlags() { 855 private void cacheNativeFlags() {
854 if (sIsFinishedCachingNativeFlags) return; 856 if (sIsFinishedCachingNativeFlags) return;
855 FeatureUtilities.cacheNativeFlags(this); 857 FeatureUtilities.cacheNativeFlags(this);
856 sIsFinishedCachingNativeFlags = true; 858 sIsFinishedCachingNativeFlags = true;
857 } 859 }
858 } 860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698