| OLD | NEW |
| 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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 const std::string& channel_id) { | 736 const std::string& channel_id) { |
| 737 scoped_refptr<base::SingleThreadTaskRunner> runner = | 737 scoped_refptr<base::SingleThreadTaskRunner> runner = |
| 738 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 738 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
| 739 scoped_refptr<base::SequencedTaskRunner> mojo_task_runner = | 739 scoped_refptr<base::SequencedTaskRunner> mojo_task_runner = |
| 740 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) | 740 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
| 741 ->task_runner(); | 741 ->task_runner(); |
| 742 if (ShouldUseMojoChannel()) { | 742 if (ShouldUseMojoChannel()) { |
| 743 VLOG(1) << "Mojo Channel is enabled on host"; | 743 VLOG(1) << "Mojo Channel is enabled on host"; |
| 744 | 744 |
| 745 return IPC::ChannelProxy::Create( | 745 return IPC::ChannelProxy::Create( |
| 746 IPC::ChannelMojo::CreateServerFactory( | 746 IPC::ChannelMojo::CreateServerFactory(mojo_task_runner, channel_id), |
| 747 mojo_task_runner, channel_id), | |
| 748 this, runner.get()); | 747 this, runner.get()); |
| 749 } | 748 } |
| 750 | 749 |
| 751 return IPC::ChannelProxy::Create( | 750 return IPC::ChannelProxy::Create(channel_id, IPC::Channel::MODE_SERVER, this, |
| 752 channel_id, IPC::Channel::MODE_SERVER, this, runner.get()); | 751 runner.get()); |
| 753 } | 752 } |
| 754 | 753 |
| 755 void RenderProcessHostImpl::CreateMessageFilters() { | 754 void RenderProcessHostImpl::CreateMessageFilters() { |
| 756 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 755 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 757 const base::CommandLine& browser_command_line = | 756 const base::CommandLine& browser_command_line = |
| 758 *base::CommandLine::ForCurrentProcess(); | 757 *base::CommandLine::ForCurrentProcess(); |
| 759 AddFilter(new ResourceSchedulerFilter(GetID())); | 758 AddFilter(new ResourceSchedulerFilter(GetID())); |
| 760 MediaInternals* media_internals = MediaInternals::GetInstance(); | 759 MediaInternals* media_internals = MediaInternals::GetInstance(); |
| 761 media::AudioManager* audio_manager = | 760 media::AudioManager* audio_manager = |
| 762 BrowserMainLoop::GetInstance()->audio_manager(); | 761 BrowserMainLoop::GetInstance()->audio_manager(); |
| (...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2583 void RenderProcessHostImpl::GetAudioOutputControllers( | 2582 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2584 const GetAudioOutputControllersCallback& callback) const { | 2583 const GetAudioOutputControllersCallback& callback) const { |
| 2585 audio_renderer_host()->GetOutputControllers(callback); | 2584 audio_renderer_host()->GetOutputControllers(callback); |
| 2586 } | 2585 } |
| 2587 | 2586 |
| 2588 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2587 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2589 return bluetooth_dispatcher_host_.get(); | 2588 return bluetooth_dispatcher_host_.get(); |
| 2590 } | 2589 } |
| 2591 | 2590 |
| 2592 } // namespace content | 2591 } // namespace content |
| OLD | NEW |