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

Unified Diff: chrome/browser/media/media_stream_capture_indicator.cc

Issue 12036057: Quick fix for TabCapture UI indicator not getting removed after ending the capture Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/media_stream_capture_indicator.cc
diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc
index 6cc6b5323e0502019e87b08d80edc5f69aaba0a4..14de99795aa4b21b9998682e6f898d44aeac9d0b 100644
--- a/chrome/browser/media/media_stream_capture_indicator.cc
+++ b/chrome/browser/media/media_stream_capture_indicator.cc
@@ -475,6 +475,12 @@ void MediaStreamCaptureIndicator::RemoveCaptureDeviceTab(
if (iter->audio_ref_count == 0 && iter->video_ref_count == 0 &&
iter->tab_capture_ref_count == 0)
tabs_.erase(iter);
+
+ // Notify the cached web_contents if the render view has changed. We expect
+ // that it is still valid since we get a capture indicator removed event
+ // before the web_contents is destroyed.
+ if (!web_contents && iter->web_contents)
+ web_contents = iter->web_contents;
}
if (web_contents)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698