| Index: chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
|
| index 705258cae96601356d1c8272795accb720ac38be..c65b17552a230a51194b50edd827248164df616b 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java
|
| @@ -12,6 +12,7 @@ import android.os.SystemClock;
|
| import android.provider.Browser;
|
| import android.text.TextUtils;
|
|
|
| +import org.chromium.chrome.browser.document.ChromeLauncherActivity;
|
| import org.chromium.chrome.browser.util.IntentUtils;
|
| import org.chromium.ui.base.PageTransition;
|
|
|
| @@ -40,6 +41,7 @@ public class TabRedirectHandler {
|
| // A resolver list which includes all resolvers of |mInitialIntent|.
|
| private final HashSet<ComponentName> mCachedResolvers = new HashSet<ComponentName>();
|
| private boolean mIsInitialIntentHeadingToChrome;
|
| + private boolean mIsCustomTabIntent;
|
|
|
| private long mLastNewUrlLoadingTime = INVALID_TIME;
|
| private boolean mIsOnEffectiveRedirectChain;
|
| @@ -76,6 +78,7 @@ public class TabRedirectHandler {
|
| Browser.EXTRA_APPLICATION_ID))) {
|
| mIsInitialIntentHeadingToChrome = true;
|
| }
|
| + mIsCustomTabIntent = ChromeLauncherActivity.isCustomTabIntent(intent);
|
|
|
| // Copies minimum information to retrieve resolvers.
|
| mInitialIntent = new Intent(Intent.ACTION_VIEW);
|
| @@ -89,6 +92,7 @@ public class TabRedirectHandler {
|
|
|
| private void clearIntentHistory() {
|
| mIsInitialIntentHeadingToChrome = false;
|
| + mIsCustomTabIntent = false;
|
| mInitialIntent = null;
|
| mCachedResolvers.clear();
|
| }
|
| @@ -190,6 +194,13 @@ public class TabRedirectHandler {
|
| }
|
|
|
| /**
|
| + * @return Whether this navigation is initiated by a Custom Tabs {@link Intent}.
|
| + */
|
| + public boolean isFromCustomTabIntent() {
|
| + return mIsCustomTabIntent;
|
| + }
|
| +
|
| + /**
|
| * @return whether navigation is from a user's typing or not.
|
| */
|
| public boolean isNavigationFromUserTyping() {
|
|
|