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

Unified Diff: Source/modules/webusb/USBEndpoint.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: Source/modules/webusb/USBEndpoint.h
diff --git a/Source/modules/webusb/USBEndpoint.h b/Source/modules/webusb/USBEndpoint.h
new file mode 100644
index 0000000000000000000000000000000000000000..1018d12c4b8567133d7125b9a2538d366bd06155
--- /dev/null
+++ b/Source/modules/webusb/USBEndpoint.h
@@ -0,0 +1,41 @@
+// 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 USBEndpoint_h
+#define USBEndpoint_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/Heap.h"
+#include "public/platform/modules/webusb/WebUSBDeviceInfo.h"
+
+namespace blink {
+
+class USBAlternateInterface;
+
+class USBEndpoint
+ : public GarbageCollected<USBEndpoint>
+ , public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static USBEndpoint* create(const USBAlternateInterface*, size_t endpointIndex);
+
+ USBEndpoint(const USBAlternateInterface*, size_t endpointIndex);
+
+ const WebUSBDeviceInfo::Endpoint& info() const;
+
+ uint8_t endpointNumber() const;
+ String direction() const;
+ String type() const;
+ unsigned packetSize() const;
+
+ DECLARE_TRACE();
+
+private:
+ Member<const USBAlternateInterface> m_alternate;
+ size_t m_endpointIndex;
+};
+
+} // namespace blink
+
+#endif // USBEndpoint_h

Powered by Google App Engine
This is Rietveld 408576698