Chromium Code Reviews| Index: content/browser/renderer_host/input/synthetic_gesture_target_android.h |
| diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_android.h b/content/browser/renderer_host/input/synthetic_gesture_target_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..423f5c3bbbeefc8f89d505743f7cd75fab258188 |
| --- /dev/null |
| +++ b/content/browser/renderer_host/input/synthetic_gesture_target_android.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ |
| +#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ |
| + |
| +#include "base/android/jni_android.h" |
| +#include "base/time/time.h" |
| +#include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
| + |
| +namespace content { |
| + |
| +class ContentViewCoreImpl; |
| +class RenderWidgetHostViewAndroid; |
| + |
| +class SyntheticGestureTargetAndroid : public SyntheticGestureTargetBase { |
| + public: |
| + explicit SyntheticGestureTargetAndroid( |
| + RenderWidgetHostViewAndroid* render_view, |
| + 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.
|
| + ~SyntheticGestureTargetAndroid(); |
| + |
| + virtual void QueueWebTouchEventToPlatform( |
| + const WebKit::WebTouchEvent& web_touch, |
| + const ui::LatencyInfo& latency_info) OVERRIDE; |
| + |
| + // SyntheticGestureTarget: |
| + virtual SyntheticGestureParams::GestureSourceType |
| + GetDefaultSyntheticGestureSourceType() const OVERRIDE; |
| + virtual bool SupportsSyntheticGestureSourceType( |
| + SyntheticGestureParams::GestureSourceType gesture_source_type) const |
| + OVERRIDE; |
| + |
| + private: |
| + // Enum values below need to be kept in sync with SyntheticTouchEvent.java |
| + enum Action { |
| + ActionInvalid = -1, |
| + ActionStart = 0, |
| + ActionMove = 1, |
| + ActionCancel = 2, |
| + ActionEnd = 3 |
| + }; |
| + |
| + void TouchSetPointer(JNIEnv* env, int index, int x, int y, int id); |
| + void TouchInject(JNIEnv* env, Action action, int pointer_count); |
| + |
| + base::android::ScopedJavaGlobalRef<jobject> java_touch_event_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_ |