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