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

Unified Diff: ui/events/keycodes/dom4/keycode_converter.h

Issue 1120813002: Remove EF_FUNCTION_KEY and EF_NUMPAD_KEY. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments (wez@) 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 | « ui/events/event_constants.h ('k') | ui/events/keycodes/dom4/keycode_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/dom4/keycode_converter.h
diff --git a/ui/events/keycodes/dom4/keycode_converter.h b/ui/events/keycodes/dom4/keycode_converter.h
index 1ed0d1231488ebf85e015d5075980b98c8d31d56..1f1fed0de350c462339cf3d1035c40e164d12866 100644
--- a/ui/events/keycodes/dom4/keycode_converter.h
+++ b/ui/events/keycodes/dom4/keycode_converter.h
@@ -16,6 +16,8 @@ namespace ui {
enum class DomCode;
enum class DomKey;
+enum class DomKeyLocation { STANDARD, LEFT, RIGHT, NUMPAD };
+
// This structure is used to define the keycode mapping table.
// It is defined here because the unittests need access to it.
typedef struct {
@@ -62,6 +64,11 @@ class KeycodeConverter {
// Convert a DomCode into a UI Events |code| string value.
static const char* DomCodeToCodeString(DomCode dom_code);
+ // Return the DomKeyLocation of a DomCode. The DomKeyLocation distinguishes
+ // keys with the same meaning, and therefore the same DomKey or KeyboardCode
+ // (VKEY), and corresponds to the DOM UI Events |KeyboardEvent.location|.
+ static DomKeyLocation DomCodeToLocation(DomCode dom_code);
+
// Convert a UI Events |key| string value into a DomKey.
static DomKey KeyStringToDomKey(const char* key);
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/events/keycodes/dom4/keycode_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698