summaryrefslogtreecommitdiffstats
path: root/ash/shelf
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-17 21:20:50 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-17 21:20:50 +0000
commitf58bbf1c0177717e5541eef8f81d15d44761bb54 (patch)
tree401b8e12f485fb59075364e3f375ed4327fd2840 /ash/shelf
parentc02c62ddc7f422440977d51011ae7d84ae5bee76 (diff)
downloadchromium_src-f58bbf1c0177717e5541eef8f81d15d44761bb54.zip
chromium_src-f58bbf1c0177717e5541eef8f81d15d44761bb54.tar.gz
chromium_src-f58bbf1c0177717e5541eef8f81d15d44761bb54.tar.bz2
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
Diffstat (limited to 'ash/shelf')
-rw-r--r--ash/shelf/shelf_tooltip_manager_unittest.cc6
-rw-r--r--ash/shelf/shelf_view.cc4
-rw-r--r--ash/shelf/shelf_view_unittest.cc4
3 files changed, 8 insertions, 6 deletions
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;
}