OLD | NEW |
---|---|
(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: | |
jamesr
2012/08/09 00:03:41
chromium style is to indent the public:/private:/p
| |
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_ | |
OLD | NEW |