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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/capture/web_contents_audio_input_stream.h" 5 #include "content/browser/media/capture/web_contents_audio_input_stream.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 base::Bind(&AudioMirroringManager::StopMirroring, 244 base::Bind(&AudioMirroringManager::StopMirroring,
245 base::Unretained(mirroring_manager_), 245 base::Unretained(mirroring_manager_),
246 make_scoped_refptr(this))); 246 make_scoped_refptr(this)));
247 } 247 }
248 248
249 void WebContentsAudioInputStream::Impl::UnmuteWebContentsAudio() { 249 void WebContentsAudioInputStream::Impl::UnmuteWebContentsAudio() {
250 DCHECK_CURRENTLY_ON(BrowserThread::UI); 250 DCHECK_CURRENTLY_ON(BrowserThread::UI);
251 251
252 WebContents* const contents = tracker_->web_contents(); 252 WebContents* const contents = tracker_->web_contents();
253 if (contents) 253 if (contents)
254 contents->SetAudioMuted(false); 254 contents->SetAudioMuted(false, "user");
miu 2014/12/05 23:46:48 You won't be able to reference that string constan
255 } 255 }
256 256
257 void WebContentsAudioInputStream::Impl::QueryForMatches( 257 void WebContentsAudioInputStream::Impl::QueryForMatches(
258 const std::set<SourceFrameRef>& candidates, 258 const std::set<SourceFrameRef>& candidates,
259 const MatchesCallback& results_callback) { 259 const MatchesCallback& results_callback) {
260 BrowserThread::PostTask( 260 BrowserThread::PostTask(
261 BrowserThread::UI, 261 BrowserThread::UI,
262 FROM_HERE, 262 FROM_HERE,
263 base::Bind(&Impl::QueryForMatchesOnUIThread, 263 base::Bind(&Impl::QueryForMatchesOnUIThread,
264 this, 264 this,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 bool WebContentsAudioInputStream::GetAutomaticGainControl() { 389 bool WebContentsAudioInputStream::GetAutomaticGainControl() {
390 return impl_->mixer_stream()->GetAutomaticGainControl(); 390 return impl_->mixer_stream()->GetAutomaticGainControl();
391 } 391 }
392 392
393 bool WebContentsAudioInputStream::IsMuted() { 393 bool WebContentsAudioInputStream::IsMuted() {
394 return false; 394 return false;
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698