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

Unified Diff: third_party/WebKit/public/platform/WebGamepad.h

Issue 2300883003: Added Hand attribute to Gamepad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gamepad_pose
Patch Set: Address haraken@'s feedback Created 4 years, 3 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: third_party/WebKit/public/platform/WebGamepad.h
diff --git a/third_party/WebKit/public/platform/WebGamepad.h b/third_party/WebKit/public/platform/WebGamepad.h
index 7d9dda556c6a58e9bad76c375f06edd8b1ab59a0..cddc011653c3eb156fa237477ee492c0165753b2 100644
--- a/third_party/WebKit/public/platform/WebGamepad.h
+++ b/third_party/WebKit/public/platform/WebGamepad.h
@@ -91,6 +91,12 @@ public:
WebGamepadVector linearAcceleration;
};
+enum WebGamepadHand {
+ GamepadHandNone = 0,
+ GamepadHandLeft = 1,
+ GamepadHandRight = 2
+};
+
// This structure is intentionally POD and fixed size so that it can be shared
// memory between hardware polling threads and the rest of the browser. See
// also WebGamepads.h.
@@ -137,9 +143,9 @@ public:
WebUChar mapping[mappingLengthCap];
WebGamepadPose pose;
-};
-static_assert(sizeof(WebGamepad) == 838, "WebGamepad has wrong size");
+ WebGamepadHand hand;
+};
#pragma pack(pop)
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp ('k') | third_party/WebKit/public/platform/WebGamepads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698