OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // Multiply-included message file, hence no include guard. |
| 6 |
| 7 #include "build/build_config.h" |
| 8 #include "content/common/content_export.h" |
| 9 #include "content/common/content_param_traits.h" |
| 10 #include "content/public/common/common_param_traits.h" |
| 11 #include "ipc/ipc_channel_handle.h" |
| 12 #include "ipc/ipc_message_macros.h" |
| 13 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/gfx/rect.h" |
| 15 |
| 16 #undef IPC_MESSAGE_EXPORT |
| 17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 18 |
| 19 #define IPC_MESSAGE_START PluginProcessMsgStart |
| 20 |
| 21 //----------------------------------------------------------------------------- |
| 22 // PluginProcess messages |
| 23 // These are messages sent from the browser to the plugin process. |
| 24 // Tells the plugin process to create a new channel for communication with a |
| 25 // given renderer. The channel name is returned in a |
| 26 // PluginProcessHostMsg_ChannelCreated message. The renderer ID is passed so |
| 27 // that the plugin process reuses an existing channel to that process if it |
| 28 // exists. This ID is a unique opaque identifier generated by the browser |
| 29 // process. |
| 30 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, |
| 31 int /* renderer_id */, |
| 32 bool /* off_the_record */) |
| 33 |
| 34 // Tells the plugin process to notify every connected renderer of the pending |
| 35 // shutdown, so we don't mistake it for a crash. |
| 36 IPC_MESSAGE_CONTROL0(PluginProcessMsg_NotifyRenderersOfPendingShutdown) |
| 37 |
| 38 IPC_MESSAGE_CONTROL3(PluginProcessMsg_ClearSiteData, |
| 39 std::string /* site */, |
| 40 uint64 /* flags */, |
| 41 uint64 /* max_age */) |
| 42 |
| 43 |
| 44 //----------------------------------------------------------------------------- |
| 45 // PluginProcessHost messages |
| 46 // These are messages sent from the plugin process to the browser process. |
| 47 // Response to a PluginProcessMsg_CreateChannel message. |
| 48 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated, |
| 49 IPC::ChannelHandle /* channel_handle */) |
| 50 |
| 51 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ClearSiteDataResult, |
| 52 bool /* success */) |
| 53 |
| 54 #if defined(OS_WIN) |
| 55 // Destroys the given window's parent on the UI thread. |
| 56 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginWindowDestroyed, |
| 57 HWND /* window */, |
| 58 HWND /* parent */) |
| 59 #endif |
| 60 |
| 61 #if defined(USE_X11) |
| 62 // On X11, the mapping between NativeViewId and X window ids |
| 63 // is known only to the browser. This message lets the plugin process |
| 64 // ask about a NativeViewId that was provided by the renderer. |
| 65 // It will get 0 back if it's a bogus input. |
| 66 IPC_SYNC_MESSAGE_CONTROL1_1(PluginProcessHostMsg_MapNativeViewId, |
| 67 gfx::NativeViewId /* input: native view id */, |
| 68 gfx::PluginWindowHandle /* output: X window id */) |
| 69 #endif |
| 70 |
| 71 #if defined(OS_MACOSX) |
| 72 // On Mac OS X, we need the browser to keep track of plugin windows so |
| 73 // that it can add and remove them from stacking groups, hide and show the |
| 74 // menu bar, etc. We pass the window rect for convenience so that the |
| 75 // browser can easily tell if the window is fullscreen. |
| 76 |
| 77 // Notifies the browser that the plugin has selected a window (i.e., brought |
| 78 // it to the front and wants it to have keyboard focus). |
| 79 IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginSelectWindow, |
| 80 uint32 /* window ID */, |
| 81 gfx::Rect /* window rect */, |
| 82 bool /* modal */) |
| 83 |
| 84 // Notifies the browser that the plugin has shown a window. |
| 85 IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginShowWindow, |
| 86 uint32 /* window ID */, |
| 87 gfx::Rect /* window rect */, |
| 88 bool /* modal */) |
| 89 |
| 90 // Notifies the browser that the plugin has hidden a window. |
| 91 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginHideWindow, |
| 92 uint32 /* window ID */, |
| 93 gfx::Rect /* window rect */) |
| 94 |
| 95 // Notifies the browser that a plugin instance has requested a cursor |
| 96 // visibility change. |
| 97 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginSetCursorVisibility, |
| 98 bool /* cursor visibility */) |
| 99 #endif |
OLD | NEW |