| 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 <Carbon/Carbon.h> // For unichar. | 8 #include <Carbon/Carbon.h> // For unichar. |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Returns a keyboard event character for the given |event|. In most cases | 71 // Returns a keyboard event character for the given |event|. In most cases |
| 72 // this returns the first character of [NSEvent charactersIgnoringModifiers], | 72 // this returns the first character of [NSEvent charactersIgnoringModifiers], |
| 73 // but when [NSEvent character] has different printable ascii character | 73 // but when [NSEvent character] has different printable ascii character |
| 74 // we may return the first character of [NSEvent characters] instead. | 74 // we may return the first character of [NSEvent characters] instead. |
| 75 // (E.g. for dvorak-qwerty layout we want [NSEvent characters] rather than | 75 // (E.g. for dvorak-qwerty layout we want [NSEvent characters] rather than |
| 76 // [charactersIgnoringModifiers] for command keys. Similarly, on german | 76 // [charactersIgnoringModifiers] for command keys. Similarly, on german |
| 77 // layout we want '{' character rather than '8' for opt-8.) | 77 // layout we want '{' character rather than '8' for opt-8.) |
| 78 unichar KeyCharacterForEvent(NSEvent* event); | 78 unichar KeyCharacterForEvent(NSEvent* event); |
| 79 | 79 |
| 80 // For testing purposes. | 80 // For testing purposes. |
| 81 const KeyboardShortcutData* GetWindowKeyboardShortcutTable(size_t* num_entries); | 81 const std::vector<KeyboardShortcutData>& GetWindowKeyboardShortcutTable(); |
| 82 const KeyboardShortcutData* | 82 const std::vector<KeyboardShortcutData>& |
| 83 GetDelayedWindowKeyboardShortcutTable(size_t* num_entries); | 83 GetDelayedWindowKeyboardShortcutTable(); |
| 84 const KeyboardShortcutData* | 84 const std::vector<KeyboardShortcutData>& GetBrowserKeyboardShortcutTable(); |
| 85 GetBrowserKeyboardShortcutTable(size_t* num_entries); | |
| 86 | 85 |
| 87 #endif // #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ | 86 #endif // #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ |
| OLD | NEW |