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

Unified Diff: Source/modules/webusb/USBDevice.idl

Issue 1315683002: WebUSB bindings part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remote USBTransferStatus.idl Created 5 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 | « Source/modules/webusb/USBDevice.cpp ('k') | Source/modules/webusb/USBInTransferResult.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webusb/USBDevice.idl
diff --git a/Source/modules/webusb/USBDevice.idl b/Source/modules/webusb/USBDevice.idl
index 7a6d2f465d5d4931428d5687357853a915fb3765..15fc05cdbe5bd1e7c01f49c051e7edc194652941 100644
--- a/Source/modules/webusb/USBDevice.idl
+++ b/Source/modules/webusb/USBDevice.idl
@@ -2,6 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// http://reillyeon.github.io/webusb/#idl-def-usbtransferstatus
+
+enum USBTransferStatus {
+ "ok",
+ "stall",
+ "babble"
+};
+
// http://reillyeon.github.io/webusb/#device-usage
[
@@ -24,4 +32,17 @@
readonly attribute DOMString? productName;
readonly attribute DOMString? serialNumber;
readonly attribute sequence<USBConfiguration> configurations;
+
+ [CallWith=ScriptState] Promise<void> open();
+ [CallWith=ScriptState] Promise<void> close();
+ [CallWith=ScriptState] Promise<void> setConfiguration(octet configurationValue);
+ [CallWith=ScriptState] Promise<void> claimInterface(octet interfaceNumber);
+ [CallWith=ScriptState] Promise<void> releaseInterface(octet interfaceNumber);
+ [CallWith=ScriptState] Promise<void> setInterface(octet interfaceNumber, octet alternateSetting);
+ [CallWith=ScriptState] Promise<USBInTransferResult> controlTransferIn(USBControlTransferParameters setup, unsigned short length);
+ [CallWith=ScriptState] Promise<USBOutTransferResult> controlTransferOut(USBControlTransferParameters setup, optional BufferSource data);
+ [CallWith=ScriptState] Promise<void> clearHalt(octet endpointNumber);
+ [CallWith=ScriptState] Promise<USBInTransferResult> transferIn(octet endpointNumber, unsigned long length);
+ [CallWith=ScriptState] Promise<USBOutTransferResult> transferOut(octet endpointNumber, BufferSource data);
+ [CallWith=ScriptState] Promise<void> reset();
};
« no previous file with comments | « Source/modules/webusb/USBDevice.cpp ('k') | Source/modules/webusb/USBInTransferResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698