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

Unified Diff: ash/common/shelf/shelf_view.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/common/shelf/shelf_view.cc
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
index 91d5fb0345bddf280ffcbe46d1d9848dc24938f1..47a3129c867b64d74a2353f2ef1cada9364999ce 100644
--- a/ash/common/shelf/shelf_view.cc
+++ b/ash/common/shelf/shelf_view.cc
@@ -594,8 +594,10 @@ bool ShelfView::StartDrag(const std::string& app_id,
gfx::Point point_in_root =
wm::GetRootWindowAt(location_in_screen_coordinates)
->ConvertPointFromScreen(location_in_screen_coordinates);
- ui::MouseEvent event(ui::ET_MOUSE_PRESSED, pt, point_in_root,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent event(
+ ui::ET_MOUSE_PRESSED, pt, point_in_root, ui::EventTimeForNow(), 0, 0,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
PointerPressedOnButton(drag_and_drop_view, DRAG_AND_DROP, event);
// Drag the item where it really belongs.
@@ -615,8 +617,10 @@ bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) {
gfx::Point point_in_root =
wm::GetRootWindowAt(location_in_screen_coordinates)
->ConvertPointFromScreen(location_in_screen_coordinates);
- ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, point_in_root,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent event(
+ ui::ET_MOUSE_DRAGGED, pt, point_in_root, ui::EventTimeForNow(), 0, 0,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
+ ui::PointerEvent::kMousePointerId));
PointerDraggedOnButton(drag_and_drop_view, DRAG_AND_DROP, event);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698