| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 | 561 |
| 562 // Find the renderer before creating the channel so if this fails early we | 562 // Find the renderer before creating the channel so if this fails early we |
| 563 // return without creating the channel. | 563 // return without creating the channel. |
| 564 base::FilePath renderer_path = ChildProcessHost::GetChildPath(flags); | 564 base::FilePath renderer_path = ChildProcessHost::GetChildPath(flags); |
| 565 if (renderer_path.empty()) | 565 if (renderer_path.empty()) |
| 566 return false; | 566 return false; |
| 567 | 567 |
| 568 // Setup the IPC channel. | 568 // Setup the IPC channel. |
| 569 const std::string channel_id = | 569 const std::string channel_id = |
| 570 IPC::Channel::GenerateVerifiedChannelID(std::string()); | 570 IPC::Channel::GenerateVerifiedChannelID(std::string()); |
| 571 channel_.reset( | 571 channel_ = IPC::ChannelProxy::CreateServer( |
| 572 new IPC::ChannelProxy(channel_id, | 572 channel_id, |
| 573 IPC::Channel::MODE_SERVER, | 573 this, |
| 574 this, | 574 BrowserThread::GetMessageLoopProxyForThread( |
| 575 BrowserThread::GetMessageLoopProxyForThread( | 575 BrowserThread::IO).get()); |
| 576 BrowserThread::IO).get())); | |
| 577 | 576 |
| 578 // Setup the Mojo channel. | 577 // Setup the Mojo channel. |
| 579 mojo_application_host_.reset(new MojoApplicationHost()); | 578 mojo_application_host_.reset(new MojoApplicationHost()); |
| 580 mojo_application_host_->Init(); | 579 mojo_application_host_->Init(); |
| 581 | 580 |
| 582 // Call the embedder first so that their IPC filters have priority. | 581 // Call the embedder first so that their IPC filters have priority. |
| 583 GetContentClient()->browser()->RenderProcessWillLaunch(this); | 582 GetContentClient()->browser()->RenderProcessWillLaunch(this); |
| 584 | 583 |
| 585 CreateMessageFilters(); | 584 CreateMessageFilters(); |
| 586 | 585 |
| (...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2247 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
| 2249 IPC::Message* reply, | 2248 IPC::Message* reply, |
| 2250 const gfx::GpuMemoryBufferHandle& handle) { | 2249 const gfx::GpuMemoryBufferHandle& handle) { |
| 2251 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2250 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2252 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2251 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
| 2253 handle); | 2252 handle); |
| 2254 Send(reply); | 2253 Send(reply); |
| 2255 } | 2254 } |
| 2256 | 2255 |
| 2257 } // namespace content | 2256 } // namespace content |
| OLD | NEW |