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

Unified Diff: chrome/common/extensions/api/hid.idl

Issue 161823002: Clean up HID backend and API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months 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 | « chrome/chrome_browser_extensions.gypi ('k') | device/hid/hid_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/hid.idl
diff --git a/chrome/common/extensions/api/hid.idl b/chrome/common/extensions/api/hid.idl
index 6923a3ab940329638f58a2be779d1e8f0933d089..d92a063d1c90de7ca91058e33c79e83ec2e5f93d 100644
--- a/chrome/common/extensions/api/hid.idl
+++ b/chrome/common/extensions/api/hid.idl
@@ -10,7 +10,7 @@ namespace hid {
// Returned by <code>getDevices</code> functions to describes a connected HID
// device. Use <code>connect</code> to connect to any of the returned devices.
dictionary HidDeviceInfo {
- DOMString path;
+ long deviceId;
long vendorId;
long productId;
};
@@ -46,9 +46,9 @@ namespace hid {
GetDevicesCallback callback);
// Open a connection to an HID device for communication.
- // |deviceInfo|: The device to open.
+ // |deviceId|: The ID of the device to open.
// |callback|: Invoked with an <code>HidConnectInfo</code>.
- static void connect(HidDeviceInfo deviceInfo,
+ static void connect(long deviceId,
ConnectCallback callback);
// Disconnect from a device. Invoking operations on a device after calling
@@ -74,18 +74,22 @@ namespace hid {
// Control endpoint.
//
// |connectionId|: The connection to which to send a report.
+ // |reportId|: The report ID to use, or <code>0</code> if none.
// |data|: The report data.
// |callback|: The callback to invoke once the write is finished.
static void send(long connectionId,
+ long reportId,
ArrayBuffer data,
SendCallback callback);
// Receive a Feature report from the device.
//
// |connectionId|: The connection to read Input report from.
+ // |reportId|: The report ID, or zero if none.
// |size|: The size of the Feature report to receive.
// |callback|: The callback to invoke once the write is finished.
static void receiveFeatureReport(long connectionId,
+ long reportId,
long size,
ReceiveCallback callback);
@@ -94,9 +98,11 @@ namespace hid {
// Feature reports are sent over the Control endpoint as a Set_Report
// transfer.
// |connectionId|: The connection to read Input report from.
+ // |reportId|: The report ID to use, or <code>0</code> if none.
// |data|: The report data.
// |callback|: The callback to invoke once the write is finished.
static void sendFeatureReport(long connectionId,
+ long reportId,
ArrayBuffer data,
SendCallback callback);
};
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | device/hid/hid_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698