| Index: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.cc
|
| diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.cc
|
| index 31d595cd8d3706b06b29e371fe5d032c1cf3518f..0396707cc5d232ed0afc391d5e84cfa281189ae7 100644
|
| --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.cc
|
| +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.cc
|
| @@ -265,11 +265,13 @@ PP_Resource CreateKeyboardInputEvent(PP_Instance instance,
|
| PP_TimeTicks time_stamp,
|
| uint32_t modifiers,
|
| uint32_t key_code,
|
| + uint32_t usb_scan_code,
|
| struct PP_Var character_text) {
|
| DebugPrintf("PPB_InputEvent::CreateKeyboardInputEvent: instance="
|
| "%"NACL_PRId32", type=%d, time_stamp=%lf, modifiers="
|
| - "%"NACL_PRIu32", key_code=%"NACL_PRIu32"\n",
|
| - instance, type, time_stamp, modifiers, key_code);
|
| + "%"NACL_PRIu32", key_code=%"NACL_PRIu32", usb_scan_code="
|
| + "%"NACL_PRIu32"\n",
|
| + instance, type, time_stamp, modifiers, key_code, usb_scan_code);
|
| // Serialize the character_text Var.
|
| uint32_t text_size = 0;
|
| nacl::scoped_array<char> text_bytes(Serialize(&character_text, 1,
|
| @@ -283,6 +285,7 @@ PP_Resource CreateKeyboardInputEvent(PP_Instance instance,
|
| static_cast<double>(time_stamp),
|
| static_cast<int32_t>(modifiers),
|
| static_cast<int32_t>(key_code),
|
| + static_cast<int32_t>(usb_scan_code),
|
| text_size,
|
| text_bytes.get(),
|
| &resource_id);
|
| @@ -304,6 +307,10 @@ uint32_t GetKeyCode(PP_Resource key_event) {
|
| IMPLEMENT_RESOURCE_THUNK(GetKeyCode, key_event, 0);
|
| }
|
|
|
| +uint32_t GetUsbScanCode_Dev(PP_Resource key_event) {
|
| + IMPLEMENT_RESOURCE_THUNK(GetUsbScanCode_Dev, key_event, 0);
|
| +}
|
| +
|
| PP_Var GetCharacterText(PP_Resource character_event) {
|
| IMPLEMENT_RESOURCE_THUNK(GetCharacterText, character_event,
|
| PP_MakeUndefined());
|
| @@ -370,6 +377,7 @@ const PPB_KeyboardInputEvent* PluginInputEvent::GetKeyboardInterface() {
|
| CreateKeyboardInputEvent,
|
| IsKeyboardInputEvent,
|
| ::GetKeyCode,
|
| + ::GetUsbScanCode_Dev,
|
| ::GetCharacterText
|
| };
|
| return &keyboard_input_event_interface;
|
| @@ -434,6 +442,10 @@ uint32_t PluginInputEvent::GetKeyCode() const {
|
| return input_event_data_.key_code;
|
| }
|
|
|
| +uint32_t PluginInputEvent::GetUsbScanCode_Dev() const {
|
| + return input_event_data_.usb_scan_code;
|
| +}
|
| +
|
| PP_Var PluginInputEvent::GetCharacterText() const {
|
| PPBVarInterface()->AddRef(character_text_);
|
| return character_text_;
|
|
|