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

Unified Diff: chrome/browser/ui/tabs/tab_utils.cc

Issue 12035046: Fix bug causing tab favicon media indicator to not turn off. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issue with browser shutdown race condition. 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
Index: chrome/browser/ui/tabs/tab_utils.cc
diff --git a/chrome/browser/ui/tabs/tab_utils.cc b/chrome/browser/ui/tabs/tab_utils.cc
index 93609fe822f8ef7a55997f481f0bb04c00e7072b..a0ea14b820c2a209f87e8c2a462821241f5df939 100644
--- a/chrome/browser/ui/tabs/tab_utils.cc
+++ b/chrome/browser/ui/tabs/tab_utils.cc
@@ -15,24 +15,21 @@ namespace chrome {
bool ShouldShowProjectingIndicator(content::WebContents* contents) {
int render_process_id = contents->GetRenderProcessHost()->GetID();
int render_view_id = contents->GetRenderViewHost()->GetRoutingID();
- scoped_refptr<MediaStreamCaptureIndicator> capture_indicator =
+ scoped_refptr<MediaStreamCaptureIndicator> indicator =
MediaInternals::GetInstance()->GetMediaStreamCaptureIndicator();
- return capture_indicator->IsProcessCapturingTab(render_process_id,
- render_view_id);
+ return indicator->IsBeingMirrored(render_process_id, render_view_id);
}
bool ShouldShowRecordingIndicator(content::WebContents* contents) {
int render_process_id = contents->GetRenderProcessHost()->GetID();
int render_view_id = contents->GetRenderViewHost()->GetRoutingID();
- scoped_refptr<MediaStreamCaptureIndicator> capture_indicator =
+ scoped_refptr<MediaStreamCaptureIndicator> indicator =
MediaInternals::GetInstance()->GetMediaStreamCaptureIndicator();
// The projecting indicator takes precedence over the recording indicator, but
// if we are projecting and we don't handle the projecting case we want to
// still show the recording indicator.
- return capture_indicator->IsProcessCapturing(render_process_id,
- render_view_id) ||
- capture_indicator->IsProcessCapturingTab(render_process_id,
- render_view_id);
+ return indicator->IsCapturingUserMedia(render_process_id, render_view_id) ||
+ indicator->IsBeingMirrored(render_process_id, render_view_id);
}
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698