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

Unified Diff: webkit/plugins/ppapi/event_conversion.cc

Issue 9359048: Calc USB scancodes for key events (linux only for now) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments 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: webkit/plugins/ppapi/event_conversion.cc
diff --git a/webkit/plugins/ppapi/event_conversion.cc b/webkit/plugins/ppapi/event_conversion.cc
index e69fd43b62e36ce7df6296b8bebe5f3a619ece7f..8d90fad8258a8de34e5ccc05ff65448d205d4c3a 100644
--- a/webkit/plugins/ppapi/event_conversion.cc
+++ b/webkit/plugins/ppapi/event_conversion.cc
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/plugins/ppapi/common.h"
+#include "webkit/plugins/ppapi/usb_scan_code_conversion.h"
using ppapi::EventTimeToPPTimeTicks;
using ppapi::InputEventData;
@@ -81,9 +82,7 @@ void AppendKeyEvent(const WebInputEvent& event,
InputEventData result = GetEventWithCommonFieldsAndType(event);
result.event_modifiers = key_event.modifiers;
result.key_code = key_event.windowsKeyCode;
- // TODO(garykac): Platform-specific code to convert from
- // |key_event.nativeKeyCode| to USB scan code.
- result.usb_scan_code = 0;
+ result.usb_scan_code = UsbScanCodeForKeyboardEvent(key_event);
result_events->push_back(result);
}

Powered by Google App Engine
This is Rietveld 408576698