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

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: 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 | « Source/modules/webusb/USBDeviceFilter.idl ('k') | Source/modules/webusb/USBEndpoint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ae83757a9f1be8243a7f4f566366abeddcad8e52
--- /dev/null
+++ b/Source/modules/webusb/USBEndpoint.h
@@ -0,0 +1,43 @@
+// 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 ExceptionState;
+class USBAlternateInterface;
+
+class USBEndpoint
+ : public GarbageCollected<USBEndpoint>
+ , public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static USBEndpoint* create(const USBAlternateInterface*, size_t endpointIndex);
+ static USBEndpoint* create(const USBAlternateInterface*, size_t endpointIndex, ExceptionState&);
+
+ 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
« no previous file with comments | « Source/modules/webusb/USBDeviceFilter.idl ('k') | Source/modules/webusb/USBEndpoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698