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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2708613002: Add EventForwarder for routing touch events (Closed)
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 53c758f11f2760db6d1ec2218b6fdc475ba4ecbb..77dc8c271efc7d8166045865f9ad9f8123072769 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -429,6 +429,7 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
content_view_core_(nullptr),
ime_adapter_android_(this),
cached_background_color_(SK_ColorWHITE),
+ view_(this),
last_compositor_frame_sink_id_(kUndefinedCompositorFrameSinkId),
gesture_provider_(ui::GetGestureProviderConfig(
ui::GestureProviderConfigType::CURRENT_PLATFORM),
@@ -1770,6 +1771,20 @@ void RenderWidgetHostViewAndroid::RunAckCallbacks() {
}
}
+bool RenderWidgetHostViewAndroid::OnTouchEvent(
+ const ui::MotionEventAndroid& event,
+ bool is_touch_handle_event) {
David Trainor- moved to gerrit 2017/02/28 01:31:23 We should look at how we could remove this distinc
Jinsuk Kim 2017/02/28 06:56:04 Left a TODO for a reminder for future refactoring.
+ return is_touch_handle_event ? OnTouchHandleEvent(event)
+ : OnTouchEvent(event);
+}
+
+bool RenderWidgetHostViewAndroid::OnMouseEvent(
+ const ui::MotionEventAndroid& event,
+ int action_button) {
+ SendMouseEvent(event, action_button);
+ return true;
+}
+
void RenderWidgetHostViewAndroid::OnGestureEvent(
const ui::GestureEventData& gesture) {
blink::WebGestureEvent web_gesture =

Powered by Google App Engine
This is Rietveld 408576698