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

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

Issue 1930393002: Switch stream creation and closing in Chrome audio rendering from IPC to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unique_ptr for Binding Created 4 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/media/audio_output_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6bb8df43f18c52bd7d062cfe36f7465a7172d4f8..ce47daa0a25de4f71663d5818b33cc7a08e411ac 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -271,6 +271,7 @@ RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
static_cast<InputRouterImpl*>(render_widget_host_->input_router());
ir->SetFrameTreeNodeId(frame_tree_node_->frame_tree_node_id());
}
+ audio_output_impl_ = 0;
}
RenderFrameHostImpl::~RenderFrameHostImpl() {
@@ -316,6 +317,9 @@ RenderFrameHostImpl::~RenderFrameHostImpl() {
// Notify the FrameTree that this RFH is going away, allowing it to shut down
// the corresponding RenderViewHost if it is no longer needed.
frame_tree_->ReleaseRenderViewHostRef(render_view_host_);
+ if (audio_output_impl_) {
+ audio_output_impl_->Reset();
+ }
}
int RenderFrameHostImpl::GetRoutingID() {
@@ -2013,6 +2017,9 @@ void RenderFrameHostImpl::RegisterMojoServices() {
GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind(
&FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get())));
+ GetServiceRegistry()->AddService(
+ base::Bind(&AudioOutputImpl::CreateService, this));
+
#if defined(ENABLE_WEBVR)
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/media/audio_output_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698