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

Side by Side Diff: Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h

Issue 9931004: Merge 112364 - [chromium] Transfer wheel fling via WebCompositorInputHandlerClient (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 23 matching lines...) Expand all
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class PlatformGestureCurveTarget; 36 class PlatformGestureCurveTarget;
37 37
38 // Implementation of PlatformGestureCurve suitable for touch pad/screen-based 38 // Implementation of PlatformGestureCurve suitable for touch pad/screen-based
39 // fling scroll. Starts with a flat velocity profile based on 'velocity', which 39 // fling scroll. Starts with a flat velocity profile based on 'velocity', which
40 // tails off to zero. Time is scaled to that duration of the fling is proportion al 40 // tails off to zero. Time is scaled to that duration of the fling is proportion al
41 // the initial velocity. 41 // the initial velocity.
42 class TouchpadFlingPlatformGestureCurve : public PlatformGestureCurve { 42 class TouchpadFlingPlatformGestureCurve : public PlatformGestureCurve {
43 public: 43 public:
44 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity); 44 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, I ntPoint cumulativeScroll = IntPoint());
45 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, c onst float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bez ierP2); 45 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, c onst float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bez ierP2, IntPoint cumulativeScroll = IntPoint());
46 virtual ~TouchpadFlingPlatformGestureCurve(); 46 virtual ~TouchpadFlingPlatformGestureCurve();
47 47
48 virtual const char* debugName() const { return "TouchpadFling"; } 48 virtual const char* debugName() const { return "TouchpadFling"; }
49 virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*); 49 virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*);
50 50
51 private: 51 private:
52 explicit TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP 2); 52 TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, const float un itTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2, const IntPoint& cumulativeScroll);
53 53
54 FloatPoint m_velocity; 54 FloatPoint m_velocity;
55 float m_timeScaleFactor; 55 float m_timeScaleFactor;
56 IntPoint m_cumulativeScroll; 56 IntPoint m_cumulativeScroll;
57 UnitBezier m_flingBezier; 57 UnitBezier m_flingBezier;
58 }; 58 };
59 59
60 } // namespace WebCore 60 } // namespace WebCore
61 61
62 #endif 62 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698