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

Unified Diff: chrome/browser/global_keyboard_shortcuts_mac.h

Issue 149325: Add facitility for Global Keyboard shortcuts. (Closed)
Patch Set: Created 11 years, 5 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/global_keyboard_shortcuts_mac.h
diff --git a/chrome/browser/global_keyboard_shortcuts_mac.h b/chrome/browser/global_keyboard_shortcuts_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..45d9a69c732aee8f0594454d09f60c8f98b0fec6
--- /dev/null
+++ b/chrome/browser/global_keyboard_shortcuts_mac.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_
+#define CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_
+
+#include "base/basictypes.h";
+
+struct KeyboardShortcutData {
+ bool command_key;
+ bool shift_key;
+ bool cntrl_key;
+ int vkey_code; // Virtual Key code for the command.
+ int chrome_command; // The chrome command # to execute for this shortcut.
+};
+
+// Check if a given keycode + modifiers correspond to a given Chrome command.
+// returns: Command number (as passed to Browser::ExecuteCommand) or -1 if there
+// was no match.
+int CommandForKeyboardShortcut(bool command_key, bool shift_key, bool cntrl_key,
+ int vkey_code);
+
+// For testing purposes.
+const KeyboardShortcutData* GetKeyboardShortCutTable(size_t* num_entries);
+
+#endif // #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698