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

Unified Diff: Source/modules/webusb/USBDevice.h

Issue 1315683002: WebUSB bindings part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remote USBTransferStatus.idl 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webusb/USBControlTransferParameters.idl ('k') | Source/modules/webusb/USBDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webusb/USBDevice.h
diff --git a/Source/modules/webusb/USBDevice.h b/Source/modules/webusb/USBDevice.h
index 39f1dfdf7e9cea23f1f8b9759e664f0cbb6d4179..de8fae9991bb3b35e24ae09217e00193b8e86d67 100644
--- a/Source/modules/webusb/USBDevice.h
+++ b/Source/modules/webusb/USBDevice.h
@@ -5,7 +5,9 @@
#ifndef USBDevice_h
#define USBDevice_h
+#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/modules/v8/UnionTypesModules.h"
#include "platform/heap/Handle.h"
#include "public/platform/modules/webusb/WebUSBDevice.h"
#include "public/platform/modules/webusb/WebUSBDeviceInfo.h"
@@ -13,7 +15,9 @@
namespace blink {
class ScriptPromiseResolver;
+class ScriptState;
class USBConfiguration;
+class USBControlTransferParameters;
class USBDevice
: public GarbageCollectedFinalized<USBDevice>
@@ -58,6 +62,20 @@ public:
String serialNumber() const { return info().serialNumber; }
HeapVector<Member<USBConfiguration>> configurations() const;
+ ScriptPromise open(ScriptState*);
+ ScriptPromise close(ScriptState*);
+ ScriptPromise setConfiguration(ScriptState*, uint8_t configurationValue);
+ ScriptPromise claimInterface(ScriptState*, uint8_t interfaceNumber);
+ ScriptPromise releaseInterface(ScriptState*, uint8_t interfaceNumber);
+ ScriptPromise setInterface(ScriptState*, uint8_t interfaceNumber, uint8_t alternateSetting);
+ ScriptPromise controlTransferIn(ScriptState*, const USBControlTransferParameters& setup, unsigned length);
+ ScriptPromise controlTransferOut(ScriptState*, const USBControlTransferParameters& setup);
+ ScriptPromise controlTransferOut(ScriptState*, const USBControlTransferParameters& setup, const ArrayBufferOrArrayBufferView& data);
+ ScriptPromise clearHalt(ScriptState*, uint8_t endpointNumber);
+ ScriptPromise transferIn(ScriptState*, uint8_t endpointNumber, unsigned length);
+ ScriptPromise transferOut(ScriptState*, uint8_t endpointNumber, const ArrayBufferOrArrayBufferView& data);
+ ScriptPromise reset(ScriptState*);
+
DEFINE_INLINE_TRACE() { }
private:
« no previous file with comments | « Source/modules/webusb/USBControlTransferParameters.idl ('k') | Source/modules/webusb/USBDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698