OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "content/common/content_param_traits.h" | 9 #include "content/common/content_param_traits.h" |
10 #include "content/common/plugin_param_traits.h" | 10 #include "content/common_child/plugin_param_traits.h" |
11 #include "content/public/common/common_param_traits.h" | 11 #include "content/public/common/common_param_traits.h" |
12 #include "ipc/ipc_channel_handle.h" | 12 #include "ipc/ipc_channel_handle.h" |
13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 #include "webkit/glue/webcursor.h" | 16 #include "webkit/glue/webcursor.h" |
17 | 17 |
18 #if defined(OS_POSIX) | 18 #if defined(OS_POSIX) |
19 #include "base/file_descriptor_posix.h" | 19 #include "base/file_descriptor_posix.h" |
20 #endif | 20 #endif |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 IPC_STRUCT_BEGIN(PluginMsg_UpdateGeometry_Param) | 55 IPC_STRUCT_BEGIN(PluginMsg_UpdateGeometry_Param) |
56 IPC_STRUCT_MEMBER(gfx::Rect, window_rect) | 56 IPC_STRUCT_MEMBER(gfx::Rect, window_rect) |
57 IPC_STRUCT_MEMBER(gfx::Rect, clip_rect) | 57 IPC_STRUCT_MEMBER(gfx::Rect, clip_rect) |
58 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer0) | 58 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer0) |
59 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer1) | 59 IPC_STRUCT_MEMBER(TransportDIB::Handle, windowless_buffer1) |
60 IPC_STRUCT_MEMBER(int, windowless_buffer_index) | 60 IPC_STRUCT_MEMBER(int, windowless_buffer_index) |
61 IPC_STRUCT_END() | 61 IPC_STRUCT_END() |
62 | 62 |
63 //----------------------------------------------------------------------------- | 63 //----------------------------------------------------------------------------- |
64 // PluginProcess messages | |
65 // These are messages sent from the browser to the plugin process. | |
66 // Tells the plugin process to create a new channel for communication with a | |
67 // given renderer. The channel name is returned in a | |
68 // PluginProcessHostMsg_ChannelCreated message. The renderer ID is passed so | |
69 // that the plugin process reuses an existing channel to that process if it | |
70 // exists. This ID is a unique opaque identifier generated by the browser | |
71 // process. | |
72 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, | |
73 int /* renderer_id */, | |
74 bool /* off_the_record */) | |
75 | |
76 // Tells the plugin process to notify every connected renderer of the pending | |
77 // shutdown, so we don't mistake it for a crash. | |
78 IPC_MESSAGE_CONTROL0(PluginProcessMsg_NotifyRenderersOfPendingShutdown) | |
79 | |
80 | |
81 //----------------------------------------------------------------------------- | |
82 // PluginProcessHost messages | |
83 // These are messages sent from the plugin process to the browser process. | |
84 // Response to a PluginProcessMsg_CreateChannel message. | |
85 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated, | |
86 IPC::ChannelHandle /* channel_handle */) | |
87 | |
88 #if defined(OS_WIN) | |
89 // Destroys the given window's parent on the UI thread. | |
90 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginWindowDestroyed, | |
91 HWND /* window */, | |
92 HWND /* parent */) | |
93 #endif | |
94 | |
95 #if defined(USE_X11) | |
96 // On X11, the mapping between NativeViewId and X window ids | |
97 // is known only to the browser. This message lets the plugin process | |
98 // ask about a NativeViewId that was provided by the renderer. | |
99 // It will get 0 back if it's a bogus input. | |
100 IPC_SYNC_MESSAGE_CONTROL1_1(PluginProcessHostMsg_MapNativeViewId, | |
101 gfx::NativeViewId /* input: native view id */, | |
102 gfx::PluginWindowHandle /* output: X window id */) | |
103 #endif | |
104 | |
105 #if defined(OS_MACOSX) | |
106 // On Mac OS X, we need the browser to keep track of plugin windows so | |
107 // that it can add and remove them from stacking groups, hide and show the | |
108 // menu bar, etc. We pass the window rect for convenience so that the | |
109 // browser can easily tell if the window is fullscreen. | |
110 | |
111 // Notifies the browser that the plugin has selected a window (i.e., brought | |
112 // it to the front and wants it to have keyboard focus). | |
113 IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginSelectWindow, | |
114 uint32 /* window ID */, | |
115 gfx::Rect /* window rect */, | |
116 bool /* modal */) | |
117 | |
118 // Notifies the browser that the plugin has shown a window. | |
119 IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginShowWindow, | |
120 uint32 /* window ID */, | |
121 gfx::Rect /* window rect */, | |
122 bool /* modal */) | |
123 | |
124 // Notifies the browser that the plugin has hidden a window. | |
125 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginHideWindow, | |
126 uint32 /* window ID */, | |
127 gfx::Rect /* window rect */) | |
128 | |
129 // Notifies the browser that a plugin instance has requested a cursor | |
130 // visibility change. | |
131 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginSetCursorVisibility, | |
132 bool /* cursor visibility */) | |
133 #endif | |
134 | |
135 | |
136 //----------------------------------------------------------------------------- | |
137 // Plugin messages | 64 // Plugin messages |
138 // These are messages sent from the renderer process to the plugin process. | 65 // These are messages sent from the renderer process to the plugin process. |
139 // Tells the plugin process to create a new plugin instance with the given | 66 // Tells the plugin process to create a new plugin instance with the given |
140 // id. A corresponding WebPluginDelegateStub is created which hosts the | 67 // id. A corresponding WebPluginDelegateStub is created which hosts the |
141 // WebPluginDelegateImpl. | 68 // WebPluginDelegateImpl. |
142 IPC_SYNC_MESSAGE_CONTROL1_1(PluginMsg_CreateInstance, | 69 IPC_SYNC_MESSAGE_CONTROL1_1(PluginMsg_CreateInstance, |
143 std::string /* mime_type */, | 70 std::string /* mime_type */, |
144 int /* instance_id */) | 71 int /* instance_id */) |
145 | 72 |
146 // The WebPluginDelegateProxy sends this to the WebPluginDelegateStub in its | 73 // The WebPluginDelegateProxy sends this to the WebPluginDelegateStub in its |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 int /* render_view_id */) | 207 int /* render_view_id */) |
281 | 208 |
282 #if defined(OS_MACOSX) | 209 #if defined(OS_MACOSX) |
283 // This message, used only on 10.6 and later, transmits the "fake" | 210 // This message, used only on 10.6 and later, transmits the "fake" |
284 // window handle allocated by the browser on behalf of the renderer | 211 // window handle allocated by the browser on behalf of the renderer |
285 // to the GPU plugin. | 212 // to the GPU plugin. |
286 IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle, | 213 IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle, |
287 gfx::PluginWindowHandle /* window */) | 214 gfx::PluginWindowHandle /* window */) |
288 #endif | 215 #endif |
289 | 216 |
290 IPC_MESSAGE_CONTROL3(PluginMsg_ClearSiteData, | |
291 std::string /* site */, | |
292 uint64 /* flags */, | |
293 uint64 /* max_age */) | |
294 | |
295 //----------------------------------------------------------------------------- | 217 //----------------------------------------------------------------------------- |
296 // PluginHost messages | 218 // PluginHost messages |
297 // These are messages sent from the plugin process to the renderer process. | 219 // These are messages sent from the plugin process to the renderer process. |
298 // They all map to the corresponding WebPlugin methods. | 220 // They all map to the corresponding WebPlugin methods. |
299 // Sends the plugin window information to the renderer. | 221 // Sends the plugin window information to the renderer. |
300 // The window parameter is a handle to the window if the plugin is a windowed | 222 // The window parameter is a handle to the window if the plugin is a windowed |
301 // plugin. It is NULL for windowless plugins. | 223 // plugin. It is NULL for windowless plugins. |
302 IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, | 224 IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, |
303 gfx::PluginWindowHandle /* window */) | 225 gfx::PluginWindowHandle /* window */) |
304 | 226 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 int32 /* width */, | 315 int32 /* width */, |
394 int32 /* height */, | 316 int32 /* height */, |
395 uint32 /* surface_id */) | 317 uint32 /* surface_id */) |
396 | 318 |
397 // Notifies the renderer process that the plugin produced a new frame | 319 // Notifies the renderer process that the plugin produced a new frame |
398 // of content into its IOSurface, and therefore that the compositor | 320 // of content into its IOSurface, and therefore that the compositor |
399 // needs to redraw. | 321 // needs to redraw. |
400 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) | 322 IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface) |
401 #endif | 323 #endif |
402 | 324 |
403 IPC_MESSAGE_CONTROL1(PluginHostMsg_ClearSiteDataResult, | |
404 bool /* success */) | |
405 | |
406 IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, | 325 IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, |
407 bool /* allow */, | 326 bool /* allow */, |
408 int /* resource_id */) | 327 int /* resource_id */) |
409 | 328 |
410 | 329 |
411 //----------------------------------------------------------------------------- | 330 //----------------------------------------------------------------------------- |
412 // NPObject messages | 331 // NPObject messages |
413 // These are messages used to marshall NPObjects. They are sent both from the | 332 // These are messages used to marshall NPObjects. They are sent both from the |
414 // plugin to the renderer and from the renderer to the plugin. | 333 // plugin to the renderer and from the renderer to the plugin. |
415 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) | 334 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, | 371 IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, |
453 std::vector<content::NPVariant_Param> /* args */, | 372 std::vector<content::NPVariant_Param> /* args */, |
454 content::NPVariant_Param /* result_param */, | 373 content::NPVariant_Param /* result_param */, |
455 bool /* result */) | 374 bool /* result */) |
456 | 375 |
457 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, | 376 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, |
458 std::string /* script */, | 377 std::string /* script */, |
459 bool /* popups_allowed */, | 378 bool /* popups_allowed */, |
460 content::NPVariant_Param /* result_param */, | 379 content::NPVariant_Param /* result_param */, |
461 bool /* result */) | 380 bool /* result */) |
OLD | NEW |