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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse event constructor Created 3 years, 9 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: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 559c9524748a85e10b0cb0fc40780d28baeb5aef..12f164a6198a8e36cecb8e13ea4bea9eea786aa1 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -174,8 +174,11 @@ void WindowEventDispatcher::DispatchGestureEvent(
DispatchDetails WindowEventDispatcher::DispatchMouseExitAtPoint(
Window* window,
const gfx::Point& point) {
- ui::MouseEvent event(ui::ET_MOUSE_EXITED, point, point, ui::EventTimeForNow(),
- ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent event(
+ ui::ET_MOUSE_EXITED, point, point, ui::EventTimeForNow(), ui::EF_NONE,
+ ui::EF_NONE,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
return DispatchMouseEnterOrExit(window, event, ui::ET_MOUSE_EXITED);
}
@@ -379,8 +382,11 @@ void WindowEventDispatcher::UpdateCapture(Window* old_capture,
if (old_capture && old_capture->GetRootWindow() == window() &&
old_capture->delegate()) {
// Send a capture changed event with bogus location data.
- ui::MouseEvent event(ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(),
- gfx::Point(), ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent event(
+ ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(), gfx::Point(),
+ ui::EventTimeForNow(), 0, 0,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
DispatchDetails details = DispatchEvent(old_capture, &event);
if (details.dispatcher_destroyed)
@@ -775,9 +781,11 @@ ui::EventDispatchDetails WindowEventDispatcher::SynthesizeMouseMoveEvent() {
return details;
gfx::Point host_mouse_location = root_mouse_location;
host_->ConvertDIPToPixels(&host_mouse_location);
- ui::MouseEvent event(ui::ET_MOUSE_MOVED, host_mouse_location,
- host_mouse_location, ui::EventTimeForNow(),
- ui::EF_IS_SYNTHESIZED, 0);
+ ui::MouseEvent event(
+ ui::ET_MOUSE_MOVED, host_mouse_location, host_mouse_location,
+ ui::EventTimeForNow(), ui::EF_IS_SYNTHESIZED, 0,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
return OnEventFromSource(&event);
}

Powered by Google App Engine
This is Rietveld 408576698