OLD | NEW |
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 "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 ~USB() override; | 35 ~USB() override; |
36 | 36 |
37 // USB.idl | 37 // USB.idl |
38 ScriptPromise getDevices(ScriptState*); | 38 ScriptPromise getDevices(ScriptState*); |
39 ScriptPromise requestDevice(ScriptState*, const USBDeviceRequestOptions&); | 39 ScriptPromise requestDevice(ScriptState*, const USBDeviceRequestOptions&); |
40 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); | 40 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); |
41 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); | 41 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); |
42 | 42 |
43 // EventTarget overrides. | 43 // EventTarget overrides. |
44 ExecutionContext* executionContext() const override; | 44 ExecutionContext* getExecutionContext() const override; |
45 const AtomicString& interfaceName() const override; | 45 const AtomicString& interfaceName() const override; |
46 | 46 |
47 // LocalFrameLifecycleObserver overrides. | 47 // LocalFrameLifecycleObserver overrides. |
48 void willDetachFrameHost() override; | 48 void willDetachFrameHost() override; |
49 | 49 |
50 // WebUSBClient::Observer overrides. | 50 // WebUSBClient::Observer overrides. |
51 void onDeviceConnected(WebPassOwnPtr<WebUSBDevice>) override; | 51 void onDeviceConnected(WebPassOwnPtr<WebUSBDevice>) override; |
52 void onDeviceDisconnected(WebPassOwnPtr<WebUSBDevice>) override; | 52 void onDeviceDisconnected(WebPassOwnPtr<WebUSBDevice>) override; |
53 | 53 |
54 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
55 | 55 |
56 private: | 56 private: |
57 explicit USB(LocalFrame& frame); | 57 explicit USB(LocalFrame& frame); |
58 | 58 |
59 WebUSBClient* m_client; | 59 WebUSBClient* m_client; |
60 }; | 60 }; |
61 | 61 |
62 } // namespace blink | 62 } // namespace blink |
63 | 63 |
64 #endif // USB_h | 64 #endif // USB_h |
OLD | NEW |