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

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

Issue 1830833002: Track USB endpoint state in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@copy_interface
Patch Set: Addressed nits. Created 4 years, 8 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/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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 private: 99 private:
100 int findConfigurationIndex(uint8_t configurationValue) const; 100 int findConfigurationIndex(uint8_t configurationValue) const;
101 int findInterfaceIndex(uint8_t interfaceNumber) const; 101 int findInterfaceIndex(uint8_t interfaceNumber) const;
102 int findAlternateIndex(size_t interfaceIndex, uint8_t alternateSetting) cons t; 102 int findAlternateIndex(size_t interfaceIndex, uint8_t alternateSetting) cons t;
103 bool ensurePageVisible(ScriptPromiseResolver*) const; 103 bool ensurePageVisible(ScriptPromiseResolver*) const;
104 bool ensureNoDeviceOrInterfaceChangeInProgress(ScriptPromiseResolver*) const ; 104 bool ensureNoDeviceOrInterfaceChangeInProgress(ScriptPromiseResolver*) const ;
105 bool ensureDeviceConfigured(ScriptPromiseResolver*) const; 105 bool ensureDeviceConfigured(ScriptPromiseResolver*) const;
106 bool ensureInterfaceClaimed(uint8_t interfaceNumber, ScriptPromiseResolver*) const; 106 bool ensureInterfaceClaimed(uint8_t interfaceNumber, ScriptPromiseResolver*) const;
107 bool ensureEndpointAvailable(bool inTransfer, uint8_t endpointNumber, Script PromiseResolver*) const; 107 bool ensureEndpointAvailable(bool inTransfer, uint8_t endpointNumber, Script PromiseResolver*) const;
108 bool anyInterfaceChangeInProgress() const; 108 bool anyInterfaceChangeInProgress() const;
109 bool convertControlTransferParameters(WebUSBDevice::TransferDirection, const USBControlTransferParameters&, WebUSBDevice::ControlTransferParameters*, Script PromiseResolver*) const;
110 void setEndpointsForInterface(size_t interfaceIndex, bool set);
109 111
110 OwnPtr<WebUSBDevice> m_device; 112 OwnPtr<WebUSBDevice> m_device;
111 bool m_opened; 113 bool m_opened;
112 bool m_deviceStateChangeInProgress; 114 bool m_deviceStateChangeInProgress;
113 int m_configurationIndex; 115 int m_configurationIndex;
114 WTF::BitVector m_claimedInterfaces; 116 WTF::BitVector m_claimedInterfaces;
115 WTF::BitVector m_interfaceStateChangeInProgress; 117 WTF::BitVector m_interfaceStateChangeInProgress;
116 WTF::Vector<size_t> m_selectedAlternates; 118 WTF::Vector<size_t> m_selectedAlternates;
119 WTF::BitVector m_inEndpoints;
120 WTF::BitVector m_outEndpoints;
117 }; 121 };
118 122
119 } // namespace blink 123 } // namespace blink
120 124
121 #endif // USBDevice_h 125 #endif // USBDevice_h
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/usbDevice.html ('k') | third_party/WebKit/Source/modules/webusb/USBDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698