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

Unified Diff: ppapi/shared_impl/ppb_gamepad_shared.h

Issue 2300543003: Added Pose attribute to Gamepad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gamepad_touched
Patch Set: Rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/gamepad/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_gamepad_shared.h
diff --git a/ppapi/shared_impl/ppb_gamepad_shared.h b/ppapi/shared_impl/ppb_gamepad_shared.h
index 8cf8cfb0fb57c7e07d27ccfeb4aeef1fbe527d53..ae06bf2605a3c6522b7d422843657ae9469b770d 100644
--- a/ppapi/shared_impl/ppb_gamepad_shared.h
+++ b/ppapi/shared_impl/ppb_gamepad_shared.h
@@ -25,6 +25,30 @@ struct WebKitGamepadButton {
double value;
};
+struct WebKitGamepadVector {
+ bool notNull;
+ float x, y, z;
+};
+
+struct WebKitGamepadQuaternion {
+ bool notNull;
+ float x, y, z, w;
+};
+
+struct WebKitGamepadPose {
+ bool notNull;
+
+ bool hasOrientation;
+ bool hasPosition;
+
+ WebKitGamepadQuaternion orientation;
+ WebKitGamepadVector position;
+ WebKitGamepadVector angularVelocity;
+ WebKitGamepadVector linearVelocity;
+ WebKitGamepadVector angularAcceleration;
+ WebKitGamepadVector linearAcceleration;
+};
+
// This must match the definition of blink::Gamepad. The GamepadHost unit test
// has some compile asserts to validate this.
struct WebKitGamepad {
@@ -57,6 +81,8 @@ struct WebKitGamepad {
// Mapping type (for example "standard")
base::char16 mapping[kMappingLengthCap];
+
+ WebKitGamepadPose pose;
};
// This must match the definition of blink::Gamepads. The GamepadHost unit
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/gamepad/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698