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

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

Issue 1288893002: Ctrl-Enter on Bookmark bar link should open in the New Tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 4 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 | « no previous file | 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 5040c4ea9cf13cf814f091766d2af59e6f9bceb7..bf294c6e20bd111b8012adeba056df4680d90922 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -197,12 +197,7 @@ bool CustomButton::OnKeyPressed(const ui::KeyEvent& event) {
SetState(STATE_PRESSED);
} 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);
- NotifyClick(synthetic_event);
+ NotifyClick(event);
} else {
return false;
}
@@ -214,11 +209,7 @@ bool CustomButton::OnKeyReleased(const ui::KeyEvent& event) {
return false;
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(event);
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698