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

Unified Diff: ui/events/android/scroller.h

Issue 2767213003: First Implementation of Snapped Points
Patch Set: Rebase and format Created 3 years, 6 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 | « third_party/WebKit/public/platform/WebSnapPointList.h ('k') | ui/events/android/scroller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/android/scroller.h
diff --git a/ui/events/android/scroller.h b/ui/events/android/scroller.h
index 37d41cd3e1bfa127dbe0c50234982bb1740e6485..b0acbd1486d805f09ab68415d63c6a0dee2f3eac 100644
--- a/ui/events/android/scroller.h
+++ b/ui/events/android/scroller.h
@@ -35,6 +35,10 @@ class EVENTS_BASE_EXPORT Scroller : public GestureCurve {
gfx::Vector2dF* offset,
gfx::Vector2dF* velocity) override;
+ void ComputeTotalScrollOffset(gfx::Vector2dF& offset) override;
+
+ bool ResetCurveBySnappedOffset(const gfx::Vector2dF& offset) override;
+
// Start scrolling by providing a starting point and the distance to travel.
// The default value of 250 milliseconds will be used for the duration.
void StartScroll(float start_x,
@@ -111,6 +115,8 @@ class EVENTS_BASE_EXPORT Scroller : public GestureCurve {
double GetSplineDeceleration(float velocity) const;
base::TimeDelta GetSplineFlingDuration(float velocity) const;
double GetSplineFlingDistance(float velocity) const;
+ double GetSplineVelocityFromDeceleration(float deceleration) const;
+ double GetSplineVelocityFromDistance(float distance) const;
Mode mode_;
« no previous file with comments | « third_party/WebKit/public/platform/WebSnapPointList.h ('k') | ui/events/android/scroller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698