1 // Copyright 2014 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.
5 #ifndef CONTENT_CHILD_FLING_ANIMATOR_IMPL_ANDROID_H_
6 #define CONTENT_CHILD_FLING_ANIMATOR_IMPL_ANDROID_H_
9 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
10 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
11 #include "third_party/WebKit/public/platform/WebSize.h"
12 #include "ui/gfx/android/scroller.h"
13 #include "ui/gfx/point_f.h"
16 class WebGestureCurveTarget
;
21 class FlingAnimatorImpl
: public blink::WebGestureCurve
{
24 virtual ~FlingAnimatorImpl();
26 static FlingAnimatorImpl
* CreateAndroidGestureCurve(
27 const blink::WebFloatPoint
& velocity
,
28 const blink::WebSize
&);
30 virtual bool apply(double time
, blink::WebGestureCurveTarget
* target
);
33 void StartFling(const gfx::PointF
& velocity
);
38 gfx::Scroller scroller_
;
40 gfx::PointF last_position_
;
42 DISALLOW_COPY_AND_ASSIGN(FlingAnimatorImpl
);
45 } // namespace webkit_glue
47 #endif // CONTENT_CHILD_FLING_ANIMATOR_IMPL_ANDROID_H_