Index: content/browser/renderer_host/media/audio_renderer_host.h |
diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h |
index 60556ee81df13c746bbfdffffd5845146eba90f1..2e80ea6e5fb516e9333e1e226f2a6dbdcc9d9af6 100644 |
--- a/content/browser/renderer_host/media/audio_renderer_host.h |
+++ b/content/browser/renderer_host/media/audio_renderer_host.h |
@@ -39,6 +39,7 @@ |
#include <map> |
+#include "base/atomic_ref_count.h" |
#include "base/gtest_prod_util.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
@@ -84,6 +85,9 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter { |
virtual void OnDestruct() const OVERRIDE; |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ // Returns true if any streams managed by this host are actively playing. |
jam
2014/05/29 17:31:19
nit: add a comment that this is a thread safe meth
DaleCurtis
2014/05/29 18:57:13
Done.
|
+ bool HasActiveAudio(); |
+ |
private: |
friend class AudioRendererHostTest; |
friend class BrowserThread; |
@@ -165,6 +169,9 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter { |
// A map of stream IDs to audio sources. |
AudioEntryMap audio_entries_; |
+ // The number of streams in the playing state. |
+ base::AtomicRefCount num_playing_streams_; |
scherkus (not reviewing)
2014/05/29 02:24:42
AtomicRefCount because of IO vs. UI thread?
DaleCurtis
2014/05/29 18:57:13
Correct.
|
+ |
DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
}; |