| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef USBInterface_h | 5 #ifndef USBInterface_h |
| 6 #define USBInterface_h | 6 #define USBInterface_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
| 10 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h" | 10 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class ExceptionState; | 14 class ExceptionState; |
| 15 class USBAlternateInterface; |
| 15 class USBConfiguration; | 16 class USBConfiguration; |
| 16 | 17 |
| 17 class USBInterface | 18 class USBInterface |
| 18 : public GarbageCollected<USBInterface> | 19 : public GarbageCollected<USBInterface> |
| 19 , public ScriptWrappable { | 20 , public ScriptWrappable { |
| 20 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 21 public: | 22 public: |
| 22 static USBInterface* create(const USBConfiguration*, size_t interfaceIndex); | 23 static USBInterface* create(const USBConfiguration*, size_t interfaceIndex); |
| 23 static USBInterface* create(const USBConfiguration*, size_t interfaceNumber,
ExceptionState&); | 24 static USBInterface* create(const USBConfiguration*, size_t interfaceNumber,
ExceptionState&); |
| 24 | 25 |
| 25 USBInterface(const USBConfiguration*, size_t interfaceIndex); | 26 USBInterface(const USBConfiguration*, size_t interfaceIndex); |
| 26 | 27 |
| 27 const WebUSBDeviceInfo::Interface& info() const; | 28 const WebUSBDeviceInfo::Interface& info() const; |
| 28 | 29 |
| 29 uint8_t interfaceNumber() const; | 30 uint8_t interfaceNumber() const; |
| 31 HeapVector<Member<USBAlternateInterface>> alternates() const; |
| 30 | 32 |
| 31 DECLARE_TRACE(); | 33 DECLARE_TRACE(); |
| 32 | 34 |
| 33 private: | 35 private: |
| 34 Member<const USBConfiguration> m_configuration; | 36 Member<const USBConfiguration> m_configuration; |
| 35 const size_t m_interfaceIndex; | 37 const size_t m_interfaceIndex; |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 } // namespace blink | 40 } // namespace blink |
| 39 | 41 |
| 40 #endif // USBInterface_h | 42 #endif // USBInterface_h |
| OLD | NEW |