Chromium Code Reviews| 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 f925c91ebe13af336480b91c1ad01c43faabb37f..cce43178dca763d59e80f2be438103b6af968850 100644 |
| --- a/content/browser/media/audio_stream_monitor.h |
| +++ b/content/browser/media/audio_stream_monitor.h |
| @@ -111,12 +111,15 @@ class CONTENT_EXPORT AudioStreamMonitor { |
| // Starts polling the stream for audio stream power levels using |callback|. |
| void StartMonitoringStreamOnUIThread( |
| int render_process_id, |
| + int render_frame_id, |
| int stream_id, |
| const ReadPowerAndClipCallback& callback); |
| // Stops polling the stream, discarding the internal copy of the |callback| |
| // provided in the call to StartMonitoringStream(). |
| - void StopMonitoringStreamOnUIThread(int render_process_id, int stream_id); |
| + void StopMonitoringStreamOnUIThread(int render_process_id, |
| + int render_frame_id, |
| + int stream_id); |
| // Called by |poll_timer_| to sample the power levels from each of the streams |
| // playing in the tab. |
| @@ -146,7 +149,12 @@ 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. |
| - using StreamID = std::pair<int, int>; |
| + struct StreamID { |
| + int render_process_id; |
| + int render_frame_id; |
| + int stream_id; |
| + bool operator<(const StreamID& other) const; |
| + }; |
| using StreamPollCallbackMap = std::map<StreamID, ReadPowerAndClipCallback>; |
|
DaleCurtis
2017/06/22 03:15:40
Can probably use flat_map here too.
lpy
2017/06/22 20:14:04
Done.
|
| StreamPollCallbackMap poll_callbacks_; |