1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// IPC messages for interacting with frames.
// Multiply-included message file, hence no include guard.
#include "content/common/content_export.h"
#include "content/common/frame_param.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/context_menu_params.h"
#include "ipc/ipc_message_macros.h"
#include "url/gurl.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START FrameMsgStart
IPC_ENUM_TRAITS(blink::WebContextMenuData::MediaType)
IPC_ENUM_TRAITS(ui::MenuSourceType)
IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams)
IPC_STRUCT_TRAITS_MEMBER(media_type)
IPC_STRUCT_TRAITS_MEMBER(x)
IPC_STRUCT_TRAITS_MEMBER(y)
IPC_STRUCT_TRAITS_MEMBER(link_url)
IPC_STRUCT_TRAITS_MEMBER(link_text)
IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
IPC_STRUCT_TRAITS_MEMBER(src_url)
IPC_STRUCT_TRAITS_MEMBER(has_image_contents)
IPC_STRUCT_TRAITS_MEMBER(page_url)
IPC_STRUCT_TRAITS_MEMBER(keyword_url)
IPC_STRUCT_TRAITS_MEMBER(frame_url)
IPC_STRUCT_TRAITS_MEMBER(frame_id)
IPC_STRUCT_TRAITS_MEMBER(frame_page_state)
IPC_STRUCT_TRAITS_MEMBER(media_flags)
IPC_STRUCT_TRAITS_MEMBER(selection_text)
IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
IPC_STRUCT_TRAITS_MEMBER(misspelling_hash)
IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled)
IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
IPC_STRUCT_TRAITS_MEMBER(is_editable)
IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
IPC_STRUCT_TRAITS_MEMBER(edit_flags)
IPC_STRUCT_TRAITS_MEMBER(security_info)
IPC_STRUCT_TRAITS_MEMBER(frame_charset)
IPC_STRUCT_TRAITS_MEMBER(referrer_policy)
IPC_STRUCT_TRAITS_MEMBER(custom_context)
IPC_STRUCT_TRAITS_MEMBER(custom_items)
IPC_STRUCT_TRAITS_MEMBER(source_type)
#if defined(OS_ANDROID)
IPC_STRUCT_TRAITS_MEMBER(selection_start)
IPC_STRUCT_TRAITS_MEMBER(selection_end)
#endif
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
IPC_STRUCT_TRAITS_MEMBER(request_id)
IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
// The frame ID for the failure report.
IPC_STRUCT_MEMBER(int64, frame_id)
// The WebFrame's uniqueName().
IPC_STRUCT_MEMBER(base::string16, frame_unique_name)
// True if this is the top-most frame.
IPC_STRUCT_MEMBER(bool, is_main_frame)
// Error code as reported in the DidFailProvisionalLoad callback.
IPC_STRUCT_MEMBER(int, error_code)
// An error message generated from the error_code. This can be an empty
// string if we were unable to find a meaningful description.
IPC_STRUCT_MEMBER(base::string16, error_description)
// The URL that the error is reported for.
IPC_STRUCT_MEMBER(GURL, url)
// True if the failure is the result of navigating to a POST again
// and we're going to show the POST interstitial.
IPC_STRUCT_MEMBER(bool, showing_repost_interstitial)
IPC_STRUCT_END()
// -----------------------------------------------------------------------------
// Messages sent from the browser to the renderer.
// When HW accelerated buffers are swapped in an out-of-process child frame
// renderer, the message is forwarded to the embedding frame to notify it of
// a new texture available for compositing. When the buffer has finished
// presenting, a FrameHostMsg_BuffersSwappedACK should be sent back to
// gpu host that produced this buffer.
//
// This is used in the non-ubercomp HW accelerated compositing path.
IPC_MESSAGE_ROUTED1(FrameMsg_BuffersSwapped,
FrameMsg_BuffersSwapped_Params /* params */)
// Notifies the embedding frame that a new CompositorFrame is ready to be
// presented. When the frame finishes presenting, a matching
// FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
// RenderViewHost that was produced the CompositorFrame.
//
// This is used in the ubercomp compositing path.
IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped,
FrameMsg_CompositorFrameSwapped_Params /* params */)
// Notifies the embedding frame that the process rendering the child frame's
// contents has terminated.
IPC_MESSAGE_ROUTED0(FrameMsg_ChildFrameProcessGone)
// Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that
// the menu has been closed.
IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed,
content::CustomContextMenuContext /* custom_context */)
// Executes custom context menu action that was provided from Blink.
IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
content::CustomContextMenuContext /* custom_context */,
unsigned /* action */)
// -----------------------------------------------------------------------------
// Messages sent from the renderer to the browser.
// Sent by the renderer when a child frame is created in the renderer. The
// |parent_frame_id| and |frame_id| are NOT routing ids. They are
// renderer-allocated identifiers used for tracking a frame's creation.
//
// Each of these messages will have a corresponding FrameHostMsg_Detach message
// sent when the frame is detached from the DOM.
//
// TOOD(ajwong): replace parent_render_frame_id and frame_id with just the
// routing ids.
IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame,
int32 /* parent_render_frame_id */,
int64 /* parent_frame_id */,
int64 /* frame_id */,
std::string /* frame_name */,
int /* new_render_frame_id */)
// Sent by the renderer to the parent RenderFrameHost when a child frame is
// detached from the DOM.
IPC_MESSAGE_ROUTED2(FrameHostMsg_Detach,
int64 /* parent_frame_id */,
int64 /* frame_id */)
// Sent when the renderer starts a provisional load for a frame.
IPC_MESSAGE_ROUTED4(FrameHostMsg_DidStartProvisionalLoadForFrame,
int64 /* frame_id */,
int64 /* parent_frame_id */,
bool /* true if it is the main frame */,
GURL /* url */)
// Sent when the renderer fails a provisional load with an error.
IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError,
FrameHostMsg_DidFailProvisionalLoadWithError_Params)
// Sent when a provisional load on the main frame redirects.
IPC_MESSAGE_ROUTED3(FrameHostMsg_DidRedirectProvisionalLoad,
int /* page_id */,
GURL /* source_url*/,
GURL /* target_url */)
// Sent to the browser when the renderer detects it is blocked on a pepper
// plugin message for too long. This is also sent when it becomes unhung
// (according to the value of is_hung). The browser can give the user the
// option of killing the plugin.
IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung,
int /* plugin_child_id */,
base::FilePath /* path */,
bool /* is_hung */)
// Sent by the renderer process to indicate that a plugin instance has crashed.
// Note: |plugin_pid| should not be trusted. The corresponding process has
// probably died. Moreover, the ID may have been reused by a new process. Any
// usage other than displaying it in a prompt to the user is very likely to be
// wrong.
IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed,
base::FilePath /* plugin_path */,
base::ProcessId /* plugin_pid */)
// Return information about a plugin for the given URL and MIME
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
int /* render_frame_id */,
GURL /* url */,
GURL /* page_url */,
std::string /* mime_type */,
bool /* found */,
content::WebPluginInfo /* plugin info */,
std::string /* actual_mime_type */)
// A renderer sends this to the browser process when it wants to
// create a plugin. The browser will create the plugin process if
// necessary, and will return a handle to the channel on success.
// On error an empty string is returned.
IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin,
int /* render_frame_id */,
GURL /* url */,
GURL /* page_url */,
std::string /* mime_type */,
IPC::ChannelHandle /* channel_handle */,
content::WebPluginInfo /* info */)
// Acknowledge that we presented a HW buffer and provide a sync point
// to specify the location in the command stream when the compositor
// is no longer using it.
//
// See FrameMsg_BuffersSwapped.
IPC_MESSAGE_ROUTED1(FrameHostMsg_BuffersSwappedACK,
FrameHostMsg_BuffersSwappedACK_Params /* params */)
// Acknowledge that we presented an ubercomp frame.
//
// See FrameMsg_CompositorFrameSwapped
IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK,
FrameHostMsg_CompositorFrameSwappedACK_Params /* params */)
// Indicates that the current frame has swapped out, after a SwapOut message.
IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK)
IPC_MESSAGE_ROUTED1(FrameHostMsg_ReclaimCompositorResources,
FrameHostMsg_ReclaimCompositorResources_Params /* params */)
// Instructs the frame to swap out for a cross-site transition, including
// running the unload event handler. Expects a SwapOut_ACK message when
// finished.
IPC_MESSAGE_ROUTED0(FrameMsg_SwapOut)
// Used to tell the parent that the user right clicked on an area of the
// content area, and a context menu should be shown for it. The params
// object contains information about the node(s) that were selected when the
// user right clicked.
IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu, content::ContextMenuParams)
|