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

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

Issue 1245363002: Add WebUSB bindings and client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: iface ctors, OWNERS, rebase 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
« no previous file with comments | « Source/modules/webusb/USB.idl ('k') | Source/modules/webusb/USBAlternateInterface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
OLDNEW
« no previous file with comments | « Source/modules/webusb/USB.idl ('k') | Source/modules/webusb/USBAlternateInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698