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

Side by Side Diff: Source/modules/webusb/USB.h

Issue 1262163003: Add WebUSB bindings and client interface [part 1] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Handle null navigator.frame() without ASSERT 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/webusb/OWNERS ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef USB_h
6 #define USB_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/webusb/USBController.h"
11 #include "platform/heap/Handle.h"
12
13 namespace blink {
14
15 class LocalFrame;
16 class ScriptState;
17 class USBDeviceEnumerationOptions;
18
19 class USB final
20 : public GarbageCollectedFinalized<USB>
21 , public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO();
23 public:
24 static USB* create(LocalFrame& frame)
25 {
26 return new USB(frame);
27 }
28
29 explicit USB(LocalFrame& frame);
30
31 ScriptPromise getDevices(ScriptState*, const USBDeviceEnumerationOptions&);
32
33 DECLARE_VIRTUAL_TRACE();
34
35 private:
36 RawPtrWillBeMember<USBController> m_controller;
37 };
38
39 } // namespace blink
40
41 #endif // USB_h
OLDNEW
« no previous file with comments | « Source/modules/webusb/OWNERS ('k') | Source/modules/webusb/USB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698