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

Unified Diff: content/browser/media/capture/web_contents_audio_input_stream.cc

Issue 757033005: Make tab audible and muted states and cause available for an extension API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve naming/capitalization for muted toggle strings; remove audible/muted event-listener code fr… Created 6 years 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: content/browser/media/capture/web_contents_audio_input_stream.cc
diff --git a/content/browser/media/capture/web_contents_audio_input_stream.cc b/content/browser/media/capture/web_contents_audio_input_stream.cc
index 605124dd30848e20e6223c7f143baaa9e8003a0e..986307808485a2ca51fa0678b9b8cd229739e1c8 100644
--- a/content/browser/media/capture/web_contents_audio_input_stream.cc
+++ b/content/browser/media/capture/web_contents_audio_input_stream.cc
@@ -23,6 +23,10 @@
namespace content {
+// String to indicate that muted state change was caused by capture
+// (instead of initial, user or an extension id).
+static const char kMutedToggleCauseCapture[] = "auto-forced for capture";
+
class WebContentsAudioInputStream::Impl
: public base::RefCountedThreadSafe<WebContentsAudioInputStream::Impl>,
public AudioMirroringManager::MirroringDestination {
@@ -251,7 +255,7 @@ void WebContentsAudioInputStream::Impl::UnmuteWebContentsAudio() {
WebContents* const contents = tracker_->web_contents();
if (contents)
- contents->SetAudioMuted(false);
+ contents->SetAudioMuted(false, kMutedToggleCauseCapture);
}
void WebContentsAudioInputStream::Impl::QueryForMatches(

Powered by Google App Engine
This is Rietveld 408576698