| Index: Source/modules/webusb/USB.h
|
| diff --git a/Source/modules/webusb/USB.h b/Source/modules/webusb/USB.h
|
| index d8c252b5b286e9925602335842c18f7ab5571a3f..9fe5ffe54a4bc4e69a53d29a89738879165bdaf6 100644
|
| --- a/Source/modules/webusb/USB.h
|
| +++ b/Source/modules/webusb/USB.h
|
| @@ -10,15 +10,18 @@
|
| #include "core/events/EventTarget.h"
|
| #include "modules/webusb/USBController.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "public/platform/modules/webusb/WebUSBClient.h"
|
|
|
| namespace blink {
|
|
|
| class LocalFrame;
|
| class ScriptState;
|
| class USBDeviceRequestOptions;
|
| +class WebUSBDevice;
|
|
|
| class USB final
|
| - : public RefCountedGarbageCollectedEventTargetWithInlineData<USB> {
|
| + : public RefCountedGarbageCollectedEventTargetWithInlineData<USB>
|
| + , public WebUSBClient::Observer {
|
| DEFINE_WRAPPERTYPEINFO();
|
| REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(USB);
|
| public:
|
| @@ -27,6 +30,8 @@ public:
|
| return new USB(frame);
|
| }
|
|
|
| + ~USB() override;
|
| +
|
| // USB.idl
|
| ScriptPromise getDevices(ScriptState*);
|
| ScriptPromise requestDevice(ScriptState*, const USBDeviceRequestOptions&);
|
| @@ -37,6 +42,10 @@ public:
|
| ExecutionContext* executionContext() const override;
|
| const AtomicString& interfaceName() const override;
|
|
|
| + // WebUSBClient::Observer overrides.
|
| + void onDeviceConnected(WebPassOwnPtr<WebUSBDevice>) override;
|
| + void onDeviceDisconnected(WebPassOwnPtr<WebUSBDevice>) override;
|
| +
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
|
|