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

Unified Diff: Source/modules/webusb/USBDevice.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
« no previous file with comments | « Source/modules/webusb/USB.idl ('k') | Source/modules/webusb/USBDeviceEnumerationOptions.idl » ('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 8738ea3097e25899e903d3678b36a35162f985fa..39f1dfdf7e9cea23f1f8b9759e664f0cbb6d4179 100644
--- a/Source/modules/webusb/USBDevice.h
+++ b/Source/modules/webusb/USBDevice.h
@@ -12,6 +12,7 @@
namespace blink {
+class ScriptPromiseResolver;
class USBConfiguration;
class USBDevice
@@ -19,13 +20,18 @@ class USBDevice
, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- using WebType = WebUSBDeviceInfo;
+ using WebType = OwnPtr<WebUSBDevice>;
static USBDevice* create(PassOwnPtr<WebUSBDevice> device)
{
return new USBDevice(device);
}
+ static USBDevice* take(ScriptPromiseResolver*, PassOwnPtr<WebUSBDevice> device)
+ {
+ return create(device);
+ }
+
explicit USBDevice(PassOwnPtr<WebUSBDevice> device)
: m_device(device)
{
« no previous file with comments | « Source/modules/webusb/USB.idl ('k') | Source/modules/webusb/USBDeviceEnumerationOptions.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698