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

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

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: Convert Gamepad IPC messages into mojo interface. Created 4 years 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..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
Tom Sepez 2016/12/06 17:53:40 nit: handle that
ke.he 2016/12/07 08:05:10 Done.
+// gamepad_hardware_buffer.h for a description of how synchronization is
+// handled. The number of Starts should match the number of Stops.
Tom Sepez 2016/12/06 17:53:40 nit: or what happens if they don't? Does the brow
ke.he 2016/12/07 08:05:10 Hi, Tom Sepez, Thanks very much for considering th
+interface GamepadMonitor {
+ [Sync]
+ GamepadStartPolling() => (handle<shared_buffer> memory_handle);
+
+ [Sync]
+ GamepadStopPolling() => ();
+
+ SetObserver(GamepadObserver gamepad_observer);
+};

Powered by Google App Engine
This is Rietveld 408576698