| 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/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 default: | 42 default: |
| 43 NOTREACHED(); | 43 NOTREACHED(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 if (webkit_event.modifiers & blink::WebInputEvent::AltKey) | 46 if (webkit_event.modifiers & blink::WebInputEvent::AltKey) |
| 47 webkit_event.isSystemKey = true; | 47 webkit_event.isSystemKey = true; |
| 48 | 48 |
| 49 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode(); | 49 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode(); |
| 50 webkit_event.nativeKeyCode = | 50 webkit_event.nativeKeyCode = |
| 51 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); | 51 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); |
| 52 webkit_event.domCode = static_cast<int>(event.code()); |
| 52 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText(); | 53 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText(); |
| 53 webkit_event.text[0] = event.GetText(); | 54 webkit_event.text[0] = event.GetText(); |
| 54 | 55 |
| 55 webkit_event.setKeyIdentifierFromWindowsKeyCode(); | 56 webkit_event.setKeyIdentifierFromWindowsKeyCode(); |
| 56 | 57 |
| 57 return webkit_event; | 58 return webkit_event; |
| 58 } | 59 } |
| 59 | 60 |
| 60 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( | 61 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( |
| 61 const ui::ScrollEvent& event) { | 62 const ui::ScrollEvent& event) { |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 webkit_event.deltaY = event.y_offset(); | 348 webkit_event.deltaY = event.y_offset(); |
| 348 } | 349 } |
| 349 | 350 |
| 350 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick; | 351 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick; |
| 351 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick; | 352 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick; |
| 352 | 353 |
| 353 return webkit_event; | 354 return webkit_event; |
| 354 } | 355 } |
| 355 | 356 |
| 356 } // namespace content | 357 } // namespace content |
| OLD | NEW |