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

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

Issue 896673003: Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: AudioStreamMonitor and corresponding Android monitor now have common base class Created 5 years, 10 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 782389f651aa033f0248c0d2bda583d5a70cbd3d..b34f2ff63d73f1eadd90acf30d625eed616b58e7 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -22,7 +22,7 @@
#include "content/browser/frame_host/navigator_delegate.h"
#include "content/browser/frame_host/render_frame_host_delegate.h"
#include "content/browser/frame_host/render_frame_host_manager.h"
-#include "content/browser/media/audio_stream_monitor.h"
+#include "content/browser/media/audio_state_provider.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host_delegate.h"
#include "content/common/accessibility_mode_enums.h"
@@ -666,8 +666,8 @@ class CONTENT_EXPORT WebContentsImpl
// Forces overscroll to be disabled (used by touch emulation).
void SetForceDisableOverscrollContent(bool force_disable);
- AudioStreamMonitor* audio_stream_monitor() {
- return &audio_stream_monitor_;
+ AudioStateProvider* audio_state_provider() {
+ return audio_state_provider_.get();
}
bool has_audio_power_save_blocker_for_testing() const {
@@ -1236,8 +1236,8 @@ class CONTENT_EXPORT WebContentsImpl
// is created, and broadcast to all frames when it changes.
AccessibilityMode accessibility_mode_;
- // Monitors power levels for audio streams associated with this WebContents.
- AudioStreamMonitor audio_stream_monitor_;
+ // Tells whether this WebContents is actively producing sound.
+ scoped_ptr<AudioStateProvider> audio_state_provider_;
// Created on-demand to mute all audio output from this WebContents.
scoped_ptr<WebContentsAudioMuter> audio_muter_;

Powered by Google App Engine
This is Rietveld 408576698