Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: content/child/plugin_messages.h

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

Powered by Google App Engine
This is Rietveld 408576698