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

Unified Diff: chrome/browser/extensions/api/commands/command_service.cc

Issue 23445013: Parse media keys for named command in the manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit fix. Created 7 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/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 2978a1f9338b7e2413e3418fe431e8580069f0f9..5d38936f1aba3355f5fa43942d57741e4bc2eae1 100644
--- a/chrome/browser/extensions/api/commands/command_service.cc
+++ b/chrome/browser/extensions/api/commands/command_service.cc
@@ -216,7 +216,8 @@ void CommandService::UpdateKeybindingPrefs(const std::string& extension_id,
// shortcut before proceeding.
RemoveKeybindingPrefs(extension_id, command_name);
- ui::Accelerator accelerator = Command::StringToAccelerator(keystroke);
+ ui::Accelerator accelerator =
+ Command::StringToAccelerator(keystroke, command_name);
AddKeybindingPref(accelerator, extension_id, command_name, true);
}
@@ -242,7 +243,7 @@ ui::Accelerator CommandService::FindShortcutForCommand(
if (StartsWithASCII(shortcut, Command::CommandPlatform() + ":", true))
shortcut = shortcut.substr(Command::CommandPlatform().length() + 1);
- return Command::StringToAccelerator(shortcut);
+ return Command::StringToAccelerator(shortcut, command_name);
}
return ui::Accelerator();
« no previous file with comments | « no previous file | chrome/browser/extensions/api/commands/command_service_new.cc » ('j') | ui/base/strings/ui_strings.grd » ('J')

Powered by Google App Engine
This is Rietveld 408576698