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

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: iface ctors, OWNERS, rebase 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
« no previous file with comments | « public/platform/modules/webusb/WebUSBError.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..811dec3559b2876a68c666170cbfa4edb434d026
--- /dev/null
+++ b/public/platform/modules/webusb/WebUSBTransferInfo.h
@@ -0,0 +1,37 @@
+// 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,
+ StatusStall,
+ StatusBabble,
+ };
+
+ WebUSBTransferInfo()
+ : status(StatusOk)
+ , bytesWritten(0)
+ {
+ }
+
+ Status status;
+
+ // Data received, if this is an inbound transfer.
+ WebVector<uint8_t> data;
+
+ // Number of bytes written if this is an outbound transfer.
+ uint32_t bytesWritten;
+};
+
+} // namespace blink
+
+#endif // WebUSBTransferInfo_h
« no previous file with comments | « public/platform/modules/webusb/WebUSBError.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698