Chromium Code Reviews| Index: Source/modules/webusb/USBAlternateInterface.h |
| diff --git a/Source/modules/webusb/USBAlternateInterface.h b/Source/modules/webusb/USBAlternateInterface.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ccbe6e08d92dd3070ec676ccedcb0ada6adb4db2 |
| --- /dev/null |
| +++ b/Source/modules/webusb/USBAlternateInterface.h |
| @@ -0,0 +1,44 @@ |
| +// 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 USBAlternateInterface_h |
| +#define USBAlternateInterface_h |
| + |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "platform/heap/Heap.h" |
| +#include "public/platform/modules/webusb/WebUSBDeviceInfo.h" |
| + |
| +namespace blink { |
| + |
| +class USBEndpoint; |
| +class USBInterface; |
| + |
| +class USBAlternateInterface |
| + : public GarbageCollected<USBAlternateInterface> |
| + , public ScriptWrappable { |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + static USBAlternateInterface* create(const USBInterface*, size_t alternateIndex); |
|
Reilly Grant (use Gerrit)
2015/07/28 22:51:42
alternateIndex != alternateSetting so be careful i
Ken Rockot(use gerrit already)
2015/07/28 23:21:39
Acknowledged. We may want to change constructors t
|
| + |
| + USBAlternateInterface(const USBInterface*, size_t alternateIndex); |
| + |
| + const WebUSBDeviceInfo::AlternateInterface& info() const; |
| + |
| + uint8_t alternateSetting() const; |
| + uint8_t interfaceClass() const; |
| + uint8_t interfaceSubclass() const; |
| + uint8_t interfaceProtocol() const; |
| + String interfaceName() const; |
| + HeapVector<Member<USBEndpoint>> endpoints() const; |
| + |
| + DECLARE_TRACE(); |
| + |
| +private: |
| + Member<const USBInterface> m_interface; |
| + size_t m_alternateIndex; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // USBAlternateInterface_h |