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

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

Issue 514923002: Add more generic filters to the chrome.hid.getDevices API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put static on its own line. Created 6 years, 4 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 | « extensions/browser/api/hid/hid_device_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/api/hid.idl
diff --git a/extensions/common/api/hid.idl b/extensions/common/api/hid.idl
index c6bb316311968db0d462bea3e9e8464635854e3a..11ee6b97b48a6cd1e74ae4c586703b447ad0a594 100644
--- a/extensions/common/api/hid.idl
+++ b/extensions/common/api/hid.idl
@@ -42,10 +42,19 @@ namespace hid {
long connectionId;
};
- // Searching criteria to enumerate devices with.
+ // Device matching criteria.
+ dictionary HidDeviceFilter {
+ long? vendorId;
+ long? productId;
+ long? usagePage;
+ long? usage;
+ };
+
+ // Options passed to <code>getDevices</code>.
dictionary GetDevicesOptions {
- long vendorId;
- long productId;
+ long? vendorId;
+ long? productId;
+ HidDeviceFilter[]? filters;
not at google - send to devlin 2014/08/28 23:12:08 Are you leaving |vendorId| and |productId| in this
Reilly Grant (use Gerrit) 2014/08/28 23:13:09 Yes, the implementation creates a filter to model
not at google - send to devlin 2014/08/28 23:18:36 It's a shame to see the HID API reach this far and
};
callback GetDevicesCallback = void (HidDeviceInfo[] devices);
« no previous file with comments | « extensions/browser/api/hid/hid_device_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698