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

Unified Diff: content/child/blink_platform_impl.cc

Issue 658183002: Add support for DOM3 KeyboardEvent keycode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change toupper to base:ToUpperASCII Created 5 years, 10 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') | content/shell/renderer/test_runner/event_sender.cc » ('j') | 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 a8d488ac58a3d6fc457beb259064d0852f8dddf7..f87df5eb6cd3388752d4007889ba0087d3499933 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -59,6 +59,7 @@
#include "third_party/WebKit/public/platform/WebWaitableEvent.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "ui/base/layout.h"
+#include "ui/events/keycodes/dom4/keycode_converter.h"
using blink::WebData;
using blink::WebFallbackThemeEngine;
@@ -1286,4 +1287,14 @@ void BlinkPlatformImpl::DestroyCurrentThread(void* thread) {
delete impl;
}
+WebString BlinkPlatformImpl::domCodeStringFromEnum(int dom_code) {
+ return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString(
+ static_cast<ui::DomCode>(dom_code)));
+}
+
+int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) {
+ return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode(
+ code.utf8().data()));
+}
+
} // namespace content
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/shell/renderer/test_runner/event_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698