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

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

Issue 599303004: Add getUserSelectedDevices to the USB extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: extensions/common/api/usb.idl
diff --git a/extensions/common/api/usb.idl b/extensions/common/api/usb.idl
index af6d55054c261a7b123e729536c8fda7414e36c6..a03d335fd26ae350548cbc1ec878dbefa49c7989 100644
--- a/extensions/common/api/usb.idl
+++ b/extensions/common/api/usb.idl
@@ -186,7 +186,7 @@ namespace usb {
// will return all devices the app has permission for.
DeviceFilter[]? filters;
};
-
+
dictionary EnumerateDevicesAndRequestAccessOptions {
// The device vendor ID.
long vendorId;
@@ -214,6 +214,19 @@ namespace usb {
static void getDevices(EnumerateDevicesOptions options,
GetDevicesCallback callback);
+ // Presents a device picker to the user and returns the $(ref:Device)s
+ // selected.
+ // If the user cancels the picker devices will be empty. A user gesture
+ // is required for the dialog to display. Without a user gesture, the
+ // callback will run as though the user cancelled. If multiple filters are
+ // provided devices matching any filter will be displayed.
+ // |multiple|: Sets whether a user is allowed to select multiple devices.
+ // |filters|: Devices to present to the user.
+ // |callback|: Invoked with a list of chosen $(ref:Device)s.
+ static void getUserSelectedDevices(boolean multiple,
+ DeviceFilter[] filters,
+ GetDevicesCallback callback);
+
// Requests access from the permission broker to a device claimed by
// ChromeOS if the given interface on the device is not claimed.
//

Powered by Google App Engine
This is Rietveld 408576698