Chromium Code Reviews| 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 4ed90e2918ab4cc41cfb83aa30882fe62feafba9..a34beb62d9a0cb67da77ca8783005a206e6a9d56 100644 |
| --- a/ui/views/controls/button/custom_button.cc |
| +++ b/ui/views/controls/button/custom_button.cc |
| @@ -318,10 +318,7 @@ void CustomButton::OnGestureEvent(ui::GestureEvent* event) { |
| bool CustomButton::AcceleratorPressed(const ui::Accelerator& accelerator) { |
| 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::KeyEvent synthetic_event = accelerator.ToKeyEvent(); |
|
sky
2017/07/11 17:19:43
No need for the local here either.
bruthig
2017/07/11 18:25:21
Done.
|
| NotifyClick(synthetic_event); |
| return true; |
| } |