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

Unified Diff: ppapi/cpp/input_event.cc

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetUsbScanCode_Dev to Pepper/NaCl interface Created 8 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
Index: ppapi/cpp/input_event.cc
diff --git a/ppapi/cpp/input_event.cc b/ppapi/cpp/input_event.cc
index 632b1eccd93652f9f15e227e28bb9fdbf342756c..64f546afff068356d9bfed3ff58e27729da19aaa 100644
--- a/ppapi/cpp/input_event.cc
+++ b/ppapi/cpp/input_event.cc
@@ -195,13 +195,14 @@ KeyboardInputEvent::KeyboardInputEvent(Instance* instance,
PP_TimeTicks time_stamp,
uint32_t modifiers,
uint32_t key_code,
+ uint32_t usb_scan_code,
const Var& character_text) {
// Type check the input event before setting it.
if (!has_interface<PPB_KeyboardInputEvent>())
return;
PassRefFromConstructor(get_interface<PPB_KeyboardInputEvent>()->Create(
instance->pp_instance(), type, time_stamp, modifiers, key_code,
- character_text.pp_var()));
+ usb_scan_code, character_text.pp_var()));
}
uint32_t KeyboardInputEvent::GetKeyCode() const {
@@ -210,6 +211,13 @@ uint32_t KeyboardInputEvent::GetKeyCode() const {
return get_interface<PPB_KeyboardInputEvent>()->GetKeyCode(pp_resource());
}
+uint32_t KeyboardInputEvent::GetUsbScanCode_Dev() const {
+ if (!has_interface<PPB_KeyboardInputEvent>())
+ return 0;
+ return get_interface<PPB_KeyboardInputEvent>()->GetUsbScanCode_Dev(
+ pp_resource());
+}
+
Var KeyboardInputEvent::GetCharacterText() const {
if (!has_interface<PPB_KeyboardInputEvent>())
return Var();

Powered by Google App Engine
This is Rietveld 408576698