| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Name prefix of the event handle when a message box is displayed. | 26 // Name prefix of the event handle when a message box is displayed. |
| 27 #define kMessageBoxEventPrefix L"message_box_active" | 27 #define kMessageBoxEventPrefix L"message_box_active" |
| 28 | 28 |
| 29 // Structures for messages that have too many parameters to be put in a | 29 // Structures for messages that have too many parameters to be put in a |
| 30 // predefined IPC message. | 30 // predefined IPC message. |
| 31 | 31 |
| 32 struct PluginMsg_Init_Params { | 32 struct PluginMsg_Init_Params { |
| 33 gfx::NativeViewId containing_window; | 33 gfx::NativeViewId containing_window; |
| 34 GURL url; | 34 GURL url; |
| 35 GURL page_url; |
| 35 std::vector<std::string> arg_names; | 36 std::vector<std::string> arg_names; |
| 36 std::vector<std::string> arg_values; | 37 std::vector<std::string> arg_values; |
| 37 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
| 38 HANDLE modal_dialog_event; | 39 HANDLE modal_dialog_event; |
| 39 #endif | 40 #endif |
| 40 bool load_manually; | 41 bool load_manually; |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 struct PluginHostMsg_URLRequest_Params { | 44 struct PluginHostMsg_URLRequest_Params { |
| 44 std::string method; | 45 std::string method; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 103 |
| 103 namespace IPC { | 104 namespace IPC { |
| 104 | 105 |
| 105 // Traits for PluginMsg_Init_Params structure to pack/unpack. | 106 // Traits for PluginMsg_Init_Params structure to pack/unpack. |
| 106 template <> | 107 template <> |
| 107 struct ParamTraits<PluginMsg_Init_Params> { | 108 struct ParamTraits<PluginMsg_Init_Params> { |
| 108 typedef PluginMsg_Init_Params param_type; | 109 typedef PluginMsg_Init_Params param_type; |
| 109 static void Write(Message* m, const param_type& p) { | 110 static void Write(Message* m, const param_type& p) { |
| 110 WriteParam(m, p.containing_window); | 111 WriteParam(m, p.containing_window); |
| 111 WriteParam(m, p.url); | 112 WriteParam(m, p.url); |
| 113 WriteParam(m, p.page_url); |
| 112 DCHECK(p.arg_names.size() == p.arg_values.size()); | 114 DCHECK(p.arg_names.size() == p.arg_values.size()); |
| 113 WriteParam(m, p.arg_names); | 115 WriteParam(m, p.arg_names); |
| 114 WriteParam(m, p.arg_values); | 116 WriteParam(m, p.arg_values); |
| 115 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
| 116 WriteParam(m, p.modal_dialog_event); | 118 WriteParam(m, p.modal_dialog_event); |
| 117 #endif | 119 #endif |
| 118 WriteParam(m, p.load_manually); | 120 WriteParam(m, p.load_manually); |
| 119 } | 121 } |
| 120 static bool Read(const Message* m, void** iter, param_type* p) { | 122 static bool Read(const Message* m, void** iter, param_type* p) { |
| 121 return ReadParam(m, iter, &p->containing_window) && | 123 return ReadParam(m, iter, &p->containing_window) && |
| 122 ReadParam(m, iter, &p->url) && | 124 ReadParam(m, iter, &p->url) && |
| 125 ReadParam(m, iter, &p->page_url) && |
| 123 ReadParam(m, iter, &p->arg_names) && | 126 ReadParam(m, iter, &p->arg_names) && |
| 124 ReadParam(m, iter, &p->arg_values) && | 127 ReadParam(m, iter, &p->arg_values) && |
| 125 #if defined(OS_WIN) | 128 #if defined(OS_WIN) |
| 126 ReadParam(m, iter, &p->modal_dialog_event) && | 129 ReadParam(m, iter, &p->modal_dialog_event) && |
| 127 #endif | 130 #endif |
| 128 ReadParam(m, iter, &p->load_manually); | 131 ReadParam(m, iter, &p->load_manually); |
| 129 } | 132 } |
| 130 static void Log(const param_type& p, std::wstring* l) { | 133 static void Log(const param_type& p, std::wstring* l) { |
| 131 l->append(L"("); | 134 l->append(L"("); |
| 132 LogParam(p.containing_window, l); | 135 LogParam(p.containing_window, l); |
| 133 l->append(L", "); | 136 l->append(L", "); |
| 134 LogParam(p.url, l); | 137 LogParam(p.url, l); |
| 135 l->append(L", "); | 138 l->append(L", "); |
| 139 LogParam(p.page_url, l); |
| 140 l->append(L", "); |
| 136 LogParam(p.arg_names, l); | 141 LogParam(p.arg_names, l); |
| 137 l->append(L", "); | 142 l->append(L", "); |
| 138 LogParam(p.arg_values, l); | 143 LogParam(p.arg_values, l); |
| 139 l->append(L", "); | 144 l->append(L", "); |
| 140 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
| 141 LogParam(p.modal_dialog_event, l); | 146 LogParam(p.modal_dialog_event, l); |
| 142 l->append(L", "); | 147 l->append(L", "); |
| 143 #endif | 148 #endif |
| 144 LogParam(p.load_manually, l); | 149 LogParam(p.load_manually, l); |
| 145 l->append(L")"); | 150 l->append(L")"); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 404 } |
| 400 }; | 405 }; |
| 401 | 406 |
| 402 } // namespace IPC | 407 } // namespace IPC |
| 403 | 408 |
| 404 | 409 |
| 405 #define MESSAGES_INTERNAL_FILE "chrome/common/plugin_messages_internal.h" | 410 #define MESSAGES_INTERNAL_FILE "chrome/common/plugin_messages_internal.h" |
| 406 #include "chrome/common/ipc_message_macros.h" | 411 #include "chrome/common/ipc_message_macros.h" |
| 407 | 412 |
| 408 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H__ | 413 #endif // CHROME_COMMON_PLUGIN_MESSAGES_H__ |
| OLD | NEW |