Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 2953643002: Replaced synthetic MouseEvent in CustomButton::AcceleratorPressed() with just an Event. (Closed)
Patch Set: Removed unnecessary local variables. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..356d274b4c5516279391feae9810dbf0bd2d7904 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -318,11 +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);
- NotifyClick(synthetic_event);
+ NotifyClick(accelerator.ToKeyEvent());
return true;
}
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698