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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
(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 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.
20 ~SyntheticGestureTargetAndroid();
21
22 virtual void QueueWebTouchEventToPlatform(
23 const WebKit::WebTouchEvent& web_touch,
24 const ui::LatencyInfo& latency_info) OVERRIDE;
25
26 private:
27 // Enum values below need to be kept in sync with SyntheticTouchEvent.java
28 enum Action {
29 ActionInvalid = -1,
30 ActionStart = 0,
31 ActionMove = 1,
32 ActionCancel = 2,
33 ActionEnd = 3
34 };
35
36 void TouchSetPointer(int index, int x, int y, int id);
37 void TouchInject(Action action, int pointer_count);
38
39 JNIEnv* env_;
40 base::android::ScopedJavaGlobalRef<jobject> java_touch_event_;
41
42 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAndroid);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698