Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / browser / renderer_host / media / audio_renderer_host.h
index cc85a6f..d38a7e9 100644 (file)
@@ -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<int, AudioEntry*> 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_;