Index: chrome/browser/extensions/api/commands/command_service.cc |
diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc |
index dc666823ddc07643ca7f3cf8922263516789f546..823aa9d326ad0236f9672c59640fa0ae1a3b0b38 100644 |
--- a/chrome/browser/extensions/api/commands/command_service.cc |
+++ b/chrome/browser/extensions/api/commands/command_service.cc |
@@ -79,10 +79,17 @@ bool InitialBindingsHaveBeenAssigned( |
} |
bool IsWhitelistedGlobalShortcut(const extensions::Command& command) { |
+ // Non-global shortcuts are always allowed. |
if (!command.global()) |
return true; |
+ // Global shortcuts must be (Ctrl|Command)-Shift-[0-9]. |
+#if defined OS_MACOSX |
+ if (!command.accelerator().IsCmdDown()) |
+ return false; |
+#else |
if (!command.accelerator().IsCtrlDown()) |
return false; |
+#endif |
if (!command.accelerator().IsShiftDown()) |
return false; |
return (command.accelerator().key_code() >= ui::VKEY_0 && |