Index: ui/views/controls/button/custom_button.cc |
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc |
index 5040c4ea9cf13cf814f091766d2af59e6f9bceb7..648ef20f8e2d0b303eb6372cb493d338ebcc0c9f 100644 |
--- a/ui/views/controls/button/custom_button.cc |
+++ b/ui/views/controls/button/custom_button.cc |
@@ -198,10 +198,11 @@ bool CustomButton::OnKeyPressed(const ui::KeyEvent& event) { |
} else if (event.key_code() == ui::VKEY_RETURN) { |
SetState(STATE_NORMAL); |
// TODO(beng): remove once NotifyClick takes ui::Event. |
- ui::MouseEvent synthetic_event(ui::ET_MOUSE_RELEASED, gfx::Point(), |
- gfx::Point(), ui::EventTimeForNow(), |
- ui::EF_LEFT_MOUSE_BUTTON, |
- ui::EF_LEFT_MOUSE_BUTTON); |
+ ui::MouseEvent synthetic_event( |
+ ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), |
+ ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, |
+ ui::EF_LEFT_MOUSE_BUTTON, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
NotifyClick(synthetic_event); |
} else { |
return false; |
@@ -217,7 +218,8 @@ bool CustomButton::OnKeyReleased(const ui::KeyEvent& event) { |
// TODO(beng): remove once NotifyClick takes ui::Event. |
ui::MouseEvent synthetic_event( |
ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), ui::EventTimeForNow(), |
- ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
NotifyClick(synthetic_event); |
return true; |
} |
@@ -256,7 +258,8 @@ bool CustomButton::AcceleratorPressed(const ui::Accelerator& accelerator) { |
// TODO(beng): remove once NotifyClick takes ui::Event. |
ui::MouseEvent synthetic_event( |
ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), ui::EventTimeForNow(), |
- ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); |
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
NotifyClick(synthetic_event); |
return true; |
} |