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

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: styles 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_
jdduke (slow) 2013/10/21 19:30:40 Can we move this to renderer_host/input?
kouhei (in TOK) 2013/10/25 15:10:18 Done.
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
jdduke (slow) 2013/10/21 23:05:45 Nit: Remove lines before/after "class WebTouchEven
kouhei (in TOK) 2013/10/25 15:10:18 Done.
13 class WebTouchEvent;
14
15 } // namespace WebKit
16
17 namespace content {
18
19 class ContentViewCoreImpl;
20
21 class SyntheticTouchEventAndroid {
jdduke (slow) 2013/10/21 23:05:45 I wonder if we want to add something else to the n
22 public:
23 // Enum values below need to be kept 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 SetPointer(int index, int x, int y, int id);
jdduke (slow) 2013/10/21 23:05:45 Nit: Please make SetPointer/Inject private, and th
kouhei (in TOK) 2013/10/25 15:10:18 Done.
36 void Inject(Action action, int pointer_count);
37 void InjectWebTouchEvent(const WebKit::WebTouchEvent* web_touch);
38
39 private:
40 JNIEnv* env_;
41 base::android::ScopedJavaGlobalRef<jobject> java_touch_event_;
42
43 DISALLOW_COPY_AND_ASSIGN(SyntheticTouchEventAndroid);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_BROWSER_RENDERER_HOST_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698