| 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..58e2c6d6a6938d8146a1b605834c12ff6e60df1c 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
|
| +// handle 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);
|
| +
|
| + [Sync]
|
| + GamepadStopPolling() => ();
|
| +
|
| + SetObserver(GamepadObserver gamepad_observer);
|
| +};
|
|
|