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

Unified Diff: chrome/common/extensions/command.cc

Issue 399783002: Begin whitelisting specific extensions for global key registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits; rebase 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
Index: chrome/common/extensions/command.cc
diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
index 8a07d95f566ea3950eeabc34bea547294cf17c7a..c64c326a999e6cdc54ead339af3d097fd470e097 100644
--- a/chrome/common/extensions/command.cc
+++ b/chrome/common/extensions/command.cc
@@ -77,12 +77,15 @@ ui::Accelerator ParseImpl(const std::string& accelerator,
for (size_t i = 0; i < tokens.size(); i++) {
if (tokens[i] == values::kKeyCtrl) {
modifiers |= ui::EF_CONTROL_DOWN;
- } else if (tokens[i] == values::kKeyCommand) {
- if (platform_key == values::kKeybindingPlatformMac) {
+ } else if (tokens[i] == values::kKeyCommand ||
+ tokens[i] == values::kKeySearch) {
+ if (platform_key == values::kKeybindingPlatformMac ||
+ platform_key == values::kKeybindingPlatformChromeOs) {
Finnur 2014/08/21 16:23:32 This still makes Search work as Command on Mac and
David Tseng 2014/08/21 17:24:51 Bad rebase; done.
// Either the developer specified Command+foo in the manifest for Mac or
// they specified Ctrl and it got normalized to Command (to get Ctrl on
// Mac the developer has to specify MacCtrl). Therefore we treat this
// as Command.
+ // Search maps to command on Chrome OS.
modifiers |= ui::EF_COMMAND_DOWN;
#if defined(OS_MACOSX)
} else if (platform_key == values::kKeybindingPlatformDefault) {

Powered by Google App Engine
This is Rietveld 408576698