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

Side by Side Diff: content/child/fling_animator_impl_android.h

Issue 634373003: Consolidate content fling implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win build Created 6 years, 2 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
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/fling_animator_impl_android.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 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.
4
5 #ifndef CONTENT_CHILD_FLING_ANIMATOR_IMPL_ANDROID_H_
6 #define CONTENT_CHILD_FLING_ANIMATOR_IMPL_ANDROID_H_
7
8
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"
14
15 namespace blink {
16 class WebGestureCurveTarget;
17 }
18
19 namespace content {
20
21 class FlingAnimatorImpl : public blink::WebGestureCurve {
22 public:
23 FlingAnimatorImpl();
24 virtual ~FlingAnimatorImpl();
25
26 static FlingAnimatorImpl* CreateAndroidGestureCurve(
27 const blink::WebFloatPoint& velocity,
28 const blink::WebSize&);
29
30 virtual bool apply(double time, blink::WebGestureCurveTarget* target);
31
32 private:
33 void StartFling(const gfx::PointF& velocity);
34 void CancelFling();
35
36 bool is_active_;
37
38 gfx::Scroller scroller_;
39
40 gfx::PointF last_position_;
41
42 DISALLOW_COPY_AND_ASSIGN(FlingAnimatorImpl);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_CHILD_FLING_ANIMATOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/fling_animator_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698