Commit fcb624a2 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Merge AudioRendererSinkCache and AudioRendererSinkCacheImpl

This CL is a follow up of https://crrev.com/c/2414551, where
AudioRendererSinkCacheImpl was moved to Blink core.

BUG=787252
R=guidou@chromium.org, haraken@chromium.org

Change-Id: Ifdaa4a5b68c4be2585307522629edc3e25f9a046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418911
Commit-Queue: Antonio Gomes (GMT-4) <tonikitoo@igalia.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809267}
parent a20f05be
......@@ -278,7 +278,6 @@ source_set("blink_headers") {
"web/blink.h",
"web/modules/autofill/web_form_element_observer.h",
"web/modules/media/audio/audio_device_factory.h",
"web/modules/media/audio/audio_renderer_sink_cache.h",
"web/modules/media/audio/web_audio_input_ipc_factory.h",
"web/modules/media/audio/web_audio_output_ipc_factory.h",
"web/modules/media/webmediaplayer_util.h",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_H_
#include <memory>
#include <string>
#include "base/memory/scoped_refptr.h"
#include "base/unguessable_token.h"
#include "media/base/output_device_info.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
class AudioRendererSink;
}
namespace blink {
// Caches AudioRendererSink instances, provides them to the clients for usage,
// tracks their used/unused state, reuses them to obtain output device
// information, garbage-collects unused sinks.
// Must live on the main render thread. Thread safe.
//
// TODO(https://crrev.com/787252): Move this header out of the Blink public API
// layer.
class BLINK_MODULES_EXPORT AudioRendererSinkCache {
public:
virtual ~AudioRendererSinkCache() {}
// Returns output device information for a specified sink.
virtual media::OutputDeviceInfo GetSinkInfo(
const LocalFrameToken& source_frame_token,
const base::UnguessableToken& session_id,
const std::string& device_id) = 0;
// Provides a sink for usage. The sink must be returned to the cache by
// calling ReleaseSink(). The sink must be stopped by the user before
// deletion, but after releasing it from the cache.
virtual scoped_refptr<media::AudioRendererSink> GetSink(
const LocalFrameToken& source_frame_token,
const std::string& device_id) = 0;
// Notifies the cache that the sink is not in use any more. Must be
// called by the client, so that the cache can garbage-collect the sink
// reference.
virtual void ReleaseSink(const media::AudioRendererSink* sink_ptr) = 0;
protected:
AudioRendererSinkCache() {}
private:
DISALLOW_COPY_AND_ASSIGN(AudioRendererSinkCache);
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_H_
......@@ -9,8 +9,8 @@ blink_modules_sources("media") {
"audio/audio_device_factory.cc",
"audio/audio_renderer_mixer_manager.cc",
"audio/audio_renderer_mixer_manager.h",
"audio/audio_renderer_sink_cache_impl.cc",
"audio/audio_renderer_sink_cache_impl.h",
"audio/audio_renderer_sink_cache.cc",
"audio/audio_renderer_sink_cache.h",
"audio/mojo_audio_input_ipc.cc",
"audio/mojo_audio_input_ipc.h",
"audio/mojo_audio_output_ipc.cc",
......
......@@ -22,7 +22,7 @@
#include "third_party/blink/public/web/modules/media/audio/web_audio_input_ipc_factory.h"
#include "third_party/blink/public/web/modules/media/audio/web_audio_output_ipc_factory.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache_impl.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h"
#include "third_party/blink/renderer/platform/wtf/wtf.h"
namespace blink {
......@@ -196,7 +196,7 @@ media::OutputDeviceInfo AudioDeviceFactory::GetOutputDeviceInfo(
//
// TODO(crbug.com/787252): Replace the use of base::ThreadPool below by
// worker_pool::PostTask().
static base::NoDestructor<AudioRendererSinkCacheImpl> cache(
static base::NoDestructor<AudioRendererSinkCache> cache(
base::ThreadPool::CreateSequencedTaskRunner(
{base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}),
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache_impl.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h"
#include <algorithm>
#include <memory>
......@@ -27,10 +27,10 @@
namespace blink {
AudioRendererSinkCacheImpl* AudioRendererSinkCacheImpl::instance_ = nullptr;
AudioRendererSinkCache* AudioRendererSinkCache::instance_ = nullptr;
class AudioRendererSinkCacheImpl::FrameObserver final
: public GarbageCollected<AudioRendererSinkCacheImpl::FrameObserver>,
class AudioRendererSinkCache::FrameObserver final
: public GarbageCollected<AudioRendererSinkCache::FrameObserver>,
public Supplement<LocalFrame>,
public ExecutionContextLifecycleObserver {
public:
......@@ -56,21 +56,21 @@ class AudioRendererSinkCacheImpl::FrameObserver final
void DropFrameCache() {
dropped_frame_cached_ = true;
if (!AudioRendererSinkCacheImpl::instance_)
if (!AudioRendererSinkCache::instance_)
return;
if (!GetSupplementable())
return;
LocalFrameToken frame_token = GetSupplementable()->GetLocalFrameToken();
AudioRendererSinkCacheImpl::instance_->DropSinksForFrame(frame_token);
AudioRendererSinkCache::instance_->DropSinksForFrame(frame_token);
}
bool dropped_frame_cached_ = false;
DISALLOW_COPY_AND_ASSIGN(FrameObserver);
};
const char AudioRendererSinkCacheImpl::FrameObserver::kSupplementName[] =
"AudioRendererSinkCacheImpl::FrameObserver";
const char AudioRendererSinkCache::FrameObserver::kSupplementName[] =
"AudioRendererSinkCache::FrameObserver";
namespace {
......@@ -97,7 +97,7 @@ bool SinkIsHealthy(media::AudioRendererSink* sink) {
} // namespace
// Cached sink data.
struct AudioRendererSinkCacheImpl::CacheEntry {
struct AudioRendererSinkCache::CacheEntry {
LocalFrameToken source_frame_token;
std::string device_id;
scoped_refptr<media::AudioRendererSink> sink; // Sink instance
......@@ -105,15 +105,15 @@ struct AudioRendererSinkCacheImpl::CacheEntry {
};
// static
void AudioRendererSinkCacheImpl::InstallFrameObserver(LocalFrame& frame) {
if (AudioRendererSinkCacheImpl::FrameObserver::From(frame))
void AudioRendererSinkCache::InstallFrameObserver(LocalFrame& frame) {
if (AudioRendererSinkCache::FrameObserver::From(frame))
return;
Supplement<LocalFrame>::ProvideTo(
frame,
MakeGarbageCollected<AudioRendererSinkCacheImpl::FrameObserver>(frame));
MakeGarbageCollected<AudioRendererSinkCache::FrameObserver>(frame));
}
AudioRendererSinkCacheImpl::AudioRendererSinkCacheImpl(
AudioRendererSinkCache::AudioRendererSinkCache(
scoped_refptr<base::SequencedTaskRunner> cleanup_task_runner,
CreateSinkCallback create_sink_cb,
base::TimeDelta delete_timeout)
......@@ -124,7 +124,7 @@ AudioRendererSinkCacheImpl::AudioRendererSinkCacheImpl(
instance_ = this;
}
AudioRendererSinkCacheImpl::~AudioRendererSinkCacheImpl() {
AudioRendererSinkCache::~AudioRendererSinkCache() {
// We just release all the cached sinks here. Stop them first.
// We can stop all the sinks, no matter they are used or not, since
// everything is being destroyed anyways.
......@@ -135,11 +135,11 @@ AudioRendererSinkCacheImpl::~AudioRendererSinkCacheImpl() {
instance_ = nullptr;
}
media::OutputDeviceInfo AudioRendererSinkCacheImpl::GetSinkInfo(
media::OutputDeviceInfo AudioRendererSinkCache::GetSinkInfo(
const LocalFrameToken& source_frame_token,
const base::UnguessableToken& session_id,
const std::string& device_id) {
TRACE_EVENT_BEGIN2("audio", "AudioRendererSinkCacheImpl::GetSinkInfo",
TRACE_EVENT_BEGIN2("audio", "AudioRendererSinkCache::GetSinkInfo",
"frame_token", source_frame_token.ToString(), "device id",
device_id);
......@@ -156,8 +156,8 @@ media::OutputDeviceInfo AudioRendererSinkCacheImpl::GetSinkInfo(
UMA_HISTOGRAM_ENUMERATION(
"Media.Audio.Render.SinkCache.GetOutputDeviceInfoCacheUtilization",
SINK_CACHE_MISS_CANNOT_LOOKUP_BY_SESSION_ID, SINK_CACHE_LAST_ENTRY);
TRACE_EVENT_END1("audio", "AudioRendererSinkCacheImpl::GetSinkInfo",
"result", "Cache not used due to using |session_id|");
TRACE_EVENT_END1("audio", "AudioRendererSinkCache::GetSinkInfo", "result",
"Cache not used due to using |session_id|");
return sink->GetOutputDeviceInfo();
}
......@@ -171,8 +171,8 @@ media::OutputDeviceInfo AudioRendererSinkCacheImpl::GetSinkInfo(
UMA_HISTOGRAM_ENUMERATION(
"Media.Audio.Render.SinkCache.GetOutputDeviceInfoCacheUtilization",
SINK_CACHE_HIT, SINK_CACHE_LAST_ENTRY);
TRACE_EVENT_END1("audio", "AudioRendererSinkCacheImpl::GetSinkInfo",
"result", "Cache hit");
TRACE_EVENT_END1("audio", "AudioRendererSinkCache::GetSinkInfo", "result",
"Cache hit");
return cache_iter->sink->GetOutputDeviceInfo();
}
}
......@@ -188,21 +188,20 @@ media::OutputDeviceInfo AudioRendererSinkCacheImpl::GetSinkInfo(
"Media.Audio.Render.SinkCache.GetOutputDeviceInfoCacheUtilization",
SINK_CACHE_MISS_NO_SINK, SINK_CACHE_LAST_ENTRY);
TRACE_EVENT_END1("audio", "AudioRendererSinkCacheImpl::GetSinkInfo", "result",
TRACE_EVENT_END1("audio", "AudioRendererSinkCache::GetSinkInfo", "result",
"Cache miss");
// |sink| is ref-counted, so it's ok if it is removed from cache before we
// get here.
return sink->GetOutputDeviceInfo();
}
scoped_refptr<media::AudioRendererSink> AudioRendererSinkCacheImpl::GetSink(
scoped_refptr<media::AudioRendererSink> AudioRendererSinkCache::GetSink(
const LocalFrameToken& source_frame_token,
const std::string& device_id) {
UMA_HISTOGRAM_BOOLEAN("Media.Audio.Render.SinkCache.UsedForSinkCreation",
true);
TRACE_EVENT_BEGIN2("audio", "AudioRendererSinkCacheImpl::GetSink",
"frame_token", source_frame_token.ToString(), "device id",
device_id);
TRACE_EVENT_BEGIN2("audio", "AudioRendererSinkCache::GetSink", "frame_token",
source_frame_token.ToString(), "device id", device_id);
base::AutoLock auto_lock(cache_lock_);
......@@ -214,7 +213,7 @@ scoped_refptr<media::AudioRendererSink> AudioRendererSinkCacheImpl::GetSink(
cache_iter->used = true;
UMA_HISTOGRAM_BOOLEAN(
"Media.Audio.Render.SinkCache.InfoSinkReusedForOutput", true);
TRACE_EVENT_END1("audio", "AudioRendererSinkCacheImpl::GetSink", "result",
TRACE_EVENT_END1("audio", "AudioRendererSinkCache::GetSink", "result",
"Cache hit");
return cache_iter->sink;
}
......@@ -228,28 +227,28 @@ scoped_refptr<media::AudioRendererSink> AudioRendererSinkCacheImpl::GetSink(
true /* used */};
if (SinkIsHealthy(cache_entry.sink.get())) {
TRACE_EVENT_INSTANT0(
"audio", "AudioRendererSinkCacheImpl::GetSink: caching new sink",
TRACE_EVENT_INSTANT0("audio",
"AudioRendererSinkCache::GetSink: caching new sink",
TRACE_EVENT_SCOPE_THREAD);
cache_.push_back(cache_entry);
}
TRACE_EVENT_END1("audio", "AudioRendererSinkCacheImpl::GetSink", "result",
TRACE_EVENT_END1("audio", "AudioRendererSinkCache::GetSink", "result",
"Cache miss");
return cache_entry.sink;
}
void AudioRendererSinkCacheImpl::ReleaseSink(
void AudioRendererSinkCache::ReleaseSink(
const media::AudioRendererSink* sink_ptr) {
// We don't know the sink state, so won't reuse it. Delete it immediately.
DeleteSink(sink_ptr, true);
}
void AudioRendererSinkCacheImpl::DeleteLaterIfUnused(
void AudioRendererSinkCache::DeleteLaterIfUnused(
const media::AudioRendererSink* sink_ptr) {
cleanup_task_runner_->PostDelayedTask(
FROM_HERE,
base::BindOnce(&AudioRendererSinkCacheImpl::DeleteSink,
base::BindOnce(&AudioRendererSinkCache::DeleteSink,
// Unretained is safe here since this is a process-wide
// singleton and tests will ensure lifetime.
base::Unretained(this), base::RetainedRef(sink_ptr),
......@@ -257,7 +256,7 @@ void AudioRendererSinkCacheImpl::DeleteLaterIfUnused(
delete_timeout_);
}
void AudioRendererSinkCacheImpl::DeleteSink(
void AudioRendererSinkCache::DeleteSink(
const media::AudioRendererSink* sink_ptr,
bool force_delete_used) {
DCHECK(sink_ptr);
......@@ -302,8 +301,8 @@ void AudioRendererSinkCacheImpl::DeleteSink(
}
}
AudioRendererSinkCacheImpl::CacheContainer::iterator
AudioRendererSinkCacheImpl::FindCacheEntry_Locked(
AudioRendererSinkCache::CacheContainer::iterator
AudioRendererSinkCache::FindCacheEntry_Locked(
const LocalFrameToken& source_frame_token,
const std::string& device_id,
bool unused_only) {
......@@ -324,7 +323,7 @@ AudioRendererSinkCacheImpl::FindCacheEntry_Locked(
});
}
void AudioRendererSinkCacheImpl::CacheOrStopUnusedSink(
void AudioRendererSinkCache::CacheOrStopUnusedSink(
const LocalFrameToken& source_frame_token,
const std::string& device_id,
scoped_refptr<media::AudioRendererSink> sink) {
......@@ -347,7 +346,7 @@ void AudioRendererSinkCacheImpl::CacheOrStopUnusedSink(
DeleteLaterIfUnused(cache_entry.sink.get());
}
void AudioRendererSinkCacheImpl::DropSinksForFrame(
void AudioRendererSinkCache::DropSinksForFrame(
const LocalFrameToken& source_frame_token) {
base::AutoLock auto_lock(cache_lock_);
base::EraseIf(cache_, [source_frame_token](const CacheEntry& val) {
......@@ -359,7 +358,7 @@ void AudioRendererSinkCacheImpl::DropSinksForFrame(
});
}
size_t AudioRendererSinkCacheImpl::GetCacheSizeForTesting() {
size_t AudioRendererSinkCache::GetCacheSizeForTesting() {
return cache_.size();
}
......
......@@ -2,29 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_IMPL_H_
#include "third_party/blink/public/web/modules/media/audio/audio_renderer_sink_cache.h"
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_H_
#include <memory>
#include <string>
#include <vector>
#include "base/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequenced_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "base/unguessable_token.h"
#include "media/audio/audio_sink_parameters.h"
#include "media/base/output_device_info.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/renderer/modules/modules_export.h"
namespace media {
class AudioRendererSink;
}
namespace blink {
class LocalFrame;
// AudioRendererSinkCache implementation.
class MODULES_EXPORT AudioRendererSinkCacheImpl
: public AudioRendererSinkCache {
// Caches AudioRendererSink instances, provides them to the clients for usage,
// tracks their used/unused state, reuses them to obtain output device
// information, garbage-collects unused sinks.
// Must live on the main render thread. Thread safe.
class MODULES_EXPORT AudioRendererSinkCache {
public:
class FrameObserver;
......@@ -39,28 +47,27 @@ class MODULES_EXPORT AudioRendererSinkCacheImpl
static void InstallFrameObserver(LocalFrame& frame);
// |cleanup_task_runner| will be used to delete sinks when they are unused,
// AudioRendererSinkCacheImpl must outlive any tasks posted to it. Since
// AudioRendererSinkCache must outlive any tasks posted to it. Since
// the sink cache is normally a process-wide singleton, this isn't a problem.
AudioRendererSinkCacheImpl(
AudioRendererSinkCache(
scoped_refptr<base::SequencedTaskRunner> cleanup_task_runner,
CreateSinkCallback create_sink_callback,
base::TimeDelta delete_timeout);
~AudioRendererSinkCacheImpl() final;
~AudioRendererSinkCache();
// AudioRendererSinkCache implementation:
media::OutputDeviceInfo GetSinkInfo(const LocalFrameToken& source_frame_token,
const base::UnguessableToken& session_id,
const std::string& device_id) final;
const std::string& device_id);
scoped_refptr<media::AudioRendererSink> GetSink(
const LocalFrameToken& source_frame_token,
const std::string& device_id) final;
void ReleaseSink(const media::AudioRendererSink* sink_ptr) final;
const std::string& device_id);
void ReleaseSink(const media::AudioRendererSink* sink_ptr);
private:
friend class AudioRendererSinkCacheTest;
friend class CacheEntryFinder;
friend class AudioRendererSinkCacheImpl::FrameObserver;
friend class AudioRendererSinkCache::FrameObserver;
struct CacheEntry;
using CacheContainer = std::vector<CacheEntry>;
......@@ -90,7 +97,7 @@ class MODULES_EXPORT AudioRendererSinkCacheImpl
size_t GetCacheSizeForTesting();
// Global instance, set in constructor and unset in destructor.
static AudioRendererSinkCacheImpl* instance_;
static AudioRendererSinkCache* instance_;
// Renderer main task runner.
const scoped_refptr<base::SequencedTaskRunner> cleanup_task_runner_;
......@@ -110,9 +117,9 @@ class MODULES_EXPORT AudioRendererSinkCacheImpl
base::Lock cache_lock_;
CacheContainer cache_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererSinkCacheImpl);
DISALLOW_COPY_AND_ASSIGN(AudioRendererSinkCache);
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIA_AUDIO_AUDIO_RENDERER_SINK_CACHE_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache_impl.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h"
#include <utility>
......@@ -38,7 +38,7 @@ class AudioRendererSinkCacheTest : public testing::Test {
task_runner_context_(
std::make_unique<base::TestMockTimeTaskRunner::ScopedContext>(
task_runner_)),
cache_(std::make_unique<AudioRendererSinkCacheImpl>(
cache_(std::make_unique<AudioRendererSinkCache>(
task_runner_,
base::BindRepeating(&AudioRendererSinkCacheTest::CreateSink,
base::Unretained(this)),
......@@ -99,7 +99,7 @@ class AudioRendererSinkCacheTest : public testing::Test {
std::unique_ptr<base::TestMockTimeTaskRunner::ScopedContext>
task_runner_context_;
std::unique_ptr<AudioRendererSinkCacheImpl> cache_;
std::unique_ptr<AudioRendererSinkCache> cache_;
private:
DISALLOW_COPY_AND_ASSIGN(AudioRendererSinkCacheTest);
......@@ -259,7 +259,7 @@ TEST_F(AudioRendererSinkCacheTest, UnhealthySinkIsStopped) {
kUnhealthyDeviceId, media::OUTPUT_DEVICE_STATUS_ERROR_INTERNAL);
cache_.reset(); // Destruct first so there's only one cache at a time.
cache_ = std::make_unique<AudioRendererSinkCacheImpl>(
cache_ = std::make_unique<AudioRendererSinkCache>(
task_runner_,
base::BindRepeating(
[](scoped_refptr<media::AudioRendererSink> sink,
......@@ -287,7 +287,7 @@ TEST_F(AudioRendererSinkCacheTest, UnhealthySinkUsingSessionIdIsStopped) {
kUnhealthyDeviceId, media::OUTPUT_DEVICE_STATUS_ERROR_INTERNAL);
cache_.reset(); // Destruct first so there's only one cache at a time.
cache_ = std::make_unique<AudioRendererSinkCacheImpl>(
cache_ = std::make_unique<AudioRendererSinkCache>(
task_runner_,
base::BindRepeating(
[](scoped_refptr<media::AudioRendererSink> sink,
......@@ -352,8 +352,8 @@ TEST_F(AudioRendererSinkCacheTest, MultithreadedAccess) {
// Request device information on the first thread.
PostAndWaitUntilDone(
thread1, base::BindOnce(
base::IgnoreResult(&AudioRendererSinkCacheImpl::GetSinkInfo),
thread1,
base::BindOnce(base::IgnoreResult(&AudioRendererSinkCache::GetSinkInfo),
base::Unretained(cache_.get()), kFrameToken,
base::UnguessableToken(), kDefaultDeviceId));
......@@ -372,8 +372,8 @@ TEST_F(AudioRendererSinkCacheTest, MultithreadedAccess) {
// Request device information on the first thread again.
PostAndWaitUntilDone(
thread1, base::BindOnce(
base::IgnoreResult(&AudioRendererSinkCacheImpl::GetSinkInfo),
thread1,
base::BindOnce(base::IgnoreResult(&AudioRendererSinkCache::GetSinkInfo),
base::Unretained(cache_.get()), kFrameToken,
base::UnguessableToken(), kDefaultDeviceId));
EXPECT_EQ(1, sink_count());
......
......@@ -62,7 +62,7 @@
#include "third_party/blink/renderer/modules/launch/file_handling_expiry_impl.h"
#include "third_party/blink/renderer/modules/launch/web_launch_service_impl.h"
#include "third_party/blink/renderer/modules/manifest/manifest_manager.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache_impl.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h"
#include "third_party/blink/renderer/modules/media_controls/media_controls_impl.h"
#include "third_party/blink/renderer/modules/mediasource/media_source_registry_impl.h"
#include "third_party/blink/renderer/modules/mediastream/user_media_client.h"
......@@ -188,7 +188,7 @@ void ModulesInitializer::InstallSupplements(LocalFrame& frame) const {
DCHECK(WebLocalFrameImpl::FromFrame(&frame)->Client());
InspectorAccessibilityAgent::ProvideTo(&frame);
ImageDownloaderImpl::ProvideTo(frame);
AudioRendererSinkCacheImpl::InstallFrameObserver(frame);
AudioRendererSinkCache::InstallFrameObserver(frame);
}
MediaControls* ModulesInitializer::CreateMediaControls(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment