| 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 "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/common/ipc_message_macros.h" | 7 #include "chrome/common/ipc_message_macros.h" |
| 8 #include "webkit/glue/webcursor.h" | 8 #include "webkit/glue/webcursor.h" |
| 9 | 9 |
| 10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
| 11 #include "base/file_descriptor_posix.h" | 11 #include "base/file_descriptor_posix.h" |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 //----------------------------------------------------------------------------- | 14 //----------------------------------------------------------------------------- |
| 15 // PluginProcess messages | 15 // PluginProcess messages |
| 16 // These are messages sent from the browser to the plugin process. | 16 // These are messages sent from the browser to the plugin process. |
| 17 IPC_BEGIN_MESSAGES(PluginProcess) | 17 IPC_BEGIN_MESSAGES(PluginProcess) |
| 18 // Tells the plugin process to create a new channel for communication with a | 18 // Tells the plugin process to create a new channel for communication with a |
| 19 // renderer. The channel name is returned in a | 19 // renderer. The channel name is returned in a |
| 20 // PluginProcessHostMsg_ChannelCreated message. The renderer's process_id is | 20 // PluginProcessHostMsg_ChannelCreated message. The renderer's process_id is |
| 21 // passed so that the plugin process reuses an existing channel to that | 21 // passed so that the plugin process reuses an existing channel to that |
| 22 // process if it exists. | 22 // process if it exists. |
| 23 // It would be nice to use #ifdefs inside the parameter list to not need to | |
| 24 // duplicate this across POSIX/Windows but the Visual Studio compiler doesn't | |
| 25 // like that. | |
| 26 #if defined(OS_WIN) | |
| 27 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, | 23 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, |
| 28 int /* process_id */, | 24 int /* process_id */, |
| 29 bool /* off_the_record */) | 25 bool /* off_the_record */) |
| 30 #elif defined(OS_POSIX) | |
| 31 IPC_MESSAGE_CONTROL3(PluginProcessMsg_CreateChannel, | |
| 32 base::FileDescriptor /* socket for new channel */, | |
| 33 int /* process_id */, | |
| 34 bool /* off_the_record */) | |
| 35 #endif | |
| 36 | 26 |
| 37 // Allows a chrome plugin loaded in the browser process to send arbitrary | 27 // Allows a chrome plugin loaded in the browser process to send arbitrary |
| 38 // data to an instance of the same plugin loaded in a plugin process. | 28 // data to an instance of the same plugin loaded in a plugin process. |
| 39 IPC_MESSAGE_CONTROL1(PluginProcessMsg_PluginMessage, | 29 IPC_MESSAGE_CONTROL1(PluginProcessMsg_PluginMessage, |
| 40 std::vector<uint8> /* opaque data */) | 30 std::vector<uint8> /* opaque data */) |
| 41 | 31 |
| 42 // The following messages are used by all child processes, even though they | 32 // The following messages are used by all child processes, even though they |
| 43 // are listed under PluginProcess. It seems overkill to define ChildProcess. | 33 // are listed under PluginProcess. It seems overkill to define ChildProcess. |
| 44 // Tells the child process it should stop. | 34 // Tells the child process it should stop. |
| 45 IPC_MESSAGE_CONTROL0(PluginProcessMsg_AskBeforeShutdown) | 35 IPC_MESSAGE_CONTROL0(PluginProcessMsg_AskBeforeShutdown) |
| 46 | 36 |
| 47 // Sent in response to PluginProcessHostMsg_ShutdownRequest to tell the child | 37 // Sent in response to PluginProcessHostMsg_ShutdownRequest to tell the child |
| 48 // process that it's safe to shutdown. | 38 // process that it's safe to shutdown. |
| 49 IPC_MESSAGE_CONTROL0(PluginProcessMsg_Shutdown) | 39 IPC_MESSAGE_CONTROL0(PluginProcessMsg_Shutdown) |
| 50 | 40 |
| 51 IPC_END_MESSAGES(PluginProcess) | 41 IPC_END_MESSAGES(PluginProcess) |
| 52 | 42 |
| 53 | 43 |
| 54 //----------------------------------------------------------------------------- | 44 //----------------------------------------------------------------------------- |
| 55 // PluginProcessHost messages | 45 // PluginProcessHost messages |
| 56 // These are messages sent from the plugin process to the browser process. | 46 // These are messages sent from the plugin process to the browser process. |
| 57 IPC_BEGIN_MESSAGES(PluginProcessHost) | 47 IPC_BEGIN_MESSAGES(PluginProcessHost) |
| 58 // Response to a PluginProcessMsg_CreateChannel message. | 48 // Response to a PluginProcessMsg_CreateChannel message. |
| 59 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated, | 49 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated, |
| 60 std::string /* channel_name */) | 50 IPC::ChannelHandle /* channel_handle */) |
| 61 | 51 |
| 62 IPC_SYNC_MESSAGE_CONTROL0_1(PluginProcessHostMsg_GetPluginFinderUrl, | 52 IPC_SYNC_MESSAGE_CONTROL0_1(PluginProcessHostMsg_GetPluginFinderUrl, |
| 63 std::string /* plugin finder URL */) | 53 std::string /* plugin finder URL */) |
| 64 | 54 |
| 65 IPC_MESSAGE_CONTROL0(PluginProcessHostMsg_ShutdownRequest) | 55 IPC_MESSAGE_CONTROL0(PluginProcessHostMsg_ShutdownRequest) |
| 66 | 56 |
| 67 // Allows a chrome plugin loaded in a plugin process to send arbitrary | 57 // Allows a chrome plugin loaded in a plugin process to send arbitrary |
| 68 // data to an instance of the same plugin loaded in the browser process. | 58 // data to an instance of the same plugin loaded in the browser process. |
| 69 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginMessage, | 59 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginMessage, |
| 70 std::vector<uint8> /* opaque data */) | 60 std::vector<uint8> /* opaque data */) |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, | 347 IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, |
| 358 std::string /* script */, | 348 std::string /* script */, |
| 359 bool /* popups_allowed */, | 349 bool /* popups_allowed */, |
| 360 NPVariant_Param /* result_param */, | 350 NPVariant_Param /* result_param */, |
| 361 bool /* result */) | 351 bool /* result */) |
| 362 | 352 |
| 363 IPC_SYNC_MESSAGE_ROUTED1_0(NPObjectMsg_SetException, | 353 IPC_SYNC_MESSAGE_ROUTED1_0(NPObjectMsg_SetException, |
| 364 std::string /* message */) | 354 std::string /* message */) |
| 365 | 355 |
| 366 IPC_END_MESSAGES(NPObject) | 356 IPC_END_MESSAGES(NPObject) |
| OLD | NEW |