Index: chrome/browser/extensions/global_shortcut_listener_win.cc |
diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc |
index a5987f7ab9eca678c502dd225cbfb78170a760dc..318e06e11a3647f6d13c76995f0f104c3406a340 100644 |
--- a/chrome/browser/extensions/global_shortcut_listener_win.cc |
+++ b/chrome/browser/extensions/global_shortcut_listener_win.cc |
@@ -72,6 +72,13 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, |
void GlobalShortcutListenerWin::RegisterAccelerator( |
const ui::Accelerator& accelerator, |
GlobalShortcutListener::Observer* observer) { |
+ if (hotkey_ids_.find(accelerator) != hotkey_ids_.end()) { |
+ // The shortcut has already been registered. Some shortcuts, such as |
+ // MediaKeys can have multiple targets, all keyed off of the same |
+ // accelerator. |
+ return; |
+ } |
+ |
int modifiers = 0; |
modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0; |
modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0; |