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

Unified Diff: public/platform/modules/webusb/WebUSBDeviceInfo.h

Issue 1270983002: WebUSB bindings part 4 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: punctuation 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/USBInterface.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/modules/webusb/WebUSBDeviceInfo.h
diff --git a/public/platform/modules/webusb/WebUSBDeviceInfo.h b/public/platform/modules/webusb/WebUSBDeviceInfo.h
index 3371a4229682a1156f789fa3f249cbbfa33a23d4..a2c049db7911f9389cea7a722f0f1b8e3aab679b 100644
--- a/public/platform/modules/webusb/WebUSBDeviceInfo.h
+++ b/public/platform/modules/webusb/WebUSBDeviceInfo.h
@@ -12,6 +12,44 @@
namespace blink {
struct WebUSBDeviceInfo {
+ struct Endpoint {
+ enum class Type {
+ Bulk,
+ Interrupt,
+ Isochronous
+ };
+
+ Endpoint()
+ : endpointNumber(0)
+ , direction(WebUSBDevice::TransferDirection::In)
+ , type(Type::Bulk)
+ , packetSize(0)
+ {
+ }
+
+ uint8_t endpointNumber;
+ WebUSBDevice::TransferDirection direction;
+ Type type;
+ uint32_t packetSize;
+ };
+
+ struct AlternateInterface {
+ AlternateInterface()
+ : alternateSetting(0)
+ , classCode(0)
+ , subclassCode(0)
+ , protocolCode(0)
+ {
+ }
+
+ uint8_t alternateSetting;
+ uint8_t classCode;
+ uint8_t subclassCode;
+ uint8_t protocolCode;
+ WebString interfaceName;
+ WebVector<Endpoint> endpoints;
+ };
+
struct Interface {
Interface()
: interfaceNumber(0)
@@ -19,7 +57,7 @@ struct WebUSBDeviceInfo {
}
uint8_t interfaceNumber;
- // WebVector<AlternateInterface> alternates;
+ WebVector<AlternateInterface> alternates;
};
struct Configuration {
« no previous file with comments | « Source/modules/webusb/USBInterface.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698