| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Defines messages between the browser and plugin process, as well as between | 5 // Defines messages between the browser and plugin process, as well as between |
| 6 // the renderer and plugin process. | 6 // the renderer and plugin process. |
| 7 // | 7 // |
| 8 // See render_message* for information about the multi-pass include of headers. | 8 // See render_message* for information about the multi-pass include of headers. |
| 9 | 9 |
| 10 #ifndef CHROME_COMMON_PLUGIN_MESSAGES_H__ | 10 #ifndef CHROME_COMMON_PLUGIN_MESSAGES_H__ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 std::string url; | 48 std::string url; |
| 49 HANDLE notify_data; | 49 HANDLE notify_data; |
| 50 bool popups_allowed; | 50 bool popups_allowed; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 struct PluginMsg_URLRequestReply_Params { | 53 struct PluginMsg_URLRequestReply_Params { |
| 54 int resource_id; | 54 int resource_id; |
| 55 std::string url; | 55 std::string url; |
| 56 bool notify_needed; | 56 bool notify_needed; |
| 57 HANDLE notify_data; | 57 HANDLE notify_data; |
| 58 HANDLE stream; |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 struct PluginMsg_Paint_Params { | 61 struct PluginMsg_Paint_Params { |
| 61 gfx::Size size; | 62 gfx::Size size; |
| 62 gfx::Rect clip_rect; | 63 gfx::Rect clip_rect; |
| 63 gfx::Rect damaged_rect; | 64 gfx::Rect damaged_rect; |
| 64 | 65 |
| 65 // Bitmap's bits. | 66 // Bitmap's bits. |
| 66 HANDLE shared_memory; | 67 HANDLE shared_memory; |
| 67 | 68 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 }; | 221 }; |
| 221 | 222 |
| 222 template <> | 223 template <> |
| 223 struct ParamTraits<PluginMsg_URLRequestReply_Params> { | 224 struct ParamTraits<PluginMsg_URLRequestReply_Params> { |
| 224 typedef PluginMsg_URLRequestReply_Params param_type; | 225 typedef PluginMsg_URLRequestReply_Params param_type; |
| 225 static void Write(Message* m, const param_type& p) { | 226 static void Write(Message* m, const param_type& p) { |
| 226 WriteParam(m, p.resource_id); | 227 WriteParam(m, p.resource_id); |
| 227 WriteParam(m, p.url); | 228 WriteParam(m, p.url); |
| 228 WriteParam(m, p.notify_needed); | 229 WriteParam(m, p.notify_needed); |
| 229 WriteParam(m, p.notify_data); | 230 WriteParam(m, p.notify_data); |
| 231 WriteParam(m, p.stream); |
| 230 } | 232 } |
| 231 static bool Read(const Message* m, void** iter, param_type* p) { | 233 static bool Read(const Message* m, void** iter, param_type* p) { |
| 232 return | 234 return |
| 233 ReadParam(m, iter, &p->resource_id) && | 235 ReadParam(m, iter, &p->resource_id) && |
| 234 ReadParam(m, iter, &p->url) && | 236 ReadParam(m, iter, &p->url) && |
| 235 ReadParam(m, iter, &p->notify_needed) && | 237 ReadParam(m, iter, &p->notify_needed) && |
| 236 ReadParam(m, iter, &p->notify_data); | 238 ReadParam(m, iter, &p->notify_data) && |
| 239 ReadParam(m, iter, &p->stream); |
| 237 } | 240 } |
| 238 static void Log(const param_type& p, std::wstring* l) { | 241 static void Log(const param_type& p, std::wstring* l) { |
| 239 l->append(L"("); | 242 l->append(L"("); |
| 240 LogParam(p.resource_id, l); | 243 LogParam(p.resource_id, l); |
| 241 l->append(L", "); | 244 l->append(L", "); |
| 242 LogParam(p.url, l); | 245 LogParam(p.url, l); |
| 243 l->append(L", "); | 246 l->append(L", "); |
| 244 LogParam(p.notify_needed, l); | 247 LogParam(p.notify_needed, l); |
| 245 l->append(L", "); | 248 l->append(L", "); |
| 246 LogParam(p.notify_data, l); | 249 LogParam(p.notify_data, l); |
| 250 l->append(L", "); |
| 251 LogParam(p.stream, l); |
| 247 l->append(L")"); | 252 l->append(L")"); |
| 248 } | 253 } |
| 249 }; | 254 }; |
| 250 | 255 |
| 251 template <> | 256 template <> |
| 252 struct ParamTraits<PluginMsg_Paint_Params> { | 257 struct ParamTraits<PluginMsg_Paint_Params> { |
| 253 typedef PluginMsg_Paint_Params param_type; | 258 typedef PluginMsg_Paint_Params param_type; |
| 254 static void Write(Message* m, const param_type& p) { | 259 static void Write(Message* m, const param_type& p) { |
| 255 WriteParam(m, p.size); | 260 WriteParam(m, p.size); |
| 256 WriteParam(m, p.clip_rect); | 261 WriteParam(m, p.clip_rect); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } else if (p.type == NPVARIANT_PARAM_OBJECT_POINTER) { | 510 } else if (p.type == NPVARIANT_PARAM_OBJECT_POINTER) { |
| 506 LogParam(p.npobject_pointer, l); | 511 LogParam(p.npobject_pointer, l); |
| 507 } | 512 } |
| 508 } | 513 } |
| 509 }; | 514 }; |
| 510 | 515 |
| 511 } // namespace IPC | 516 } // namespace IPC |
| 512 | 517 |
| 513 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H__ | 518 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H__ |
| 514 | 519 |
| OLD | NEW |