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

Unified Diff: ui/events/keycodes/dom/keycode_converter.cc

Issue 1108893002: Revise DOM Level 3 US Layout maps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for keycodes/dom/ rename 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/keycodes/dom/keycode_converter_data.inc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/dom/keycode_converter.cc
diff --git a/ui/events/keycodes/dom/keycode_converter.cc b/ui/events/keycodes/dom/keycode_converter.cc
index 8eb3934753245174cf3fed331cbf9ba921147823..c77b8aba3fbdf216e5c1495ee48cc470605e92c5 100644
--- a/ui/events/keycodes/dom/keycode_converter.cc
+++ b/ui/events/keycodes/dom/keycode_converter.cc
@@ -108,13 +108,7 @@ int KeycodeConverter::CodeToNativeKeycode(const char* code) {
// static
int KeycodeConverter::DomCodeToNativeKeycode(DomCode code) {
- if (code == DomCode::NONE)
- return InvalidNativeKeycode();
- for (size_t i = 0; i < kKeycodeMapEntries; ++i) {
- if (usb_keycode_map[i].usb_keycode == static_cast<uint32_t>(code))
- return usb_keycode_map[i].native_keycode;
- }
- return InvalidNativeKeycode();
+ return UsbKeycodeToNativeKeycode(static_cast<uint32_t>(code));
}
// static
« no previous file with comments | « no previous file | ui/events/keycodes/dom/keycode_converter_data.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698