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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 1260453006: ui: events: Add a class to hold common touch and stylus properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address build problems, add accessor and unit tests. Created 5 years, 4 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 649e2a15be19251aca8d8d6a7c76875074e0354f..f196d35b6b37dd2c62d419586bb2423c8ab70a96 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -153,8 +153,10 @@ void WindowEventDispatcher::DispatchGestureEvent(ui::GestureEvent* event) {
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::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
return DispatchMouseEnterOrExit(window, event, ui::ET_MOUSE_EXITED);
}
@@ -366,8 +368,10 @@ 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::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
DispatchDetails details = DispatchEvent(old_capture, &event);
if (details.dispatcher_destroyed)
@@ -723,9 +727,10 @@ ui::EventDispatchDetails WindowEventDispatcher::SynthesizeMouseMoveEvent() {
return details;
gfx::Point host_mouse_location = root_mouse_location;
host_->ConvertPointToHost(&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::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
return OnEventFromSource(&event);
}

Powered by Google App Engine
This is Rietveld 408576698