Chromium Code Reviews| 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 USBEndpoint; | |
| 15 class USBInterface; | |
| 16 | |
| 17 class USBAlternateInterface | |
| 18 : public GarbageCollected<USBAlternateInterface> | |
| 19 , public ScriptWrappable { | |
| 20 DEFINE_WRAPPERTYPEINFO(); | |
| 21 public: | |
| 22 static USBAlternateInterface* create(const USBInterface*, size_t alternateIn dex); | |
|
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
| |
| 23 | |
| 24 USBAlternateInterface(const USBInterface*, size_t alternateIndex); | |
| 25 | |
| 26 const WebUSBDeviceInfo::AlternateInterface& info() const; | |
| 27 | |
| 28 uint8_t alternateSetting() const; | |
| 29 uint8_t interfaceClass() const; | |
| 30 uint8_t interfaceSubclass() const; | |
| 31 uint8_t interfaceProtocol() const; | |
| 32 String interfaceName() const; | |
| 33 HeapVector<Member<USBEndpoint>> endpoints() const; | |
| 34 | |
| 35 DECLARE_TRACE(); | |
| 36 | |
| 37 private: | |
| 38 Member<const USBInterface> m_interface; | |
| 39 size_t m_alternateIndex; | |
| 40 }; | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // USBAlternateInterface_h | |
| OLD | NEW |