summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_process_host.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 20:50:09 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 20:50:09 +0000
commit255a9f6c6f6db2a95fec78c6c2f2c504c655e733 (patch)
tree471d21ae7e41cc2e33a491a5309b3ea77430ebca /chrome/browser/plugin_process_host.h
parent04b74d13d927794495a1a3a1b89d67f85a104e12 (diff)
downloadchromium_src-255a9f6c6f6db2a95fec78c6c2f2c504c655e733.zip
chromium_src-255a9f6c6f6db2a95fec78c6c2f2c504c655e733.tar.gz
chromium_src-255a9f6c6f6db2a95fec78c6c2f2c504c655e733.tar.bz2
posix: two related changes to make plugin IPC work on POSIX.
* use a new ChannelHandle type when passing IPC channels over IPC The current POSIX code assumes that one end of a channel is always a new child process (a renderer). For plugins we need to be able to construct channels between each of the browser, plugin, and renderer. This change augments the messages related to creating channels to allow passing in a base::FileDescriptor containing the socket. The intent is that the browser process, as the initial interchange between plugin and renderer, creates the socketpair() on their behalf and hands each their respective end of the connection. * register channel endpoint names in the global pipe map The plugin code assumes it can map from a string to a channel endpoint at basically any time. So whenever we get a channel endpoint over IPC, we install it in a global map of channel endpoints. Review URL: http://codereview.chromium.org/113157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.h')
-rw-r--r--chrome/browser/plugin_process_host.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index 56004f6..9a74dff 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -18,6 +18,7 @@
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/child_process_host.h"
+#include "chrome/common/ipc_channel_handle.h"
#include "webkit/glue/webplugininfo.h"
class URLRequestContext;
@@ -65,7 +66,7 @@ class PluginProcessHost : public ChildProcessHost,
// Sends the reply to an open channel request to the renderer with the given
// channel name.
static void ReplyToRenderer(ResourceMessageFilter* renderer_message_filter,
- const std::string& channel,
+ const IPC::ChannelHandle& channel,
const FilePath& plugin_path,
IPC::Message* reply_msg);
@@ -113,12 +114,15 @@ class PluginProcessHost : public ChildProcessHost,
struct ChannelRequest {
ChannelRequest(ResourceMessageFilter* renderer_message_filter,
- const std::string& m, IPC::Message* r) :
+ const std::string& m, IPC::Message* r,
+ int s) :
mime_type(m), reply_msg(r),
- renderer_message_filter_(renderer_message_filter) { }
+ renderer_message_filter_(renderer_message_filter),
+ socket(s) { }
std::string mime_type;
IPC::Message* reply_msg;
scoped_refptr<ResourceMessageFilter> renderer_message_filter_;
+ int socket;
};
// These are channel requests that we are waiting to send to the