| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "content/child/plugin_param_traits.h" | 8 #include "content/child/plugin_param_traits.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/common/content_param_traits.h" | 10 #include "content/common/content_param_traits.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 IPC_STRUCT_BEGIN(PluginMsg_DidReceiveResponseParams) | 46 IPC_STRUCT_BEGIN(PluginMsg_DidReceiveResponseParams) |
| 47 IPC_STRUCT_MEMBER(unsigned long, id) | 47 IPC_STRUCT_MEMBER(unsigned long, id) |
| 48 IPC_STRUCT_MEMBER(std::string, mime_type) | 48 IPC_STRUCT_MEMBER(std::string, mime_type) |
| 49 IPC_STRUCT_MEMBER(std::string, headers) | 49 IPC_STRUCT_MEMBER(std::string, headers) |
| 50 IPC_STRUCT_MEMBER(uint32, expected_length) | 50 IPC_STRUCT_MEMBER(uint32, expected_length) |
| 51 IPC_STRUCT_MEMBER(uint32, last_modified) | 51 IPC_STRUCT_MEMBER(uint32, last_modified) |
| 52 IPC_STRUCT_MEMBER(bool, request_is_seekable) | 52 IPC_STRUCT_MEMBER(bool, request_is_seekable) |
| 53 IPC_STRUCT_END() | 53 IPC_STRUCT_END() |
| 54 | 54 |
| 55 IPC_STRUCT_BEGIN(PluginMsg_FetchURL_Params) |
| 56 IPC_STRUCT_MEMBER(unsigned long, resource_id) |
| 57 IPC_STRUCT_MEMBER(int, notify_id) |
| 58 IPC_STRUCT_MEMBER(GURL, url) |
| 59 IPC_STRUCT_MEMBER(GURL, first_party_for_cookies) |
| 60 IPC_STRUCT_MEMBER(std::string, method) |
| 61 IPC_STRUCT_MEMBER(std::string, post_data) |
| 62 IPC_STRUCT_MEMBER(GURL, referrer) |
| 63 IPC_STRUCT_MEMBER(bool, notify_redirect) |
| 64 IPC_STRUCT_MEMBER(bool, is_plugin_src_load) |
| 65 IPC_STRUCT_MEMBER(int, render_view_id) |
| 66 IPC_STRUCT_END() |
| 67 |
| 55 IPC_STRUCT_BEGIN(PluginMsg_UpdateGeometry_Param) | 68 IPC_STRUCT_BEGIN(PluginMsg_UpdateGeometry_Param) |
| 56 IPC_STRUCT_MEMBER(gfx::Rect, window_rect) | 69 IPC_STRUCT_MEMBER(gfx::Rect, window_rect) |
| 57 IPC_STRUCT_MEMBER(gfx::Rect, clip_rect) | 70 IPC_STRUCT_MEMBER(gfx::Rect, clip_rect) |
| 58 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer0) | 71 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer0) |
| 59 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer1) | 72 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer1) |
| 60 IPC_STRUCT_MEMBER(int, windowless_buffer_index) | 73 IPC_STRUCT_MEMBER(int, windowless_buffer_index) |
| 61 IPC_STRUCT_END() | 74 IPC_STRUCT_END() |
| 62 | 75 |
| 63 //----------------------------------------------------------------------------- | 76 //----------------------------------------------------------------------------- |
| 64 // Plugin messages | 77 // Plugin messages |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 bool /* focused */) | 131 bool /* focused */) |
| 119 | 132 |
| 120 IPC_SYNC_MESSAGE_ROUTED1_2(PluginMsg_HandleInputEvent, | 133 IPC_SYNC_MESSAGE_ROUTED1_2(PluginMsg_HandleInputEvent, |
| 121 IPC::WebInputEventPointer /* event */, | 134 IPC::WebInputEventPointer /* event */, |
| 122 bool /* handled */, | 135 bool /* handled */, |
| 123 WebCursor /* cursor type*/) | 136 WebCursor /* cursor type*/) |
| 124 | 137 |
| 125 IPC_MESSAGE_ROUTED1(PluginMsg_SetContentAreaFocus, | 138 IPC_MESSAGE_ROUTED1(PluginMsg_SetContentAreaFocus, |
| 126 bool /* has_focus */) | 139 bool /* has_focus */) |
| 127 | 140 |
| 128 #if defined(OS_WIN) | |
| 129 IPC_MESSAGE_ROUTED4(PluginMsg_ImeCompositionUpdated, | |
| 130 string16 /* text */, | |
| 131 std::vector<int> /* clauses */, | |
| 132 std::vector<int>, /* target */ | |
| 133 int /* cursor_position */) | |
| 134 | |
| 135 IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, | |
| 136 string16 /* text */) | |
| 137 #endif | |
| 138 | |
| 139 #if defined(OS_MACOSX) | |
| 140 IPC_MESSAGE_ROUTED1(PluginMsg_SetWindowFocus, | |
| 141 bool /* has_focus */) | |
| 142 | |
| 143 IPC_MESSAGE_ROUTED0(PluginMsg_ContainerHidden) | |
| 144 | |
| 145 IPC_MESSAGE_ROUTED3(PluginMsg_ContainerShown, | |
| 146 gfx::Rect /* window_frame */, | |
| 147 gfx::Rect /* view_frame */, | |
| 148 bool /* has_focus */) | |
| 149 | |
| 150 IPC_MESSAGE_ROUTED2(PluginMsg_WindowFrameChanged, | |
| 151 gfx::Rect /* window_frame */, | |
| 152 gfx::Rect /* view_frame */) | |
| 153 | |
| 154 IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, | |
| 155 string16 /* text */) | |
| 156 #endif | |
| 157 | |
| 158 IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_WillSendRequest, | 141 IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_WillSendRequest, |
| 159 unsigned long /* id */, | 142 unsigned long /* id */, |
| 160 GURL /* url */, | 143 GURL /* url */, |
| 161 int /* http_status_code */) | 144 int /* http_status_code */) |
| 162 | 145 |
| 163 IPC_MESSAGE_ROUTED1(PluginMsg_DidReceiveResponse, | 146 IPC_MESSAGE_ROUTED1(PluginMsg_DidReceiveResponse, |
| 164 PluginMsg_DidReceiveResponseParams) | 147 PluginMsg_DidReceiveResponseParams) |
| 165 | 148 |
| 166 IPC_MESSAGE_ROUTED3(PluginMsg_DidReceiveData, | 149 IPC_MESSAGE_ROUTED3(PluginMsg_DidReceiveData, |
| 167 unsigned long /* id */, | 150 unsigned long /* id */, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 IPC_MESSAGE_ROUTED2(PluginMsg_HTTPRangeRequestReply, | 182 IPC_MESSAGE_ROUTED2(PluginMsg_HTTPRangeRequestReply, |
| 200 unsigned long /* resource_id */, | 183 unsigned long /* resource_id */, |
| 201 int /* range_request_id */) | 184 int /* range_request_id */) |
| 202 | 185 |
| 203 IPC_MESSAGE_CONTROL1(PluginMsg_SignalModalDialogEvent, | 186 IPC_MESSAGE_CONTROL1(PluginMsg_SignalModalDialogEvent, |
| 204 int /* render_view_id */) | 187 int /* render_view_id */) |
| 205 | 188 |
| 206 IPC_MESSAGE_CONTROL1(PluginMsg_ResetModalDialogEvent, | 189 IPC_MESSAGE_CONTROL1(PluginMsg_ResetModalDialogEvent, |
| 207 int /* render_view_id */) | 190 int /* render_view_id */) |
| 208 | 191 |
| 192 IPC_MESSAGE_ROUTED1(PluginMsg_FetchURL, |
| 193 PluginMsg_FetchURL_Params) |
| 194 |
| 195 #if defined(OS_WIN) |
| 196 IPC_MESSAGE_ROUTED4(PluginMsg_ImeCompositionUpdated, |
| 197 string16 /* text */, |
| 198 std::vector<int> /* clauses */, |
| 199 std::vector<int>, /* target */ |
| 200 int /* cursor_position */) |
| 201 |
| 202 IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, |
| 203 string16 /* text */) |
| 204 #endif |
| 205 |
| 209 #if defined(OS_MACOSX) | 206 #if defined(OS_MACOSX) |
| 207 IPC_MESSAGE_ROUTED1(PluginMsg_SetWindowFocus, |
| 208 bool /* has_focus */) |
| 209 |
| 210 IPC_MESSAGE_ROUTED0(PluginMsg_ContainerHidden) |
| 211 |
| 212 IPC_MESSAGE_ROUTED3(PluginMsg_ContainerShown, |
| 213 gfx::Rect /* window_frame */, |
| 214 gfx::Rect /* view_frame */, |
| 215 bool /* has_focus */) |
| 216 |
| 217 IPC_MESSAGE_ROUTED2(PluginMsg_WindowFrameChanged, |
| 218 gfx::Rect /* window_frame */, |
| 219 gfx::Rect /* view_frame */) |
| 220 |
| 221 IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, |
| 222 string16 /* text */) |
| 223 |
| 210 // This message, used only on 10.6 and later, transmits the "fake" | 224 // This message, used only on 10.6 and later, transmits the "fake" |
| 211 // window handle allocated by the browser on behalf of the renderer | 225 // window handle allocated by the browser on behalf of the renderer |
| 212 // to the GPU plugin. | 226 // to the GPU plugin. |
| 213 IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle, | 227 IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle, |
| 214 gfx::PluginWindowHandle /* window */) | 228 gfx::PluginWindowHandle /* window */) |
| 215 #endif | 229 #endif |
| 216 | 230 |
| 217 //----------------------------------------------------------------------------- | 231 //----------------------------------------------------------------------------- |
| 218 // PluginHost messages | 232 // PluginHost messages |
| 219 // These are messages sent from the plugin process to the renderer process. | 233 // These are messages sent from the plugin process to the renderer process. |
| 220 // They all map to the corresponding WebPlugin methods. | 234 // They all map to the corresponding WebPlugin methods. |
| 221 // Sends the plugin window information to the renderer. | 235 // Sends the plugin window information to the renderer. |
| 222 // The window parameter is a handle to the window if the plugin is a windowed | 236 // The window parameter is a handle to the window if the plugin is a windowed |
| 223 // plugin. It is NULL for windowless plugins. | 237 // plugin. It is NULL for windowless plugins. |
| 224 IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, | 238 IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, |
| 225 gfx::PluginWindowHandle /* window */) | 239 gfx::PluginWindowHandle /* window */) |
| 226 | 240 |
| 227 #if defined(OS_WIN) | |
| 228 // The modal_loop_pump_messages_event parameter is an event handle which is | |
| 229 // passed in for windowless plugins and is used to indicate if messages | |
| 230 // are to be pumped in sync calls to the plugin process. Currently used | |
| 231 // in HandleEvent calls. | |
| 232 IPC_SYNC_MESSAGE_ROUTED2_0(PluginHostMsg_SetWindowlessData, | |
| 233 HANDLE /* modal_loop_pump_messages_event */, | |
| 234 gfx::NativeViewId /* dummy_activation_window*/) | |
| 235 | |
| 236 // Send the IME status retrieved from a windowless plug-in. A windowless plug-in | |
| 237 // uses the IME attached to a browser process as a renderer does. A plug-in | |
| 238 // sends this message to control the IME status of a browser process. I would | |
| 239 // note that a plug-in sends this message to a renderer process that hosts this | |
| 240 // plug-in (not directly to a browser process) so the renderer process can | |
| 241 // update its IME status. | |
| 242 IPC_MESSAGE_ROUTED2(PluginHostMsg_NotifyIMEStatus, | |
| 243 int /* input_type */, | |
| 244 gfx::Rect /* caret_rect */) | |
| 245 #endif | |
| 246 | |
| 247 IPC_MESSAGE_ROUTED1(PluginHostMsg_URLRequest, | 241 IPC_MESSAGE_ROUTED1(PluginHostMsg_URLRequest, |
| 248 PluginHostMsg_URLRequest_Params) | 242 PluginHostMsg_URLRequest_Params) |
| 249 | 243 |
| 250 IPC_MESSAGE_ROUTED1(PluginHostMsg_CancelResource, | 244 IPC_MESSAGE_ROUTED1(PluginHostMsg_CancelResource, |
| 251 int /* id */) | 245 int /* id */) |
| 252 | 246 |
| 253 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, | 247 IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, |
| 254 gfx::Rect /* rect */) | 248 gfx::Rect /* rect */) |
| 255 | 249 |
| 256 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject, | 250 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 285 | 279 |
| 286 IPC_MESSAGE_ROUTED2(PluginHostMsg_DeferResourceLoading, | 280 IPC_MESSAGE_ROUTED2(PluginHostMsg_DeferResourceLoading, |
| 287 unsigned long /* resource_id */, | 281 unsigned long /* resource_id */, |
| 288 bool /* defer */) | 282 bool /* defer */) |
| 289 | 283 |
| 290 IPC_SYNC_MESSAGE_CONTROL1_0(PluginHostMsg_SetException, | 284 IPC_SYNC_MESSAGE_CONTROL1_0(PluginHostMsg_SetException, |
| 291 std::string /* message */) | 285 std::string /* message */) |
| 292 | 286 |
| 293 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) | 287 IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) |
| 294 | 288 |
| 289 IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, |
| 290 bool /* allow */, |
| 291 int /* resource_id */) |
| 292 |
| 293 IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_CheckIfRunInsecureContent, |
| 294 GURL /* url */, |
| 295 bool /* result */) |
| 296 |
| 297 #if defined(OS_WIN) |
| 298 // The modal_loop_pump_messages_event parameter is an event handle which is |
| 299 // passed in for windowless plugins and is used to indicate if messages |
| 300 // are to be pumped in sync calls to the plugin process. Currently used |
| 301 // in HandleEvent calls. |
| 302 IPC_SYNC_MESSAGE_ROUTED2_0(PluginHostMsg_SetWindowlessData, |
| 303 HANDLE /* modal_loop_pump_messages_event */, |
| 304 gfx::NativeViewId /* dummy_activation_window*/) |
| 305 |
| 306 // Send the IME status retrieved from a windowless plug-in. A windowless plug-in |
| 307 // uses the IME attached to a browser process as a renderer does. A plug-in |
| 308 // sends this message to control the IME status of a browser process. I would |
| 309 // note that a plug-in sends this message to a renderer process that hosts this |
| 310 // plug-in (not directly to a browser process) so the renderer process can |
| 311 // update its IME status. |
| 312 IPC_MESSAGE_ROUTED2(PluginHostMsg_NotifyIMEStatus, |
| 313 int /* input_type */, |
| 314 gfx::Rect /* caret_rect */) |
| 315 #endif |
| 316 |
| 295 #if defined(OS_MACOSX) | 317 #if defined(OS_MACOSX) |
| 296 IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged, | 318 IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged, |
| 297 bool /* focused */) | 319 bool /* focused */) |
| 298 | 320 |
| 299 IPC_MESSAGE_ROUTED0(PluginHostMsg_StartIme) | 321 IPC_MESSAGE_ROUTED0(PluginHostMsg_StartIme) |
| 300 | 322 |
| 301 //---------------------------------------------------------------------- | 323 //---------------------------------------------------------------------- |
| 302 // Core Animation plugin implementation rendering via compositor. | 324 // Core Animation plugin implementation rendering via compositor. |
| 303 | 325 |
| 304 // Notifies the renderer process that this plugin will be using the | 326 // Notifies the renderer process that this plugin will be using the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 315 int32 /* width */, | 337 int32 /* width */, |
| 316 int32 /* height */, | 338 int32 /* height */, |
| 317 uint32 /* surface_id */) | 339 uint32 /* surface_id */) |
| 318 | 340 |
| 319 // Notifies the renderer process that the plugin produced a new frame | 341 // Notifies the renderer process that the plugin produced a new frame |
| 320 // of content into its IOSurface, and therefore that the compositor | 342 // of content into its IOSurface, and therefore that the compositor |
| 321 // needs to redraw. | 343 // needs to redraw. |
| 322 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) | 344 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) |
| 323 #endif | 345 #endif |
| 324 | 346 |
| 325 IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, | |
| 326 bool /* allow */, | |
| 327 int /* resource_id */) | |
| 328 | |
| 329 | 347 |
| 330 //----------------------------------------------------------------------------- | 348 //----------------------------------------------------------------------------- |
| 331 // NPObject messages | 349 // NPObject messages |
| 332 // These are messages used to marshall NPObjects. They are sent both from the | 350 // These are messages used to marshall NPObjects. They are sent both from the |
| 333 // plugin to the renderer and from the renderer to the plugin. | 351 // plugin to the renderer and from the renderer to the plugin. |
| 334 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) | 352 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) |
| 335 | 353 |
| 336 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, | 354 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, |
| 337 content::NPIdentifier_Param /* name */, | 355 content::NPIdentifier_Param /* name */, |
| 338 bool /* result */) | 356 bool /* result */) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, | 389 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, |
| 372 std::vector<content::NPVariant_Param> /* args */, | 390 std::vector<content::NPVariant_Param> /* args */, |
| 373 content::NPVariant_Param /* result_param */, | 391 content::NPVariant_Param /* result_param */, |
| 374 bool /* result */) | 392 bool /* result */) |
| 375 | 393 |
| 376 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, | 394 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, |
| 377 std::string /* script */, | 395 std::string /* script */, |
| 378 bool /* popups_allowed */, | 396 bool /* popups_allowed */, |
| 379 content::NPVariant_Param /* result_param */, | 397 content::NPVariant_Param /* result_param */, |
| 380 bool /* result */) | 398 bool /* result */) |
| OLD | NEW |