Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3433)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java

Issue 968453002: Stop infobar autohiding when Touch Exploration enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698