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 #include "content/browser/renderer_host/web_input_event_aura.h" | 5 #include "content/browser/renderer_host/web_input_event_aura.h" |
6 | 6 |
7 #include "content/browser/renderer_host/input/web_input_event_util.h" | 7 #include "content/browser/renderer_host/input/web_input_event_util.h" |
8 #include "content/browser/renderer_host/ui_events_helper.h" | 8 #include "content/browser/renderer_host/ui_events_helper.h" |
9 #include "ui/aura/client/screen_position_client.h" | 9 #include "ui/aura/client/screen_position_client.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 case ui::ET_KEY_RELEASED: | 78 case ui::ET_KEY_RELEASED: |
79 webkit_event.type = blink::WebInputEvent::KeyUp; | 79 webkit_event.type = blink::WebInputEvent::KeyUp; |
80 break; | 80 break; |
81 default: | 81 default: |
82 NOTREACHED(); | 82 NOTREACHED(); |
83 } | 83 } |
84 | 84 |
85 if (webkit_event.modifiers & blink::WebInputEvent::AltKey) | 85 if (webkit_event.modifiers & blink::WebInputEvent::AltKey) |
86 webkit_event.isSystemKey = true; | 86 webkit_event.isSystemKey = true; |
87 | 87 |
88 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode(); | 88 webkit_event.windowsKeyCode = event.key_code(); |
89 webkit_event.nativeKeyCode = | 89 webkit_event.nativeKeyCode = |
90 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); | 90 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); |
91 webkit_event.domCode = static_cast<int>(event.code()); | 91 webkit_event.domCode = static_cast<int>(event.code()); |
92 webkit_event.domKey = static_cast<int>(event.GetDomKey()); | 92 webkit_event.domKey = static_cast<int>(event.GetDomKey()); |
93 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText(); | 93 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText(); |
94 webkit_event.text[0] = event.GetText(); | 94 webkit_event.text[0] = event.GetText(); |
95 | 95 |
96 webkit_event.setKeyIdentifierFromWindowsKeyCode(); | 96 webkit_event.setKeyIdentifierFromWindowsKeyCode(); |
97 | 97 |
98 return webkit_event; | 98 return webkit_event; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 webkit_event.tiltX = roundf(event.pointer_details().tilt_x()); | 414 webkit_event.tiltX = roundf(event.pointer_details().tilt_x()); |
415 webkit_event.tiltY = roundf(event.pointer_details().tilt_y()); | 415 webkit_event.tiltY = roundf(event.pointer_details().tilt_y()); |
416 webkit_event.force = event.pointer_details().force(); | 416 webkit_event.force = event.pointer_details().force(); |
417 webkit_event.pointerType = | 417 webkit_event.pointerType = |
418 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type()); | 418 EventPointerTypeToWebPointerType(event.pointer_details().pointer_type()); |
419 | 419 |
420 return webkit_event; | 420 return webkit_event; |
421 } | 421 } |
422 | 422 |
423 } // namespace content | 423 } // namespace content |
OLD | NEW |