| Index: content/browser/media/audio_stream_monitor.h
|
| diff --git a/content/browser/media/audio_stream_monitor.h b/content/browser/media/audio_stream_monitor.h
|
| index ced46683efbfb3dcf17b91245bd65ac183fde2f4..f925c91ebe13af336480b91c1ad01c43faabb37f 100644
|
| --- a/content/browser/media/audio_stream_monitor.h
|
| +++ b/content/browser/media/audio_stream_monitor.h
|
| @@ -54,6 +54,10 @@ class CONTENT_EXPORT AudioStreamMonitor {
|
| // false as soon as the WebContents stop producing sound.
|
| bool IsCurrentlyAudible() const;
|
|
|
| + // Called by the WebContentsImpl if |render_process_id| dies; used to clear
|
| + // any outstanding poll callbacks.
|
| + void RenderProcessGone(int render_process_id);
|
| +
|
| // Starts or stops audio level monitoring respectively for the stream owned by
|
| // the specified renderer. Safe to call from any thread.
|
| //
|
| @@ -142,8 +146,8 @@ class CONTENT_EXPORT AudioStreamMonitor {
|
|
|
| // The callbacks to read power levels for each stream. Only playing (i.e.,
|
| // not paused) streams will have an entry in this map.
|
| - typedef std::pair<int, int> StreamID;
|
| - typedef std::map<StreamID, ReadPowerAndClipCallback> StreamPollCallbackMap;
|
| + using StreamID = std::pair<int, int>;
|
| + using StreamPollCallbackMap = std::map<StreamID, ReadPowerAndClipCallback>;
|
| StreamPollCallbackMap poll_callbacks_;
|
|
|
| // Records the last time at which sound was audible from any stream.
|
| @@ -163,10 +167,6 @@ class CONTENT_EXPORT AudioStreamMonitor {
|
| // future.
|
| base::OneShotTimer off_timer_;
|
|
|
| - // Number of active streams to be used as a proxy for audibility when power
|
| - // level monitoring is not available.
|
| - size_t active_streams_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(AudioStreamMonitor);
|
| };
|
|
|
|
|