OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ |
7 | 7 |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" | 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 const blink::WebTouchEvent& web_touch, | 26 const blink::WebTouchEvent& web_touch, |
27 const ui::LatencyInfo& latency_info) OVERRIDE; | 27 const ui::LatencyInfo& latency_info) OVERRIDE; |
28 | 28 |
29 // SyntheticGestureTarget: | 29 // SyntheticGestureTarget: |
30 virtual SyntheticGestureParams::GestureSourceType | 30 virtual SyntheticGestureParams::GestureSourceType |
31 GetDefaultSyntheticGestureSourceType() const OVERRIDE; | 31 GetDefaultSyntheticGestureSourceType() const OVERRIDE; |
32 virtual bool SupportsSyntheticGestureSourceType( | 32 virtual bool SupportsSyntheticGestureSourceType( |
33 SyntheticGestureParams::GestureSourceType gesture_source_type) const | 33 SyntheticGestureParams::GestureSourceType gesture_source_type) const |
34 OVERRIDE; | 34 OVERRIDE; |
35 | 35 |
| 36 virtual int GetTouchSlopInDips() const OVERRIDE; |
| 37 |
36 private: | 38 private: |
37 // Enum values below need to be kept in sync with TouchEventSynthesizer.java | 39 // Enum values below need to be kept in sync with TouchEventSynthesizer.java |
38 enum Action { | 40 enum Action { |
39 ActionInvalid = -1, | 41 ActionInvalid = -1, |
40 ActionStart = 0, | 42 ActionStart = 0, |
41 ActionMove = 1, | 43 ActionMove = 1, |
42 ActionCancel = 2, | 44 ActionCancel = 2, |
43 ActionEnd = 3 | 45 ActionEnd = 3 |
44 }; | 46 }; |
45 | 47 |
46 void TouchSetPointer(JNIEnv* env, int index, int x, int y, int id); | 48 void TouchSetPointer(JNIEnv* env, int index, int x, int y, int id); |
47 void TouchInject(JNIEnv* env, Action action, int pointer_count); | 49 void TouchInject(JNIEnv* env, Action action, int pointer_count); |
48 | 50 |
49 base::android::ScopedJavaGlobalRef<jobject> touch_event_synthesizer_; | 51 base::android::ScopedJavaGlobalRef<jobject> touch_event_synthesizer_; |
50 | 52 |
51 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid); | 53 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid); |
52 }; | 54 }; |
53 | 55 |
54 } // namespace content | 56 } // namespace content |
55 | 57 |
56 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_
H_ | 58 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_
H_ |
OLD | NEW |