diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-27 01:43:51 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-27 01:43:51 +0000 |
commit | 3dfc7a41b5e87e3fb1b99836e26a8a62aa3efcfe (patch) | |
tree | a075d88642cf2ee3c0597b5569e1b5232254063d /chrome/common/plugin_messages_internal.h | |
parent | 550c2e55ca73daff47dbcfffd1789c121064f093 (diff) | |
download | chromium_src-3dfc7a41b5e87e3fb1b99836e26a8a62aa3efcfe.zip chromium_src-3dfc7a41b5e87e3fb1b99836e26a8a62aa3efcfe.tar.gz chromium_src-3dfc7a41b5e87e3fb1b99836e26a8a62aa3efcfe.tar.bz2 |
mac/linux: rework plugin channel file descriptor creation
This CL fixes a bug where the same renderer could open several channels to the same plugin process, which end up having the same name. This CL makes it that there is only one channel for each (plugin, renderer) pair, just like on Windows.
The socketpair is created in the plugin process (which can ensure that only one channel per renderer gets created), and sends the renderer side through the browser process.
Note: this should essentially be a noop on Windows.
Review URL: http://codereview.chromium.org/149062
Patch from Antoine Labour <piman@google.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages_internal.h')
-rw-r--r-- | chrome/common/plugin_messages_internal.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h index 500bd93..9eed897 100644 --- a/chrome/common/plugin_messages_internal.h +++ b/chrome/common/plugin_messages_internal.h @@ -20,19 +20,9 @@ IPC_BEGIN_MESSAGES(PluginProcess) // PluginProcessHostMsg_ChannelCreated message. The renderer's process_id is // passed so that the plugin process reuses an existing channel to that // process if it exists. - // It would be nice to use #ifdefs inside the parameter list to not need to - // duplicate this across POSIX/Windows but the Visual Studio compiler doesn't - // like that. -#if defined(OS_WIN) IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, int /* process_id */, bool /* off_the_record */) -#elif defined(OS_POSIX) - IPC_MESSAGE_CONTROL3(PluginProcessMsg_CreateChannel, - base::FileDescriptor /* socket for new channel */, - int /* process_id */, - bool /* off_the_record */) -#endif // Allows a chrome plugin loaded in the browser process to send arbitrary // data to an instance of the same plugin loaded in a plugin process. @@ -57,7 +47,7 @@ IPC_END_MESSAGES(PluginProcess) IPC_BEGIN_MESSAGES(PluginProcessHost) // Response to a PluginProcessMsg_CreateChannel message. IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated, - std::string /* channel_name */) + IPC::ChannelHandle /* channel_handle */) IPC_SYNC_MESSAGE_CONTROL0_1(PluginProcessHostMsg_GetPluginFinderUrl, std::string /* plugin finder URL */) |