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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/modules/webusb/USBDevice.cpp ('k') | Source/modules/webusb/USBInTransferResult.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // http://reillyeon.github.io/webusb/#idl-def-usbtransferstatus
6
7 enum USBTransferStatus {
8 "ok",
9 "stall",
10 "babble"
11 };
12
5 // http://reillyeon.github.io/webusb/#device-usage 13 // http://reillyeon.github.io/webusb/#device-usage
6 14
7 [ 15 [
8 GarbageCollected, 16 GarbageCollected,
9 RuntimeEnabled=WebUSB, 17 RuntimeEnabled=WebUSB,
10 ] interface USBDevice { 18 ] interface USBDevice {
11 readonly attribute DOMString guid; 19 readonly attribute DOMString guid;
12 readonly attribute octet usbVersionMajor; 20 readonly attribute octet usbVersionMajor;
13 readonly attribute octet usbVersionMinor; 21 readonly attribute octet usbVersionMinor;
14 readonly attribute octet usbVersionSubminor; 22 readonly attribute octet usbVersionSubminor;
15 readonly attribute octet deviceClass; 23 readonly attribute octet deviceClass;
16 readonly attribute octet deviceSubclass; 24 readonly attribute octet deviceSubclass;
17 readonly attribute octet deviceProtocol; 25 readonly attribute octet deviceProtocol;
18 readonly attribute unsigned short vendorId; 26 readonly attribute unsigned short vendorId;
19 readonly attribute unsigned short productId; 27 readonly attribute unsigned short productId;
20 readonly attribute octet deviceVersionMajor; 28 readonly attribute octet deviceVersionMajor;
21 readonly attribute octet deviceVersionMinor; 29 readonly attribute octet deviceVersionMinor;
22 readonly attribute octet deviceVersionSubminor; 30 readonly attribute octet deviceVersionSubminor;
23 readonly attribute DOMString? manufacturerName; 31 readonly attribute DOMString? manufacturerName;
24 readonly attribute DOMString? productName; 32 readonly attribute DOMString? productName;
25 readonly attribute DOMString? serialNumber; 33 readonly attribute DOMString? serialNumber;
26 readonly attribute sequence<USBConfiguration> configurations; 34 readonly attribute sequence<USBConfiguration> configurations;
35
36 [CallWith=ScriptState] Promise<void> open();
37 [CallWith=ScriptState] Promise<void> close();
38 [CallWith=ScriptState] Promise<void> setConfiguration(octet configurationVal ue);
39 [CallWith=ScriptState] Promise<void> claimInterface(octet interfaceNumber);
40 [CallWith=ScriptState] Promise<void> releaseInterface(octet interfaceNumber) ;
41 [CallWith=ScriptState] Promise<void> setInterface(octet interfaceNumber, oct et alternateSetting);
42 [CallWith=ScriptState] Promise<USBInTransferResult> controlTransferIn(USBCon trolTransferParameters setup, unsigned short length);
43 [CallWith=ScriptState] Promise<USBOutTransferResult> controlTransferOut(USBC ontrolTransferParameters setup, optional BufferSource data);
44 [CallWith=ScriptState] Promise<void> clearHalt(octet endpointNumber);
45 [CallWith=ScriptState] Promise<USBInTransferResult> transferIn(octet endpoin tNumber, unsigned long length);
46 [CallWith=ScriptState] Promise<USBOutTransferResult> transferOut(octet endpo intNumber, BufferSource data);
47 [CallWith=ScriptState] Promise<void> reset();
27 }; 48 };
OLDNEW
« 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