Chromium Code Reviews| 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..6864192796a4fcf9249bc6a2218745d825b4d753 100644 |
| --- a/device/gamepad/public/interfaces/gamepad.mojom |
| +++ b/device/gamepad/public/interfaces/gamepad.mojom |
| @@ -49,3 +49,19 @@ 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 |
| +// gamepad_hardware_buffer.h for a description of how synchronization is |
| +// handled. The number of Starts should match the number of Stops. |
| +interface GamepadMonitor { |
| + [Sync] |
| + GamepadStartPolling() => (handle<shared_buffer> memory_handle); |
| + GamepadStopPolling(); |
|
blundell
2016/12/01 16:01:26
Did you reason about whether this one should be sy
ke.he
2016/12/02 13:20:47
It should be Sync as it was in the old impl. Thank
|
| + SetObserver(GamepadObserver gamepad_observer); |
| +}; |