diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-06-28 11:06:20 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-07-08 16:44:53 +0200 |
commit | 1d988d971bc4270ba3d148e8e2c143bf8f625b6e (patch) | |
tree | dc1d15e07d64df476ff0ac56c273b27007e3f805 /src/core/media_capture_devices_dispatcher.h | |
parent | 94daa599a65e2113d0adaa9afddf8691a02c18bb (diff) |
Adaptations for 90-based
Pick-to: 6.2
Change-Id: I8402b044d8e12d75e144a00984b856f3de10bffd
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/media_capture_devices_dispatcher.h')
-rw-r--r-- | src/core/media_capture_devices_dispatcher.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h index 2db457d33..d2633cb83 100644 --- a/src/core/media_capture_devices_dispatcher.h +++ b/src/core/media_capture_devices_dispatcher.h @@ -51,9 +51,8 @@ #include "base/containers/circular_deque.h" #include "base/memory/singleton.h" #include "base/observer_list.h" +#include "chrome/browser/tab_contents/web_contents_collection.h" #include "content/public/browser/media_observer.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_delegate.h" namespace QtWebEngineCore { @@ -61,7 +60,7 @@ namespace QtWebEngineCore { // This singleton is used to receive updates about media events from the content // layer. Based on Chrome's implementation. class MediaCaptureDevicesDispatcher : public content::MediaObserver, - public content::NotificationObserver + public WebContentsCollection::Observer { public: static MediaCaptureDevicesDispatcher *GetInstance(); @@ -111,8 +110,8 @@ private: MediaCaptureDevicesDispatcher(); virtual ~MediaCaptureDevicesDispatcher(); - // content::NotificationObserver implementation. - void Observe(int type, const content::NotificationSource &source, const content::NotificationDetails &details) override; + // WebContentsCollection::Observer: + void WebContentsDestroyed(content::WebContents *webContents) override; // Helpers for ProcessMediaAccessRequest(). void processDesktopCaptureAccessRequest(content::WebContents *, const content::MediaStreamRequest &, content::MediaResponseCallback); @@ -125,7 +124,7 @@ private: RequestsQueues m_pendingRequests; - content::NotificationRegistrar m_notificationsRegistrar; + WebContentsCollection m_webContentsCollection; bool m_loopbackAudioSupported = false; |