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

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

Issue 1252913014: WebUSB bindings part 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set-upstream 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
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 USBDevice_h 5 #ifndef USBDevice_h
6 #define USBDevice_h 6 #define USBDevice_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/modules/webusb/WebUSBDevice.h" 10 #include "public/platform/modules/webusb/WebUSBDevice.h"
11 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h" 11 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class USBConfiguration;
16
15 class USBDevice 17 class USBDevice
16 : public GarbageCollectedFinalized<USBDevice> 18 : public GarbageCollectedFinalized<USBDevice>
17 , public ScriptWrappable { 19 , public ScriptWrappable {
18 DEFINE_WRAPPERTYPEINFO(); 20 DEFINE_WRAPPERTYPEINFO();
19 public: 21 public:
20 using WebType = WebUSBDeviceInfo; 22 using WebType = WebUSBDeviceInfo;
21 23
22 static USBDevice* create(PassOwnPtr<WebUSBDevice> device) 24 static USBDevice* create(PassOwnPtr<WebUSBDevice> device)
23 { 25 {
24 return new USBDevice(device); 26 return new USBDevice(device);
(...skipping 16 matching lines...) Expand all
41 uint8_t deviceSubclass() const { return info().deviceSubclass; } 43 uint8_t deviceSubclass() const { return info().deviceSubclass; }
42 uint8_t deviceProtocol() const { return info().deviceProtocol; } 44 uint8_t deviceProtocol() const { return info().deviceProtocol; }
43 uint16_t vendorId() const { return info().vendorID; } 45 uint16_t vendorId() const { return info().vendorID; }
44 uint16_t productId() const { return info().productID; } 46 uint16_t productId() const { return info().productID; }
45 uint8_t deviceVersionMajor() const { return info().deviceVersionMajor; } 47 uint8_t deviceVersionMajor() const { return info().deviceVersionMajor; }
46 uint8_t deviceVersionMinor() const { return info().deviceVersionMinor; } 48 uint8_t deviceVersionMinor() const { return info().deviceVersionMinor; }
47 uint8_t deviceVersionSubminor() const { return info().deviceVersionSubminor; } 49 uint8_t deviceVersionSubminor() const { return info().deviceVersionSubminor; }
48 String manufacturerName() const { return info().manufacturerName; } 50 String manufacturerName() const { return info().manufacturerName; }
49 String productName() const { return info().productName; } 51 String productName() const { return info().productName; }
50 String serialNumber() const { return info().serialNumber; } 52 String serialNumber() const { return info().serialNumber; }
53 HeapVector<Member<USBConfiguration>> configurations() const;
51 54
52 DEFINE_INLINE_TRACE() { } 55 DEFINE_INLINE_TRACE() { }
53 56
54 private: 57 private:
55 OwnPtr<WebUSBDevice> m_device; 58 OwnPtr<WebUSBDevice> m_device;
56 }; 59 };
57 60
58 } // namespace blink 61 } // namespace blink
59 62
60 #endif // USBDevice_h 63 #endif // USBDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698