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

Unified Diff: ui/events/keycodes/keyboard_code_conversion.h

Issue 1072193004: Take GetCharacterFromKeyCode() out behind the barn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | ui/events/keycodes/keyboard_code_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/keyboard_code_conversion.h
diff --git a/ui/events/keycodes/keyboard_code_conversion.h b/ui/events/keycodes/keyboard_code_conversion.h
index 526ead5c3a9eeb7fa3238a736636dafbf615b8bb..d3df2f770001e079f498fdf5c66f65f55a85b467 100644
--- a/ui/events/keycodes/keyboard_code_conversion.h
+++ b/ui/events/keycodes/keyboard_code_conversion.h
@@ -15,7 +15,7 @@ namespace ui {
enum class DomCode;
-// Helper functions to get the meaning of a Windows key code in a
+// Helper functions to get the meaning of a DOM |code| in a
// platform independent way. It supports control characters as well.
// It assumes a US keyboard layout is used, so it may only be used when there
// is no native event or no better way to get the character.
@@ -29,14 +29,6 @@ enum class DomCode;
// character according to US keyboard layout definition. Preferably, such
// events should be created using a full KeyEvent constructor, explicitly
// specifying the character and DOM 3 values as well as the legacy VKEY.
-//
-// TODO(kpschoedel): replace remaining uses of the ...FromKeyCode() functions
-// and remove them, to avoid future creation of underspecified key events.
-// crbug.com/444045
-EVENTS_BASE_EXPORT base::char16 GetCharacterFromKeyCode(KeyboardCode key_code,
- int flags);
-EVENTS_BASE_EXPORT DomKey GetDomKeyFromKeyCode(KeyboardCode key_code,
- int flags);
// Helper function to map a physical key state (dom_code and flags)
// to a meaning (dom_key and character, together corresponding to the
@@ -48,6 +40,8 @@ EVENTS_BASE_EXPORT DomKey GetDomKeyFromKeyCode(KeyboardCode key_code,
// Returns true and sets the output parameters if the (dom_code, flags) pair
// has an interpretation in the US English layout; otherwise the output
// parameters are untouched.
+EVENTS_BASE_EXPORT base::char16 DomCodeToUsLayoutCharacter(DomCode dom_code,
+ int flags);
EVENTS_BASE_EXPORT bool DomCodeToUsLayoutDomKey(DomCode dom_code,
int flags,
DomKey* dom_key,
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | ui/events/keycodes/keyboard_code_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698