| Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| index 9dac7b19e4339dc9b9f592b83a1aa16d5a69da5b..7f233424c2afc89b6c132a8976506f041b36f0e8 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| @@ -17,6 +17,7 @@ import android.net.Uri;
|
| import android.os.Bundle;
|
| import android.provider.Browser;
|
| import android.support.annotation.Nullable;
|
| +import android.support.v4.view.ViewCompat;
|
| import android.text.TextUtils;
|
| import android.util.Log;
|
| import android.view.ContextThemeWrapper;
|
| @@ -2137,6 +2138,16 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
|
| }
|
|
|
| /**
|
| + * @return Whether the tab can currently be interacted with by the user. This requires the
|
| + * view owned by the Tab to be visible and in a state where the user can interact with
|
| + * it (i.e. not in something like the phone tab switcher).
|
| + */
|
| + @CalledByNative
|
| + public boolean isUserInteractable() {
|
| + return !mIsHidden && ViewCompat.isAttachedToWindow(getView());
|
| + }
|
| +
|
| + /**
|
| * @return Whether or not the tab is in the closing process.
|
| */
|
| public boolean isClosing() {
|
|
|