summaryrefslogtreecommitdiffstats
path: root/mojo/converters
diff options
context:
space:
mode:
authorkpschoedel <kpschoedel@chromium.org>2015-09-16 12:51:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-16 19:52:34 +0000
commitcf78ded8ae7f64968789c3bac48ea6e69df08d29 (patch)
tree2253817386e06034960caa0bd144be2aa6a74832 /mojo/converters
parent82957ade8b7a9686c50688ab8caab3a19dcd80b1 (diff)
downloadchromium_src-cf78ded8ae7f64968789c3bac48ea6e69df08d29.zip
chromium_src-cf78ded8ae7f64968789c3bac48ea6e69df08d29.tar.gz
chromium_src-cf78ded8ae7f64968789c3bac48ea6e69df08d29.tar.bz2
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}
Diffstat (limited to 'mojo/converters')
-rw-r--r--mojo/converters/input_events/BUILD.gn1
-rw-r--r--mojo/converters/input_events/input_events_type_converters.cc5
2 files changed, 4 insertions, 2 deletions
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<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: