| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Multiply-included message file, hence no include guard. | 5 // Multiply-included message file, hence no include guard. |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/child/plugin_param_traits.h" | |
| 11 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 12 #include "content/common/content_param_traits.h" | 11 #include "content/common/content_param_traits.h" |
| 13 #include "content/common/cursors/webcursor.h" | 12 #include "content/common/cursors/webcursor.h" |
| 14 #include "ipc/ipc_channel_handle.h" | 13 #include "ipc/ipc_channel_handle.h" |
| 15 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
| 16 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 17 #include "ui/gfx/ipc/gfx_param_traits.h" | 16 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/surface/transport_dib.h" | 18 #include "ui/surface/transport_dib.h" |
| 20 #include "url/ipc/url_param_traits.h" | 19 #include "url/ipc/url_param_traits.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool /* result */) | 70 bool /* result */) |
| 72 | 71 |
| 73 // Used to synchronously request a paint for windowless plugins. | 72 // Used to synchronously request a paint for windowless plugins. |
| 74 IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, | 73 IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, |
| 75 gfx::Rect /* damaged_rect */) | 74 gfx::Rect /* damaged_rect */) |
| 76 | 75 |
| 77 // Sent by the renderer after it paints from its backing store so that the | 76 // Sent by the renderer after it paints from its backing store so that the |
| 78 // plugin knows it can send more invalidates. | 77 // plugin knows it can send more invalidates. |
| 79 IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) | 78 IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) |
| 80 | 79 |
| 81 IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject, | |
| 82 int /* route_id */) | |
| 83 | |
| 84 // Gets the form value of the plugin instance synchronously. | 80 // Gets the form value of the plugin instance synchronously. |
| 85 IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, | 81 IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, |
| 86 base::string16 /* value */, | 82 base::string16 /* value */, |
| 87 bool /* success */) | 83 bool /* success */) |
| 88 | 84 |
| 89 // Updates the plugin location. | 85 // Updates the plugin location. |
| 90 IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, | 86 IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, |
| 91 PluginMsg_UpdateGeometry_Param) | 87 PluginMsg_UpdateGeometry_Param) |
| 92 | 88 |
| 93 // A synchronous version of above. | 89 // A synchronous version of above. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 #endif | 138 #endif |
| 143 | 139 |
| 144 //----------------------------------------------------------------------------- | 140 //----------------------------------------------------------------------------- |
| 145 // PluginHost messages | 141 // PluginHost messages |
| 146 // These are messages sent from the plugin process to the renderer process. | 142 // These are messages sent from the plugin process to the renderer process. |
| 147 // They all map to the corresponding WebPlugin methods. | 143 // They all map to the corresponding WebPlugin methods. |
| 148 | 144 |
| 149 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, | 145 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, |
| 150 gfx::Rect /* rect */) | 146 gfx::Rect /* rect */) |
| 151 | 147 |
| 152 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject, | |
| 153 int /* route id */, | |
| 154 bool /* success */) | |
| 155 | |
| 156 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetPluginElement, | |
| 157 int /* route id */, | |
| 158 bool /* success */) | |
| 159 | |
| 160 IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_ResolveProxy, | 148 IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_ResolveProxy, |
| 161 GURL /* url */, | 149 GURL /* url */, |
| 162 bool /* result */, | 150 bool /* result */, |
| 163 std::string /* proxy list */) | 151 std::string /* proxy list */) |
| 164 | 152 |
| 165 IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, | 153 IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, |
| 166 GURL /* url */, | 154 GURL /* url */, |
| 167 GURL /* first_party_for_cookies */, | 155 GURL /* first_party_for_cookies */, |
| 168 std::string /* cookie */) | 156 std::string /* cookie */) |
| 169 | 157 |
| 170 IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, | 158 IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, |
| 171 GURL /* url */, | 159 GURL /* url */, |
| 172 GURL /* first_party_for_cookies */, | 160 GURL /* first_party_for_cookies */, |
| 173 std::string /* cookies */) | 161 std::string /* cookies */) |
| 174 | 162 |
| 175 IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) | 163 IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) |
| 176 | 164 |
| 177 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStartLoading) | 165 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStartLoading) |
| 178 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStopLoading) | 166 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStopLoading) |
| 179 | 167 |
| 180 IPC_SYNC_MESSAGE_CONTROL1_0(PluginHostMsg_SetException, | |
| 181 std::string /* message */) | |
| 182 | |
| 183 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) | 168 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) |
| 184 | 169 |
| 185 #if defined(OS_WIN) | 170 #if defined(OS_WIN) |
| 186 // The modal_loop_pump_messages_event parameter is an event handle which is | 171 // The modal_loop_pump_messages_event parameter is an event handle which is |
| 187 // passed in for windowless plugins and is used to indicate if messages | 172 // passed in for windowless plugins and is used to indicate if messages |
| 188 // are to be pumped in sync calls to the plugin process. Currently used | 173 // are to be pumped in sync calls to the plugin process. Currently used |
| 189 // in HandleEvent calls. | 174 // in HandleEvent calls. |
| 190 IPC_SYNC_MESSAGE_ROUTED2_0(PluginHostMsg_SetWindowlessData, | 175 IPC_SYNC_MESSAGE_ROUTED2_0(PluginHostMsg_SetWindowlessData, |
| 191 HANDLE /* modal_loop_pump_messages_event */, | 176 HANDLE /* modal_loop_pump_messages_event */, |
| 192 gfx::NativeViewId /* dummy_activation_window*/) | 177 gfx::NativeViewId /* dummy_activation_window*/) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface, | 209 IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface, |
| 225 int32_t /* width */, | 210 int32_t /* width */, |
| 226 int32_t /* height */, | 211 int32_t /* height */, |
| 227 uint32_t /* surface_id */) | 212 uint32_t /* surface_id */) |
| 228 | 213 |
| 229 // Notifies the renderer process that the plugin produced a new frame | 214 // Notifies the renderer process that the plugin produced a new frame |
| 230 // of content into its IOSurface, and therefore that the compositor | 215 // of content into its IOSurface, and therefore that the compositor |
| 231 // needs to redraw. | 216 // needs to redraw. |
| 232 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) | 217 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) |
| 233 #endif | 218 #endif |
| 234 | |
| 235 | |
| 236 //----------------------------------------------------------------------------- | |
| 237 // NPObject messages | |
| 238 // These are messages used to marshall NPObjects. They are sent both from the | |
| 239 // plugin to the renderer and from the renderer to the plugin. | |
| 240 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) | |
| 241 | |
| 242 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, | |
| 243 content::NPIdentifier_Param /* name */, | |
| 244 bool /* result */) | |
| 245 | |
| 246 IPC_SYNC_MESSAGE_ROUTED3_2(NPObjectMsg_Invoke, | |
| 247 bool /* is_default */, | |
| 248 content::NPIdentifier_Param /* method */, | |
| 249 std::vector<content::NPVariant_Param> /* args */, | |
| 250 content::NPVariant_Param /* result_param */, | |
| 251 bool /* result */) | |
| 252 | |
| 253 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasProperty, | |
| 254 content::NPIdentifier_Param /* name */, | |
| 255 bool /* result */) | |
| 256 | |
| 257 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_GetProperty, | |
| 258 content::NPIdentifier_Param /* name */, | |
| 259 content::NPVariant_Param /* property */, | |
| 260 bool /* result */) | |
| 261 | |
| 262 IPC_SYNC_MESSAGE_ROUTED2_1(NPObjectMsg_SetProperty, | |
| 263 content::NPIdentifier_Param /* name */, | |
| 264 content::NPVariant_Param /* property */, | |
| 265 bool /* result */) | |
| 266 | |
| 267 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_RemoveProperty, | |
| 268 content::NPIdentifier_Param /* name */, | |
| 269 bool /* result */) | |
| 270 | |
| 271 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Invalidate) | |
| 272 | |
| 273 IPC_SYNC_MESSAGE_ROUTED0_2(NPObjectMsg_Enumeration, | |
| 274 std::vector<content::NPIdentifier_Param> /* value */, | |
| 275 bool /* result */) | |
| 276 | |
| 277 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, | |
| 278 std::vector<content::NPVariant_Param> /* args */, | |
| 279 content::NPVariant_Param /* result_param */, | |
| 280 bool /* result */) | |
| 281 | |
| 282 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, | |
| 283 std::string /* script */, | |
| 284 bool /* popups_allowed */, | |
| 285 content::NPVariant_Param /* result_param */, | |
| 286 bool /* result */) | |
| OLD | NEW |