summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/controls/button/custom_button.cc3
-rw-r--r--ui/views/controls/button/custom_button_unittest.cc2
-rw-r--r--ui/views/controls/button/radio_button.cc2
-rw-r--r--ui/views/controls/combobox/combobox_unittest.cc2
-rw-r--r--ui/views/controls/menu/menu_controller.cc10
-rw-r--r--ui/views/controls/scrollbar/base_scroll_bar_button.cc1
-rw-r--r--ui/views/controls/single_split_view_unittest.cc12
-rw-r--r--ui/views/controls/slider_unittest.cc4
-rw-r--r--ui/views/controls/table/table_view_unittest.cc15
-rw-r--r--ui/views/controls/textfield/native_textfield_views_unittest.cc43
-rw-r--r--ui/views/corewm/capture_controller_unittest.cc2
-rw-r--r--ui/views/corewm/compound_event_filter_unittest.cc12
-rw-r--r--ui/views/view_unittest.cc34
-rw-r--r--ui/views/widget/root_view.cc3
-rw-r--r--ui/views/widget/widget.cc2
-rw-r--r--ui/views/widget/widget_interactive_uitest.cc28
-rw-r--r--ui/views/widget/widget_unittest.cc20
17 files changed, 113 insertions, 82 deletions
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 2be2a23..cafa5a3 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -199,6 +199,7 @@ bool CustomButton::OnKeyPressed(const ui::KeyEvent& event) {
ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED,
gfx::Point(),
gfx::Point(),
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
} else {
@@ -216,6 +217,7 @@ bool CustomButton::OnKeyReleased(const ui::KeyEvent& event) {
ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED,
gfx::Point(),
gfx::Point(),
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
return true;
@@ -260,6 +262,7 @@ bool CustomButton::AcceleratorPressed(const ui::Accelerator& accelerator) {
ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED,
gfx::Point(),
gfx::Point(),
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
return true;
diff --git a/ui/views/controls/button/custom_button_unittest.cc b/ui/views/controls/button/custom_button_unittest.cc
index f7b11e6..cb27628 100644
--- a/ui/views/controls/button/custom_button_unittest.cc
+++ b/ui/views/controls/button/custom_button_unittest.cc
@@ -80,10 +80,12 @@ TEST_F(CustomButtonTest, HoverStateOnVisibilityChange) {
gfx::Point center(10, 10);
button->OnMousePressed(ui::MouseEvent(ui::ET_MOUSE_PRESSED, center, center,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON));
EXPECT_EQ(CustomButton::STATE_PRESSED, button->state());
button->OnMouseReleased(ui::MouseEvent(ui::ET_MOUSE_RELEASED, center, center,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON));
EXPECT_EQ(CustomButton::STATE_HOVERED, button->state());
diff --git a/ui/views/controls/button/radio_button.cc b/ui/views/controls/button/radio_button.cc
index 224e989..0b85469 100644
--- a/ui/views/controls/button/radio_button.cc
+++ b/ui/views/controls/button/radio_button.cc
@@ -123,7 +123,7 @@ bool RadioButton::IsGroupFocusTraversable() const {
void RadioButton::OnFocus() {
Checkbox::OnFocus();
SetChecked(true);
- ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 0);
+ ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 0, 0);
LabelButton::NotifyClick(event);
}
diff --git a/ui/views/controls/combobox/combobox_unittest.cc b/ui/views/controls/combobox/combobox_unittest.cc
index 172ead3..573fcb3 100644
--- a/ui/views/controls/combobox/combobox_unittest.cc
+++ b/ui/views/controls/combobox/combobox_unittest.cc
@@ -220,10 +220,12 @@ class ComboboxTest : public ViewsTestBase {
void PerformClick(const gfx::Point& point) {
ui::MouseEvent pressed_event = ui::MouseEvent(ui::ET_MOUSE_PRESSED, point,
point,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
widget_->OnMouseEvent(&pressed_event);
ui::MouseEvent released_event = ui::MouseEvent(ui::ET_MOUSE_RELEASED, point,
point,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
widget_->OnMouseEvent(&released_event);
}
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 3b0e5d5..4629052 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -2230,12 +2230,13 @@ void MenuController::UpdateActiveMouseView(SubmenuView* event_source,
target_menu, active_mouse_view, &target_point);
ui::MouseEvent mouse_entered_event(ui::ET_MOUSE_ENTERED,
target_point, target_point,
- 0);
+ 0, 0);
active_mouse_view->OnMouseEntered(mouse_entered_event);
ui::MouseEvent mouse_pressed_event(ui::ET_MOUSE_PRESSED,
target_point, target_point,
- event.flags());
+ event.flags(),
+ event.changed_button_flags());
active_mouse_view->OnMousePressed(mouse_pressed_event);
}
}
@@ -2245,7 +2246,8 @@ void MenuController::UpdateActiveMouseView(SubmenuView* event_source,
View::ConvertPointToTarget(target_menu, active_mouse_view, &target_point);
ui::MouseEvent mouse_dragged_event(ui::ET_MOUSE_DRAGGED,
target_point, target_point,
- event.flags());
+ event.flags(),
+ event.changed_button_flags());
active_mouse_view->OnMouseDragged(mouse_dragged_event);
}
}
@@ -2261,7 +2263,7 @@ void MenuController::SendMouseReleaseToActiveView(SubmenuView* event_source,
&target_loc);
View::ConvertPointFromScreen(active_mouse_view, &target_loc);
ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, target_loc, target_loc,
- event.flags());
+ event.flags(), event.changed_button_flags());
// Reset active mouse view before sending mouse released. That way if it calls
// back to us, we aren't in a weird state.
SetActiveMouseView(NULL);
diff --git a/ui/views/controls/scrollbar/base_scroll_bar_button.cc b/ui/views/controls/scrollbar/base_scroll_bar_button.cc
index 6eba692..c0a9e51 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar_button.cc
+++ b/ui/views/controls/scrollbar/base_scroll_bar_button.cc
@@ -44,6 +44,7 @@ void BaseScrollBarButton::RepeaterNotifyClick() {
#endif
ui::MouseEvent event(ui::ET_MOUSE_RELEASED,
cursor_point, cursor_point,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
Button::NotifyClick(event);
}
diff --git a/ui/views/controls/single_split_view_unittest.cc b/ui/views/controls/single_split_view_unittest.cc
index f82c1b5..9b621dea 100644
--- a/ui/views/controls/single_split_view_unittest.cc
+++ b/ui/views/controls/single_split_view_unittest.cc
@@ -166,7 +166,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
gfx::Point press_point(7, kInitialDividerOffset + kMouseOffset);
ui::MouseEvent mouse_pressed(
- ui::ET_MOUSE_PRESSED, press_point, press_point, 0);
+ ui::ET_MOUSE_PRESSED, press_point, press_point, 0, 0);
ASSERT_TRUE(split.OnMousePressed(mouse_pressed));
EXPECT_EQ(kInitialDividerOffset, split.divider_offset());
@@ -174,7 +174,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
gfx::Point drag_1_point(
5, kInitialDividerOffset + kMouseOffset + kMouseMoveDelta);
ui::MouseEvent mouse_dragged_1(
- ui::ET_MOUSE_DRAGGED, drag_1_point, drag_1_point, 0);
+ ui::ET_MOUSE_DRAGGED, drag_1_point, drag_1_point, 0, 0);
ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_1));
EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta, split.divider_offset());
@@ -182,7 +182,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
gfx::Point drag_2_point(
7, kMinimumChildSize - 5);
ui::MouseEvent mouse_dragged_2(
- ui::ET_MOUSE_DRAGGED, drag_2_point, drag_2_point, 0);
+ ui::ET_MOUSE_DRAGGED, drag_2_point, drag_2_point, 0,0 );
ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_2));
EXPECT_EQ(kMinimumChildSize,
split.divider_offset());
@@ -191,7 +191,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
gfx::Point drag_3_point(
7, kTotalSplitSize - kMinimumChildSize + 5);
ui::MouseEvent mouse_dragged_3(
- ui::ET_MOUSE_DRAGGED, drag_3_point, drag_3_point, 0);
+ ui::ET_MOUSE_DRAGGED, drag_3_point, drag_3_point, 0, 0);
ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_3));
EXPECT_EQ(kTotalSplitSize - kMinimumChildSize - split.GetDividerSize(),
split.divider_offset());
@@ -200,7 +200,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
gfx::Point drag_4_point(
6, kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2);
ui::MouseEvent mouse_dragged_4(
- ui::ET_MOUSE_DRAGGED, drag_4_point, drag_4_point, 0);
+ ui::ET_MOUSE_DRAGGED, drag_4_point, drag_4_point, 0, 0);
ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_4));
EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2,
split.divider_offset());
@@ -208,7 +208,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
gfx::Point release_point(
7, kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2);
ui::MouseEvent mouse_released(
- ui::ET_MOUSE_RELEASED, release_point, release_point, 0);
+ ui::ET_MOUSE_RELEASED, release_point, release_point, 0, 0);
split.OnMouseReleased(mouse_released);
EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2,
split.divider_offset());
diff --git a/ui/views/controls/slider_unittest.cc b/ui/views/controls/slider_unittest.cc
index 7add734..caa93f3 100644
--- a/ui/views/controls/slider_unittest.cc
+++ b/ui/views/controls/slider_unittest.cc
@@ -17,10 +17,10 @@ namespace {
void ClickAt(views::View* view, int x, int y) {
gfx::Point point(x, y);
ui::MouseEvent press(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
view->OnMousePressed(press);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
view->OnMouseReleased(release);
}
diff --git a/ui/views/controls/table/table_view_unittest.cc b/ui/views/controls/table/table_view_unittest.cc
index 4d89f32..70547ce 100644
--- a/ui/views/controls/table/table_view_unittest.cc
+++ b/ui/views/controls/table/table_view_unittest.cc
@@ -191,7 +191,8 @@ class TableViewTest : public testing::Test {
const int y = row * table_->row_height();
const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(0, y),
gfx::Point(0, y),
- ui::EF_LEFT_MOUSE_BUTTON | flags);
+ ui::EF_LEFT_MOUSE_BUTTON | flags,
+ ui::EF_LEFT_MOUSE_BUTTON);
table_->OnMousePressed(pressed);
}
@@ -289,10 +290,12 @@ TEST_F(TableViewTest, Resize) {
EXPECT_NE(0, x);
// Drag the mouse 1 pixel to the left.
const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(x, 0),
- gfx::Point(x, 0), ui::EF_LEFT_MOUSE_BUTTON);
+ gfx::Point(x, 0), ui::EF_LEFT_MOUSE_BUTTON,
+ ui::EF_LEFT_MOUSE_BUTTON);
helper_->header()->OnMousePressed(pressed);
const ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, gfx::Point(x - 1, 0),
- gfx::Point(x - 1, 0), ui::EF_LEFT_MOUSE_BUTTON);
+ gfx::Point(x - 1, 0), ui::EF_LEFT_MOUSE_BUTTON,
+ 0);
helper_->header()->OnMouseDragged(dragged);
// This should shrink the first column and pull the second column in.
@@ -378,11 +381,13 @@ TEST_F(TableViewTest, SortOnMouse) {
EXPECT_NE(0, x);
// Press and release the mouse.
const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(x, 0),
- gfx::Point(x, 0), ui::EF_LEFT_MOUSE_BUTTON);
+ gfx::Point(x, 0), ui::EF_LEFT_MOUSE_BUTTON,
+ ui::EF_LEFT_MOUSE_BUTTON);
// The header must return true, else it won't normally get the release.
EXPECT_TRUE(helper_->header()->OnMousePressed(pressed));
const ui::MouseEvent release(ui::ET_MOUSE_RELEASED, gfx::Point(x, 0),
- gfx::Point(x, 0), ui::EF_LEFT_MOUSE_BUTTON);
+ gfx::Point(x, 0), ui::EF_LEFT_MOUSE_BUTTON,
+ ui::EF_LEFT_MOUSE_BUTTON);
helper_->header()->OnMouseReleased(release);
ASSERT_EQ(1u, table_->sort_descriptors().size());
diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc
index 33196ec..f351da0 100644
--- a/ui/views/controls/textfield/native_textfield_views_unittest.cc
+++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc
@@ -293,20 +293,22 @@ class NativeTextfieldViewsTest : public ViewsTestBase,
void MouseClick(const gfx::Rect bound, int x_offset) {
gfx::Point point(bound.x() + x_offset, bound.y() + bound.height() / 2);
ui::MouseEvent click(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMouseReleased(release);
}
// This is to avoid double/triple click.
void NonClientMouseClick() {
ui::MouseEvent click(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON | ui::EF_IS_NON_CLIENT);
+ ui::EF_LEFT_MOUSE_BUTTON | ui::EF_IS_NON_CLIENT,
+ ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON | ui::EF_IS_NON_CLIENT);
+ ui::EF_LEFT_MOUSE_BUTTON | ui::EF_IS_NON_CLIENT,
+ ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMouseReleased(release);
}
@@ -781,7 +783,7 @@ TEST_F(NativeTextfieldViewsTest, FocusTraversalTest) {
widget_->GetFocusManager()->AdvanceFocus(true);
EXPECT_EQ(3, GetFocusedView()->id());
ui::MouseEvent click(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click);
EXPECT_EQ(1, GetFocusedView()->id());
}
@@ -813,12 +815,13 @@ TEST_F(NativeTextfieldViewsTest, DoubleAndTripleClickTest) {
InitTextfield(Textfield::STYLE_DEFAULT);
textfield_->SetText(ASCIIToUTF16("hello world"));
ui::MouseEvent click(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
ui::MouseEvent double_click(
ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK);
+ ui::EF_LEFT_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK,
+ ui::EF_LEFT_MOUSE_BUTTON);
// Test for double click.
textfield_view_->OnMousePressed(click);
@@ -847,15 +850,15 @@ TEST_F(NativeTextfieldViewsTest, DragToSelect) {
gfx::Point start_point(kStart, 0);
gfx::Point end_point(kEnd, 0);
ui::MouseEvent click_a(ui::ET_MOUSE_PRESSED, start_point, start_point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
ui::MouseEvent click_b(ui::ET_MOUSE_PRESSED, end_point, end_point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
ui::MouseEvent drag_left(ui::ET_MOUSE_DRAGGED, gfx::Point(), gfx::Point(),
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, 0);
ui::MouseEvent drag_right(ui::ET_MOUSE_DRAGGED, end_point, end_point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, 0);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, end_point, end_point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click_a);
EXPECT_TRUE(textfield_->GetSelectedText().empty());
// Check that dragging left selects the beginning of the string.
@@ -962,6 +965,7 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_InitiateDrag) {
textfield_->SetObscured(false);
// Ensure that textfields only initiate drag operations inside the selection.
ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, kStringPoint, kStringPoint,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(press_event);
EXPECT_EQ(ui::DragDropTypes::DRAG_NONE,
@@ -991,7 +995,7 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_ToTheRight) {
textfield_->SelectRange(gfx::Range(1, 5));
gfx::Point point(GetCursorPositionX(3), 0);
ui::MouseEvent click_a(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click_a);
EXPECT_TRUE(textfield_view_->CanStartDragForView(textfield_view_,
click_a.location(), gfx::Point()));
@@ -1046,7 +1050,7 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_ToTheLeft) {
textfield_->SelectRange(gfx::Range(5, 10));
gfx::Point point(GetCursorPositionX(7), 0);
ui::MouseEvent click_a(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click_a);
EXPECT_TRUE(textfield_view_->CanStartDragForView(textfield_view_,
click_a.location(), gfx::Point()));
@@ -1095,7 +1099,7 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_Canceled) {
textfield_->SelectRange(gfx::Range(6, 10));
gfx::Point point(GetCursorPositionX(8), 0);
ui::MouseEvent click(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(click);
ui::OSExchangeData data;
textfield_view_->WriteDragDataForView(NULL, click.location(), &data);
@@ -1108,9 +1112,9 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_Canceled) {
// "Cancel" the drag, via move and release over the selection, and OnDragDone.
gfx::Point drag_point(GetCursorPositionX(9), 0);
ui::MouseEvent drag(ui::ET_MOUSE_DRAGGED, drag_point, drag_point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, 0);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, drag_point, drag_point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMouseDragged(drag);
textfield_view_->OnMouseReleased(release);
textfield_view_->OnDragDone();
@@ -1850,13 +1854,14 @@ TEST_F(NativeTextfieldViewsTest, KeepInitiallySelectedWord) {
const gfx::Point middle(middle_cursor.x(),
middle_cursor.y() + middle_cursor.height() / 2);
ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, middle, middle,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
textfield_view_->OnMousePressed(press_event);
EXPECT_EQ(gfx::Range(4, 7), textfield_->GetSelectedRange());
// Drag the mouse to the beginning of the textfield.
ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, beginning, beginning,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, 0);
textfield_view_->OnMouseDragged(drag_event);
EXPECT_EQ(gfx::Range(7, 0), textfield_->GetSelectedRange());
}
diff --git a/ui/views/corewm/capture_controller_unittest.cc b/ui/views/corewm/capture_controller_unittest.cc
index 558a403..c779547 100644
--- a/ui/views/corewm/capture_controller_unittest.cc
+++ b/ui/views/corewm/capture_controller_unittest.cc
@@ -102,7 +102,7 @@ TEST_F(CaptureControllerTest, ResetMouseEventHandlerOnCapture) {
// Make a synthesized mouse down event. Ensure that the RootWindow will
// dispatch further mouse events to |w1|.
ui::MouseEvent mouse_pressed_event(ui::ET_MOUSE_PRESSED, gfx::Point(5, 5),
- gfx::Point(5, 5), 0);
+ gfx::Point(5, 5), 0, 0);
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ(w1.get(), dispatcher()->mouse_pressed_handler());
diff --git a/ui/views/corewm/compound_event_filter_unittest.cc b/ui/views/corewm/compound_event_filter_unittest.cc
index 293e2d3..fbeb2d3 100644
--- a/ui/views/corewm/compound_event_filter_unittest.cc
+++ b/ui/views/corewm/compound_event_filter_unittest.cc
@@ -70,19 +70,19 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
// Synthesized mouse event should not show the cursor.
ui::MouseEvent enter(ui::ET_MOUSE_ENTERED, gfx::Point(10, 10),
- gfx::Point(10, 10), 0);
+ gfx::Point(10, 10), 0, 0);
enter.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&enter);
EXPECT_FALSE(cursor_client.IsCursorVisible());
ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
- gfx::Point(10, 10), 0);
+ gfx::Point(10, 10), 0, 0);
move.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&move);
EXPECT_FALSE(cursor_client.IsCursorVisible());
ui::MouseEvent real_move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
- gfx::Point(10, 10), 0);
+ gfx::Point(10, 10), 0, 0);
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&real_move);
EXPECT_TRUE(cursor_client.IsCursorVisible());
@@ -92,7 +92,7 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
// Mouse synthesized exit event should not show the cursor.
ui::MouseEvent exit(ui::ET_MOUSE_EXITED, gfx::Point(10, 10),
- gfx::Point(10, 10), 0);
+ gfx::Point(10, 10), 0, 0);
exit.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit);
EXPECT_FALSE(cursor_client.IsCursorVisible());
@@ -113,7 +113,7 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
aura::test::TestCursorClient cursor_client(root_window());
ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
- gfx::Point(10, 10), 0);
+ gfx::Point(10, 10), 0, 0);
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse0);
EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
@@ -134,7 +134,7 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
- gfx::Point(10, 10), 0);
+ gfx::Point(10, 10), 0, 0);
// Move the cursor again. The cursor should be visible.
dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 1597f5d..ffe9db3 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -412,7 +412,7 @@ TEST_F(ViewTest, MouseEvent) {
gfx::Point p1(110, 120);
ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
root->OnMousePressed(pressed);
EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_PRESSED);
EXPECT_EQ(v2->location_.x(), 10);
@@ -425,7 +425,7 @@ TEST_F(ViewTest, MouseEvent) {
v2->Reset();
gfx::Point p2(50, 40);
ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, p2, p2,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, 0);
root->OnMouseDragged(dragged);
EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_DRAGGED);
EXPECT_EQ(v2->location_.x(), -50);
@@ -436,7 +436,8 @@ TEST_F(ViewTest, MouseEvent) {
// Releasted event out of bounds. Should still go to v2
v1->Reset();
v2->Reset();
- ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0);
+ ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0,
+ 0);
root->OnMouseDragged(released);
EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_RELEASED);
EXPECT_EQ(v2->location_.x(), -100);
@@ -471,7 +472,7 @@ TEST_F(ViewTest, DeleteOnPressed) {
v2->delete_on_pressed_ = true;
gfx::Point point(110, 120);
ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
root->OnMousePressed(pressed);
EXPECT_EQ(0, v1->child_count());
@@ -1359,7 +1360,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// Move the mouse in v111.
gfx::Point p1(6, 6);
- ui::MouseEvent move1(ui::ET_MOUSE_MOVED, p1, p1, 0);
+ ui::MouseEvent move1(ui::ET_MOUSE_MOVED, p1, p1, 0, 0);
root_view->OnMouseMoved(move1);
EXPECT_TRUE(v111->received_mouse_enter_);
EXPECT_FALSE(v11->last_mouse_event_type_);
@@ -1370,7 +1371,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// Now, move into v121.
gfx::Point p2(65, 21);
- ui::MouseEvent move2(ui::ET_MOUSE_MOVED, p2, p2, 0);
+ ui::MouseEvent move2(ui::ET_MOUSE_MOVED, p2, p2, 0, 0);
root_view->OnMouseMoved(move2);
EXPECT_TRUE(v111->received_mouse_exit_);
EXPECT_TRUE(v121->received_mouse_enter_);
@@ -1381,7 +1382,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// Now, move into v11.
gfx::Point p3(1, 1);
- ui::MouseEvent move3(ui::ET_MOUSE_MOVED, p3, p3, 0);
+ ui::MouseEvent move3(ui::ET_MOUSE_MOVED, p3, p3, 0, 0);
root_view->OnMouseMoved(move3);
EXPECT_TRUE(v121->received_mouse_exit_);
EXPECT_TRUE(v11->received_mouse_enter_);
@@ -1392,7 +1393,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// Move to v21.
gfx::Point p4(121, 15);
- ui::MouseEvent move4(ui::ET_MOUSE_MOVED, p4, p4, 0);
+ ui::MouseEvent move4(ui::ET_MOUSE_MOVED, p4, p4, 0, 0);
root_view->OnMouseMoved(move4);
EXPECT_TRUE(v21->received_mouse_enter_);
EXPECT_FALSE(v2->last_mouse_event_type_);
@@ -1405,7 +1406,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// Move to v1.
gfx::Point p5(21, 0);
- ui::MouseEvent move5(ui::ET_MOUSE_MOVED, p5, p5, 0);
+ ui::MouseEvent move5(ui::ET_MOUSE_MOVED, p5, p5, 0, 0);
root_view->OnMouseMoved(move5);
EXPECT_TRUE(v21->received_mouse_exit_);
EXPECT_TRUE(v1->received_mouse_enter_);
@@ -1415,7 +1416,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// Now, move into v11.
gfx::Point p6(15, 15);
- ui::MouseEvent mouse6(ui::ET_MOUSE_MOVED, p6, p6, 0);
+ ui::MouseEvent mouse6(ui::ET_MOUSE_MOVED, p6, p6, 0, 0);
root_view->OnMouseMoved(mouse6);
EXPECT_TRUE(v11->received_mouse_enter_);
EXPECT_FALSE(v1->last_mouse_event_type_);
@@ -1427,7 +1428,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
// and the mouse remains inside |v1| the whole time, it receives another ENTER
// when the mouse leaves v11.
gfx::Point p7(21, 0);
- ui::MouseEvent mouse7(ui::ET_MOUSE_MOVED, p7, p7, 0);
+ ui::MouseEvent mouse7(ui::ET_MOUSE_MOVED, p7, p7, 0, 0);
root_view->OnMouseMoved(mouse7);
EXPECT_TRUE(v11->received_mouse_exit_);
EXPECT_FALSE(v1->received_mouse_enter_);
@@ -1964,14 +1965,15 @@ TEST_F(ViewTest, TransformEvent) {
gfx::Point p1(110, 210);
ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
root->OnMousePressed(pressed);
EXPECT_EQ(0, v1->last_mouse_event_type_);
EXPECT_EQ(ui::ET_MOUSE_PRESSED, v2->last_mouse_event_type_);
EXPECT_EQ(190, v2->location_.x());
EXPECT_EQ(10, v2->location_.y());
- ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0);
+ ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0,
+ 0);
root->OnMouseReleased(released);
// Now rotate |v2| inside |v1| clockwise.
@@ -1988,7 +1990,7 @@ TEST_F(ViewTest, TransformEvent) {
gfx::Point point2(110, 320);
ui::MouseEvent p2(ui::ET_MOUSE_PRESSED, point2, point2,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
root->OnMousePressed(p2);
EXPECT_EQ(0, v1->last_mouse_event_type_);
EXPECT_EQ(ui::ET_MOUSE_PRESSED, v2->last_mouse_event_type_);
@@ -2024,7 +2026,7 @@ TEST_F(ViewTest, TransformEvent) {
gfx::Point point(112, 110);
ui::MouseEvent p3(ui::ET_MOUSE_PRESSED, point, point,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
root->OnMousePressed(p3);
EXPECT_EQ(ui::ET_MOUSE_PRESSED, v3->last_mouse_event_type_);
@@ -2063,7 +2065,7 @@ TEST_F(ViewTest, TransformEvent) {
gfx::Point point3(124, 125);
ui::MouseEvent p4(ui::ET_MOUSE_PRESSED, point3, point3,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
root->OnMousePressed(p4);
EXPECT_EQ(ui::ET_MOUSE_PRESSED, v3->last_mouse_event_type_);
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index c825998..f3ad2a0 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -524,7 +524,8 @@ void RootView::OnMouseCaptureLost() {
gfx::Point last_point(last_mouse_event_x_, last_mouse_event_y_);
ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED,
last_point, last_point,
- last_mouse_event_flags_);
+ last_mouse_event_flags_,
+ 0);
UpdateCursor(release_event);
}
// We allow the view to delete us from OnMouseCaptureLost. As such,
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index dc1ace9..e8e5aa6 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -966,7 +966,7 @@ void Widget::SynthesizeMouseMoveEvent() {
ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED,
last_mouse_event_position_,
last_mouse_event_position_,
- ui::EF_IS_SYNTHESIZED);
+ ui::EF_IS_SYNTHESIZED, 0);
root_view_->OnMouseMoved(mouse_event);
}
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index 30d44a3..202d453 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -227,7 +227,7 @@ TEST_F(WidgetTest, CaptureAutoReset) {
// By default, mouse release removes capture.
gfx::Point click_location(45, 15);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, click_location, click_location,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
toplevel->OnMouseEvent(&release);
EXPECT_FALSE(toplevel->HasCapture());
@@ -274,9 +274,9 @@ TEST_F(WidgetTest, ResetCaptureOnGestureEnd) {
gfx::Point click_location(45, 15);
ui::MouseEvent press(ui::ET_MOUSE_PRESSED, click_location, click_location,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, click_location, click_location,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
EXPECT_TRUE(toplevel->HasCapture());
@@ -327,9 +327,10 @@ TEST_F(WidgetTest, DisableCaptureWidgetFromMousePress) {
base::Owned(new ui::MouseEvent(ui::ET_MOUSE_RELEASED,
location,
location,
+ ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON))));
ui::MouseEvent press(ui::ET_MOUSE_PRESSED, location, location,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
first->OnMouseEvent(&press);
EXPECT_FALSE(first->HasCapture());
first->Close();
@@ -361,7 +362,7 @@ TEST_F(WidgetTest, DISABLED_GrabUngrab) {
// Click on child1
gfx::Point p1(45, 45);
ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
toplevel->OnMouseEvent(&pressed);
EXPECT_TRUE(toplevel->HasCapture());
@@ -369,7 +370,7 @@ TEST_F(WidgetTest, DISABLED_GrabUngrab) {
EXPECT_FALSE(child2->HasCapture());
ui::MouseEvent released(ui::ET_MOUSE_RELEASED, p1, p1,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
toplevel->OnMouseEvent(&released);
EXPECT_FALSE(toplevel->HasCapture());
@@ -381,7 +382,7 @@ TEST_F(WidgetTest, DISABLED_GrabUngrab) {
// Click on child2
gfx::Point p2(315, 45);
ui::MouseEvent pressed2(ui::ET_MOUSE_PRESSED, p2, p2,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
toplevel->OnMouseEvent(&pressed2);
EXPECT_TRUE(pressed2.handled());
EXPECT_TRUE(toplevel->HasCapture());
@@ -389,7 +390,7 @@ TEST_F(WidgetTest, DISABLED_GrabUngrab) {
EXPECT_FALSE(child1->HasCapture());
ui::MouseEvent released2(ui::ET_MOUSE_RELEASED, p2, p2,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
toplevel->OnMouseEvent(&released2);
EXPECT_FALSE(toplevel->HasCapture());
EXPECT_FALSE(child1->HasCapture());
@@ -414,21 +415,24 @@ TEST_F(WidgetTest, CheckResizeControllerEvents) {
// Move to an outside position.
gfx::Point p1(200, 200);
- ui::MouseEvent moved_out(ui::ET_MOUSE_MOVED, p1, p1, ui::EF_NONE);
+ ui::MouseEvent moved_out(ui::ET_MOUSE_MOVED, p1, p1, ui::EF_NONE,
+ ui::EF_NONE);
toplevel->OnMouseEvent(&moved_out);
EXPECT_EQ(0, view->EnteredCalls());
EXPECT_EQ(0, view->ExitedCalls());
// Move onto the active view.
gfx::Point p2(95, 95);
- ui::MouseEvent moved_over(ui::ET_MOUSE_MOVED, p2, p2, ui::EF_NONE);
+ ui::MouseEvent moved_over(ui::ET_MOUSE_MOVED, p2, p2, ui::EF_NONE,
+ ui::EF_NONE);
toplevel->OnMouseEvent(&moved_over);
EXPECT_EQ(1, view->EnteredCalls());
EXPECT_EQ(0, view->ExitedCalls());
// Move onto the outer resizing border.
gfx::Point p3(102, 95);
- ui::MouseEvent moved_resizer(ui::ET_MOUSE_MOVED, p3, p3, ui::EF_NONE);
+ ui::MouseEvent moved_resizer(ui::ET_MOUSE_MOVED, p3, p3, ui::EF_NONE,
+ ui::EF_NONE);
toplevel->OnMouseEvent(&moved_resizer);
EXPECT_EQ(0, view->EnteredCalls());
EXPECT_EQ(1, view->ExitedCalls());
@@ -775,7 +779,7 @@ TEST_F(WidgetCaptureTest, MAYBE_MouseEventDispatchedToRightWindow) {
// Send a mouse event to the RootWindow associated with |widget1|. Even though
// |widget2| has capture, |widget1| should still get the event.
ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(),
- ui::EF_NONE);
+ ui::EF_NONE, ui::EF_NONE);
widget1.GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
OnHostMouseEvent(&mouse_event);
EXPECT_TRUE(widget1.GetAndClearGotMouseEvent());
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 51b444f..52d6a5f 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1305,7 +1305,7 @@ class CloseWidgetView : public View {
void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) {
const gfx::Rect screen_bounds(widget->GetWindowBoundsInScreen());
ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, screen_bounds.CenterPoint(),
- screen_bounds.CenterPoint(), 0);
+ screen_bounds.CenterPoint(), 0, 0);
aura::RootWindowHostDelegate* rwhd =
widget->GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate();
rwhd->OnHostMouseEvent(&move_event);
@@ -1316,19 +1316,20 @@ void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) {
return;
ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, screen_bounds.CenterPoint(),
- screen_bounds.CenterPoint(), 0);
+ screen_bounds.CenterPoint(), 0, 0);
rwhd->OnHostMouseEvent(&press_event);
if (last_event_type == ui::ET_MOUSE_PRESSED)
return;
gfx::Point end_point(screen_bounds.CenterPoint());
end_point.Offset(1, 1);
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, end_point, end_point, 0);
+ ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, end_point, end_point, 0, 0);
rwhd->OnHostMouseEvent(&drag_event);
if (last_event_type == ui::ET_MOUSE_DRAGGED)
return;
- ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, end_point, end_point, 0);
+ ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, end_point, end_point, 0,
+ 0);
rwhd->OnHostMouseEvent(&release_event);
}
@@ -1542,7 +1543,7 @@ TEST_F(WidgetTest, SynthesizeMouseMoveEvent) {
gfx::Point cursor_location(5, 5);
ui::MouseEvent move(ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
- ui::EF_NONE);
+ ui::EF_NONE, ui::EF_NONE);
widget->OnMouseEvent(&move);
EXPECT_EQ(1, v1->GetEventCount(ui::ET_MOUSE_ENTERED));
@@ -1724,7 +1725,7 @@ TEST_F(WidgetTest, TestWidgetDeletedInOnMousePressed) {
gfx::Point click_location(45, 15);
ui::MouseEvent press(ui::ET_MOUSE_PRESSED, click_location, click_location,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
widget->OnMouseEvent(&press);
// Yay we did not crash!
@@ -1867,7 +1868,7 @@ TEST_F(WidgetTest, MAYBE_DisableTestRootViewHandlersWhenHidden) {
EXPECT_EQ(NULL, GetMousePressedHandler(root_view));
gfx::Point click_location(45, 15);
ui::MouseEvent press(ui::ET_MOUSE_PRESSED, click_location, click_location,
- ui::EF_LEFT_MOUSE_BUTTON);
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
widget->OnMouseEvent(&press);
EXPECT_EQ(view, GetMousePressedHandler(root_view));
widget->Hide();
@@ -1877,7 +1878,7 @@ TEST_F(WidgetTest, MAYBE_DisableTestRootViewHandlersWhenHidden) {
widget->Show();
EXPECT_EQ(NULL, GetMouseMoveHandler(root_view));
gfx::Point move_location(45, 15);
- ui::MouseEvent move(ui::ET_MOUSE_MOVED, move_location, move_location, 0);
+ ui::MouseEvent move(ui::ET_MOUSE_MOVED, move_location, move_location, 0, 0);
widget->OnMouseEvent(&move);
EXPECT_EQ(view, GetMouseMoveHandler(root_view));
widget->Hide();
@@ -2066,6 +2067,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::MouseEvent move_main(ui::ET_MOUSE_MOVED,
cursor_location_main,
cursor_location_main,
+ ui::EF_NONE,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
AsRootWindowHostDelegate()->OnHostMouseEvent(&move_main);
@@ -2092,6 +2094,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::MouseEvent mouse_down_dialog(ui::ET_MOUSE_PRESSED,
cursor_location_dialog,
cursor_location_dialog,
+ ui::EF_NONE,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_down_dialog);
@@ -2103,6 +2106,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::MouseEvent mouse_down_main(ui::ET_MOUSE_MOVED,
cursor_location_main2,
cursor_location_main2,
+ ui::EF_NONE,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_down_main);