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

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

Issue 2317253005: SourceEventType added to LatencyInfo (Closed)
Patch Set: Added a fake return to the end of EventTypeToLatencySourceEventType, for compilers that don't know … Created 4 years, 3 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_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index d8d2254cdaa0b7838facc1b9529321a873195e0e..edb16bd7d4038cae87acdbd8598bc84efbfa3da3 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1937,7 +1937,7 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
if (mouse_wheel_event.deltaX != 0 || mouse_wheel_event.deltaY != 0) {
if (ShouldRouteEvent(event)) {
host_->delegate()->GetInputEventRouter()->RouteMouseWheelEvent(
- this, &mouse_wheel_event);
+ this, &mouse_wheel_event, *event->latency());
} else {
ProcessMouseWheelEvent(mouse_wheel_event, *event->latency());
}
@@ -1956,8 +1956,8 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
*event, base::Bind(&GetScreenLocationFromEvent));
ModifyEventMovementAndCoords(&mouse_event);
if (ShouldRouteEvent(event)) {
- host_->delegate()->GetInputEventRouter()->RouteMouseEvent(this,
- &mouse_event);
+ host_->delegate()->GetInputEventRouter()->RouteMouseEvent(
+ this, &mouse_event, *event->latency());
} else {
ProcessMouseEvent(mouse_event, *event->latency());
}
@@ -2089,9 +2089,9 @@ void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) {
*event, base::Bind(&GetScreenLocationFromEvent));
if (ShouldRouteEvent(event)) {
host_->delegate()->GetInputEventRouter()->RouteGestureEvent(
- this, &gesture_event, ui::LatencyInfo());
+ this, &gesture_event, ui::LatencyInfo(ui::SourceEventType::WHEEL));
host_->delegate()->GetInputEventRouter()->RouteMouseWheelEvent(
- this, &mouse_wheel_event);
+ this, &mouse_wheel_event, *event->latency());
} else {
host_->ForwardGestureEvent(gesture_event);
host_->ForwardWheelEventWithLatencyInfo(mouse_wheel_event,
@@ -2104,7 +2104,7 @@ void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) {
*event, base::Bind(&GetScreenLocationFromEvent));
if (ShouldRouteEvent(event)) {
host_->delegate()->GetInputEventRouter()->RouteGestureEvent(
- this, &gesture_event, ui::LatencyInfo());
+ this, &gesture_event, ui::LatencyInfo(ui::SourceEventType::WHEEL));
} else {
host_->ForwardGestureEvent(gesture_event);
}
@@ -2190,7 +2190,7 @@ void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) {
fling_cancel.sourceDevice = blink::WebGestureDeviceTouchscreen;
if (ShouldRouteEvent(event)) {
host_->delegate()->GetInputEventRouter()->RouteGestureEvent(
- this, &fling_cancel, ui::LatencyInfo());
+ this, &fling_cancel, ui::LatencyInfo(ui::SourceEventType::TOUCH));
} else {
host_->ForwardGestureEvent(fling_cancel);
}

Powered by Google App Engine
This is Rietveld 408576698