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

Unified Diff: mojo/converters/input_events/input_events_type_converters.cc

Issue 1312833006: Remove ui::KeyEvent::platform_keycode_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/converters/input_events/BUILD.gn ('k') | ui/events/cocoa/events_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/input_events/input_events_type_converters.cc
diff --git a/mojo/converters/input_events/input_events_type_converters.cc b/mojo/converters/input_events/input_events_type_converters.cc
index f1db97c009d425e639c812d3da0f2df2ee244af6..425205029c9e156ff2f5567bc0c97b3bccf8c958 100644
--- a/mojo/converters/input_events/input_events_type_converters.cc
+++ b/mojo/converters/input_events/input_events_type_converters.cc
@@ -12,6 +12,7 @@
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/converters/input_events/mojo_extended_key_event_data.h"
#include "ui/events/event_utils.h"
+#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/mojo/events/input_events.mojom.h"
@@ -202,7 +203,8 @@ EventPtr TypeConverter<EventPtr, ui::Event>::Convert(const ui::Event& input) {
const ui::KeyEvent* key_event = static_cast<const ui::KeyEvent*>(&input);
KeyDataPtr key_data(KeyData::New());
key_data->key_code = key_event->GetConflatedWindowsKeyCode();
- key_data->native_key_code = key_event->platform_keycode();
+ key_data->native_key_code =
+ ui::KeycodeConverter::DomCodeToNativeKeycode(key_event->code());
key_data->is_char = key_event->is_char();
key_data->character = key_event->GetCharacter();
@@ -265,7 +267,6 @@ scoped_ptr<ui::Event> TypeConverter<scoped_ptr<ui::Event>, EventPtr>::Convert(
static_cast<int32_t>(input->key_data->windows_key_code),
input->key_data->text,
input->key_data->unmodified_text)));
- key_event->set_platform_keycode(input->key_data->native_key_code);
return key_event.Pass();
}
case EVENT_TYPE_POINTER_DOWN:
« no previous file with comments | « mojo/converters/input_events/BUILD.gn ('k') | ui/events/cocoa/events_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698