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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelAnimation.java

Issue 1614953004: Allow swipe threshold adjustment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-middle-state
Patch Set: address comments Created 4 years, 11 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java » ('j') | 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/compositor/bottombar/OverlayPanelAnimation.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelAnimation.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelAnimation.java
index fe46eaf0b29589435625bc2acbae8f1e985fdb8b..d7e4b7186e1f3410f45c2d443d090b68508e7018 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelAnimation.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelAnimation.java
@@ -235,7 +235,7 @@ public abstract class OverlayPanelAnimation extends OverlayPanelBase
// Calculate the nearest state from the current position, and then calculate the duration
// of the animation that will start with a desired initial velocity and move the desired
// amount of dps (displacement).
- final PanelState nearestState = findNearestPanelStateFromHeight(getHeight());
+ final PanelState nearestState = findNearestPanelStateFromHeight(getHeight(), 0.0f);
final float displacement = getPanelHeightFromState(nearestState) - getHeight();
final long duration = calculateAnimationDuration(
INITIAL_ANIMATION_VELOCITY_DP_PER_SECOND, displacement);
@@ -254,7 +254,7 @@ public abstract class OverlayPanelAnimation extends OverlayPanelBase
// Calculate the projected state the Panel will be at the end of the fling movement and the
// duration of the animation given the current velocity and the projected displacement.
- PanelState projectedState = findNearestPanelStateFromHeight(projectedHeight);
+ PanelState projectedState = findNearestPanelStateFromHeight(projectedHeight, velocity);
// Prevent the fling gesture from moving the Panel from PEEKED to MAXIMIZED if the Panel
// Promo is available and we are running in full screen panel mode. This is to make sure
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698