| 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 d1a32d5f857b05925f884ef64d834e673c8c5f29..cf8f15587e5f11fc6052b106ad7a52dc20b93369 100644
|
| --- a/content/browser/media/audio_stream_monitor.h
|
| +++ b/content/browser/media/audio_stream_monitor.h
|
| @@ -22,7 +22,6 @@ class TickClock;
|
| }
|
|
|
| namespace content {
|
| -class WebContents;
|
|
|
| // Repeatedly polls audio streams for their power levels, and "debounces" the
|
| // information into a simple, binary "was recently audible" result for the audio
|
| @@ -35,7 +34,9 @@ class WebContents;
|
| // Each WebContentsImpl owns an AudioStreamMonitor.
|
| class CONTENT_EXPORT AudioStreamMonitor {
|
| public:
|
| - explicit AudioStreamMonitor(WebContents* contents);
|
| + using AudibleChangeCallback = base::Callback<void(bool)>;
|
| +
|
| + explicit AudioStreamMonitor(const AudibleChangeCallback& callback);
|
| ~AudioStreamMonitor();
|
|
|
| // Indicates if audio stream monitoring is available. It's only available if
|
| @@ -112,10 +113,8 @@ class CONTENT_EXPORT AudioStreamMonitor {
|
| // on, |off_timer_| is started to re-invoke this method in the future.
|
| void MaybeToggle();
|
|
|
| - // The WebContents instance instance to receive indicator toggle
|
| - // notifications. This pointer should be valid for the lifetime of
|
| - // AudioStreamMonitor.
|
| - WebContents* const web_contents_;
|
| + // The Callback to run to receive indicator toggle notifications.
|
| + const AudibleChangeCallback audible_change_callback_;
|
|
|
| // Note: |clock_| is always |&default_tick_clock_|, except during unit
|
| // testing.
|
|
|