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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2706933003: webapk: Avoid overwriting default CreationParams
Patch Set: rebase 461342 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index b6351a6d2ea09bab9802eace1241cde079cf1abb..6f7da830a264ae79e2b96066043050aefb3ba86b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -530,30 +530,30 @@ public class CustomTabActivity extends ChromeActivity {
tab.setAppAssociatedWith(customTabsConnection.getClientPackageNameForSession(mSession));
mPrerenderedUrl = customTabsConnection.getPrerenderedUrl(mSession);
+ CustomTabDelegateFactory delegateFactory =
+ new CustomTabDelegateFactory(mIntentDataProvider.shouldEnableUrlBarHiding(),
+ mIntentDataProvider.isOpenedByChrome(),
+ getFullscreenManager().getBrowserVisibilityDelegate());
int webContentsStateOnLaunch = WEBCONTENTS_STATE_NO_WEBCONTENTS;
- WebContents webContents =
- customTabsConnection.takePrerenderedUrl(mSession, url, referrerUrl);
+ WebContents webContents = customTabsConnection.takePrerenderedUrl(
+ mSession, url, referrerUrl, delegateFactory.getChildProcessParamId());
mHasPrerendered = webContents != null;
if (mHasPrerendered) webContentsStateOnLaunch = WEBCONTENTS_STATE_PRERENDERED_WEBCONTENTS;
if (!mHasPrerendered) {
- webContents = WarmupManager.getInstance().takeSpareWebContents(false, false);
+ webContents = WarmupManager.getInstance().takeSpareWebContents(
+ false, false, delegateFactory.getChildProcessParamId());
if (webContents != null) webContentsStateOnLaunch = WEBCONTENTS_STATE_SPARE_WEBCONTENTS;
}
RecordHistogram.recordEnumeratedHistogram("CustomTabs.WebContentsStateOnLaunch",
webContentsStateOnLaunch, WEBCONTENTS_STATE_MAX);
if (webContents == null) {
- webContents = WebContentsFactory.createWebContentsWithWarmRenderer(false, false);
+ webContents = WebContentsFactory.createWebContents(
+ delegateFactory.getChildProcessParamId(), false, false);
}
if (!mHasPrerendered) {
customTabsConnection.resetPostMessageHandlerForSession(mSession, webContents);
}
- tab.initialize(
- webContents, getTabContentManager(),
- new CustomTabDelegateFactory(
- mIntentDataProvider.shouldEnableUrlBarHiding(),
- mIntentDataProvider.isOpenedByChrome(),
- getFullscreenManager().getBrowserVisibilityDelegate()),
- false, false);
+ tab.initialize(webContents, getTabContentManager(), delegateFactory, false, false);
if (mIntentDataProvider.shouldEnableEmbeddedMediaExperience()) {
tab.enableEmbeddedMediaExperience(true);

Powered by Google App Engine
This is Rietveld 408576698