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

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

Issue 301973003: Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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