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

Side by Side Diff: Source/modules/webusb/USB.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 unified diff | Download patch
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/webusb/USB.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 USB_h 5 #ifndef USB_h
6 #define USB_h 6 #define USB_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 "modules/webusb/USBController.h" 10 #include "modules/webusb/USBController.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class LocalFrame; 15 class LocalFrame;
16 class ScriptState; 16 class ScriptState;
17 class USBDeviceEnumerationOptions; 17 class USBDeviceRequestOptions;
18 18
19 class USB final 19 class USB final
20 : public GarbageCollectedFinalized<USB> 20 : public GarbageCollectedFinalized<USB>
21 , public ScriptWrappable { 21 , public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
23 public: 23 public:
24 static USB* create(LocalFrame& frame) 24 static USB* create(LocalFrame& frame)
25 { 25 {
26 return new USB(frame); 26 return new USB(frame);
27 } 27 }
28 28
29 explicit USB(LocalFrame& frame); 29 explicit USB(LocalFrame& frame);
30 30
31 ScriptPromise getDevices(ScriptState*, const USBDeviceEnumerationOptions&); 31 ScriptPromise getDevices(ScriptState*);
32 ScriptPromise requestDevice(ScriptState*, const USBDeviceRequestOptions&);
32 33
33 DECLARE_VIRTUAL_TRACE(); 34 DECLARE_VIRTUAL_TRACE();
34 35
35 private: 36 private:
36 RawPtrWillBeMember<USBController> m_controller; 37 RawPtrWillBeMember<USBController> m_controller;
37 }; 38 };
38 39
39 } // namespace blink 40 } // namespace blink
40 41
41 #endif // USB_h 42 #endif // USB_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/webusb/USB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698