Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: device/gamepad/public/interfaces/gamepad.mojom

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: remove useless Fuzztraits<blink::WebGamepad> Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+};

Powered by Google App Engine
This is Rietveld 408576698