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

Unified Diff: public/platform/Platform.h

Issue 663523002: Adding support for DOM3 KeyboardEvents Code in KeyboardEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Embedder API are part of Platform.h instead of WebViewClient.h Created 5 years, 11 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: public/platform/Platform.h
diff --git a/public/platform/Platform.h b/public/platform/Platform.h
index be369762a4f30d439fe7a48569e884b6694368f9..e2a79fd9194e33042e106613f81630fc1903d3af 100644
--- a/public/platform/Platform.h
+++ b/public/platform/Platform.h
@@ -604,6 +604,18 @@ public:
// longer notify the listener, if any.
virtual void stopListening(WebPlatformEventType type) { }
+ // This method converts from the supplied DOM code enum to the
+ // embedder's DOM code value for the key pressed. |domCode| values are
+ // based on the value defined in ui/events/keycodes/dom4/keycode_converter_data.h.
+ // Returns null string, if DOM code value is not found.
+ virtual WebString domCodeStringFromEnum(int domCode) { return WebString(); }
Mike West 2015/01/29 11:49:35 "DOM Code String" is ambiguous. Could you rename t
Habib Virji 2015/01/29 12:24:14 Will it be okay to rename them DOMKeyboardCodeStri
+
+ // This method converts from the suppled DOM code value to the
+ // embedder's DOM code enum for the key pressed. |codeString| is defined in
+ // ui/events/keycodes/dom4/keycode_converter_data.h.
+ // Returns 0, if DOM code enum is not found.
+ virtual int domEnumFromCodeString(const WebString& codeString) { return 0; }
Mike West 2015/01/29 11:49:34 It's a bit strange that we're calling this an enum
Habib Virji 2015/01/29 12:24:14 We went through that discussion https://codereview
Rick Byers 2015/01/29 21:11:10 Yeah, I thought Wez's arguments for making it opaq
+
// Quota -----------------------------------------------------------
// Queries the storage partition's storage usage and quota information.

Powered by Google App Engine
This is Rietveld 408576698