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

Unified Diff: ui/views/focus/focus_manager.cc

Issue 399783002: Begin whitelisting specific extensions for global key registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update cl with new permission "commands.accessibility". Created 6 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
« chrome/common/extensions/command_unittest.cc ('K') | « ui/events/event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/focus/focus_manager.cc
diff --git a/ui/views/focus/focus_manager.cc b/ui/views/focus/focus_manager.cc
index 4808b4422cb1157310a4306bb74eb6c950fe1462..b1f372f0baf3b69fd532d0dd103ce46ce165b511 100644
--- a/ui/views/focus/focus_manager.cc
+++ b/ui/views/focus/focus_manager.cc
@@ -66,6 +66,10 @@ bool FocusManager::OnKeyEvent(const ui::KeyEvent& event) {
modifiers |= ui::EF_CONTROL_DOWN;
if (event.IsAltDown())
modifiers |= ui::EF_ALT_DOWN;
+#if defined(OS_MACOSX) || defined(OS_CHROMEOS)
+ if (event.IsCommandDown())
+ modifiers |= ui::EF_COMMAND_DOWN;
+#endif
ui::Accelerator accelerator(event.key_code(), modifiers);
accelerator.set_type(event.type());
accelerator.set_is_repeat(event.IsRepeat());
« chrome/common/extensions/command_unittest.cc ('K') | « ui/events/event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698