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 dc99553cbc5baadabec30a5a27c7b3821b43e99c..1df3245fc23da505e54ebc061df85aac7f87fddd 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -81,6 +81,7 @@ |
#include "ui/display/screen.h" |
#include "ui/events/blink/blink_event_util.h" |
#include "ui/events/blink/did_overscroll_params.h" |
+#include "ui/events/blink/web_input_event_traits.h" |
#include "ui/events/gesture_detection/gesture_provider_config_helper.h" |
#include "ui/events/gesture_detection/motion_event.h" |
#include "ui/gfx/android/device_display_info.h" |
@@ -696,7 +697,7 @@ bool RenderWidgetHostViewAndroid::OnTouchEvent( |
blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent( |
event, result.moved_beyond_slop_region); |
- ui::LatencyInfo latency_info; |
+ ui::LatencyInfo latency_info(ui::SourceEventType::TOUCH); |
latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
host_->ForwardTouchEventWithLatencyInfo(web_event, latency_info); |
@@ -729,9 +730,11 @@ void RenderWidgetHostViewAndroid::ResetGestureDetection() { |
std::unique_ptr<ui::MotionEvent> cancel_event = current_down_event->Cancel(); |
if (gesture_provider_.OnTouchEvent(*cancel_event).succeeded) { |
bool causes_scrolling = false; |
+ ui::LatencyInfo latency_info(ui::SourceEventType::TOUCH); |
+ latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
host_->ForwardTouchEventWithLatencyInfo( |
ui::CreateWebTouchEventFromMotionEvent(*cancel_event, causes_scrolling), |
- ui::LatencyInfo()); |
+ latency_info); |
} |
} |
@@ -1499,7 +1502,7 @@ void RenderWidgetHostViewAndroid::SendMouseEvent( |
void RenderWidgetHostViewAndroid::SendMouseWheelEvent( |
const blink::WebMouseWheelEvent& event) { |
if (host_) { |
- ui::LatencyInfo latency_info; |
+ ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); |
latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
host_->ForwardWheelEventWithLatencyInfo(event, latency_info); |
} |
@@ -1511,8 +1514,11 @@ void RenderWidgetHostViewAndroid::SendGestureEvent( |
if (overscroll_controller_) |
overscroll_controller_->Enable(); |
- if (host_) |
- host_->ForwardGestureEventWithLatencyInfo(event, ui::LatencyInfo()); |
+ if (host_) { |
+ ui::LatencyInfo latency_info = |
+ ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(event); |
+ host_->ForwardGestureEventWithLatencyInfo(event, latency_info); |
+ } |
} |
void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { |