Index: extensions/common/api/hid.idl |
diff --git a/extensions/common/api/hid.idl b/extensions/common/api/hid.idl |
index c6bb316311968db0d462bea3e9e8464635854e3a..e93f9c256485562fa2ca735326fcdf4b95b23416 100644 |
--- a/extensions/common/api/hid.idl |
+++ b/extensions/common/api/hid.idl |
@@ -42,10 +42,27 @@ namespace hid { |
long connectionId; |
}; |
- // Searching criteria to enumerate devices with. |
+ // Device matching criteria. |
+ dictionary DeviceFilter { |
+ long? vendorId; |
+ // (checked only if the vendor ID matches) |
+ long? productId; |
+ long? usagePage; |
+ // (checked only if the HID usage page matches) |
not at google - send to devlin
2014/08/29 00:26:26
This is all going to be generated as https://devel
|
+ long? usage; |
+ }; |
+ |
+ // Options passed to <code>getDevices</code>. |
dictionary GetDevicesOptions { |
- long vendorId; |
- long productId; |
+ // <b>Note:</b> Deprecated, equivalent to a filter with |
+ // <code>vendorId</code> set. |
+ long? vendorId; |
not at google - send to devlin
2014/08/29 00:26:26
There's a deprecated annotation:
[deprecated=Use
|
+ // <b>Note:</b> Deprecated, equivalent to a filter with |
+ // <code>productId</code> set. |
+ long? productId; |
+ // Devices matching any of the given filters will be returned. Providing an |
+ // empty filter list will return all devices the app has permission for. |
+ DeviceFilter[]? filters; |
}; |
callback GetDevicesCallback = void (HidDeviceInfo[] devices); |
@@ -67,8 +84,7 @@ namespace hid { |
callback SendCallback = void(); |
interface Functions { |
- // Enumerate all the connected HID devices specified by the vendorId/ |
- // productId/interfaceId tuple. |
+ // Enumerate all the connected HID devices matching the given properties. |
// |options|: The properties to search for on target devices. |
// |callback|: Invoked with the <code>HidDeviceInfo</code> array on success. |
static void getDevices(GetDevicesOptions options, |