| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "ui/events/keycodes/keyboard_code_conversion_mac.h" | 5 #import "ui/events/keycodes/keyboard_code_conversion_mac.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #import <Carbon/Carbon.h> | 9 #import <Carbon/Carbon.h> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "ui/events/keycodes/dom4/keycode_converter.h" | 12 #include "ui/events/keycodes/dom/keycode_converter.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // A struct to hold a Windows keycode to Mac virtual keycode mapping. | 18 // A struct to hold a Windows keycode to Mac virtual keycode mapping. |
| 19 struct KeyCodeMap { | 19 struct KeyCodeMap { |
| 20 KeyboardCode keycode; | 20 KeyboardCode keycode; |
| 21 int macKeycode; | 21 int macKeycode; |
| 22 unichar characterIgnoringAllModifiers; | 22 unichar characterIgnoringAllModifiers; |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 return code; | 547 return code; |
| 548 } | 548 } |
| 549 return KeyboardCodeFromKeyCode([event keyCode]); | 549 return KeyboardCodeFromKeyCode([event keyCode]); |
| 550 } | 550 } |
| 551 | 551 |
| 552 DomCode CodeFromNSEvent(NSEvent* event) { | 552 DomCode CodeFromNSEvent(NSEvent* event) { |
| 553 return ui::KeycodeConverter::NativeKeycodeToDomCode([event keyCode]); | 553 return ui::KeycodeConverter::NativeKeycodeToDomCode([event keyCode]); |
| 554 } | 554 } |
| 555 | 555 |
| 556 } // namespace ui | 556 } // namespace ui |
| OLD | NEW |