From cf78ded8ae7f64968789c3bac48ea6e69df08d29 Mon Sep 17 00:00:00 2001 From: kpschoedel Date: Wed, 16 Sep 2015 12:51:54 -0700 Subject: Remove ui::KeyEvent::platform_keycode_ This field had been added as a temporary measure to support X11 Keysym-based character composition under Ozone. Since crrev.com/ed31ed it is no longer necessary. BUG=442757 Review URL: https://codereview.chromium.org/1312833006 Cr-Commit-Position: refs/heads/master@{#349195} --- mojo/converters/input_events/BUILD.gn | 1 + mojo/converters/input_events/input_events_type_converters.cc | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mojo/converters') diff --git a/mojo/converters/input_events/BUILD.gn b/mojo/converters/input_events/BUILD.gn index e3790d5..af91f8f 100644 --- a/mojo/converters/input_events/BUILD.gn +++ b/mojo/converters/input_events/BUILD.gn @@ -19,6 +19,7 @@ component("input_events") { "//mojo/environment:chromium", "//third_party/mojo/src/mojo/public/c/system:for_component", "//ui/events", + "//ui/events:dom_keycode_converter", "//ui/gfx/geometry", "//ui/mojo/events:interfaces", "//ui/mojo/geometry:interfaces", diff --git a/mojo/converters/input_events/input_events_type_converters.cc b/mojo/converters/input_events/input_events_type_converters.cc index f1db97c..4252050 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::Convert(const ui::Event& input) { const ui::KeyEvent* key_event = static_cast(&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 TypeConverter, EventPtr>::Convert( static_cast(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: -- cgit v1.1