OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ |
| 6 #define CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ |
| 7 |
| 8 #include "base/basictypes.h"; |
| 9 |
| 10 struct KeyboardShortcutData { |
| 11 bool command_key; |
| 12 bool shift_key; |
| 13 bool cntrl_key; |
| 14 int vkey_code; // Virtual Key code for the command. |
| 15 int chrome_command; // The chrome command # to execute for this shortcut. |
| 16 }; |
| 17 |
| 18 // Check if a given keycode + modifiers correspond to a given Chrome command. |
| 19 // returns: Command number (as passed to Browser::ExecuteCommand) or -1 if there |
| 20 // was no match. |
| 21 int CommandForKeyboardShortcut(bool command_key, bool shift_key, bool cntrl_key, |
| 22 int vkey_code); |
| 23 |
| 24 // For testing purposes. |
| 25 const KeyboardShortcutData* GetKeyboardShortCutTable(size_t* num_entries); |
| 26 |
| 27 #endif // #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ |
OLD | NEW |