[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / common / plugin_process_messages.h
blobc21186b252ec428b5ad5c5bf9fdc485848001351
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.
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/geometry/rect.h"
14 #include "ui/gfx/ipc/gfx_param_traits.h"
15 #include "ui/gfx/native_widget_types.h"
17 #undef IPC_MESSAGE_EXPORT
18 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
20 #define IPC_MESSAGE_START PluginProcessMsgStart
22 //-----------------------------------------------------------------------------
23 // PluginProcess messages
24 // These are messages sent from the browser to the plugin process.
25 // Tells the plugin process to create a new channel for communication with a
26 // given renderer. The channel name is returned in a
27 // PluginProcessHostMsg_ChannelCreated message. The renderer ID is passed so
28 // that the plugin process reuses an existing channel to that process if it
29 // exists. This ID is a unique opaque identifier generated by the browser
30 // process.
31 IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel,
32 int /* renderer_id */,
33 bool /* off_the_record */)
35 // Tells the plugin process to notify every connected renderer of the pending
36 // shutdown, so we don't mistake it for a crash.
37 IPC_MESSAGE_CONTROL0(PluginProcessMsg_NotifyRenderersOfPendingShutdown)
39 IPC_MESSAGE_CONTROL3(PluginProcessMsg_ClearSiteData,
40 std::string /* site */,
41 uint64 /* flags */,
42 uint64 /* max_age */)
45 //-----------------------------------------------------------------------------
46 // PluginProcessHost messages
47 // These are messages sent from the plugin process to the browser process.
48 // Response to a PluginProcessMsg_CreateChannel message.
49 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated,
50 IPC::ChannelHandle /* channel_handle */)
52 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelDestroyed,
53 int /* renderer_id */)
55 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ClearSiteDataResult,
56 bool /* success */)
58 #if defined(OS_WIN)
59 // Destroys the given window's parent on the UI thread.
60 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginWindowDestroyed,
61 HWND /* window */,
62 HWND /* parent */)
63 #endif
65 #if defined(OS_MACOSX)
66 // On Mac OS X, we need the browser to keep track of plugin windows so
67 // that it can add and remove them from stacking groups, hide and show the
68 // menu bar, etc. We pass the window rect for convenience so that the
69 // browser can easily tell if the window is fullscreen.
71 // Notifies the browser that the plugin has shown a window.
72 IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginShowWindow,
73 uint32 /* window ID */,
74 gfx::Rect /* window rect */,
75 bool /* modal */)
77 // Notifies the browser that the plugin has hidden a window.
78 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginHideWindow,
79 uint32 /* window ID */,
80 gfx::Rect /* window rect */)
82 // Notifies the browser that a plugin instance has requested a cursor
83 // visibility change.
84 IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginSetCursorVisibility,
85 bool /* cursor visibility */)
86 #endif