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

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: More header updates to fix all presubmit problems. 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..2f0bce2d44adaa93df894f1c3d1d39eec1c5854d 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,6 +1,6 @@
-// Copyright 2011 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.
+// Copyright (c) 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.
#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
@@ -32,6 +32,14 @@ struct InputEventData {
PP_Bool wheel_scroll_by_page;
uint32_t key_code;
+
+ // A code for identifying the key by a USB Usage Page (upper 16-bits) and
+ // Usage Id (lower 16-bits). 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
« no previous file with comments | « ppapi/c/dev/ppb_keyboard_input_event_dev.h ('k') | ppapi/native_client/src/shared/ppapi_proxy/input_event_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698