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

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

Issue 1352283005: Add getConfiguration method to USBDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update webexposed/global-interface-listing-expected.txt. Created 5 years, 3 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/USBConfiguration.cpp ('k') | Source/modules/webusb/USBDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/modules/v8/UnionTypesModules.h" 10 #include "bindings/modules/v8/UnionTypesModules.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 uint8_t deviceVersionMajor() const { return info().deviceVersionMajor; } 57 uint8_t deviceVersionMajor() const { return info().deviceVersionMajor; }
58 uint8_t deviceVersionMinor() const { return info().deviceVersionMinor; } 58 uint8_t deviceVersionMinor() const { return info().deviceVersionMinor; }
59 uint8_t deviceVersionSubminor() const { return info().deviceVersionSubminor; } 59 uint8_t deviceVersionSubminor() const { return info().deviceVersionSubminor; }
60 String manufacturerName() const { return info().manufacturerName; } 60 String manufacturerName() const { return info().manufacturerName; }
61 String productName() const { return info().productName; } 61 String productName() const { return info().productName; }
62 String serialNumber() const { return info().serialNumber; } 62 String serialNumber() const { return info().serialNumber; }
63 HeapVector<Member<USBConfiguration>> configurations() const; 63 HeapVector<Member<USBConfiguration>> configurations() const;
64 64
65 ScriptPromise open(ScriptState*); 65 ScriptPromise open(ScriptState*);
66 ScriptPromise close(ScriptState*); 66 ScriptPromise close(ScriptState*);
67 ScriptPromise getConfiguration(ScriptState*);
67 ScriptPromise setConfiguration(ScriptState*, uint8_t configurationValue); 68 ScriptPromise setConfiguration(ScriptState*, uint8_t configurationValue);
68 ScriptPromise claimInterface(ScriptState*, uint8_t interfaceNumber); 69 ScriptPromise claimInterface(ScriptState*, uint8_t interfaceNumber);
69 ScriptPromise releaseInterface(ScriptState*, uint8_t interfaceNumber); 70 ScriptPromise releaseInterface(ScriptState*, uint8_t interfaceNumber);
70 ScriptPromise setInterface(ScriptState*, uint8_t interfaceNumber, uint8_t al ternateSetting); 71 ScriptPromise setInterface(ScriptState*, uint8_t interfaceNumber, uint8_t al ternateSetting);
71 ScriptPromise controlTransferIn(ScriptState*, const USBControlTransferParame ters& setup, unsigned length); 72 ScriptPromise controlTransferIn(ScriptState*, const USBControlTransferParame ters& setup, unsigned length);
72 ScriptPromise controlTransferOut(ScriptState*, const USBControlTransferParam eters& setup); 73 ScriptPromise controlTransferOut(ScriptState*, const USBControlTransferParam eters& setup);
73 ScriptPromise controlTransferOut(ScriptState*, const USBControlTransferParam eters& setup, const ArrayBufferOrArrayBufferView& data); 74 ScriptPromise controlTransferOut(ScriptState*, const USBControlTransferParam eters& setup, const ArrayBufferOrArrayBufferView& data);
74 ScriptPromise clearHalt(ScriptState*, uint8_t endpointNumber); 75 ScriptPromise clearHalt(ScriptState*, uint8_t endpointNumber);
75 ScriptPromise transferIn(ScriptState*, uint8_t endpointNumber, unsigned leng th); 76 ScriptPromise transferIn(ScriptState*, uint8_t endpointNumber, unsigned leng th);
76 ScriptPromise transferOut(ScriptState*, uint8_t endpointNumber, const ArrayB ufferOrArrayBufferView& data); 77 ScriptPromise transferOut(ScriptState*, uint8_t endpointNumber, const ArrayB ufferOrArrayBufferView& data);
77 ScriptPromise reset(ScriptState*); 78 ScriptPromise reset(ScriptState*);
78 79
79 DEFINE_INLINE_TRACE() { } 80 DEFINE_INLINE_TRACE() { }
80 81
81 private: 82 private:
82 OwnPtr<WebUSBDevice> m_device; 83 OwnPtr<WebUSBDevice> m_device;
83 }; 84 };
84 85
85 } // namespace blink 86 } // namespace blink
86 87
87 #endif // USBDevice_h 88 #endif // USBDevice_h
OLDNEW
« no previous file with comments | « Source/modules/webusb/USBConfiguration.cpp ('k') | Source/modules/webusb/USBDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698