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

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: 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..a0d90ff5932f6acd535df70c1e7bef031d294238 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -197,10 +197,13 @@ bool CustomButton::OnKeyPressed(const ui::KeyEvent& event) {
SetState(STATE_PRESSED);
} else if (event.key_code() == ui::VKEY_RETURN) {
SetState(STATE_NORMAL);
+ int flags = ui::EF_LEFT_MOUSE_BUTTON;
+ if (event.IsControlDown())
+ flags |= ui::EventFlags::EF_CONTROL_DOWN;
// 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,
+ flags,
AKVT 2015/08/13 15:11:49 Can we pass event.flags() | ui::EF_LEFT_MOUSE_BUTT
Deepak 2015/08/13 15:15:48 Done.
ui::EF_LEFT_MOUSE_BUTTON);
NotifyClick(synthetic_event);
} else {
« 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