diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-08-07 09:41:49 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2018-08-10 06:52:25 +0000 |
commit | 24a81ed670ec5c015b258a7e3960156720b356be (patch) | |
tree | f83995cebab09df70532436979f2c86472cc4b55 /src/core | |
parent | b106a045a3160a046d7a304edb1fd958502fcc67 (diff) |
MediaCaptureDevicesDispatcher: Remove unused m_desktopCaptureSessions
Never used for anything?
Change-Id: Ib7facf264d3a286a8c2ea1d1584ab86f11f4ea33
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/media_capture_devices_dispatcher.cpp | 23 | ||||
-rw-r--r-- | src/core/media_capture_devices_dispatcher.h | 11 |
2 files changed, 0 insertions, 34 deletions
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp index 6d4159949..f7867c300 100644 --- a/src/core/media_capture_devices_dispatcher.cpp +++ b/src/core/media_capture_devices_dispatcher.cpp @@ -443,29 +443,6 @@ void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render { DCHECK_CURRENTLY_ON(BrowserThread::UI); - // Track desktop capture sessions. Tracking is necessary to avoid unbalanced - // session counts since not all requests will reach MEDIA_REQUEST_STATE_DONE, - // but they will all reach MEDIA_REQUEST_STATE_CLOSING. - if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE || stream_type == content::MEDIA_TAB_VIDEO_CAPTURE) { - if (state == content::MEDIA_REQUEST_STATE_DONE) { - DesktopCaptureSession session = { render_process_id, render_frame_id, - page_request_id }; - m_desktopCaptureSessions.push_back(session); - } else if (state == content::MEDIA_REQUEST_STATE_CLOSING) { - for (DesktopCaptureSessions::iterator it = - m_desktopCaptureSessions.begin(); - it != m_desktopCaptureSessions.end(); - ++it) { - if (it->render_process_id == render_process_id && - it->render_view_id == render_frame_id && - it->page_request_id == page_request_id) { - m_desktopCaptureSessions.erase(it); - break; - } - } - } - } - // Cancel the request. if (state == content::MEDIA_REQUEST_STATE_CLOSING) { bool found = false; diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h index 579d159a4..c24d23cc3 100644 --- a/src/core/media_capture_devices_dispatcher.h +++ b/src/core/media_capture_devices_dispatcher.h @@ -128,17 +128,6 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver, content::NotificationRegistrar m_notificationsRegistrar; - // Tracks MEDIA_DESKTOP_VIDEO_CAPTURE sessions which reach the - // MEDIA_REQUEST_STATE_DONE state. Sessions are remove when - // MEDIA_REQUEST_STATE_CLOSING is encountered. - struct DesktopCaptureSession { - int render_process_id; - int render_view_id; - int page_request_id; - }; - typedef std::list<DesktopCaptureSession> DesktopCaptureSessions; - DesktopCaptureSessions m_desktopCaptureSessions; - DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher); }; |