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

Unified Diff: public/platform/modules/webusb/WebUSBClient.h

Issue 1288793003: WebUSB: Create a requestDevice method separate from getDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update stale reference in modules.gypi. 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
Index: public/platform/modules/webusb/WebUSBClient.h
diff --git a/public/platform/modules/webusb/WebUSBClient.h b/public/platform/modules/webusb/WebUSBClient.h
index fd2c8bc162d547d7b326dd3a25b0d5a4c61e17e6..5bcff9103fc41de27b5408bddc8bfc4f47e35888 100644
--- a/public/platform/modules/webusb/WebUSBClient.h
+++ b/public/platform/modules/webusb/WebUSBClient.h
@@ -11,10 +11,11 @@
namespace blink {
class WebUSBDevice;
-struct WebUSBDeviceEnumerationOptions;
+struct WebUSBDeviceRequestOptions;
struct WebUSBError;
using WebUSBClientGetDevicesCallbacks = WebCallbacks<WebPassOwnPtr<WebVector<WebUSBDevice*>>, const WebUSBError&>;
+using WebUSBClientRequestDeviceCallbacks = WebCallbacks<WebPassOwnPtr<WebUSBDevice>, const WebUSBError&>;
class WebUSBClient {
public:
@@ -22,7 +23,11 @@ public:
// Enumerates available devices.
// Ownership of the WebUSBClientGetDevicesCallbacks is transferred to the client.
- virtual void getDevices(const WebUSBDeviceEnumerationOptions&, WebUSBClientGetDevicesCallbacks*) = 0;
+ virtual void getDevices(WebUSBClientGetDevicesCallbacks*) = 0;
+
+ // Requests access to a device.
+ // Ownership of the WebUSBClientRequestDeviceCallbacks is transferred to the client.
+ virtual void requestDevice(const WebUSBDeviceRequestOptions&, WebUSBClientRequestDeviceCallbacks*) = 0;
};
} // namespace blink
« no previous file with comments | « Source/modules/webusb/USBDeviceRequestOptions.idl ('k') | public/platform/modules/webusb/WebUSBDeviceEnumerationOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698