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

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

Issue 1245363002: Add WebUSB bindings and client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: iface ctors, OWNERS, rebase Created 5 years, 5 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/USBDeviceEnumerationOptions.idl » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..6303000a807784c34ccba16b7968722cc4cf08e9
--- /dev/null
+++ b/Source/modules/webusb/USBDevice.idl
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+ GarbageCollected,
+ RuntimeEnabled=WebUSB,
+] interface USBDevice {
+ readonly attribute DOMString guid;
+ readonly attribute octet usbVersionMajor;
+ readonly attribute octet usbVersionMinor;
+ readonly attribute octet usbVersionSubminor;
+ readonly attribute octet deviceClass;
+ readonly attribute octet deviceSubclass;
+ readonly attribute octet deviceProtocol;
+ readonly attribute unsigned short vendorId;
+ readonly attribute unsigned short productId;
+ readonly attribute octet deviceVersionMajor;
+ readonly attribute octet deviceVersionMinor;
+ readonly attribute octet deviceVersionSubminor;
+ readonly attribute DOMString? manufacturerName;
+ readonly attribute DOMString? productName;
+ readonly attribute DOMString? serialNumber;
+ readonly attribute sequence<USBConfigurationInfo> 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 parameters, unsigned short length);
+ [CallWith=ScriptState] Promise<USBOutTransferResult> controlTransferOut(USBControlTransferParameters parameters, 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/USBDeviceEnumerationOptions.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698