Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 module device.mojom; | |
|
yzshen1
2016/11/14 21:13:17
Please add the copyright boilerplate.
ke.he
2016/11/15 10:55:18
Done.
| |
| 2 | |
| 3 struct WebGamepadQuaternion{ | |
|
blundell
2016/11/14 12:33:16
nit: "Web" is a Blink-ism that shouldn't be part o
ke.he
2016/11/15 10:55:18
I changed all the "WebGamepadxxx" into "Gamepadxxx
| |
| 4 bool notNull; | |
|
yzshen1
2016/11/14 21:13:17
please use naming format like this: not_null. (Her
yzshen1
2016/11/14 21:13:17
Could we use the nullable feature instead of an ex
ke.he
2016/11/15 10:55:18
Done.
ke.he
2016/11/15 10:55:18
Oh, it is not correct to just copy those webxxx st
| |
| 5 float x; | |
| 6 float y; | |
| 7 float z; | |
| 8 float w; | |
| 9 }; | |
| 10 | |
| 11 struct WebGamepadVector{ | |
| 12 bool notNull; | |
| 13 float x; | |
| 14 float y; | |
| 15 float z; | |
| 16 }; | |
| 17 | |
| 18 struct WebGamepadButton{ | |
| 19 bool pressed; | |
| 20 bool touched; | |
| 21 double value; | |
| 22 }; | |
| 23 | |
| 24 struct WebGamepadPose{ | |
| 25 bool notNull; | |
| 26 bool hasOrientation; | |
| 27 bool hasPosition; | |
| 28 WebGamepadQuaternion orientation; | |
| 29 WebGamepadVector position; | |
| 30 WebGamepadVector angularVelocity; | |
| 31 WebGamepadVector linearVelocity; | |
| 32 WebGamepadVector angularAcceleration; | |
| 33 WebGamepadVector linearAcceleration; | |
| 34 }; | |
| 35 | |
| 36 enum WebGamepadHand { | |
| 37 GamepadHandNone = 0, | |
| 38 GamepadHandLeft = 1, | |
| 39 GamepadHandRight = 2 | |
| 40 }; | |
| 41 | |
| 42 struct WebGamepad { | |
| 43 bool connected; | |
| 44 array<uint16, 128> id; //blink::WebGamepad::idLengthCap = 128 | |
| 45 uint64 timestamp; | |
| 46 uint32 axesLength; | |
| 47 array<double, 16> axes; //blink::WebGamepad::axesLengthCap = 16 | |
| 48 uint32 buttonsLength; | |
| 49 array<WebGamepadButton, 32> buttons; //blink::WebGamepad::buttonLengthCap = 32 | |
| 50 array<uint16, 16> mapping; //blink::WebGamepad::mappingLengthCap = 16 | |
| 51 WebGamepadPose pose; | |
| 52 WebGamepadHand hand; | |
| 53 uint32 displayId; | |
| 54 }; | |
| OLD | NEW |