| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 }; | 58 }; |
| 59 | 59 |
| 60 struct PluginMsg_Paint_Params { | |
| 61 gfx::Size size; | |
| 62 gfx::Rect clip_rect; | |
| 63 gfx::Rect damaged_rect; | |
| 64 | |
| 65 // Bitmap's bits. | |
| 66 HANDLE shared_memory; | |
| 67 | |
| 68 // Information about the world transform (see GetWorldTransform). | |
| 69 XFORM xf; | |
| 70 }; | |
| 71 | |
| 72 struct PluginMsg_PrintResponse_Params { | 60 struct PluginMsg_PrintResponse_Params { |
| 73 HANDLE shared_memory; | 61 HANDLE shared_memory; |
| 74 size_t size; | 62 size_t size; |
| 75 }; | 63 }; |
| 76 | 64 |
| 77 struct PluginMsg_DidReceiveResponseParams { | 65 struct PluginMsg_DidReceiveResponseParams { |
| 78 int id; | 66 int id; |
| 79 std::string mime_type; | 67 std::string mime_type; |
| 80 std::string headers; | 68 std::string headers; |
| 81 uint32 expected_length; | 69 uint32 expected_length; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 LogParam(p.url, l); | 230 LogParam(p.url, l); |
| 243 l->append(L", "); | 231 l->append(L", "); |
| 244 LogParam(p.notify_needed, l); | 232 LogParam(p.notify_needed, l); |
| 245 l->append(L", "); | 233 l->append(L", "); |
| 246 LogParam(p.notify_data, l); | 234 LogParam(p.notify_data, l); |
| 247 l->append(L")"); | 235 l->append(L")"); |
| 248 } | 236 } |
| 249 }; | 237 }; |
| 250 | 238 |
| 251 template <> | 239 template <> |
| 252 struct ParamTraits<PluginMsg_Paint_Params> { | |
| 253 typedef PluginMsg_Paint_Params param_type; | |
| 254 static void Write(Message* m, const param_type& p) { | |
| 255 WriteParam(m, p.size); | |
| 256 WriteParam(m, p.clip_rect); | |
| 257 WriteParam(m, p.damaged_rect); | |
| 258 WriteParam(m, p.shared_memory); | |
| 259 WriteParam(m, p.xf); | |
| 260 } | |
| 261 static bool Read(const Message* m, void** iter, param_type* r) { | |
| 262 return | |
| 263 ReadParam(m, iter, &r->size) && | |
| 264 ReadParam(m, iter, &r->clip_rect) && | |
| 265 ReadParam(m, iter, &r->damaged_rect) && | |
| 266 ReadParam(m, iter, &r->shared_memory) && | |
| 267 ReadParam(m, iter, &r->xf); | |
| 268 } | |
| 269 static void Log(const param_type& p, std::wstring* l) { | |
| 270 l->append(L"("); | |
| 271 LogParam(p.size, l); | |
| 272 l->append(L", "); | |
| 273 LogParam(p.clip_rect, l); | |
| 274 l->append(L", "); | |
| 275 LogParam(p.damaged_rect, l); | |
| 276 l->append(L", "); | |
| 277 LogParam(p.shared_memory, l); | |
| 278 l->append(L", "); | |
| 279 LogParam(p.xf, l); | |
| 280 l->append(L")"); | |
| 281 } | |
| 282 }; | |
| 283 | |
| 284 template <> | |
| 285 struct ParamTraits<PluginMsg_PrintResponse_Params> { | 240 struct ParamTraits<PluginMsg_PrintResponse_Params> { |
| 286 typedef PluginMsg_PrintResponse_Params param_type; | 241 typedef PluginMsg_PrintResponse_Params param_type; |
| 287 static void Write(Message* m, const param_type& p) { | 242 static void Write(Message* m, const param_type& p) { |
| 288 WriteParam(m, p.shared_memory); | 243 WriteParam(m, p.shared_memory); |
| 289 WriteParam(m, p.size); | 244 WriteParam(m, p.size); |
| 290 } | 245 } |
| 291 static bool Read(const Message* m, void** iter, param_type* r) { | 246 static bool Read(const Message* m, void** iter, param_type* r) { |
| 292 return | 247 return |
| 293 ReadParam(m, iter, &r->shared_memory) && | 248 ReadParam(m, iter, &r->shared_memory) && |
| 294 ReadParam(m, iter, &r->size); | 249 ReadParam(m, iter, &r->size); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } else if (p.type == NPVARIANT_PARAM_OBJECT_POINTER) { | 460 } else if (p.type == NPVARIANT_PARAM_OBJECT_POINTER) { |
| 506 LogParam(p.npobject_pointer, l); | 461 LogParam(p.npobject_pointer, l); |
| 507 } | 462 } |
| 508 } | 463 } |
| 509 }; | 464 }; |
| 510 | 465 |
| 511 } // namespace IPC | 466 } // namespace IPC |
| 512 | 467 |
| 513 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H__ | 468 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H__ |
| 514 | 469 |
| OLD | NEW |