summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/plugin_messages.h74
-rw-r--r--chrome/common/plugin_messages_internal.h44
2 files changed, 31 insertions, 87 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) {
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index c220b8b..f65816c 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -202,14 +202,13 @@ IPC_BEGIN_MESSAGES(Plugin)
base::SharedMemoryHandle /* shared_memory*/,
size_t /* size */)
- IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetPluginScriptableObject,
- int /* route_id */,
- intptr_t /* npobject_ptr */)
+ IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject,
+ int /* route_id */)
- IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_DidFinishLoadWithReason,
- GURL /* url */,
- int /* reason */,
- intptr_t /* notify_data */)
+ IPC_MESSAGE_ROUTED3(PluginMsg_DidFinishLoadWithReason,
+ GURL /* url */,
+ int /* reason */,
+ int /* notify_id */)
// Updates the plugin location.
IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry,
@@ -244,12 +243,11 @@ IPC_BEGIN_MESSAGES(Plugin)
IPC_MESSAGE_ROUTED1(PluginMsg_DidFail,
unsigned long /* id */)
- IPC_MESSAGE_ROUTED5(PluginMsg_SendJavaScriptStream,
+ IPC_MESSAGE_ROUTED4(PluginMsg_SendJavaScriptStream,
GURL /* url */,
std::string /* result */,
bool /* success */,
- bool /* notify required */,
- intptr_t /* notify data */)
+ int /* notify_id */)
IPC_MESSAGE_ROUTED2(PluginMsg_DidReceiveManualResponse,
GURL /* url */,
@@ -264,8 +262,14 @@ IPC_BEGIN_MESSAGES(Plugin)
IPC_MESSAGE_ROUTED0(PluginMsg_InstallMissingPlugin)
- IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_HandleURLRequestReply,
- PluginMsg_URLRequestReply_Params)
+ IPC_MESSAGE_ROUTED3(PluginMsg_HandleURLRequestReply,
+ unsigned long /* resource_id */,
+ GURL /* url */,
+ int /* notify_id */)
+
+ IPC_MESSAGE_ROUTED2(PluginMsg_HTTPRangeRequestReply,
+ unsigned long /* resource_id */,
+ int /* range_request_id */)
IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_CreateCommandBuffer,
int /* route_id */)
@@ -307,15 +311,13 @@ IPC_BEGIN_MESSAGES(PluginHost)
IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect,
gfx::Rect /* rect */)
- IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_GetWindowScriptNPObject,
+ IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject,
int /* route id */,
- bool /* success */,
- intptr_t /* npobject_ptr */)
+ bool /* success */)
- IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_GetPluginElement,
+ IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetPluginElement,
int /* route id */,
- bool /* success */,
- intptr_t /* npobject_ptr */)
+ bool /* success */)
IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie,
GURL /* url */,
@@ -356,12 +358,10 @@ IPC_BEGIN_MESSAGES(PluginHost)
IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad)
- IPC_MESSAGE_ROUTED5(PluginHostMsg_InitiateHTTPRangeRequest,
+ IPC_MESSAGE_ROUTED3(PluginHostMsg_InitiateHTTPRangeRequest,
std::string /* url */,
std::string /* range_info */,
- intptr_t /* existing_stream */,
- bool /* notify_needed */,
- intptr_t /* notify_data */)
+ int /* range_request_id */)
IPC_MESSAGE_ROUTED2(PluginHostMsg_DeferResourceLoading,
unsigned long /* resource_id */,