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

Side by Side Diff: public/platform/modules/webusb/WebUSBDeviceInfo.h

Issue 1252913014: WebUSB bindings part 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update expeced interface listing 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/USBInterface.idl ('k') | no next file » | 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 #ifndef WebUSBDeviceInfo_h 5 #ifndef WebUSBDeviceInfo_h
6 #define WebUSBDeviceInfo_h 6 #define WebUSBDeviceInfo_h
7 7
8 #include "public/platform/WebString.h" 8 #include "public/platform/WebString.h"
9 #include "public/platform/WebVector.h"
10 #include "public/platform/modules/webusb/WebUSBDevice.h"
9 11
10 namespace blink { 12 namespace blink {
11 13
12 struct WebUSBDeviceInfo { 14 struct WebUSBDeviceInfo {
15 struct Interface {
16 Interface()
17 : interfaceNumber(0)
18 {
19 }
20
21 uint8_t interfaceNumber;
22 // WebVector<AlternateInterface> alternates;
23 };
24
25 struct Configuration {
26 Configuration()
27 : configurationValue(0)
28 {
29 }
30
31 uint8_t configurationValue;
32 WebString configurationName;
33 WebVector<Interface> interfaces;
34 };
35
36 WebUSBDeviceInfo()
37 : usbVersionMajor(0)
38 , usbVersionMinor(0)
39 , usbVersionSubminor(0)
40 , deviceClass(0)
41 , deviceSubclass(0)
42 , deviceProtocol(0)
43 , vendorID(0)
44 , productID(0)
45 , deviceVersionMajor(0)
46 , deviceVersionMinor(0)
47 , deviceVersionSubminor(0)
48 {
49 }
50
13 WebString guid; 51 WebString guid;
14 uint8_t usbVersionMajor; 52 uint8_t usbVersionMajor;
15 uint8_t usbVersionMinor; 53 uint8_t usbVersionMinor;
16 uint8_t usbVersionSubminor; 54 uint8_t usbVersionSubminor;
17 uint8_t deviceClass; 55 uint8_t deviceClass;
18 uint8_t deviceSubclass; 56 uint8_t deviceSubclass;
19 uint8_t deviceProtocol; 57 uint8_t deviceProtocol;
20 uint16_t vendorID; 58 uint16_t vendorID;
21 uint16_t productID; 59 uint16_t productID;
22 uint8_t deviceVersionMajor; 60 uint8_t deviceVersionMajor;
23 uint8_t deviceVersionMinor; 61 uint8_t deviceVersionMinor;
24 uint8_t deviceVersionSubminor; 62 uint8_t deviceVersionSubminor;
25 WebString manufacturerName; 63 WebString manufacturerName;
26 WebString productName; 64 WebString productName;
27 WebString serialNumber; 65 WebString serialNumber;
66 WebVector<Configuration> configurations;
28 }; 67 };
29 68
30 } // namespace blink 69 } // namespace blink
31 70
32 #endif // WebUSBDeviceInfo_h 71 #endif // WebUSBDeviceInfo_h
OLDNEW
« 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