| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 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_BROWSER_RENDERER_HOST_GENERIC_TOUCH_GESTURE_ANDROID_H_ | |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_GENERIC_TOUCH_GESTURE_ANDROID_H_ | |
| 7 | |
| 8 #include "base/android/jni_android.h" | |
| 9 #include "base/time/time.h" | |
| 10 #include "content/browser/renderer_host/synthetic_gesture_calculator.h" | |
| 11 #include "content/port/browser/synthetic_gesture.h" | |
| 12 | |
| 13 namespace content { | |
| 14 | |
| 15 class ContentViewCore; | |
| 16 class RenderWidgetHost; | |
| 17 | |
| 18 class GenericTouchGestureAndroid : public SyntheticGesture { | |
| 19 public: | |
| 20 GenericTouchGestureAndroid( | |
| 21 RenderWidgetHost* rwh, | |
| 22 base::android::ScopedJavaLocalRef<jobject> java_scroller); | |
| 23 | |
| 24 // Called by the java side once the TimeAnimator ticks. | |
| 25 float GetDelta(JNIEnv* env, jobject obj, float scale); | |
| 26 void SetHasFinished(JNIEnv* env, jobject obj); | |
| 27 | |
| 28 // SmoothScrollGesture | |
| 29 virtual bool ForwardInputEvents(base::TimeTicks now, | |
| 30 RenderWidgetHost* host) OVERRIDE; | |
| 31 | |
| 32 private: | |
| 33 virtual ~GenericTouchGestureAndroid(); | |
| 34 | |
| 35 SyntheticGestureCalculator synthetic_gesture_calculator_; | |
| 36 | |
| 37 bool has_started_; | |
| 38 bool has_finished_; | |
| 39 | |
| 40 RenderWidgetHost* rwh_; | |
| 41 base::android::ScopedJavaGlobalRef<jobject> java_touch_gesture_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(GenericTouchGestureAndroid); | |
| 44 }; | |
| 45 | |
| 46 } // namespace content | |
| 47 | |
| 48 #endif // CONTENT_BROWSER_RENDERER_HOST_GENERIC_TOUCH_GESTURE_ANDROID_H_ | |
| OLD | NEW |