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

Side by Side Diff: chrome/browser/global_keyboard_shortcuts_mac.h

Issue 2074643003: MacViews: Views accelerators table should match the Cocoa one. (Closed) Base URL: ssh://bitbucket.browser.yandex-team.ru/chromium/src.git@master
Patch Set: Fix compilation. Created 4 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 unified diff | Download patch
OLDNEW
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
11 #include <vector>
12
11 @class NSEvent; 13 @class NSEvent;
12 14
13 struct KeyboardShortcutData { 15 struct KeyboardShortcutData {
14 bool command_key; 16 bool command_key;
15 bool shift_key; 17 bool shift_key;
16 bool cntrl_key; 18 bool cntrl_key;
17 bool opt_key; 19 bool opt_key;
18 // Either one of vkey_code or key_char must be specified. For keys 20 // Either one of vkey_code or key_char must be specified. For keys
19 // whose virtual key code is hardware-dependent (kVK_ANSI_*) key_char 21 // whose virtual key code is hardware-dependent (kVK_ANSI_*) key_char
20 // should be specified instead. 22 // should be specified instead.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Returns a keyboard event character for the given |event|. In most cases 73 // Returns a keyboard event character for the given |event|. In most cases
72 // this returns the first character of [NSEvent charactersIgnoringModifiers], 74 // this returns the first character of [NSEvent charactersIgnoringModifiers],
73 // but when [NSEvent character] has different printable ascii character 75 // but when [NSEvent character] has different printable ascii character
74 // we may return the first character of [NSEvent characters] instead. 76 // we may return the first character of [NSEvent characters] instead.
75 // (E.g. for dvorak-qwerty layout we want [NSEvent characters] rather than 77 // (E.g. for dvorak-qwerty layout we want [NSEvent characters] rather than
76 // [charactersIgnoringModifiers] for command keys. Similarly, on german 78 // [charactersIgnoringModifiers] for command keys. Similarly, on german
77 // layout we want '{' character rather than '8' for opt-8.) 79 // layout we want '{' character rather than '8' for opt-8.)
78 unichar KeyCharacterForEvent(NSEvent* event); 80 unichar KeyCharacterForEvent(NSEvent* event);
79 81
80 // For testing purposes. 82 // For testing purposes.
81 const KeyboardShortcutData* GetWindowKeyboardShortcutTable(size_t* num_entries); 83 const std::vector<KeyboardShortcutData>& GetWindowKeyboardShortcutTable();
82 const KeyboardShortcutData* 84 const std::vector<KeyboardShortcutData>&
83 GetDelayedWindowKeyboardShortcutTable(size_t* num_entries); 85 GetDelayedWindowKeyboardShortcutTable();
84 const KeyboardShortcutData* 86 const std::vector<KeyboardShortcutData>& GetBrowserKeyboardShortcutTable();
85 GetBrowserKeyboardShortcutTable(size_t* num_entries);
86 87
87 #endif // #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ 88 #endif // #ifndef CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_cocoa_mac.mm ('k') | chrome/browser/global_keyboard_shortcuts_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698