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

Unified Diff: chrome/nacl/nacl_listener.cc

Issue 10912011: Change NaCl IPC PPAPI proxy startup to support a NaCl-Browser process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/nacl/nacl_ipc_adapter.cc ('k') | ppapi/proxy/plugin_main_nacl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl/nacl_listener.cc
===================================================================
--- chrome/nacl/nacl_listener.cc (revision 154143)
+++ chrome/nacl/nacl_listener.cc (working copy)
@@ -198,22 +198,22 @@
}
if (params.enable_ipc_proxy) {
- // Create the server side of the channel and notify the process host so it
- // can reply to the renderer, which will connect as client.
- IPC::ChannelHandle channel_handle =
+ // Create the initial PPAPI IPC channel between the NaCl IRT and the
+ // browser process. The IRT uses this channel to communicate with the
+ // browser and to create additional IPC channels to renderer processes.
+ IPC::ChannelHandle handle =
IPC::Channel::GenerateVerifiedChannelID("nacl");
-
- scoped_refptr<NaClIPCAdapter> ipc_adapter(new NaClIPCAdapter(
- channel_handle, io_thread_.message_loop_proxy()));
- args->initial_ipc_desc = ipc_adapter.get()->MakeNaClDesc();
-
+ scoped_refptr<NaClIPCAdapter> ipc_adapter(
+ new NaClIPCAdapter(handle, io_thread_.message_loop_proxy()));
+ // Pass a NaClDesc to the untrusted side. This will hold a ref to the
+ // NaClIPCAdapter.
+ args->initial_ipc_desc = ipc_adapter->MakeNaClDesc();
#if defined(OS_POSIX)
- channel_handle.socket = base::FileDescriptor(
- ipc_adapter.get()->TakeClientFileDescriptor(), true);
+ handle.socket = base::FileDescriptor(
+ ipc_adapter->TakeClientFileDescriptor(), true);
#endif
-
- if (!Send(new NaClProcessHostMsg_PpapiChannelCreated(channel_handle)))
- LOG(ERROR) << "Failed to send IPC channel handle to renderer.";
+ if (!Send(new NaClProcessHostMsg_PpapiChannelCreated(handle)))
+ LOG(ERROR) << "Failed to send IPC channel handle to NaClProcessHost.";
}
std::vector<nacl::FileDescriptor> handles = params.handles;
« no previous file with comments | « chrome/nacl/nacl_ipc_adapter.cc ('k') | ppapi/proxy/plugin_main_nacl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698