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

Side by Side Diff: content/browser/renderer_host/web_input_event_aura.cc

Issue 929053004: [KeyboardEvent] Add embedder APIs to translate between Dom |key| enum and strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "API has been updated on the blink side" Created 5 years, 9 months 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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 NOTREACHED(); 64 NOTREACHED();
65 } 65 }
66 66
67 if (webkit_event.modifiers & blink::WebInputEvent::AltKey) 67 if (webkit_event.modifiers & blink::WebInputEvent::AltKey)
68 webkit_event.isSystemKey = true; 68 webkit_event.isSystemKey = true;
69 69
70 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode(); 70 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode();
71 webkit_event.nativeKeyCode = 71 webkit_event.nativeKeyCode =
72 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); 72 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code());
73 webkit_event.domCode = static_cast<int>(event.code()); 73 webkit_event.domCode = static_cast<int>(event.code());
74 webkit_event.domKey = static_cast<int>(event.GetDomKey());
74 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText(); 75 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText();
75 webkit_event.text[0] = event.GetText(); 76 webkit_event.text[0] = event.GetText();
76 77
77 webkit_event.setKeyIdentifierFromWindowsKeyCode(); 78 webkit_event.setKeyIdentifierFromWindowsKeyCode();
78 79
79 return webkit_event; 80 return webkit_event;
80 } 81 }
81 82
82 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( 83 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
83 const ui::ScrollEvent& event) { 84 const ui::ScrollEvent& event) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 webkit_event.deltaY = event.y_offset(); 379 webkit_event.deltaY = event.y_offset();
379 } 380 }
380 381
381 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick; 382 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick;
382 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick; 383 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick;
383 384
384 return webkit_event; 385 return webkit_event;
385 } 386 }
386 387
387 } // namespace content 388 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/blink_platform_impl.h » ('j') | content/child/blink_platform_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698