#include "content/browser/media/audio_stream_monitor.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/invalidate_type.h"
namespace content {
namespace {
AudioStreamMonitor* GetMonitorForRenderFrame(
GlobalRenderFrameHostId render_frame_host_id) { … }
}
AudioStreamMonitor::AudibleClientRegistration::AudibleClientRegistration(
GlobalRenderFrameHostId render_frame_host_id,
AudioStreamMonitor* audio_stream_monitor)
: … { … }
AudioStreamMonitor::AudibleClientRegistration::~AudibleClientRegistration() { … }
bool AudioStreamMonitor::StreamID::operator<(const StreamID& other) const { … }
bool AudioStreamMonitor::StreamID::operator==(const StreamID& other) const { … }
AudioStreamMonitor::AudioStreamMonitor(WebContents* contents)
: … { … }
AudioStreamMonitor::~AudioStreamMonitor() { … }
bool AudioStreamMonitor::WasRecentlyAudible() const { … }
bool AudioStreamMonitor::IsCurrentlyAudible() const { … }
void AudioStreamMonitor::RenderProcessGone(int render_process_id) { … }
std::unique_ptr<AudioStreamMonitor::AudibleClientRegistration>
AudioStreamMonitor::RegisterAudibleClient(
GlobalRenderFrameHostId render_frame_host_id) { … }
void AudioStreamMonitor::AddAudibleClient(
GlobalRenderFrameHostId render_frame_host_id) { … }
void AudioStreamMonitor::RemoveAudibleClient(
GlobalRenderFrameHostId render_frame_host_id) { … }
void AudioStreamMonitor::StartMonitoringStream(
GlobalRenderFrameHostId render_frame_host_id,
int stream_id) { … }
void AudioStreamMonitor::StopMonitoringStream(
GlobalRenderFrameHostId render_frame_host_id,
int stream_id) { … }
void AudioStreamMonitor::UpdateStreamAudibleState(
GlobalRenderFrameHostId render_frame_host_id,
int stream_id,
bool is_audible) { … }
void AudioStreamMonitor::StartMonitoringStreamOnUIThread(const StreamID& sid) { … }
void AudioStreamMonitor::StopMonitoringStreamOnUIThread(const StreamID& sid) { … }
void AudioStreamMonitor::UpdateStreamAudibleStateOnUIThread(const StreamID& sid,
bool is_audible) { … }
void AudioStreamMonitor::UpdateStreams() { … }
void AudioStreamMonitor::MaybeToggle() { … }
void AudioStreamMonitor::RenderFrameDeleted(
RenderFrameHost* render_frame_host) { … }
}