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

Unified Diff: trunk/src/ui/base/keycodes/usb_keycode_map.h

Issue 23451030: Revert 222168 "Add a CodeToNativeKeycode helper that converts UI..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
Index: trunk/src/ui/base/keycodes/usb_keycode_map.h
===================================================================
--- trunk/src/ui/base/keycodes/usb_keycode_map.h (revision 222198)
+++ trunk/src/ui/base/keycodes/usb_keycode_map.h (working copy)
@@ -399,21 +399,6 @@
return InvalidKeyboardEventCode();
}
-inline uint16_t CodeToNativeKeycode(const char* code) {
- if (!code ||
- strcmp(code, InvalidKeyboardEventCode()) == 0) {
- return InvalidNativeKeycode();
- }
-
- for (size_t i = 0; i < arraysize(usb_keycode_map); ++i) {
- if (usb_keycode_map[i].code &&
- strcmp(usb_keycode_map[i].code, code) == 0) {
- return usb_keycode_map[i].native_keycode;
- }
- }
- return InvalidNativeKeycode();
-}
-
// USB keycodes
// Note that USB keycodes are not part of any web standard.
// Please don't use USB keycodes in new code.
« no previous file with comments | « trunk/src/remoting/test/remote_desktop_browsertest.cc ('k') | trunk/src/ui/base/keycodes/usb_keycode_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698