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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 586303004: WebContentsAudioMuter: Mute all audio output from a WebContentsImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dale's comments. Created 6 years, 3 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: content/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 134b8d8860b4d24bf5cf734fb16ecbec2f22636b..5c76a984d54e03ad9cb5a83162a7915e3bde6830 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -65,6 +65,7 @@ class SavePackage;
class ScreenOrientationDispatcherHost;
class SiteInstance;
class TestWebContents;
+class WebContentsAudioMuter;
class WebContentsDelegate;
class WebContentsImpl;
class WebContentsObserver;
@@ -246,6 +247,8 @@ class CONTENT_EXPORT WebContentsImpl
virtual void IncrementCapturerCount(const gfx::Size& capture_size) OVERRIDE;
virtual void DecrementCapturerCount() OVERRIDE;
virtual int GetCapturerCount() const OVERRIDE;
+ virtual bool IsAudioMuted() const OVERRIDE;
+ virtual void SetAudioMuted(bool mute) OVERRIDE;
virtual bool IsCrashed() const OVERRIDE;
virtual void SetIsCrashed(base::TerminationStatus status,
int error_code) OVERRIDE;
@@ -1241,6 +1244,9 @@ class CONTENT_EXPORT WebContentsImpl
// Monitors power levels for audio streams associated with this WebContents.
AudioStreamMonitor audio_stream_monitor_;
+ // Created on-demand to mute all audio output from this WebContents.
+ scoped_ptr<WebContentsAudioMuter> audio_muter_;
+
base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
« no previous file with comments | « content/browser/media/capture/web_contents_audio_muter.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698