Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: chrome/browser/extensions/api/commands/

Issue 60353008: Mac global keybindings (Closed) Base URL:
Patch Set: Created 7 years 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
Index: chrome/browser/extensions/api/commands/
--- chrome/browser/extensions/api/commands/ (revision 239014)
+++ chrome/browser/extensions/api/commands/ (working copy)
@@ -79,10 +79,17 @@
bool IsWhitelistedGlobalShortcut(const extensions::Command& command) {
+ // Non-global shortcuts are always allowed.
if (!
return true;
+ // Global shortcuts must be (Ctrl|Command)-Shift-[0-9].
+#if defined OS_MACOSX
+ if (!command.accelerator().IsCmdDown())
+ return false;
if (!command.accelerator().IsCtrlDown())
return false;
if (!command.accelerator().IsShiftDown())
return false;
return (command.accelerator().key_code() >= ui::VKEY_0 &&

Powered by Google App Engine
This is Rietveld 408576698