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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 20131: Create AudioRendererHost in BrowserRenderProcessHost and hook with ResourceMessageFilter (Closed)
Patch Set: mac project files Created 11 years, 10 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: chrome/browser/renderer_host/browser_render_process_host.cc
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index b020feb4819e0ec457fd684b89b4bfa8a07572bf..24d5f4da7dd7bf944f765813e1881310840dbcc0 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -155,6 +155,10 @@ BrowserRenderProcessHost::~BrowserRenderProcessHost() {
// We may have some unsent messages at this point, but that's OK.
channel_.reset();
+ // Destroy the AudioRendererHost properly.
+ if (audio_renderer_host_.get())
+ audio_renderer_host_->Destroy();
+
if (process_.handle() && !run_renderer_in_process()) {
ProcessWatcher::EnsureProcessTerminated(process_.handle());
}
@@ -195,8 +199,13 @@ bool BrowserRenderProcessHost::Init() {
// run the IPC channel on the shared IO thread.
base::Thread* io_thread = g_browser_process->io_thread();
+ // Construct the AudioRendererHost with the IO thread.
+ audio_renderer_host_ =
+ new AudioRendererHost(io_thread->message_loop());
+
scoped_refptr<ResourceMessageFilter> resource_message_filter =
new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(),
+ audio_renderer_host_.get(),
PluginService::GetInstance(),
g_browser_process->print_job_manager(),
host_id(),
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698