From bb86d4c372593987c16ab62d21456c4831946f1e Mon Sep 17 00:00:00 2001 From: "hidehiko@chromium.org" Date: Thu, 17 Apr 2014 12:17:15 +0000 Subject: Add IPC Channel for new ManifestService. This CL adds a new IPC Channel between NaCl plugin and the renderer process with introducing ManifestService (in the plugin) and ManifestServiceChannel (in the renderer) as its end points. Currently, ManifestService is just an empty service. Its functions will be added in following CLs. The service will be used only for non-SFI mode as a first step. On other platforms, IPC Channel will not be created. TEST=Ran trybots. BUG=358431 Review URL: https://codereview.chromium.org/231793003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264477 0039d316-1c4b-4281-b951-d872f2087c98 --- components/nacl/common/nacl_host_messages.h | 1 + components/nacl/common/nacl_messages.h | 5 +++-- components/nacl/common/nacl_types.cc | 2 ++ components/nacl/common/nacl_types.h | 16 +++++++++++----- 4 files changed, 17 insertions(+), 7 deletions(-) (limited to 'components/nacl/common') diff --git a/components/nacl/common/nacl_host_messages.h b/components/nacl/common/nacl_host_messages.h index da7478b..88237da 100644 --- a/components/nacl/common/nacl_host_messages.h +++ b/components/nacl/common/nacl_host_messages.h @@ -34,6 +34,7 @@ IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchResult) IPC_STRUCT_TRAITS_MEMBER(imc_channel_handle) IPC_STRUCT_TRAITS_MEMBER(ppapi_ipc_channel_handle) IPC_STRUCT_TRAITS_MEMBER(trusted_ipc_channel_handle) + IPC_STRUCT_TRAITS_MEMBER(manifest_service_ipc_channel_handle) IPC_STRUCT_TRAITS_MEMBER(plugin_pid) IPC_STRUCT_TRAITS_MEMBER(plugin_child_id) IPC_STRUCT_TRAITS_END() diff --git a/components/nacl/common/nacl_messages.h b/components/nacl/common/nacl_messages.h index 77db201..2b1fbba 100644 --- a/components/nacl/common/nacl_messages.h +++ b/components/nacl/common/nacl_messages.h @@ -90,7 +90,8 @@ IPC_SYNC_MESSAGE_CONTROL2_2(NaClProcessMsg_ResolveFileToken, // Notify the browser process that the server side of the PPAPI channel was // created successfully. -IPC_MESSAGE_CONTROL3(NaClProcessHostMsg_PpapiChannelsCreated, +IPC_MESSAGE_CONTROL4(NaClProcessHostMsg_PpapiChannelsCreated, IPC::ChannelHandle, /* browser_channel_handle */ IPC::ChannelHandle, /* ppapi_renderer_channel_handle */ - IPC::ChannelHandle /* trusted_renderer_channel_handle */) + IPC::ChannelHandle, /* trusted_renderer_channel_handle */ + IPC::ChannelHandle /* manifest_service_channel_handle */) diff --git a/components/nacl/common/nacl_types.cc b/components/nacl/common/nacl_types.cc index f7c0888..0dc5a1c 100644 --- a/components/nacl/common/nacl_types.cc +++ b/components/nacl/common/nacl_types.cc @@ -71,11 +71,13 @@ NaClLaunchResult::NaClLaunchResult( FileDescriptor imc_channel_handle, const IPC::ChannelHandle& ppapi_ipc_channel_handle, const IPC::ChannelHandle& trusted_ipc_channel_handle, + const IPC::ChannelHandle& manifest_service_ipc_channel_handle, base::ProcessId plugin_pid, int plugin_child_id) : imc_channel_handle(imc_channel_handle), ppapi_ipc_channel_handle(ppapi_ipc_channel_handle), trusted_ipc_channel_handle(trusted_ipc_channel_handle), + manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle), plugin_pid(plugin_pid), plugin_child_id(plugin_child_id) { } diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h index 84904cc2..04a9848 100644 --- a/components/nacl/common/nacl_types.h +++ b/components/nacl/common/nacl_types.h @@ -89,11 +89,13 @@ struct NaClLaunchParams { struct NaClLaunchResult { NaClLaunchResult(); - NaClLaunchResult(FileDescriptor imc_channel_handle, - const IPC::ChannelHandle& ppapi_ipc_channel_handle, - const IPC::ChannelHandle& trusted_ipc_channel_handle, - base::ProcessId plugin_pid, - int plugin_child_id); + NaClLaunchResult( + FileDescriptor imc_channel_handle, + const IPC::ChannelHandle& ppapi_ipc_channel_handle, + const IPC::ChannelHandle& trusted_ipc_channel_handle, + const IPC::ChannelHandle& manifest_service_ipc_channel_handle, + base::ProcessId plugin_pid, + int plugin_child_id); ~NaClLaunchResult(); // For plugin loader <-> renderer IMC communication. @@ -105,6 +107,10 @@ struct NaClLaunchResult { // For plugin loader <-> renderer control communication (loading and // starting nexe). IPC::ChannelHandle trusted_ipc_channel_handle; + + // For plugin <-> renderer ManifestService communication. + IPC::ChannelHandle manifest_service_ipc_channel_handle; + base::ProcessId plugin_pid; int plugin_child_id; }; -- cgit v1.1