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

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

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: code rebase 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
« no previous file with comments | « device/gamepad/gamepad_provider.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+};
« no previous file with comments | « device/gamepad/gamepad_provider.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698