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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse constructor Created 3 years, 8 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
« no previous file with comments | « no previous file | content/common/input/synthetic_web_input_event_builders.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
index 25c56ffb8ec0768d6ba91bab40a87cd2881f9130..95382879e80814d9abf298874db380485e8eb9b0 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -149,17 +149,16 @@ void SyntheticGestureTargetAura::DispatchWebMouseEventToPlatform(
ui::EventType event_type =
WebMouseEventTypeToEventType(web_mouse_event.GetType());
int flags = WebEventModifiersToEventFlags(web_mouse_event.GetModifiers());
+ ui::PointerDetails pointer_details(
+ WebMousePointerTypeToEventPointerType(web_mouse_event.pointer_type));
ui::MouseEvent mouse_event(event_type, gfx::Point(), gfx::Point(),
- ui::EventTimeForNow(), flags, flags);
+ ui::EventTimeForNow(), flags, flags,
+ pointer_details);
gfx::PointF location(
web_mouse_event.PositionInWidget().x * device_scale_factor_,
web_mouse_event.PositionInWidget().y * device_scale_factor_);
mouse_event.set_location_f(location);
mouse_event.set_root_location_f(location);
- ui::PointerDetails pointer_details = mouse_event.pointer_details();
- pointer_details.pointer_type =
- WebMousePointerTypeToEventPointerType(web_mouse_event.pointer_type);
- mouse_event.set_pointer_details(pointer_details);
aura::Window* window = GetWindow();
mouse_event.ConvertLocationToTarget(window, window->GetRootWindow());
« no previous file with comments | « no previous file | content/common/input/synthetic_web_input_event_builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698