| 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 "content/public/common/common_param_traits.h" | 13 #include "content/public/common/common_param_traits.h" |
| 15 #include "ipc/ipc_channel_handle.h" | 14 #include "ipc/ipc_channel_handle.h" |
| 16 #include "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
| 17 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 18 #include "ui/gfx/ipc/gfx_param_traits.h" | 17 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 20 | 19 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 bool /* result */) | 91 bool /* result */) |
| 93 | 92 |
| 94 // Used to synchronously request a paint for windowless plugins. | 93 // Used to synchronously request a paint for windowless plugins. |
| 95 IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, | 94 IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, |
| 96 gfx::Rect /* damaged_rect */) | 95 gfx::Rect /* damaged_rect */) |
| 97 | 96 |
| 98 // Sent by the renderer after it paints from its backing store so that the | 97 // Sent by the renderer after it paints from its backing store so that the |
| 99 // plugin knows it can send more invalidates. | 98 // plugin knows it can send more invalidates. |
| 100 IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) | 99 IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) |
| 101 | 100 |
| 102 IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject, | |
| 103 int /* route_id */) | |
| 104 | |
| 105 // Gets the form value of the plugin instance synchronously. | 101 // Gets the form value of the plugin instance synchronously. |
| 106 IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, | 102 IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, |
| 107 base::string16 /* value */, | 103 base::string16 /* value */, |
| 108 bool /* success */) | 104 bool /* success */) |
| 109 | 105 |
| 110 // Updates the plugin location. | 106 // Updates the plugin location. |
| 111 IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, | 107 IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, |
| 112 PluginMsg_UpdateGeometry_Param) | 108 PluginMsg_UpdateGeometry_Param) |
| 113 | 109 |
| 114 // A synchronous version of above. | 110 // A synchronous version of above. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // plugin. It is NULL for windowless plugins. | 186 // plugin. It is NULL for windowless plugins. |
| 191 IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, | 187 IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, |
| 192 gfx::PluginWindowHandle /* window */) | 188 gfx::PluginWindowHandle /* window */) |
| 193 | 189 |
| 194 IPC_MESSAGE_ROUTED1(PluginHostMsg_CancelResource, | 190 IPC_MESSAGE_ROUTED1(PluginHostMsg_CancelResource, |
| 195 int /* id */) | 191 int /* id */) |
| 196 | 192 |
| 197 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, | 193 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, |
| 198 gfx::Rect /* rect */) | 194 gfx::Rect /* rect */) |
| 199 | 195 |
| 200 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject, | |
| 201 int /* route id */, | |
| 202 bool /* success */) | |
| 203 | |
| 204 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetPluginElement, | |
| 205 int /* route id */, | |
| 206 bool /* success */) | |
| 207 | |
| 208 IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_ResolveProxy, | 196 IPC_SYNC_MESSAGE_ROUTED1_2(PluginHostMsg_ResolveProxy, |
| 209 GURL /* url */, | 197 GURL /* url */, |
| 210 bool /* result */, | 198 bool /* result */, |
| 211 std::string /* proxy list */) | 199 std::string /* proxy list */) |
| 212 | 200 |
| 213 IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, | 201 IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, |
| 214 GURL /* url */, | 202 GURL /* url */, |
| 215 GURL /* first_party_for_cookies */, | 203 GURL /* first_party_for_cookies */, |
| 216 std::string /* cookie */) | 204 std::string /* cookie */) |
| 217 | 205 |
| 218 IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, | 206 IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, |
| 219 GURL /* url */, | 207 GURL /* url */, |
| 220 GURL /* first_party_for_cookies */, | 208 GURL /* first_party_for_cookies */, |
| 221 std::string /* cookies */) | 209 std::string /* cookies */) |
| 222 | 210 |
| 223 IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) | 211 IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) |
| 224 | 212 |
| 225 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStartLoading) | 213 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStartLoading) |
| 226 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStopLoading) | 214 IPC_MESSAGE_ROUTED0(PluginHostMsg_DidStopLoading) |
| 227 | 215 |
| 228 IPC_MESSAGE_ROUTED2(PluginHostMsg_DeferResourceLoading, | 216 IPC_MESSAGE_ROUTED2(PluginHostMsg_DeferResourceLoading, |
| 229 unsigned long /* resource_id */, | 217 unsigned long /* resource_id */, |
| 230 bool /* defer */) | 218 bool /* defer */) |
| 231 | 219 |
| 232 IPC_SYNC_MESSAGE_CONTROL1_0(PluginHostMsg_SetException, | |
| 233 std::string /* message */) | |
| 234 | |
| 235 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) | 220 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) |
| 236 | 221 |
| 237 IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, | 222 IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, |
| 238 bool /* allow */, | 223 bool /* allow */, |
| 239 int /* resource_id */) | 224 int /* resource_id */) |
| 240 | 225 |
| 241 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_CheckIfRunInsecureContent, | 226 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_CheckIfRunInsecureContent, |
| 242 GURL /* url */, | 227 GURL /* url */, |
| 243 bool /* result */) | 228 bool /* result */) |
| 244 | 229 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface, | 269 IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface, |
| 285 int32_t /* width */, | 270 int32_t /* width */, |
| 286 int32_t /* height */, | 271 int32_t /* height */, |
| 287 uint32_t /* surface_id */) | 272 uint32_t /* surface_id */) |
| 288 | 273 |
| 289 // Notifies the renderer process that the plugin produced a new frame | 274 // Notifies the renderer process that the plugin produced a new frame |
| 290 // of content into its IOSurface, and therefore that the compositor | 275 // of content into its IOSurface, and therefore that the compositor |
| 291 // needs to redraw. | 276 // needs to redraw. |
| 292 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) | 277 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) |
| 293 #endif | 278 #endif |
| 294 | |
| 295 | |
| 296 //----------------------------------------------------------------------------- | |
| 297 // NPObject messages | |
| 298 // These are messages used to marshall NPObjects. They are sent both from the | |
| 299 // plugin to the renderer and from the renderer to the plugin. | |
| 300 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) | |
| 301 | |
| 302 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, | |
| 303 content::NPIdentifier_Param /* name */, | |
| 304 bool /* result */) | |
| 305 | |
| 306 IPC_SYNC_MESSAGE_ROUTED3_2(NPObjectMsg_Invoke, | |
| 307 bool /* is_default */, | |
| 308 content::NPIdentifier_Param /* method */, | |
| 309 std::vector<content::NPVariant_Param> /* args */, | |
| 310 content::NPVariant_Param /* result_param */, | |
| 311 bool /* result */) | |
| 312 | |
| 313 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasProperty, | |
| 314 content::NPIdentifier_Param /* name */, | |
| 315 bool /* result */) | |
| 316 | |
| 317 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_GetProperty, | |
| 318 content::NPIdentifier_Param /* name */, | |
| 319 content::NPVariant_Param /* property */, | |
| 320 bool /* result */) | |
| 321 | |
| 322 IPC_SYNC_MESSAGE_ROUTED2_1(NPObjectMsg_SetProperty, | |
| 323 content::NPIdentifier_Param /* name */, | |
| 324 content::NPVariant_Param /* property */, | |
| 325 bool /* result */) | |
| 326 | |
| 327 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_RemoveProperty, | |
| 328 content::NPIdentifier_Param /* name */, | |
| 329 bool /* result */) | |
| 330 | |
| 331 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Invalidate) | |
| 332 | |
| 333 IPC_SYNC_MESSAGE_ROUTED0_2(NPObjectMsg_Enumeration, | |
| 334 std::vector<content::NPIdentifier_Param> /* value */, | |
| 335 bool /* result */) | |
| 336 | |
| 337 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, | |
| 338 std::vector<content::NPVariant_Param> /* args */, | |
| 339 content::NPVariant_Param /* result_param */, | |
| 340 bool /* result */) | |
| 341 | |
| 342 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, | |
| 343 std::string /* script */, | |
| 344 bool /* popups_allowed */, | |
| 345 content::NPVariant_Param /* result_param */, | |
| 346 bool /* result */) | |
| OLD | NEW |