| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 std::string string_value; | 98 std::string string_value; |
| 99 int npobject_routing_id; | 99 int npobject_routing_id; |
| 100 intptr_t npobject_pointer; | 100 intptr_t npobject_pointer; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 struct PluginMsg_UpdateGeometry_Param { | 103 struct PluginMsg_UpdateGeometry_Param { |
| 104 gfx::Rect window_rect; | 104 gfx::Rect window_rect; |
| 105 gfx::Rect clip_rect; | 105 gfx::Rect clip_rect; |
| 106 TransportDIB::Handle windowless_buffer; | 106 TransportDIB::Handle windowless_buffer; |
| 107 TransportDIB::Handle background_buffer; | 107 TransportDIB::Handle background_buffer; |
| 108 |
| 109 #if defined(OS_MACOSX) |
| 110 // This field contains a key that the plug-in process is expected to return |
| 111 // to the renderer in its ACK message, unless the value is -1, in which case |
| 112 // no ACK message is required. Other than the special -1 value, the values |
| 113 // used in ack_key are opaque to the plug-in process. |
| 114 int ack_key; |
| 115 #endif |
| 108 }; | 116 }; |
| 109 | 117 |
| 110 | 118 |
| 111 namespace IPC { | 119 namespace IPC { |
| 112 | 120 |
| 113 // Traits for PluginMsg_Init_Params structure to pack/unpack. | 121 // Traits for PluginMsg_Init_Params structure to pack/unpack. |
| 114 template <> | 122 template <> |
| 115 struct ParamTraits<PluginMsg_Init_Params> { | 123 struct ParamTraits<PluginMsg_Init_Params> { |
| 116 typedef PluginMsg_Init_Params param_type; | 124 typedef PluginMsg_Init_Params param_type; |
| 117 static void Write(Message* m, const param_type& p) { | 125 static void Write(Message* m, const param_type& p) { |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // for transparent windowless plugins, and holds the background of the plugin | 419 // for transparent windowless plugins, and holds the background of the plugin |
| 412 // rectangle. | 420 // rectangle. |
| 413 template <> | 421 template <> |
| 414 struct ParamTraits<PluginMsg_UpdateGeometry_Param> { | 422 struct ParamTraits<PluginMsg_UpdateGeometry_Param> { |
| 415 typedef PluginMsg_UpdateGeometry_Param param_type; | 423 typedef PluginMsg_UpdateGeometry_Param param_type; |
| 416 static void Write(Message* m, const param_type& p) { | 424 static void Write(Message* m, const param_type& p) { |
| 417 WriteParam(m, p.window_rect); | 425 WriteParam(m, p.window_rect); |
| 418 WriteParam(m, p.clip_rect); | 426 WriteParam(m, p.clip_rect); |
| 419 WriteParam(m, p.windowless_buffer); | 427 WriteParam(m, p.windowless_buffer); |
| 420 WriteParam(m, p.background_buffer); | 428 WriteParam(m, p.background_buffer); |
| 429 #if defined(OS_MACOSX) |
| 430 WriteParam(m, p.ack_key); |
| 431 #endif |
| 421 } | 432 } |
| 422 static bool Read(const Message* m, void** iter, param_type* r) { | 433 static bool Read(const Message* m, void** iter, param_type* r) { |
| 423 return | 434 return |
| 424 ReadParam(m, iter, &r->window_rect) && | 435 ReadParam(m, iter, &r->window_rect) && |
| 425 ReadParam(m, iter, &r->clip_rect) && | 436 ReadParam(m, iter, &r->clip_rect) && |
| 426 ReadParam(m, iter, &r->windowless_buffer) && | 437 ReadParam(m, iter, &r->windowless_buffer) && |
| 427 ReadParam(m, iter, &r->background_buffer); | 438 ReadParam(m, iter, &r->background_buffer) |
| 439 #if defined(OS_MACOSX) |
| 440 && |
| 441 ReadParam(m, iter, &r->ack_key) |
| 442 #endif |
| 443 ; |
| 428 } | 444 } |
| 429 static void Log(const param_type& p, std::wstring* l) { | 445 static void Log(const param_type& p, std::wstring* l) { |
| 430 l->append(L"("); | 446 l->append(L"("); |
| 431 LogParam(p.window_rect, l); | 447 LogParam(p.window_rect, l); |
| 432 l->append(L", "); | 448 l->append(L", "); |
| 433 LogParam(p.clip_rect, l); | 449 LogParam(p.clip_rect, l); |
| 434 l->append(L", "); | 450 l->append(L", "); |
| 435 LogParam(p.windowless_buffer, l); | 451 LogParam(p.windowless_buffer, l); |
| 436 l->append(L", "); | 452 l->append(L", "); |
| 437 LogParam(p.background_buffer, l); | 453 LogParam(p.background_buffer, l); |
| 454 #if defined(OS_MACOSX) |
| 455 l->append(L", "); |
| 456 LogParam(p.ack_key, l); |
| 457 #endif |
| 438 l->append(L")"); | 458 l->append(L")"); |
| 439 } | 459 } |
| 440 }; | 460 }; |
| 441 | 461 |
| 442 } // namespace IPC | 462 } // namespace IPC |
| 443 | 463 |
| 444 | 464 |
| 445 #define MESSAGES_INTERNAL_FILE "chrome/common/plugin_messages_internal.h" | 465 #define MESSAGES_INTERNAL_FILE "chrome/common/plugin_messages_internal.h" |
| 446 #include "ipc/ipc_message_macros.h" | 466 #include "ipc/ipc_message_macros.h" |
| 447 | 467 |
| 448 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H_ | 468 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H_ |
| OLD | NEW |