[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / child / fling_animator_impl_android.h
blobea33ba291962e69bb1d160cb461ab00b397288fc
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"
15 namespace blink {
16 class WebGestureCurveTarget;
19 namespace content {
21 class FlingAnimatorImpl : public blink::WebGestureCurve {
22 public:
23 FlingAnimatorImpl();
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);
32 private:
33 void StartFling(const gfx::PointF& velocity);
34 void CancelFling();
36 bool is_active_;
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_