#ifndef CONTENT_CHILD_TOUCH_FLING_GESTURE_CURVE_H_
#define CONTENT_CHILD_TOUCH_FLING_GESTURE_CURVE_H_
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebFloatSize.h"
#include "third_party/WebKit/public/platform/WebGestureCurve.h"
#include "third_party/WebKit/public/platform/WebSize.h"
namespace blink {
class WebGestureCurveTarget;
}
namespace content {
class TouchFlingGestureCurve : public blink::WebGestureCurve {
public:
static CONTENT_EXPORT WebGestureCurve* Create(
const blink::WebFloatPoint& initial_velocity,
float p0, float p1, float p2,
const blink::WebSize& cumulativeScroll);
virtual bool apply(double monotonicTime,
blink::WebGestureCurveTarget*) OVERRIDE;
private:
TouchFlingGestureCurve(const blink::WebFloatPoint& initial_velocity,
float p0,
float p1,
float p2,
const blink::WebSize& cumulativeScroll);
virtual ~TouchFlingGestureCurve();
blink::WebFloatPoint displacement_ratio_;
blink::WebFloatSize cumulative_scroll_;
float coefficients_[3];
float time_offset_;
float curve_duration_;
float position_offset_;
DISALLOW_COPY_AND_ASSIGN(TouchFlingGestureCurve);
};
}
#endif