summaryrefslogtreecommitdiffstats
path: root/chrome/common/plugin_messages.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-29 22:35:33 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-29 22:35:33 +0000
commitea3d1d84be3d6f97bf50e76511c9e26af6895533 (patch)
tree94c73f600dcca23329221ad8c51e6a5158263f7e /chrome/common/plugin_messages.h
parent403e46333b43009776a08273501e4ca8c5c06e12 (diff)
downloadchromium_src-ea3d1d84be3d6f97bf50e76511c9e26af6895533.zip
chromium_src-ea3d1d84be3d6f97bf50e76511c9e26af6895533.tar.gz
chromium_src-ea3d1d84be3d6f97bf50e76511c9e26af6895533.tar.bz2
Fix passing pointers between processes.
BUG=31880 Review URL: http://codereview.chromium.org/558036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages.h')
-rw-r--r--chrome/common/plugin_messages.h74
1 files changed, 9 insertions, 65 deletions
diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h
index 736e55e..74de33f 100644
--- a/chrome/common/plugin_messages.h
+++ b/chrome/common/plugin_messages.h
@@ -42,25 +42,14 @@ struct PluginMsg_Init_Params {
};
struct PluginHostMsg_URLRequest_Params {
+ std::string url;
std::string method;
- bool is_javascript_url;
std::string target;
std::vector<char> buffer;
- bool is_file_data;
- bool notify;
- std::string url;
- intptr_t notify_data;
+ int notify_id;
bool popups_allowed;
};
-struct PluginMsg_URLRequestReply_Params {
- unsigned long resource_id;
- GURL url;
- bool notify_needed;
- intptr_t notify_data;
- intptr_t stream;
-};
-
struct PluginMsg_DidReceiveResponseParams {
unsigned long id;
std::string mime_type;
@@ -163,45 +152,33 @@ template <>
struct ParamTraits<PluginHostMsg_URLRequest_Params> {
typedef PluginHostMsg_URLRequest_Params param_type;
static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.url);
WriteParam(m, p.method);
- WriteParam(m, p.is_javascript_url);
WriteParam(m, p.target);
WriteParam(m, p.buffer);
- WriteParam(m, p.is_file_data);
- WriteParam(m, p.notify);
- WriteParam(m, p.url);
- WriteParam(m, p.notify_data);
+ WriteParam(m, p.notify_id);
WriteParam(m, p.popups_allowed);
}
static bool Read(const Message* m, void** iter, param_type* p) {
return
+ ReadParam(m, iter, &p->url) &&
ReadParam(m, iter, &p->method) &&
- ReadParam(m, iter, &p->is_javascript_url) &&
ReadParam(m, iter, &p->target) &&
ReadParam(m, iter, &p->buffer) &&
- ReadParam(m, iter, &p->is_file_data) &&
- ReadParam(m, iter, &p->notify) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->notify_data) &&
+ ReadParam(m, iter, &p->notify_id) &&
ReadParam(m, iter, &p->popups_allowed);
}
static void Log(const param_type& p, std::wstring* l) {
l->append(L"(");
- LogParam(p.method, l);
+ LogParam(p.url, l);
l->append(L", ");
- LogParam(p.is_javascript_url, l);
+ LogParam(p.method, l);
l->append(L", ");
LogParam(p.target, l);
l->append(L", ");
LogParam(p.buffer, l);
l->append(L", ");
- LogParam(p.is_file_data, l);
- l->append(L", ");
- LogParam(p.notify, l);
- l->append(L", ");
- LogParam(p.url, l);
- l->append(L", ");
- LogParam(p.notify_data, l);
+ LogParam(p.notify_id, l);
l->append(L", ");
LogParam(p.popups_allowed, l);
l->append(L")");
@@ -209,39 +186,6 @@ struct ParamTraits<PluginHostMsg_URLRequest_Params> {
};
template <>
-struct ParamTraits<PluginMsg_URLRequestReply_Params> {
- typedef PluginMsg_URLRequestReply_Params param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.resource_id);
- WriteParam(m, p.url);
- WriteParam(m, p.notify_needed);
- WriteParam(m, p.notify_data);
- WriteParam(m, p.stream);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->resource_id) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->notify_needed) &&
- ReadParam(m, iter, &p->notify_data) &&
- ReadParam(m, iter, &p->stream);
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.resource_id, l);
- l->append(L", ");
- LogParam(p.url, l);
- l->append(L", ");
- LogParam(p.notify_needed, l);
- l->append(L", ");
- LogParam(p.notify_data, l);
- l->append(L", ");
- LogParam(p.stream, l);
- l->append(L")");
- }
-};
-
-template <>
struct ParamTraits<PluginMsg_DidReceiveResponseParams> {
typedef PluginMsg_DidReceiveResponseParams param_type;
static void Write(Message* m, const param_type& p) {