OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef USBAlternateInterface_h |
| 6 #define USBAlternateInterface_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Heap.h" |
| 10 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class ExceptionState; |
| 15 class USBEndpoint; |
| 16 class USBInterface; |
| 17 |
| 18 class USBAlternateInterface |
| 19 : public GarbageCollected<USBAlternateInterface> |
| 20 , public ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: |
| 23 static USBAlternateInterface* create(const USBInterface*, size_t alternateIn
dex); |
| 24 static USBAlternateInterface* create(const USBInterface*, size_t alternateIn
dex, ExceptionState&); |
| 25 |
| 26 USBAlternateInterface(const USBInterface*, size_t alternateIndex); |
| 27 |
| 28 const WebUSBDeviceInfo::AlternateInterface& info() const; |
| 29 |
| 30 uint8_t alternateSetting() const; |
| 31 uint8_t interfaceClass() const; |
| 32 uint8_t interfaceSubclass() const; |
| 33 uint8_t interfaceProtocol() const; |
| 34 String interfaceName() const; |
| 35 HeapVector<Member<USBEndpoint>> endpoints() const; |
| 36 |
| 37 DECLARE_TRACE(); |
| 38 |
| 39 private: |
| 40 Member<const USBInterface> m_interface; |
| 41 size_t m_alternateIndex; |
| 42 }; |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif // USBAlternateInterface_h |
OLD | NEW |