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

Side by Side Diff: webkit/child/touch_fling_gesture_curve.h

Issue 52663003: Remove all fling related stuff from the renderer assuming that browser side Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/child/fling_curve_configuration.cc ('k') | webkit/child/touch_fling_gesture_curve.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_CHILD_TOUCH_FLING_GESTURE_CURVE_H_
6 #define WEBKIT_CHILD_TOUCH_FLING_GESTURE_CURVE_H_
7
8 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
9 #include "third_party/WebKit/public/platform/WebFloatSize.h"
10 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
11 #include "third_party/WebKit/public/platform/WebSize.h"
12 #include "webkit/child/webkit_child_export.h"
13
14 namespace WebKit {
15 class WebGestureCurveTarget;
16 }
17
18 namespace webkit_glue {
19
20 // Implementation of WebGestureCurve suitable for touch pad/screen-based
21 // fling scroll. Starts with a flat velocity profile based on 'velocity', which
22 // tails off to zero. Time is scaled to that duration of the fling is
23 // proportional to the initial velocity.
24 class TouchFlingGestureCurve : public WebKit::WebGestureCurve {
25 public:
26
27 WEBKIT_CHILD_EXPORT static WebGestureCurve* Create(
28 const WebKit::WebFloatPoint& initial_velocity,
29 float p0, float p1, float p2,
30 const WebKit::WebSize& cumulativeScroll);
31
32 virtual bool apply(double monotonicTime,
33 WebKit::WebGestureCurveTarget*) OVERRIDE;
34
35 private:
36 TouchFlingGestureCurve(const WebKit::WebFloatPoint& initial_velocity,
37 float p0,
38 float p1,
39 float p2,
40 const WebKit::WebSize& cumulativeScroll);
41 virtual ~TouchFlingGestureCurve();
42
43 WebKit::WebFloatPoint displacement_ratio_;
44 WebKit::WebFloatSize cumulative_scroll_;
45 float coefficients_[3];
46 float time_offset_;
47 float curve_duration_;
48 float position_offset_;
49
50 DISALLOW_COPY_AND_ASSIGN(TouchFlingGestureCurve);
51 };
52
53 } // namespace webkit_glue
54
55 #endif // WEBKIT_CHILD_TOUCH_FLING_GESTURE_CURVE_H_
OLDNEW
« no previous file with comments | « webkit/child/fling_curve_configuration.cc ('k') | webkit/child/touch_fling_gesture_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698