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

Side by Side Diff: content/browser/renderer_host/synthetic_touch_event_android.h

Issue 26664002: SyntheticGestureTarget implementation for injecting synthetic input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/time/time.h"
10
11 namespace WebKit {
12
13 class WebTouchEvent;
14
15 } // namespace WebKit
16
17 namespace content {
18
19 class ContentViewCoreImpl;
20
21 class SyntheticTouchEventAndroid {
22 public:
23 // Below need to be keep in sync with SyntheticTouchEvent.java
24 enum Action {
25 ActionInvalid = -1,
26 ActionStart = 0,
27 ActionMove = 1,
28 ActionCancel = 2,
29 ActionEnd = 3
30 };
31
32 SyntheticTouchEventAndroid(ContentViewCoreImpl* content_view_core);
33 ~SyntheticTouchEventAndroid();
34
35 void reset();
36 long GetCurrentTime();
37 void SetDownTime(long downTime);
38 void AddPointer(int x, int y, int id);
39 void Inject(Action action);
40 void InjectWebTouchEvent(const WebKit::WebTouchEvent* web_touch);
41
42 private:
43 JNIEnv* env_;
44 base::android::ScopedJavaGlobalRef<jobject> java_touch_event_;
45 int savedDownTime_;
Dominik Grewe 2013/10/10 14:01:45 Should this be saved_down_time_? Or do we have oth
kouhei (in TOK) 2013/10/15 02:10:02 Done. I just got confused switching back and forth
46
47 DISALLOW_COPY_AND_ASSIGN(SyntheticTouchEventAndroid);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_RENDERER_HOST_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698