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

Unified Diff: webkit/plugins/ppapi/usb_key_code_conversion.h

Issue 9608011: Update Linux nativeKeyCode to USB keycode conversion table. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update LOG and comments Created 8 years, 9 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/usb_key_code_conversion.h
diff --git a/webkit/plugins/ppapi/usb_key_code_conversion.h b/webkit/plugins/ppapi/usb_key_code_conversion.h
index fc3da163c2c0f7ad85caabb4f6a853de4f27bbcf..b37ad42be118f227fa8a2b144737888f4d295d05 100644
--- a/webkit/plugins/ppapi/usb_key_code_conversion.h
+++ b/webkit/plugins/ppapi/usb_key_code_conversion.h
@@ -21,6 +21,14 @@ namespace ppapi {
// is returned.
uint32_t UsbKeyCodeForKeyboardEvent(const WebKit::WebKeyboardEvent& key_event);
+// Compile time check to verify that the given array (of type CTYPENAME) has
+// exactly SIZE elements.
+#define COMPILE_ASSERT_ARRAY_SIZE(NAME, CTYPENAME, SIZE) \
+struct Dummy_Struct_For_##NAME { \
+char _COMPILE_ASSERT_FAILED_The_array_named_ \
+## NAME ## _does_not_have_ ## SIZE ## \
+_elements[(sizeof(NAME) == (SIZE * sizeof(CTYPENAME))) ? 1 : -1]; }
Wez 2012/03/07 23:25:18 PPAPI headers already use macros of this sort; can
dmichael (off chromium) 2012/03/07 23:45:07 since here we're free to use things in base, it wo
garykac 2012/03/14 13:47:47 Done.
+
} // namespace ppapi
} // namespace webkit

Powered by Google App Engine
This is Rietveld 408576698