| Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
|
| index ad6844d5780f90aed0c6574842355875d0ecce8b..690cc6c80ebd13f47793b4166dfe400f85d1a1b3 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
|
| @@ -139,18 +139,15 @@
|
| }
|
| }
|
|
|
| - private final boolean mShouldHideTopControls;
|
| - private final boolean mIsOpenedByChrome;
|
| -
|
| - private ExternalNavigationDelegateImpl mNavigationDelegate;
|
| + private CustomTabNavigationDelegate mNavigationDelegate;
|
| private ExternalNavigationHandler mNavigationHandler;
|
| + private boolean mShouldHideTopControls;
|
|
|
| /**
|
| * @param shouldHideTopControls Whether or not the top controls may auto-hide.
|
| */
|
| - public CustomTabDelegateFactory(boolean shouldHideTopControls, boolean isOpenedByChrome) {
|
| + public CustomTabDelegateFactory(boolean shouldHideTopControls) {
|
| mShouldHideTopControls = shouldHideTopControls;
|
| - mIsOpenedByChrome = isOpenedByChrome;
|
| }
|
|
|
| @Override
|
| @@ -170,11 +167,7 @@
|
|
|
| @Override
|
| public InterceptNavigationDelegateImpl createInterceptNavigationDelegate(Tab tab) {
|
| - if (mIsOpenedByChrome) {
|
| - mNavigationDelegate = new ExternalNavigationDelegateImpl(tab);
|
| - } else {
|
| - mNavigationDelegate = new CustomTabNavigationDelegate(tab, tab.getAppAssociatedWith());
|
| - }
|
| + mNavigationDelegate = new CustomTabNavigationDelegate(tab, tab.getAppAssociatedWith());
|
| mNavigationHandler = new ExternalNavigationHandler(mNavigationDelegate);
|
| return new InterceptNavigationDelegateImpl(mNavigationHandler, tab);
|
| }
|
| @@ -197,7 +190,7 @@
|
| * @return The {@link CustomTabNavigationDelegate} in this tab. For test purpose only.
|
| */
|
| @VisibleForTesting
|
| - ExternalNavigationDelegateImpl getExternalNavigationDelegate() {
|
| + CustomTabNavigationDelegate getExternalNavigationDelegate() {
|
| return mNavigationDelegate;
|
| }
|
|
|
|
|