Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_android.h

Issue 26664002: SyntheticGestureTarget implementation for injecting synthetic input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase_wip Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..3ec47458cc52918c9c7a95fff83913000f4e5732
--- /dev/null
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_android.h
@@ -0,0 +1,47 @@
+// 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:
+ SyntheticGestureTargetAndroid(RenderWidgetHostViewAndroid* render_view);
jdduke (slow) 2013/10/28 15:59:47 What if we have as an argument here |java_touch_ev
kouhei (in TOK) 2013/10/30 03:18:35 Done.
+ ~SyntheticGestureTargetAndroid();
+
+ virtual void QueueWebTouchEventToPlatform(
+ const WebKit::WebTouchEvent& web_touch,
+ const ui::LatencyInfo& latency_info) 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(int index, int x, int y, int id);
+ void TouchInject(Action action, int pointer_count);
+
+ JNIEnv* env_;
+ 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_

Powered by Google App Engine
This is Rietveld 408576698