#include "extensions/browser/api/offscreen/audio_lifetime_enforcer.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_runner.h"
#include "extensions/browser/offscreen_document_host.h"
namespace extensions {
namespace {
base::TimeDelta g_audio_timeout = …;
}
AudioLifetimeEnforcer::AudioLifetimeEnforcer(
OffscreenDocumentHost* offscreen_document,
TerminationCallback termination_callback,
NotifyInactiveCallback notify_inactive_callback)
: … { … }
AudioLifetimeEnforcer::~AudioLifetimeEnforcer() = default;
base::AutoReset<base::TimeDelta> AudioLifetimeEnforcer::SetTimeoutForTesting(
base::TimeDelta timeout) { … }
bool AudioLifetimeEnforcer::IsActive() { … }
void AudioLifetimeEnforcer::OnAudioStateChanged(bool audible) { … }
void AudioLifetimeEnforcer::PostTimeoutTask() { … }
void AudioLifetimeEnforcer::OnAudioTimeout() { … }
}