| 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 cdbb845f42b526104106f6f94cabb6e772ebb199..da9a9d4155ed66e8b48e073696780e207af435e0 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
|
| @@ -518,28 +518,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.createWebContents(false, false);
|
| + if (webContents == null) {
|
| + 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);
|
| initializeMainTab(tab);
|
| return tab;
|
| }
|
|
|