| 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
|
| +// 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);
|
| +};
|
|
|