X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fbrowser%2Frenderer_host%2Fmedia%2Faudio_renderer_host.h;h=d38a7e9cc57441e8403ba648d10282c140692771;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=cc85a6fd20a2016c93cbe7b6be9a9c8fcf99118f;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/browser/renderer_host/media/audio_renderer_host.h b/src/content/browser/renderer_host/media/audio_renderer_host.h index cc85a6f..d38a7e9 100644 --- a/src/content/browser/renderer_host/media/audio_renderer_host.h +++ b/src/content/browser/renderer_host/media/audio_renderer_host.h @@ -84,14 +84,18 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter { const RenderViewHost::GetAudioOutputControllersCallback& callback) const; // BrowserMessageFilter implementation. - virtual void OnChannelClosing() OVERRIDE; - virtual void OnDestruct() const OVERRIDE; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + void OnChannelClosing() override; + void OnDestruct() const override; + 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(); + // Returns true if any streams managed by the RenderView identified by + // |render_view_id| are actively playing. Can be called from any thread. + bool RenderViewHasActiveAudio(int render_view_id) const; + #if defined(OS_TIZEN) // Sets an application ID and class properties, which are used to tag audio // streams in pulseaudio/Murphy. @@ -113,7 +117,7 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter { class AudioEntry; typedef std::map AudioEntryMap; - virtual ~AudioRendererHost(); + ~AudioRendererHost() override; // Methods called on IO thread ---------------------------------------------- @@ -169,6 +173,10 @@ class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter { // Returns NULL if not found. AudioEntry* LookupById(int stream_id); + // A helper method to update the number of playing streams and alert the + // ResourceScheduler when the renderer starts or stops playing an audiostream. + void UpdateNumPlayingStreams(AudioEntry* entry, bool is_playing); + // ID of the RenderProcessHost that owns this instance. const int render_process_id_;