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

Side by Side Diff: content/browser/android/event_forwarder_impl.h

Issue 2708613002: Add EventForwarder for routing touch events (Closed)
Patch Set: - Created 3 years, 10 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 2017 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_ANDROID_EVENT_FORWARDER_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_EVENT_FORWARDER_IMPL_H_
7
8 #include "base/android/jni_android.h"
9
10 namespace ui {
11 class ViewAndroid;
12 }
13
14 namespace content {
15 class RenderWidgetHostViewAndroid;
16 class WebContentsImpl;
17
18 class EventForwarderImpl {
19 public:
20 EventForwarderImpl(WebContentsImpl* web_contents);
21 jboolean OnTouchEvent(
22 JNIEnv* env,
23 const base::android::JavaParamRef<jobject>& obj,
24 const base::android::JavaParamRef<jobject>& motion_event,
25 jlong time_ms,
26 jint android_action,
27 jint pointer_count,
28 jint history_size,
29 jint action_index,
30 jfloat pos_x_0,
31 jfloat pos_y_0,
32 jfloat pos_x_1,
33 jfloat pos_y_1,
34 jint pointer_id_0,
35 jint pointer_id_1,
36 jfloat touch_major_0,
37 jfloat touch_major_1,
38 jfloat touch_minor_0,
39 jfloat touch_minor_1,
40 jfloat orientation_0,
41 jfloat orientation_1,
42 jfloat tilt_0,
43 jfloat tilt_1,
44 jfloat raw_pos_x,
45 jfloat raw_pos_y,
46 jint android_tool_type_0,
47 jint android_tool_type_1,
48 jint android_button_state,
49 jint android_meta_state,
50 jboolean is_touch_handle_event);
51
52 private:
53 ui::ViewAndroid* GetViewAndroid() const;
54 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const;
55
56 // Reference to the current WebContents.
57 WebContentsImpl* web_contents_;
58 float dip_scale_;
59 };
60
61 bool RegisterEventForwarderImpl(JNIEnv* env);
62
63 } // namespace content
64
65 #endif // CONTENT_BROWSER_ANDROID_EVENT_FORWARDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698