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

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: 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
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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 scoped_refptr<base::SingleThreadTaskRunner> runner = 719 scoped_refptr<base::SingleThreadTaskRunner> runner =
720 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 720 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
721 scoped_refptr<base::SequencedTaskRunner> mojo_task_runner = 721 scoped_refptr<base::SequencedTaskRunner> mojo_task_runner =
722 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) 722 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
723 ->task_runner(); 723 ->task_runner();
724 if (ShouldUseMojoChannel()) { 724 if (ShouldUseMojoChannel()) {
725 VLOG(1) << "Mojo Channel is enabled on host"; 725 VLOG(1) << "Mojo Channel is enabled on host";
726 726
727 return IPC::ChannelProxy::Create( 727 return IPC::ChannelProxy::Create(
728 IPC::ChannelMojo::CreateServerFactory( 728 IPC::ChannelMojo::CreateServerFactory(
729 mojo_task_runner, channel_id, 729 mojo_task_runner, channel_id),
730 content::ChildProcessHost::GetAttachmentBroker()),
731 this, runner.get()); 730 this, runner.get());
732 } 731 }
733 732
734 return IPC::ChannelProxy::Create( 733 return IPC::ChannelProxy::Create(
735 channel_id, IPC::Channel::MODE_SERVER, this, runner.get(), 734 channel_id, IPC::Channel::MODE_SERVER, this, runner.get());
736 content::ChildProcessHost::GetAttachmentBroker());
737 } 735 }
738 736
739 void RenderProcessHostImpl::CreateMessageFilters() { 737 void RenderProcessHostImpl::CreateMessageFilters() {
740 DCHECK_CURRENTLY_ON(BrowserThread::UI); 738 DCHECK_CURRENTLY_ON(BrowserThread::UI);
741 const base::CommandLine& browser_command_line = 739 const base::CommandLine& browser_command_line =
742 *base::CommandLine::ForCurrentProcess(); 740 *base::CommandLine::ForCurrentProcess();
743 AddFilter(new ResourceSchedulerFilter(GetID())); 741 AddFilter(new ResourceSchedulerFilter(GetID()));
744 MediaInternals* media_internals = MediaInternals::GetInstance(); 742 MediaInternals* media_internals = MediaInternals::GetInstance();
745 media::AudioManager* audio_manager = 743 media::AudioManager* audio_manager =
746 BrowserMainLoop::GetInstance()->audio_manager(); 744 BrowserMainLoop::GetInstance()->audio_manager();
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2533 void RenderProcessHostImpl::GetAudioOutputControllers( 2531 void RenderProcessHostImpl::GetAudioOutputControllers(
2534 const GetAudioOutputControllersCallback& callback) const { 2532 const GetAudioOutputControllersCallback& callback) const {
2535 audio_renderer_host()->GetOutputControllers(callback); 2533 audio_renderer_host()->GetOutputControllers(callback);
2536 } 2534 }
2537 2535
2538 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2536 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2539 return bluetooth_dispatcher_host_.get(); 2537 return bluetooth_dispatcher_host_.get();
2540 } 2538 }
2541 2539
2542 } // namespace content 2540 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698