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

Side by Side Diff: mojo/converters/blink/blink_input_events_type_converters.cc

Issue 2120153003: Remove keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_key_identifier_3a
Patch Set: Rebase Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/converters/blink/blink_input_events_type_converters.h" 5 #include "mojo/converters/blink/blink_input_events_type_converters.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 if (web_event->modifiers & blink::WebInputEvent::AltKey) 127 if (web_event->modifiers & blink::WebInputEvent::AltKey)
128 web_event->isSystemKey = true; 128 web_event->isSystemKey = true;
129 129
130 web_event->windowsKeyCode = event.GetLocatedWindowsKeyboardCode(); 130 web_event->windowsKeyCode = event.GetLocatedWindowsKeyboardCode();
131 web_event->nativeKeyCode = 131 web_event->nativeKeyCode =
132 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code()); 132 ui::KeycodeConverter::DomCodeToNativeKeycode(event.code());
133 web_event->text[0] = event.GetText(); 133 web_event->text[0] = event.GetText();
134 web_event->unmodifiedText[0] = event.GetUnmodifiedText(); 134 web_event->unmodifiedText[0] = event.GetUnmodifiedText();
135
136 web_event->setKeyIdentifierFromWindowsKeyCode();
137 return std::move(web_event); 135 return std::move(web_event);
138 } 136 }
139 137
140 std::unique_ptr<blink::WebInputEvent> BuildWebMouseWheelEventFrom( 138 std::unique_ptr<blink::WebInputEvent> BuildWebMouseWheelEventFrom(
141 const ui::MouseWheelEvent& event) { 139 const ui::MouseWheelEvent& event) {
142 std::unique_ptr<blink::WebMouseWheelEvent> web_event( 140 std::unique_ptr<blink::WebMouseWheelEvent> web_event(
143 new blink::WebMouseWheelEvent); 141 new blink::WebMouseWheelEvent);
144 web_event->type = blink::WebInputEvent::MouseWheel; 142 web_event->type = blink::WebInputEvent::MouseWheel;
145 web_event->button = blink::WebMouseEvent::ButtonNone; 143 web_event->button = blink::WebMouseEvent::ButtonNone;
146 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); 144 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags());
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return BuildWebMouseWheelEventFrom(*event.AsMouseWheelEvent()); 237 return BuildWebMouseWheelEventFrom(*event.AsMouseWheelEvent());
240 case ui::ET_KEY_PRESSED: 238 case ui::ET_KEY_PRESSED:
241 case ui::ET_KEY_RELEASED: 239 case ui::ET_KEY_RELEASED:
242 return BuildWebKeyboardEvent(*event.AsKeyEvent()); 240 return BuildWebKeyboardEvent(*event.AsKeyEvent());
243 default: 241 default:
244 return nullptr; 242 return nullptr;
245 } 243 }
246 } 244 }
247 245
248 } // namespace mojo 246 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/converters/blink/OWNERS ('k') | third_party/WebKit/LayoutTests/fast/events/arrow-keys-on-body.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698