| Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
|
| index b636846f12b9821a38ffb33e7bfd07c230c91654..2bb70c6ab72fd869fc54695b0ca73d3b4c5b181d 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
|
| @@ -40,6 +40,9 @@ public class InfoBarContainer extends SwipableOverlayView {
|
| private static final int TAB_STRIP_AND_TOOLBAR_HEIGHT_PHONE_DP = 56;
|
| private static final int TAB_STRIP_AND_TOOLBAR_HEIGHT_TABLET_DP = 96;
|
|
|
| + /** WHether or not the InfoBarContainer is allowed to hide when the user scrolls. */
|
| + private static boolean sIsAllowedToAutoHide;
|
| +
|
| /**
|
| * A listener for the InfoBar animation.
|
| */
|
| @@ -520,6 +523,20 @@ public class InfoBarContainer extends SwipableOverlayView {
|
| return mNativeInfoBarContainer;
|
| }
|
|
|
| + /**
|
| + * Sets whether the InfoBarContainer is allowed to auto-hide when the user scrolls the page.
|
| + * Expected to be called when Touch Exploration is enabled.
|
| + * @param isAllowed Whether auto-hiding is allowed.
|
| + */
|
| + public static void setIsAllowedToAutoHide(boolean isAllowed) {
|
| + sIsAllowedToAutoHide = isAllowed;
|
| + }
|
| +
|
| + @Override
|
| + protected boolean isAllowedToAutoHide() {
|
| + return sIsAllowedToAutoHide;
|
| + }
|
| +
|
| @Override
|
| protected void onViewSwipedAway() {
|
| assert false;
|
|
|