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

Side by Side Diff: webkit/glue/fling_animator_impl_android.h

Issue 10823239: Upstream android's fling animator. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/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 (c) 2012 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 WEBKIT_GLUE_FLING_ANIMATOR_IMPL_ANDROID_H_
6 #define WEBKIT_GLUE_FLING_ANIMATOR_IMPL_ANDROID_H_
7
8 #include "base/android/scoped_java_ref.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFlingAnimator.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
13
14 namespace webkit_glue {
15
16 class FlingAnimatorImpl : public WebKit::WebFlingAnimator {
17 public:
18 FlingAnimatorImpl();
19 virtual ~FlingAnimatorImpl();
20
21 virtual void startFling(const WebKit::WebFloatPoint& velocity,
22 const WebKit::WebRect& range);
23 // Returns true if the animation is not yet finished.
24 virtual bool updatePosition();
25 virtual WebKit::WebPoint getCurrentPosition();
26 virtual void cancelFling();
27
28 private:
29 bool is_active_;
30
31 // Java OverScroller instance and methods.
32 base::android::ScopedJavaGlobalRef<jobject> java_scroller_;
33 jmethodID fling_method_id_;
34 jmethodID abort_method_id_;
35 jmethodID compute_method_id_;
36 jmethodID getX_method_id_;
37 jmethodID getY_method_id_;
38
39 DISALLOW_COPY_AND_ASSIGN(FlingAnimatorImpl);
40 };
41
42 } // namespace webkit_glue
43
44 #endif // WEBKIT_GLUE_FLING_ANIMATOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/fling_animator_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698