| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/shared_memory.h" | 5 #include "base/shared_memory.h" |
| 6 #include "chrome/common/ipc_message_macros.h" | 6 #include "chrome/common/ipc_message_macros.h" |
| 7 #include "webkit/glue/webcursor.h" | 7 #include "webkit/glue/webcursor.h" |
| 8 | 8 |
| 9 //----------------------------------------------------------------------------- | 9 //----------------------------------------------------------------------------- |
| 10 // PluginProcess messages | 10 // PluginProcess messages |
| 11 // These are messages sent from the browser to the plugin process. | 11 // These are messages sent from the browser to the plugin process. |
| 12 IPC_BEGIN_MESSAGES(PluginProcess, 3) | 12 IPC_BEGIN_MESSAGES(PluginProcess) |
| 13 // Tells the plugin process to create a new channel for communication with a | 13 // Tells the plugin process to create a new channel for communication with a |
| 14 // renderer. The channel name is returned in a | 14 // renderer. The channel name is returned in a |
| 15 // PluginProcessHostMsg_ChannelCreated message. | 15 // PluginProcessHostMsg_ChannelCreated message. |
| 16 // The renderer_handle is the handle of the renderer process requesting | 16 // The renderer_handle is the handle of the renderer process requesting |
| 17 // the channel. It has to be valid in the context of the plugin process. | 17 // the channel. It has to be valid in the context of the plugin process. |
| 18 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, | 18 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, |
| 19 int /* process_id */, | 19 int /* process_id */, |
| 20 HANDLE /* renderer handle */) | 20 HANDLE /* renderer handle */) |
| 21 | 21 |
| 22 IPC_MESSAGE_CONTROL1(PluginProcessMsg_ShutdownResponse, | 22 IPC_MESSAGE_CONTROL1(PluginProcessMsg_ShutdownResponse, |
| 23 bool /* ok to shutdown */) | 23 bool /* ok to shutdown */) |
| 24 | 24 |
| 25 // Allows a chrome plugin loaded in the browser process to send arbitrary | 25 // Allows a chrome plugin loaded in the browser process to send arbitrary |
| 26 // data to an instance of the same plugin loaded in a plugin process. | 26 // data to an instance of the same plugin loaded in a plugin process. |
| 27 IPC_MESSAGE_CONTROL1(PluginProcessMsg_PluginMessage, | 27 IPC_MESSAGE_CONTROL1(PluginProcessMsg_PluginMessage, |
| 28 std::vector<uint8> /* opaque data */) | 28 std::vector<uint8> /* opaque data */) |
| 29 | 29 |
| 30 IPC_MESSAGE_CONTROL0(PluginProcessMsg_BrowserShutdown) | 30 IPC_MESSAGE_CONTROL0(PluginProcessMsg_BrowserShutdown) |
| 31 | 31 |
| 32 IPC_END_MESSAGES(PluginProcess) | 32 IPC_END_MESSAGES(PluginProcess) |
| 33 | 33 |
| 34 | 34 |
| 35 //----------------------------------------------------------------------------- | 35 //----------------------------------------------------------------------------- |
| 36 // PluginProcessHost messages | 36 // PluginProcessHost messages |
| 37 // These are messages sent from the plugin process to the browser process. | 37 // These are messages sent from the plugin process to the browser process. |
| 38 IPC_BEGIN_MESSAGES(PluginProcessHost, 4) | 38 IPC_BEGIN_MESSAGES(PluginProcessHost) |
| 39 // Response to a PluginProcessMsg_CreateChannel message. | 39 // Response to a PluginProcessMsg_CreateChannel message. |
| 40 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_ChannelCreated, | 40 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_ChannelCreated, |
| 41 int /* process_id */, | 41 int /* process_id */, |
| 42 std::wstring /* channel_name */) | 42 std::wstring /* channel_name */) |
| 43 | 43 |
| 44 IPC_MESSAGE_ROUTED3(PluginProcessHostMsg_DownloadUrl, | 44 IPC_MESSAGE_ROUTED3(PluginProcessHostMsg_DownloadUrl, |
| 45 std::string /* URL */, | 45 std::string /* URL */, |
| 46 int /* process id */, | 46 int /* process id */, |
| 47 HWND /* caller window */) | 47 HWND /* caller window */) |
| 48 | 48 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Destroys the given window on the UI thread. | 85 // Destroys the given window on the UI thread. |
| 86 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_DestroyWindow, | 86 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_DestroyWindow, |
| 87 HWND /* window */) | 87 HWND /* window */) |
| 88 | 88 |
| 89 IPC_END_MESSAGES(PluginProcessHost) | 89 IPC_END_MESSAGES(PluginProcessHost) |
| 90 | 90 |
| 91 | 91 |
| 92 //----------------------------------------------------------------------------- | 92 //----------------------------------------------------------------------------- |
| 93 // Plugin messages | 93 // Plugin messages |
| 94 // These are messages sent from the renderer process to the plugin process. | 94 // These are messages sent from the renderer process to the plugin process. |
| 95 IPC_BEGIN_MESSAGES(Plugin, 5) | 95 IPC_BEGIN_MESSAGES(Plugin) |
| 96 // Tells the plugin process to create a new plugin instance with the given | 96 // Tells the plugin process to create a new plugin instance with the given |
| 97 // id. A corresponding WebPluginDelegateStub is created which hosts the | 97 // id. A corresponding WebPluginDelegateStub is created which hosts the |
| 98 // WebPluginDelegateImpl. | 98 // WebPluginDelegateImpl. |
| 99 IPC_SYNC_MESSAGE_CONTROL1_1(PluginMsg_CreateInstance, | 99 IPC_SYNC_MESSAGE_CONTROL1_1(PluginMsg_CreateInstance, |
| 100 std::string /* mime_type */, | 100 std::string /* mime_type */, |
| 101 int /* instance_id */) | 101 int /* instance_id */) |
| 102 | 102 |
| 103 // The WebPluginDelegateProxy sends this to the WebPluginDelegateStub in its | 103 // The WebPluginDelegateProxy sends this to the WebPluginDelegateStub in its |
| 104 // destructor, so that the stub deletes the actual WebPluginDelegateImpl | 104 // destructor, so that the stub deletes the actual WebPluginDelegateImpl |
| 105 // object that it's hosting. | 105 // object that it's hosting. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 std::string /* url */, | 195 std::string /* url */, |
| 196 bool /* notify_needed */, | 196 bool /* notify_needed */, |
| 197 HANDLE /* notify data */) | 197 HANDLE /* notify data */) |
| 198 IPC_END_MESSAGES(Plugin) | 198 IPC_END_MESSAGES(Plugin) |
| 199 | 199 |
| 200 | 200 |
| 201 //----------------------------------------------------------------------------- | 201 //----------------------------------------------------------------------------- |
| 202 // PluginHost messages | 202 // PluginHost messages |
| 203 // These are messages sent from the plugin process to the renderer process. | 203 // These are messages sent from the plugin process to the renderer process. |
| 204 // They all map to the corresponding WebPlugin methods. | 204 // They all map to the corresponding WebPlugin methods. |
| 205 IPC_BEGIN_MESSAGES(PluginHost, 6) | 205 IPC_BEGIN_MESSAGES(PluginHost) |
| 206 // Sends the plugin window information to the renderer. | 206 // Sends the plugin window information to the renderer. |
| 207 // The window parameter is a handle to the window if the plugin is a windowed | 207 // The window parameter is a handle to the window if the plugin is a windowed |
| 208 // plugin. It is NULL for windowless plugins. | 208 // plugin. It is NULL for windowless plugins. |
| 209 // The modal_loop_pump_messages_event parameter is an event handle which is | 209 // The modal_loop_pump_messages_event parameter is an event handle which is |
| 210 // passed in for windowless plugins and is used to indicate if messages | 210 // passed in for windowless plugins and is used to indicate if messages |
| 211 // are to be pumped in sync calls to the plugin process. Currently used | 211 // are to be pumped in sync calls to the plugin process. Currently used |
| 212 // in HandleEvent calls. | 212 // in HandleEvent calls. |
| 213 IPC_SYNC_MESSAGE_ROUTED2_0(PluginHostMsg_SetWindow, | 213 IPC_SYNC_MESSAGE_ROUTED2_0(PluginHostMsg_SetWindow, |
| 214 HWND /* window */, | 214 HWND /* window */, |
| 215 HANDLE /* modal_loop_pump_messages_event */) | 215 HANDLE /* modal_loop_pump_messages_event */) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 HANDLE /* existing_stream */, | 267 HANDLE /* existing_stream */, |
| 268 bool /* notify_needed */, | 268 bool /* notify_needed */, |
| 269 HANDLE /* notify_data */) | 269 HANDLE /* notify_data */) |
| 270 | 270 |
| 271 IPC_END_MESSAGES(PluginHost) | 271 IPC_END_MESSAGES(PluginHost) |
| 272 | 272 |
| 273 //----------------------------------------------------------------------------- | 273 //----------------------------------------------------------------------------- |
| 274 // NPObject messages | 274 // NPObject messages |
| 275 // These are messages used to marshall NPObjects. They are sent both from the | 275 // These are messages used to marshall NPObjects. They are sent both from the |
| 276 // plugin to the renderer and from the renderer to the plugin. | 276 // plugin to the renderer and from the renderer to the plugin. |
| 277 IPC_BEGIN_MESSAGES(NPObject, 7) | 277 IPC_BEGIN_MESSAGES(NPObject) |
| 278 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) | 278 IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) |
| 279 | 279 |
| 280 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, | 280 IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, |
| 281 NPIdentifier_Param /* name */, | 281 NPIdentifier_Param /* name */, |
| 282 bool /* result */) | 282 bool /* result */) |
| 283 | 283 |
| 284 IPC_SYNC_MESSAGE_ROUTED3_2(NPObjectMsg_Invoke, | 284 IPC_SYNC_MESSAGE_ROUTED3_2(NPObjectMsg_Invoke, |
| 285 bool /* is_default */, | 285 bool /* is_default */, |
| 286 NPIdentifier_Param /* method */, | 286 NPIdentifier_Param /* method */, |
| 287 std::vector<NPVariant_Param> /* args */, | 287 std::vector<NPVariant_Param> /* args */, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 316 std::string /* script */, | 316 std::string /* script */, |
| 317 bool /* popups_allowed */, | 317 bool /* popups_allowed */, |
| 318 NPVariant_Param /* result_param */, | 318 NPVariant_Param /* result_param */, |
| 319 bool /* result */) | 319 bool /* result */) |
| 320 | 320 |
| 321 IPC_SYNC_MESSAGE_ROUTED1_0(NPObjectMsg_SetException, | 321 IPC_SYNC_MESSAGE_ROUTED1_0(NPObjectMsg_SetException, |
| 322 std::string /* message */) | 322 std::string /* message */) |
| 323 | 323 |
| 324 IPC_END_MESSAGES(NPObject) | 324 IPC_END_MESSAGES(NPObject) |
| 325 | 325 |
| OLD | NEW |