#include "third_party/blink/public/web/modules/media/audio/audio_output_ipc_factory.h"
#include <utility>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "third_party/blink/public/mojom/media/renderer_audio_output_stream_factory.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/modules/media/audio/mojo_audio_output_ipc.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
namespace blink {
class AudioOutputIPCFactory::Impl { … };
AudioOutputIPCFactory& AudioOutputIPCFactory::GetInstance() { … }
AudioOutputIPCFactory::AudioOutputIPCFactory(
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
: … { … }
AudioOutputIPCFactory::~AudioOutputIPCFactory() = default;
std::unique_ptr<media::AudioOutputIPC>
AudioOutputIPCFactory::CreateAudioOutputIPC(
const blink::LocalFrameToken& frame_token) const { … }
void AudioOutputIPCFactory::RegisterRemoteFactory(
const blink::LocalFrameToken& frame_token,
const blink::BrowserInterfaceBrokerProxy& interface_broker) { … }
void AudioOutputIPCFactory::MaybeDeregisterRemoteFactory(
const blink::LocalFrameToken& frame_token) { … }
const scoped_refptr<base::SingleThreadTaskRunner>&
AudioOutputIPCFactory::io_task_runner() const { … }
mojom::blink::RendererAudioOutputStreamFactory*
AudioOutputIPCFactory::Impl::GetRemoteFactory(
const blink::LocalFrameToken& frame_token) const { … }
void AudioOutputIPCFactory::Impl::RegisterRemoteFactoryOnIOThread(
const blink::LocalFrameToken& frame_token,
mojo::PendingRemote<mojom::blink::RendererAudioOutputStreamFactory>
factory_pending_remote) { … }
void AudioOutputIPCFactory::Impl::MaybeDeregisterRemoteFactoryOnIOThread(
const blink::LocalFrameToken& frame_token) { … }
}