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

Side by Side 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 unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool connected; 42 bool connected;
43 array<uint16> id; 43 array<uint16> id;
44 uint64 timestamp; 44 uint64 timestamp;
45 array<double> axes; 45 array<double> axes;
46 array<GamepadButton> buttons; 46 array<GamepadButton> buttons;
47 array<uint16> mapping; 47 array<uint16> mapping;
48 GamepadPose? pose; 48 GamepadPose? pose;
49 GamepadHand hand; 49 GamepadHand hand;
50 uint32 display_id; 50 uint32 display_id;
51 }; 51 };
52
53 interface GamepadObserver {
54 GamepadConnected(int32 index, Gamepad gamepad);
55 GamepadDisconnected(int32 index, Gamepad gamepad);
56 };
57
58 // Asks the browser process to start polling, and return a shared memory
59 // 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.
60 // gamepad_hardware_buffer.h for a description of how synchronization is
61 // 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
62 interface GamepadMonitor {
63 [Sync]
64 GamepadStartPolling() => (handle<shared_buffer> memory_handle);
65
66 [Sync]
67 GamepadStopPolling() => ();
68
69 SetObserver(GamepadObserver gamepad_observer);
70 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698