| Index: Source/modules/webusb/USB.h
|
| diff --git a/Source/modules/webusb/USB.h b/Source/modules/webusb/USB.h
|
| index 7a5cb00d5dd4885fb0535cd063b8dd609fb02be5..5d2d60ca1894b3c65f34f596865955afa2d624f1 100644
|
| --- a/Source/modules/webusb/USB.h
|
| +++ b/Source/modules/webusb/USB.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "core/events/EventTarget.h"
|
| #include "modules/webusb/USBController.h"
|
| #include "platform/heap/Handle.h"
|
|
|
| @@ -17,9 +18,10 @@ class ScriptState;
|
| class USBDeviceRequestOptions;
|
|
|
| class USB final
|
| - : public GarbageCollectedFinalized<USB>
|
| - , public ScriptWrappable {
|
| + : public RefCountedGarbageCollectedEventTargetWithInlineData<USB> {
|
| DEFINE_WRAPPERTYPEINFO();
|
| + REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(USB);
|
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(USB);
|
| public:
|
| static USB* create(LocalFrame& frame)
|
| {
|
| @@ -28,8 +30,15 @@ public:
|
|
|
| explicit USB(LocalFrame& frame);
|
|
|
| + // USB.idl
|
| ScriptPromise getDevices(ScriptState*);
|
| ScriptPromise requestDevice(ScriptState*, const USBDeviceRequestOptions&);
|
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
|
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
|
| +
|
| + // EventTarget overrides.
|
| + ExecutionContext* executionContext() const override;
|
| + const AtomicString& interfaceName() const override;
|
|
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
|
|