| 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..38317ef8094fbe59d6200f16115d59fcda5e51fe 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,10 @@ 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. Can
|
| + // be called from any thread.
|
| + bool HasActiveAudio();
|
| +
|
| private:
|
| friend class AudioRendererHostTest;
|
| friend class BrowserThread;
|
| @@ -165,6 +170,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_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
|
| };
|
|
|
|
|