From f58bbf1c0177717e5541eef8f81d15d44761bb54 Mon Sep 17 00:00:00 2001
From: "sky@chromium.org"
 <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue, 17 Dec 2013 21:20:50 +0000
Subject: Changes MouseEvent constructor to take changed_button_flags.

I want this for EventGenerator, but it seems best to make everyone
think about this rather than create another constructor.

BUG=none
TEST=none
R=sadrul@chromium.org

Review URL: https://codereview.chromium.org/101573006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241358 0039d316-1c4b-4281-b951-d872f2087c98
---
 ash/shelf/shelf_tooltip_manager_unittest.cc | 6 ++++--
 ash/shelf/shelf_view.cc                     | 4 ++--
 ash/shelf/shelf_view_unittest.cc            | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

(limited to 'ash/shelf')

diff --git a/ash/shelf/shelf_tooltip_manager_unittest.cc b/ash/shelf/shelf_tooltip_manager_unittest.cc
index 33792ec..6114202 100644
--- a/ash/shelf/shelf_tooltip_manager_unittest.cc
+++ b/ash/shelf/shelf_tooltip_manager_unittest.cc
@@ -231,7 +231,8 @@ TEST_F(ShelfTooltipManagerTest, HideForMouseMoveEvent) {
 
   // Shouldn't hide if the mouse is in the tooltip.
   ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, tooltip_rect.CenterPoint(),
-                             tooltip_rect.CenterPoint(), ui::EF_NONE);
+                             tooltip_rect.CenterPoint(), ui::EF_NONE,
+                             ui::EF_NONE);
   ui::LocatedEventTestApi test_api(&mouse_event);
 
   SetEventTarget(root_window, &mouse_event);
@@ -260,7 +261,8 @@ TEST_F(ShelfTooltipManagerTest, HideForMouseClickEvent) {
 
   // Should hide if the mouse is pressed in the tooltip.
   ui::MouseEvent mouse_event(ui::ET_MOUSE_PRESSED, tooltip_rect.CenterPoint(),
-                             tooltip_rect.CenterPoint(), ui::EF_NONE);
+                             tooltip_rect.CenterPoint(), ui::EF_NONE,
+                             ui::EF_NONE);
 
   SetEventTarget(root_window, &mouse_event);
   event_handler->OnMouseEvent(&mouse_event);
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 3b7e204..101c0cd 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -616,7 +616,7 @@ bool ShelfView::StartDrag(const std::string& app_id,
   ash::wm::ConvertPointFromScreen(
       ash::wm::GetRootWindowAt(location_in_screen_coordinates),
       &point_in_root);
-  ui::MouseEvent event(ui::ET_MOUSE_PRESSED, pt, point_in_root, 0);
+  ui::MouseEvent event(ui::ET_MOUSE_PRESSED, pt, point_in_root, 0, 0);
   PointerPressedOnButton(drag_and_drop_view,
                          ShelfButtonHost::DRAG_AND_DROP,
                          event);
@@ -639,7 +639,7 @@ bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) {
   ash::wm::ConvertPointFromScreen(
       ash::wm::GetRootWindowAt(location_in_screen_coordinates),
       &point_in_root);
-  ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, point_in_root, 0);
+  ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, point_in_root, 0, 0);
   PointerDraggedOnButton(drag_and_drop_view,
                          ShelfButtonHost::DRAG_AND_DROP,
                          event);
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index ec1468a..ffd20a4 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -402,7 +402,7 @@ class ShelfViewTest : public AshTestBase {
     views::View* button = test_api_->GetButton(button_index);
     ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED,
                                button->bounds().origin(),
-                               button->GetBoundsInScreen().origin(), 0);
+                               button->GetBoundsInScreen().origin(), 0, 0);
     button_host->PointerPressedOnButton(button, pointer, click_event);
     return button;
   }
@@ -427,7 +427,7 @@ class ShelfViewTest : public AshTestBase {
     views::View* destination = test_api_->GetButton(destination_index);
     ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED,
                               destination->bounds().origin(),
-                              destination->GetBoundsInScreen().origin(), 0);
+                              destination->GetBoundsInScreen().origin(), 0, 0);
     button_host->PointerDraggedOnButton(button, pointer, drag_event);
     return button;
   }
-- 
cgit v1.1