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

Unified Diff: third_party/WebKit/Source/modules/webusb/USB.h

Issue 2751173004: Make navigator.usb open the DeviceManager connection lazily. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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 92ad0d920306b8eb8fc4adb0dbfe5c5e0820ceab..5d73165cbf50499d80120217ec13e386114c7c27 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.h
+++ b/third_party/WebKit/Source/modules/webusb/USB.h
@@ -69,9 +69,16 @@ class USB final : public EventTargetWithInlineData,
DECLARE_VIRTUAL_TRACE();
+ protected:
+ // EventTarget protected overrides.
+ void addedEventListener(const AtomicString& eventType,
+ RegisteredEventListener&) override;
+
private:
explicit USB(LocalFrame& frame);
+ void ensureDeviceManagerConnection();
+
device::usb::blink::DeviceManagerPtr m_deviceManager;
HeapHashSet<Member<ScriptPromiseResolver>> m_deviceManagerRequests;
device::usb::blink::ChooserServicePtr m_chooserService;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webusb/USB.cpp » ('j') | third_party/WebKit/Source/modules/webusb/USB.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698