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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename to usb_key_code 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/native_client/src/shared/ppapi_proxy/input_event_data.h
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h b/ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h
index c3cacc046a5822cb1d6c06e242e68a2a64ca154e..39e95a1adf17daeef149eb8153d26ecc1e126e84 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h
+++ b/ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h
@@ -1,4 +1,4 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE file.
@@ -32,6 +32,14 @@ struct InputEventData {
PP_Bool wheel_scroll_by_page;
uint32_t key_code;
+
+ // The Usage Page (upper 16-bits) and Usage Id (lower 16-bits) that encode
Wez 2012/02/19 22:34:22 nit: Suggest "A code identifying the key by a USB
garykac 2012/02/21 18:42:21 Done.
+ // the USB key code for this event. See the "Keyboard/Keypad Page (0x07)" of
+ // the "USB HID Usage Tables" document for encoding details.
+ uint32_t usb_key_code;
+
+ // Required for consistent 64-bit alignment on all platforms.
+ uint32_t unused_padding;
};
// Make sure that the size is consistent across platforms, so the alignment is
// consistent. Note the fields above are carefully ordered to make sure it is
@@ -39,7 +47,7 @@ struct InputEventData {
// and alignment. TODO(dmichael): This is only required because we don't pickle
// the type. As a short-cut, we memcpy it instead. It would be cleaner to
// pickle this struct.
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(InputEventData, 64);
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(InputEventData, 72);
} // namespace ppapi_proxy

Powered by Google App Engine
This is Rietveld 408576698