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

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: Code review comments Created 5 years, 7 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
« no previous file with comments | « no previous file | content/child/blink_platform_impl.h » ('j') | content/child/blink_platform_impl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 NOTREACHED(); 65 NOTREACHED();
66 } 66 }
67 67
68 if (webkit_event.modifiers & blink::WebInputEvent::AltKey) 68 if (webkit_event.modifiers & blink::WebInputEvent::AltKey)
69 webkit_event.isSystemKey = true; 69 webkit_event.isSystemKey = true;
70 70
71 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode(); 71 webkit_event.windowsKeyCode = event.GetLocatedWindowsKeyboardCode();
72 webkit_event.nativeKeyCode = 72 webkit_event.nativeKeyCode =
73 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); 73 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code());
74 webkit_event.domCode = static_cast<int>(event.code()); 74 webkit_event.domCode = static_cast<int>(event.code());
75 webkit_event.domKey = static_cast<int>(event.GetDomKey());
Wez 2015/05/07 00:23:22 You also need to propagate the ui::KeyEvent::chara
Habib Virji 2015/05/19 16:16:28 It is already covered in the below unmodifiedText
kpschoedel 2015/05/19 20:00:26 You'll also need to set .domKey in the OS_WIN case
Habib Virji 2015/05/21 16:36:09 Done.
Wez 2015/06/03 00:35:08 unmodifiedText is an old field in WebKit keyboard
Habib Virji 2015/06/05 20:05:11 In GetUnmodifiedText it does not check the |keypre
Wez 2015/06/11 00:09:05 No, but the GetCharacter() function that it delega
Habib Virji 2015/06/24 14:32:12 Acknowledged.
75 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText(); 76 webkit_event.unmodifiedText[0] = event.GetUnmodifiedText();
76 webkit_event.text[0] = event.GetText(); 77 webkit_event.text[0] = event.GetText();
77 78
78 webkit_event.setKeyIdentifierFromWindowsKeyCode(); 79 webkit_event.setKeyIdentifierFromWindowsKeyCode();
79 80
80 return webkit_event; 81 return webkit_event;
81 } 82 }
82 83
83 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( 84 blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
84 const ui::ScrollEvent& event) { 85 const ui::ScrollEvent& event) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 webkit_event.deltaY = event.y_offset(); 380 webkit_event.deltaY = event.y_offset();
380 } 381 }
381 382
382 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick; 383 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick;
383 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick; 384 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick;
384 385
385 return webkit_event; 386 return webkit_event;
386 } 387 }
387 388
388 } // namespace content 389 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/blink_platform_impl.h » ('j') | content/child/blink_platform_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698