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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 354002: Sixth patch in getting rid of caching MessageLoop pointers. Audio and automa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 bool BrowserRenderProcessHost::Init(bool is_extensions_process) { 246 bool BrowserRenderProcessHost::Init(bool is_extensions_process) {
247 // calling Init() more than once does nothing, this makes it more convenient 247 // calling Init() more than once does nothing, this makes it more convenient
248 // for the view host which may not be sure in some cases 248 // for the view host which may not be sure in some cases
249 if (channel_.get()) 249 if (channel_.get())
250 return true; 250 return true;
251 251
252 // run the IPC channel on the shared IO thread. 252 // run the IPC channel on the shared IO thread.
253 base::Thread* io_thread = g_browser_process->io_thread(); 253 base::Thread* io_thread = g_browser_process->io_thread();
254 254
255 // Construct the AudioRendererHost with the IO thread. 255 // Construct the AudioRendererHost with the IO thread.
256 audio_renderer_host_ = 256 audio_renderer_host_ = new AudioRendererHost();
257 new AudioRendererHost(io_thread->message_loop());
258 257
259 scoped_refptr<ResourceMessageFilter> resource_message_filter = 258 scoped_refptr<ResourceMessageFilter> resource_message_filter =
260 new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(), 259 new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(),
261 id(), 260 id(),
262 audio_renderer_host_.get(), 261 audio_renderer_host_.get(),
263 PluginService::GetInstance(), 262 PluginService::GetInstance(),
264 g_browser_process->print_job_manager(), 263 g_browser_process->print_job_manager(),
265 profile(), 264 profile(),
266 widget_helper_, 265 widget_helper_,
267 profile()->GetSpellChecker()); 266 profile()->GetSpellChecker());
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 profile()->GetExtensionMessageService()->RemoveEventListener( 1033 profile()->GetExtensionMessageService()->RemoveEventListener(
1035 event_name, id()); 1034 event_name, id());
1036 } 1035 }
1037 } 1036 }
1038 1037
1039 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) { 1038 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) {
1040 if (profile()->GetExtensionMessageService()) { 1039 if (profile()->GetExtensionMessageService()) {
1041 profile()->GetExtensionMessageService()->CloseChannel(port_id); 1040 profile()->GetExtensionMessageService()->CloseChannel(port_id);
1042 } 1041 }
1043 } 1042 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698