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

Unified Diff: chrome/browser/extensions/global_shortcut_listener_win.cc

Issue 64273008: [Windows] Finish global and non-global media keys support on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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/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..16fb4b370040390fa8ac3dc2d184e9b80a9370d4 100644
--- a/chrome/browser/extensions/global_shortcut_listener_win.cc
+++ b/chrome/browser/extensions/global_shortcut_listener_win.cc
@@ -72,6 +72,9 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd,
void GlobalShortcutListenerWin::RegisterAccelerator(
const ui::Accelerator& accelerator,
GlobalShortcutListener::Observer* observer) {
+ if (hotkey_ids_.find(accelerator) != hotkey_ids_.end())
+ return; // The shortcut has been registered.
Finnur 2013/11/12 16:27:54 Perhaps document that this is because some shortcu
zhchbin 2013/11/13 05:01:57 Done.
+
int modifiers = 0;
modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0;
modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0;

Powered by Google App Engine
This is Rietveld 408576698