Chromium Code Reviews| 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_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ | |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ | |
| 7 | |
| 8 #include "base/android/jni_android.h" | |
| 9 #include "base/time/time.h" | |
| 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 class ContentViewCoreImpl; | |
| 15 class RenderWidgetHostViewAndroid; | |
| 16 | |
| 17 class SyntheticGestureTargetAndroid : public SyntheticGestureTargetBase { | |
| 18 public: | |
| 19 explicit SyntheticGestureTargetAndroid( | |
| 20 RenderWidgetHostViewAndroid* render_view, | |
| 21 base::android::ScopedJavaLocalRef<jobject> java_touch_event); | |
|
aelias_OOO_until_Jul13
2013/10/31 01:47:48
I'm confused as to why this is taking a single tou
kouhei (in TOK)
2013/10/31 04:26:36
java_touch_event is a SyntheticTouchEvent instance
aelias_OOO_until_Jul13
2013/10/31 08:52:42
OK. Can you please rename it to TouchEventSynthes
kouhei (in TOK)
2013/11/05 01:32:25
Done.
| |
| 22 ~SyntheticGestureTargetAndroid(); | |
| 23 | |
| 24 virtual void QueueWebTouchEventToPlatform( | |
| 25 const WebKit::WebTouchEvent& web_touch, | |
| 26 const ui::LatencyInfo& latency_info) OVERRIDE; | |
| 27 | |
| 28 // SyntheticGestureTarget: | |
| 29 virtual SyntheticGestureParams::GestureSourceType | |
| 30 GetDefaultSyntheticGestureSourceType() const OVERRIDE; | |
| 31 virtual bool SupportsSyntheticGestureSourceType( | |
| 32 SyntheticGestureParams::GestureSourceType gesture_source_type) const | |
| 33 OVERRIDE; | |
| 34 | |
| 35 private: | |
| 36 // Enum values below need to be kept in sync with SyntheticTouchEvent.java | |
| 37 enum Action { | |
| 38 ActionInvalid = -1, | |
| 39 ActionStart = 0, | |
| 40 ActionMove = 1, | |
| 41 ActionCancel = 2, | |
| 42 ActionEnd = 3 | |
| 43 }; | |
| 44 | |
| 45 void TouchSetPointer(JNIEnv* env, int index, int x, int y, int id); | |
| 46 void TouchInject(JNIEnv* env, Action action, int pointer_count); | |
| 47 | |
| 48 base::android::ScopedJavaGlobalRef<jobject> java_touch_event_; | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid); | |
| 51 }; | |
| 52 | |
| 53 } // namespace content | |
| 54 | |
| 55 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_ H_ | |
| OLD | NEW |