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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1337503002: Add blink embedder APIs for DomKey conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/child/blink_platform_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 57e38bdf315fa26c64bb35712837c92b433ef5e4..1cb71ef6f50745e106e6415b2278b5aace208bce 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -1374,4 +1374,14 @@ int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) {
code.utf8().data()));
}
+WebString BlinkPlatformImpl::domKeyStringFromEnum(int dom_key) {
+ return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
+ static_cast<ui::DomKey>(dom_key)));
piman 2015/09/10 18:27:40 nit: do we need a range check to make sure this st
kpschoedel 2015/09/10 18:41:30 I can answer this: |ui::DomKey| is explicitly desi
+}
+
+int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) {
+ return static_cast<int>(
+ ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8().data()));
+}
+
} // namespace content
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698