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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1292263003: ipc: Use a global for the process's attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_message2
Patch Set: Comments from avi. Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 scoped_refptr<base::SingleThreadTaskRunner> runner = 730 scoped_refptr<base::SingleThreadTaskRunner> runner =
731 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 731 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
732 scoped_refptr<base::SequencedTaskRunner> mojo_task_runner = 732 scoped_refptr<base::SequencedTaskRunner> mojo_task_runner =
733 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) 733 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
734 ->task_runner(); 734 ->task_runner();
735 if (ShouldUseMojoChannel()) { 735 if (ShouldUseMojoChannel()) {
736 VLOG(1) << "Mojo Channel is enabled on host"; 736 VLOG(1) << "Mojo Channel is enabled on host";
737 737
738 return IPC::ChannelProxy::Create( 738 return IPC::ChannelProxy::Create(
739 IPC::ChannelMojo::CreateServerFactory( 739 IPC::ChannelMojo::CreateServerFactory(
740 mojo_task_runner, channel_id, 740 mojo_task_runner, channel_id),
741 content::ChildProcessHost::GetAttachmentBroker()),
742 this, runner.get()); 741 this, runner.get());
743 } 742 }
744 743
745 return IPC::ChannelProxy::Create( 744 return IPC::ChannelProxy::Create(
746 channel_id, IPC::Channel::MODE_SERVER, this, runner.get(), 745 channel_id, IPC::Channel::MODE_SERVER, this, runner.get());
747 content::ChildProcessHost::GetAttachmentBroker());
748 } 746 }
749 747
750 void RenderProcessHostImpl::CreateMessageFilters() { 748 void RenderProcessHostImpl::CreateMessageFilters() {
751 DCHECK_CURRENTLY_ON(BrowserThread::UI); 749 DCHECK_CURRENTLY_ON(BrowserThread::UI);
752 const base::CommandLine& browser_command_line = 750 const base::CommandLine& browser_command_line =
753 *base::CommandLine::ForCurrentProcess(); 751 *base::CommandLine::ForCurrentProcess();
754 AddFilter(new ResourceSchedulerFilter(GetID())); 752 AddFilter(new ResourceSchedulerFilter(GetID()));
755 MediaInternals* media_internals = MediaInternals::GetInstance(); 753 MediaInternals* media_internals = MediaInternals::GetInstance();
756 media::AudioManager* audio_manager = 754 media::AudioManager* audio_manager =
757 BrowserMainLoop::GetInstance()->audio_manager(); 755 BrowserMainLoop::GetInstance()->audio_manager();
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2579 void RenderProcessHostImpl::GetAudioOutputControllers( 2577 void RenderProcessHostImpl::GetAudioOutputControllers(
2580 const GetAudioOutputControllersCallback& callback) const { 2578 const GetAudioOutputControllersCallback& callback) const {
2581 audio_renderer_host()->GetOutputControllers(callback); 2579 audio_renderer_host()->GetOutputControllers(callback);
2582 } 2580 }
2583 2581
2584 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2582 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2585 return bluetooth_dispatcher_host_.get(); 2583 return bluetooth_dispatcher_host_.get();
2586 } 2584 }
2587 2585
2588 } // namespace content 2586 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698