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

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

Issue 1245363002: Add WebUSB bindings and client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: public/platform/modules/webusb/WebUSBTransferInfo.h
diff --git a/public/platform/modules/webusb/WebUSBTransferInfo.h b/public/platform/modules/webusb/WebUSBTransferInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..aeaf39da88cf4a9ce5b0608bfd5b17c36cd897f1
--- /dev/null
+++ b/public/platform/modules/webusb/WebUSBTransferInfo.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef WebUSBTransferInfo_h
+#define WebUSBTransferInfo_h
+
+#include "public/platform/WebVector.h"
+
+namespace blink {
+
+// Information about a completed USB transfer.
+struct WebUSBTransferInfo {
+ enum Status {
+ StatusOk,
+ StatusStalled,
+ StatusOverflow,
Reilly Grant (use Gerrit) 2015/07/23 23:24:08 Let's keep this consistent with the WebUSB API and
Ken Rockot(use gerrit already) 2015/07/28 22:30:38 Done. Also changed StatusStalled -> StatusStall
+ };
+
+ WebUSBTransferInfo()
+ : status(StatusOk)
+ {
+ }
+
+ Status status;
+
+ // Data received, if this is an inbound transfer.
+ WebVector<uint8_t> data;
+
+ // Number of bytes sent if this is an outbound transfer.
+ uint32_t bytesSent;
Reilly Grant (use Gerrit) 2015/07/23 23:24:08 bytesWritten to be consistent as well.
Ken Rockot(use gerrit already) 2015/07/28 22:30:38 Done.
+};
+
+} // namespace blink
+
+#endif // WebUSBTransferInfo_h

Powered by Google App Engine
This is Rietveld 408576698