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 USBConfiguration_h |
| 6 #define USBConfiguration_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class ExceptionState; |
| 15 class USBDevice; |
| 16 class USBInterface; |
| 17 |
| 18 class USBConfiguration |
| 19 : public GarbageCollected<USBConfiguration> |
| 20 , public ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: |
| 23 static USBConfiguration* create(const USBDevice*, size_t configurationIndex)
; |
| 24 static USBConfiguration* create(const USBDevice*, size_t configurationIndex,
ExceptionState&); |
| 25 |
| 26 USBConfiguration(const USBDevice*, size_t configurationIndex); |
| 27 |
| 28 const WebUSBDeviceInfo::Configuration& info() const; |
| 29 |
| 30 uint8_t configurationValue() const; |
| 31 String configurationName() const; |
| 32 HeapVector<Member<USBInterface>> interfaces() const; |
| 33 |
| 34 DECLARE_TRACE(); |
| 35 |
| 36 private: |
| 37 Member<const USBDevice> m_device; |
| 38 size_t m_configurationIndex; |
| 39 }; |
| 40 |
| 41 } // namespace blink |
| 42 |
| 43 #endif // USBConfiguration_h |
OLD | NEW |