Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java |
index 6c47e6bb486f615b09a76b1cbc7ffd5a463b4533..b2b8d598c6f48b7252f3de23d789c67fdc813f07 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java |
@@ -121,9 +121,6 @@ |
/** If the panel should be ignoring swipe events (for compatibility mode). */ |
private boolean mIgnoreSwipeEvents; |
- /** This is used to make sure there is one show request to one close request. */ |
- private boolean mPanelShowRequested; |
- |
// ============================================================================================ |
// Constructor |
// ============================================================================================ |
@@ -187,9 +184,7 @@ |
@Override |
public void closePanel(StateChangeReason reason, boolean animate) { |
- // If the panel hasn't peeked, then it shouldn't need to close. |
- if (!mPanelShowRequested) return; |
- mPanelShowRequested = false; |
+ if (!isShowing()) return; |
super.closePanel(reason, animate); |
} |
@@ -199,8 +194,7 @@ |
* @param reason The reason the panel is being shown. |
*/ |
public void requestPanelShow(StateChangeReason reason) { |
- if (mPanelShowRequested) return; |
- mPanelShowRequested = true; |
+ if (isShowing()) return; |
if (mPanelManager != null) { |
mPanelManager.requestPanelShow(this, reason); |