| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module device.mojom; | 5 module device.mojom; |
| 6 | 6 |
| 7 struct GamepadQuaternion { | 7 struct GamepadQuaternion { |
| 8 float x; | 8 float x; |
| 9 float y; | 9 float y; |
| 10 float z; | 10 float z; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 uint32 display_id; | 50 uint32 display_id; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 interface GamepadObserver { | 53 interface GamepadObserver { |
| 54 GamepadConnected(int32 index, Gamepad gamepad); | 54 GamepadConnected(int32 index, Gamepad gamepad); |
| 55 GamepadDisconnected(int32 index, Gamepad gamepad); | 55 GamepadDisconnected(int32 index, Gamepad gamepad); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // Asks the browser process to start polling, and return a shared memory | 58 // Asks the browser process to start polling, and return a shared memory |
| 59 // handle that will hold the data from the hardware. See | 59 // handle that will hold the data from the hardware. See |
| 60 // gamepad_hardware_buffer.h for a description of how synchronization is | 60 // gamepad_shared_buffer.h for a description of how synchronization is |
| 61 // handled. The number of Starts should match the number of Stops. | 61 // handled. The number of Starts should match the number of Stops. |
| 62 interface GamepadMonitor { | 62 interface GamepadMonitor { |
| 63 [Sync] | 63 [Sync] |
| 64 GamepadStartPolling() => (handle<shared_buffer> memory_handle); | 64 GamepadStartPolling() => (handle<shared_buffer> memory_handle); |
| 65 | 65 |
| 66 [Sync] | 66 [Sync] |
| 67 GamepadStopPolling() => (); | 67 GamepadStopPolling() => (); |
| 68 | 68 |
| 69 SetObserver(GamepadObserver gamepad_observer); | 69 SetObserver(GamepadObserver gamepad_observer); |
| 70 }; | 70 }; |
| OLD | NEW |