WebContentsAudioMuter: Mute all audio output from a WebContentsImpl.
commit50f9789a2baac93fd5ac908ae01e4bec597955cf
authormiu <miu@chromium.org>
Mon, 22 Sep 2014 22:49:52 +0000 (22 15:49 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 22 Sep 2014 22:50:14 +0000 (22 22:50 +0000)
tree00c76967123ad3722d1adcb4b79a3f1378bc01aa
parenta35a53a65e17c4fe1d79f456a4f71827198c9b89
WebContentsAudioMuter: Mute all audio output from a WebContentsImpl.

Adds support in libcontent for muting all audio output from a
WebContentsImpl.  This is meant to be activated via user actions in
the browser tab strip UI (follow-up change pending).  To be clear, this
change introduces the functionality required to mute audio, but there is
nothing in this change to activate it.  The plan is to provide this
feature experimentally behind about:flags, and gather data to drive
later launch decisions.

Main approach: Introduce the WebContentsAudioMuter, which leverages the
existing WebContents audio capture mechanisms (AudioMirroringManager) to
divert all audio output to a "null" destination.  In other words, this
is essentially "audio capture to nowhere."

BUG=360372

Review URL: https://codereview.chromium.org/586303004

Cr-Commit-Position: refs/heads/master@{#296078}
content/browser/media/capture/web_contents_audio_input_stream.cc
content/browser/media/capture/web_contents_audio_muter.cc [new file with mode: 0644]
content/browser/media/capture/web_contents_audio_muter.h [new file with mode: 0644]
content/browser/web_contents/web_contents_impl.cc
content/browser/web_contents/web_contents_impl.h
content/content_browser.gypi
content/public/browser/web_contents.h