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

Side by Side Diff: content/browser/renderer_host/render_widget_host_input_event_router.cc

Issue 1993383002: Adding Event.Latency.Browser.WheelUI, Passing latency_info to ProcessMouse/MouseWheelEvent functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
6 6
7 #include "base/debug/dump_without_crashing.h" 7 #include "base/debug/dump_without_crashing.h"
8 #include "cc/quads/surface_draw_quad.h" 8 #include "cc/quads/surface_draw_quad.h"
9 #include "cc/surfaces/surface_id_allocator.h" 9 #include "cc/surfaces/surface_id_allocator.h"
10 #include "cc/surfaces/surface_manager.h" 10 #include "cc/surfaces/surface_manager.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 RenderWidgetHostViewBase* root_view, 135 RenderWidgetHostViewBase* root_view,
136 blink::WebMouseEvent* event) { 136 blink::WebMouseEvent* event) {
137 gfx::Point transformed_point; 137 gfx::Point transformed_point;
138 RenderWidgetHostViewBase* target = FindEventTarget( 138 RenderWidgetHostViewBase* target = FindEventTarget(
139 root_view, gfx::Point(event->x, event->y), &transformed_point); 139 root_view, gfx::Point(event->x, event->y), &transformed_point);
140 if (!target) 140 if (!target)
141 return; 141 return;
142 142
143 event->x = transformed_point.x(); 143 event->x = transformed_point.x();
144 event->y = transformed_point.y(); 144 event->y = transformed_point.y();
145 145 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
146 target->ProcessMouseEvent(*event); 146 // https://crbug.com/613628
147 ui::LatencyInfo latency_info;
148 target->ProcessMouseEvent(*event, latency_info);
147 } 149 }
148 150
149 void RenderWidgetHostInputEventRouter::RouteMouseWheelEvent( 151 void RenderWidgetHostInputEventRouter::RouteMouseWheelEvent(
150 RenderWidgetHostViewBase* root_view, 152 RenderWidgetHostViewBase* root_view,
151 blink::WebMouseWheelEvent* event) { 153 blink::WebMouseWheelEvent* event) {
152 gfx::Point transformed_point; 154 gfx::Point transformed_point;
153 RenderWidgetHostViewBase* target = FindEventTarget( 155 RenderWidgetHostViewBase* target = FindEventTarget(
154 root_view, gfx::Point(event->x, event->y), &transformed_point); 156 root_view, gfx::Point(event->x, event->y), &transformed_point);
155 if (!target) 157 if (!target)
156 return; 158 return;
157 159
158 event->x = transformed_point.x(); 160 event->x = transformed_point.x();
159 event->y = transformed_point.y(); 161 event->y = transformed_point.y();
160 162 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
161 target->ProcessMouseWheelEvent(*event); 163 // https://crbug.com/613628
164 ui::LatencyInfo latency_info;
165 target->ProcessMouseWheelEvent(*event, latency_info);
162 } 166 }
163 167
164 void RenderWidgetHostInputEventRouter::RouteGestureEvent( 168 void RenderWidgetHostInputEventRouter::RouteGestureEvent(
165 RenderWidgetHostViewBase* root_view, 169 RenderWidgetHostViewBase* root_view,
166 blink::WebGestureEvent* event, 170 blink::WebGestureEvent* event,
167 const ui::LatencyInfo& latency) { 171 const ui::LatencyInfo& latency) {
168 // We use GestureTapDown to detect the start of a gesture sequence since there 172 // We use GestureTapDown to detect the start of a gesture sequence since there
169 // is no WebGestureEvent equivalent for ET_GESTURE_BEGIN. Note that this 173 // is no WebGestureEvent equivalent for ET_GESTURE_BEGIN. Note that this
170 // means the GestureFlingCancel that always comes between ET_GESTURE_BEGIN and 174 // means the GestureFlingCancel that always comes between ET_GESTURE_BEGIN and
171 // GestureTapDown is sent to the previous target, in case it is still in a 175 // GestureTapDown is sent to the previous target, in case it is still in a
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 const FrameHostMsg_HittestData_Params& params) { 288 const FrameHostMsg_HittestData_Params& params) {
285 if (owner_map_.find(params.surface_id.id_namespace()) == owner_map_.end()) { 289 if (owner_map_.find(params.surface_id.id_namespace()) == owner_map_.end()) {
286 return; 290 return;
287 } 291 }
288 HittestData data; 292 HittestData data;
289 data.ignored_for_hittest = params.ignored_for_hittest; 293 data.ignored_for_hittest = params.ignored_for_hittest;
290 hittest_data_[params.surface_id] = data; 294 hittest_data_[params.surface_id] = data;
291 } 295 }
292 296
293 } // namespace content 297 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698