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

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

Issue 1284033002: WebUSB bindings part 5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « public/platform/modules/webusb/WebUSBClient.h ('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 WebUSBTransferInfo_h 5 #ifndef WebUSBTransferInfo_h
6 #define WebUSBTransferInfo_h 6 #define WebUSBTransferInfo_h
7 7
8 #include "public/platform/WebVector.h" 8 #include "public/platform/WebVector.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 struct WebUSBTransferInfo { 12 struct WebUSBTransferInfo {
13 enum class Status { 13 enum class Status {
14 Ok, 14 Ok,
15 Stall, 15 Stall,
16 Babble, 16 Babble,
17 }; 17 };
18 18
19 WebUSBTransferInfo() 19 WebUSBTransferInfo()
20 : status(StatusOk) 20 : status(Status::Ok)
21 , bytesWritten(0) 21 , bytesWritten(0)
22 { 22 {
23 } 23 }
24 24
25 Status status; 25 Status status;
26 26
27 // Data received, if this is an inbound transfer. 27 // Data received, if this is an inbound transfer.
28 WebVector<uint8_t> data; 28 WebVector<uint8_t> data;
29 29
30 // Number of bytes written if this is an outbound transfer. 30 // Number of bytes written if this is an outbound transfer.
31 uint32_t bytesWritten; 31 uint32_t bytesWritten;
32 }; 32 };
33 33
34 } // namespace blink 34 } // namespace blink
35 35
36 #endif // WebUSBTransferInfo_h 36 #endif // WebUSBTransferInfo_h
OLDNEW
« no previous file with comments | « public/platform/modules/webusb/WebUSBClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698