Index: third_party/WebKit/Source/modules/webusb/USB.h |
diff --git a/third_party/WebKit/Source/modules/webusb/USB.h b/third_party/WebKit/Source/modules/webusb/USB.h |
index 8d406a6ec624d1db12fe6ddfcd069eaa26958e4a..ae2c9c93647225d4da51a400210f5ba3d30a838b 100644 |
--- a/third_party/WebKit/Source/modules/webusb/USB.h |
+++ b/third_party/WebKit/Source/modules/webusb/USB.h |
@@ -9,20 +9,19 @@ |
#include "bindings/core/v8/ScriptWrappable.h" |
#include "core/dom/ContextLifecycleObserver.h" |
#include "core/events/EventTarget.h" |
+#include "device/usb/public/interfaces/chooser_service.mojom-blink.h" |
+#include "device/usb/public/interfaces/device_manager.mojom-blink.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 ContextLifecycleObserver |
- , public WebUSBClient::Observer { |
+ , public ContextLifecycleObserver { |
DEFINE_WRAPPERTYPEINFO(); |
REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(USB); |
USING_GARBAGE_COLLECTED_MIXIN(USB); |
@@ -32,7 +31,7 @@ public: |
return new USB(frame); |
} |
- ~USB() override; |
+ virtual ~USB(); |
// USB.idl |
ScriptPromise getDevices(ScriptState*); |
@@ -47,9 +46,9 @@ public: |
// ContextLifecycleObserver overrides. |
void contextDestroyed() override; |
- // WebUSBClient::Observer overrides. |
- void onDeviceConnected(WebPassOwnPtr<WebUSBDevice>) override; |
- void onDeviceDisconnected(WebPassOwnPtr<WebUSBDevice>) override; |
+ device::usb::blink::DeviceManager* deviceManager() const { return m_deviceManager.get(); } |
esprehn
2016/04/06 20:10:45
did these get renamed from ::wtf at some point?
|
+ |
+ void onDeviceChanges(device::usb::blink::DeviceChangeNotificationPtr); |
DECLARE_VIRTUAL_TRACE(); |
EAGERLY_FINALIZE(); |
@@ -57,7 +56,8 @@ public: |
private: |
explicit USB(LocalFrame& frame); |
- WebUSBClient* m_client; |
+ device::usb::blink::DeviceManagerPtr m_deviceManager; |
+ device::usb::blink::ChooserServicePtr m_chooserService; |
}; |
} // namespace blink |