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

Unified Diff: ash/autoclick/autoclick_controller.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: ash/autoclick/autoclick_controller.cc
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index 55a70b3c8fe491ad7c882ceffd115e18329ca2bc..b5ce6cbc8743d7ff502473815d8c2bc35c9ec892 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -182,14 +182,18 @@ void AutoclickControllerImpl::DoAutoclick(const gfx::Point& event_location,
aura::WindowTreeHost* host = root_window->GetHost();
host->ConvertDIPToPixels(&click_location);
- ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, click_location,
- click_location, ui::EventTimeForNow(),
- mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
- ui::EF_LEFT_MOUSE_BUTTON);
- ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, click_location,
- click_location, ui::EventTimeForNow(),
- mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::MouseEvent press_event(
+ ui::ET_MOUSE_PRESSED, click_location, click_location,
+ ui::EventTimeForNow(), mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
+ ui::EF_LEFT_MOUSE_BUTTON,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
+ ui::MouseEvent release_event(
+ ui::ET_MOUSE_RELEASED, click_location, click_location,
+ ui::EventTimeForNow(), mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
+ ui::EF_LEFT_MOUSE_BUTTON,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
ui::EventDispatchDetails details =
host->event_sink()->OnEventFromSource(&press_event);

Powered by Google App Engine
This is Rietveld 408576698