| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ | 5 #ifndef UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ |
| 6 #define UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ | 6 #define UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 KeyboardCode keycode, | 31 KeyboardCode keycode, |
| 32 NSUInteger flags, | 32 NSUInteger flags, |
| 33 unichar* character, | 33 unichar* character, |
| 34 unichar* characterIgnoringModifiers); | 34 unichar* characterIgnoringModifiers); |
| 35 | 35 |
| 36 // This implementation cribbed from: | 36 // This implementation cribbed from: |
| 37 // third_party/WebKit/Source/web/mac/WebInputEventFactory.mm | 37 // third_party/WebKit/Source/web/mac/WebInputEventFactory.mm |
| 38 // Converts |event| into a |KeyboardCode|. The mapping is not direct as the Mac | 38 // Converts |event| into a |KeyboardCode|. The mapping is not direct as the Mac |
| 39 // has a different notion of key codes. | 39 // has a different notion of key codes. |
| 40 EVENTS_BASE_EXPORT KeyboardCode KeyboardCodeFromNSEvent(NSEvent* event); | 40 EVENTS_BASE_EXPORT KeyboardCode KeyboardCodeFromNSEvent(NSEvent* event); |
| 41 EVENTS_BASE_EXPORT KeyboardCode KeyboardCodeFromCharCode(unichar charCode); |
| 41 | 42 |
| 42 EVENTS_BASE_EXPORT DomCode CodeFromNSEvent(NSEvent* event); | 43 EVENTS_BASE_EXPORT DomCode CodeFromNSEvent(NSEvent* event); |
| 43 | 44 |
| 44 } // namespace ui | 45 } // namespace ui |
| 45 | 46 |
| 46 #endif // UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ | 47 #endif // UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_MAC_H_ |
| OLD | NEW |