Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2812883003: Browser test dry runs with mojo audio streams.
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index c5c6b04749a9de5743278470bc877171e85f9b35..fbd52c507b259ace03d6d8a721d1e10cce2e06e1 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -2830,6 +2830,12 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
base::Bind(&IgnoreInterfaceRequest<device::mojom::VRService>));
#endif
+ if (RendererAudioOutputStreamFactoryContextImpl::UseMojoFactories()) {
+ GetInterfaceRegistry()->AddInterface(base::BindRepeating(
+ &RenderFrameHostImpl::CreateAudioOutputStreamFactory,
+ base::Unretained(this)));
+ }
+
#if BUILDFLAG(ENABLE_WEBRTC)
// BrowserMainLoop::GetInstance() may be null on unit tests.
if (BrowserMainLoop::GetInstance()) {
@@ -3829,6 +3835,15 @@ void RenderFrameHostImpl::ResetFeaturePolicy() {
parent_policy, container_policy, last_committed_origin_);
}
+void RenderFrameHostImpl::CreateAudioOutputStreamFactory(
+ const service_manager::BindSourceInfo& source_info,
+ mojom::RendererAudioOutputStreamFactoryRequest request) {
+ RenderProcessHostImpl* process =
+ static_cast<RenderProcessHostImpl*>(GetProcess());
+ audio_output_stream_factory_ = process->CreateAudioOutputStreamFactory(
+ GetRoutingID(), std::move(request));
+}
+
void RenderFrameHostImpl::BindMediaInterfaceFactoryRequest(
const service_manager::BindSourceInfo& source_info,
media::mojom::InterfaceFactoryRequest request) {

Powered by Google App Engine
This is Rietveld 408576698