Index: ui/views/controls/button/custom_button.cc |
=================================================================== |
--- ui/views/controls/button/custom_button.cc (revision 151406) |
+++ ui/views/controls/button/custom_button.cc (working copy) |
@@ -108,7 +108,7 @@ |
return kViewClassName; |
} |
-bool CustomButton::OnMousePressed(const MouseEvent& event) { |
+bool CustomButton::OnMousePressed(const ui::MouseEvent& event) { |
if (state_ != BS_DISABLED) { |
if (ShouldEnterPushedState(event) && HitTestPoint(event.location())) |
SetState(BS_PUSHED); |
@@ -118,7 +118,7 @@ |
return true; |
} |
-bool CustomButton::OnMouseDragged(const MouseEvent& event) { |
+bool CustomButton::OnMouseDragged(const ui::MouseEvent& event) { |
if (state_ != BS_DISABLED) { |
if (HitTestPoint(event.location())) |
SetState(ShouldEnterPushedState(event) ? BS_PUSHED : BS_HOT); |
@@ -128,7 +128,7 @@ |
return true; |
} |
-void CustomButton::OnMouseReleased(const MouseEvent& event) { |
+void CustomButton::OnMouseReleased(const ui::MouseEvent& event) { |
if (state_ == BS_DISABLED) |
return; |
@@ -151,18 +151,18 @@ |
SetState(BS_NORMAL); |
} |
-void CustomButton::OnMouseEntered(const MouseEvent& event) { |
+void CustomButton::OnMouseEntered(const ui::MouseEvent& event) { |
if (state_ != BS_DISABLED) |
SetState(BS_HOT); |
} |
-void CustomButton::OnMouseExited(const MouseEvent& event) { |
+void CustomButton::OnMouseExited(const ui::MouseEvent& event) { |
// Starting a drag results in a MouseExited, we need to ignore it. |
if (state_ != BS_DISABLED && !InDrag()) |
SetState(BS_NORMAL); |
} |
-void CustomButton::OnMouseMoved(const MouseEvent& event) { |
+void CustomButton::OnMouseMoved(const ui::MouseEvent& event) { |
if (state_ != BS_DISABLED) |
SetState(HitTestPoint(event.location()) ? BS_HOT : BS_NORMAL); |
} |
@@ -179,8 +179,10 @@ |
} else if (event.key_code() == ui::VKEY_RETURN) { |
SetState(BS_NORMAL); |
// TODO(beng): remove once NotifyClick takes ui::Event. |
- views::MouseEvent synthetic_event( |
- ui::ET_MOUSE_RELEASED, 0, 0, ui::EF_LEFT_MOUSE_BUTTON); |
+ ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED, |
+ gfx::Point(), |
+ gfx::Point(), |
+ ui::EF_LEFT_MOUSE_BUTTON); |
NotifyClick(synthetic_event); |
} else { |
return false; |
@@ -194,8 +196,10 @@ |
SetState(BS_NORMAL); |
// TODO(beng): remove once NotifyClick takes ui::Event. |
- views::MouseEvent synthetic_event( |
- ui::ET_MOUSE_RELEASED, 0, 0, ui::EF_LEFT_MOUSE_BUTTON); |
+ ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED, |
+ gfx::Point(), |
+ gfx::Point(), |
+ ui::EF_LEFT_MOUSE_BUTTON); |
NotifyClick(synthetic_event); |
return true; |
} |
@@ -231,8 +235,10 @@ |
accelerator.modifiers()); |
*/ |
// TODO(beng): remove once NotifyClick takes ui::Event. |
- views::MouseEvent synthetic_event( |
- ui::ET_MOUSE_RELEASED, 0, 0, ui::EF_LEFT_MOUSE_BUTTON); |
+ ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED, |
+ gfx::Point(), |
+ gfx::Point(), |
+ ui::EF_LEFT_MOUSE_BUTTON); |
NotifyClick(synthetic_event); |
return true; |
} |