Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(781)

Side by Side Diff: Source/modules/webusb/USBAlternateInterface.h

Issue 1270983002: WebUSB bindings part 4 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update expected interface list Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 alternateSe tting, 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 const size_t m_alternateIndex;
42 };
43
44 } // namespace blink
45
46 #endif // USBAlternateInterface_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698