Chromium Code Reviews| 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); |
|
Reilly Grant (use Gerrit)
2015/07/28 22:51:43
endpointIndex != endpointNumber so be careful if y
Ken Rockot(use gerrit already)
2015/07/28 23:21:39
Acknowledged.
|
| + |
| + 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 |