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

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

Issue 310853003: Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « components/nacl/renderer/trusted_plugin_channel.cc ('k') | content/child/child_thread.cc » ('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 (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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 // Find the renderer before creating the channel so if this fails early we 563 // Find the renderer before creating the channel so if this fails early we
564 // return without creating the channel. 564 // return without creating the channel.
565 base::FilePath renderer_path = ChildProcessHost::GetChildPath(flags); 565 base::FilePath renderer_path = ChildProcessHost::GetChildPath(flags);
566 if (renderer_path.empty()) 566 if (renderer_path.empty())
567 return false; 567 return false;
568 568
569 // Setup the IPC channel. 569 // Setup the IPC channel.
570 const std::string channel_id = 570 const std::string channel_id =
571 IPC::Channel::GenerateVerifiedChannelID(std::string()); 571 IPC::Channel::GenerateVerifiedChannelID(std::string());
572 channel_.reset( 572 channel_ = IPC::ChannelProxy::Create(
573 new IPC::ChannelProxy(channel_id, 573 channel_id,
574 IPC::Channel::MODE_SERVER, 574 IPC::Channel::MODE_SERVER,
575 this, 575 this,
576 BrowserThread::GetMessageLoopProxyForThread( 576 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get());
577 BrowserThread::IO).get()));
578 577
579 // Setup the Mojo channel. 578 // Setup the Mojo channel.
580 mojo_application_host_.reset(new MojoApplicationHost()); 579 mojo_application_host_.reset(new MojoApplicationHost());
581 mojo_application_host_->Init(); 580 mojo_application_host_->Init();
582 581
583 // Call the embedder first so that their IPC filters have priority. 582 // Call the embedder first so that their IPC filters have priority.
584 GetContentClient()->browser()->RenderProcessWillLaunch(this); 583 GetContentClient()->browser()->RenderProcessWillLaunch(this);
585 584
586 CreateMessageFilters(); 585 CreateMessageFilters();
587 586
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/nacl/renderer/trusted_plugin_channel.cc ('k') | content/child/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698