Index: device/gamepad/public/interfaces/gamepad.mojom |
diff --git a/device/gamepad/public/interfaces/gamepad.mojom b/device/gamepad/public/interfaces/gamepad.mojom |
index 5fbd79f824f7edeb38b6a30801bdaad273c8f7e7..8632387038a3166bc3895590c0604d15eb8488e1 100644 |
--- a/device/gamepad/public/interfaces/gamepad.mojom |
+++ b/device/gamepad/public/interfaces/gamepad.mojom |
@@ -49,3 +49,22 @@ struct Gamepad { |
GamepadHand hand; |
uint32 display_id; |
}; |
+ |
+interface GamepadObserver { |
+ GamepadConnected(int32 index, Gamepad gamepad); |
+ GamepadDisconnected(int32 index, Gamepad gamepad); |
+}; |
+ |
+// Asks the browser process to start polling, and return a shared memory |
+// handles that will hold the data from the hardware. See |
Tom Sepez
2016/12/06 17:53:40
nit: handle that
ke.he
2016/12/07 08:05:10
Done.
|
+// gamepad_hardware_buffer.h for a description of how synchronization is |
+// handled. The number of Starts should match the number of Stops. |
Tom Sepez
2016/12/06 17:53:40
nit: or what happens if they don't? Does the brow
ke.he
2016/12/07 08:05:10
Hi, Tom Sepez, Thanks very much for considering th
|
+interface GamepadMonitor { |
+ [Sync] |
+ GamepadStartPolling() => (handle<shared_buffer> memory_handle); |
+ |
+ [Sync] |
+ GamepadStopPolling() => (); |
+ |
+ SetObserver(GamepadObserver gamepad_observer); |
+}; |