[Ozone-Gbm] Explicitly crash if trying software rendering on GBM
[chromium-blink-merge.git] / content / common / frame_messages.h
blobc3b5b622c61690e928e2b4409eff783030615660
1 // Copyright 2013 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.
5 // IPC messages for interacting with frames.
6 // Multiply-included message file, hence no include guard.
8 #include "content/common/content_export.h"
9 #include "content/common/content_param_traits.h"
10 #include "content/common/frame_message_enums.h"
11 #include "content/common/frame_param.h"
12 #include "content/common/frame_replication_state.h"
13 #include "content/common/navigation_gesture.h"
14 #include "content/common/navigation_params.h"
15 #include "content/common/resource_request_body.h"
16 #include "content/public/common/color_suggestion.h"
17 #include "content/public/common/common_param_traits.h"
18 #include "content/public/common/context_menu_params.h"
19 #include "content/public/common/frame_navigate_params.h"
20 #include "content/public/common/javascript_message_type.h"
21 #include "content/public/common/page_state.h"
22 #include "content/public/common/resource_response.h"
23 #include "content/public/common/transition_element.h"
24 #include "ipc/ipc_message_macros.h"
25 #include "ui/gfx/ipc/gfx_param_traits.h"
26 #include "url/gurl.h"
27 #include "url/origin.h"
29 #undef IPC_MESSAGE_EXPORT
30 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
32 #define IPC_MESSAGE_START FrameMsgStart
34 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode,
35 AccessibilityModeOff,
36 AccessibilityModeComplete)
37 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType,
38 content::JAVASCRIPT_MESSAGE_TYPE_ALERT,
39 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT)
40 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value,
41 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST)
42 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value,
43 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST)
44 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType,
45 blink::WebContextMenuData::MediaTypeLast)
46 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST)
47 IPC_ENUM_TRAITS(content::SandboxFlags) // Bitmask.
49 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
50 IPC_STRUCT_TRAITS_MEMBER(color)
51 IPC_STRUCT_TRAITS_MEMBER(label)
52 IPC_STRUCT_TRAITS_END()
54 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams)
55 IPC_STRUCT_TRAITS_MEMBER(media_type)
56 IPC_STRUCT_TRAITS_MEMBER(x)
57 IPC_STRUCT_TRAITS_MEMBER(y)
58 IPC_STRUCT_TRAITS_MEMBER(link_url)
59 IPC_STRUCT_TRAITS_MEMBER(link_text)
60 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
61 IPC_STRUCT_TRAITS_MEMBER(src_url)
62 IPC_STRUCT_TRAITS_MEMBER(has_image_contents)
63 IPC_STRUCT_TRAITS_MEMBER(page_url)
64 IPC_STRUCT_TRAITS_MEMBER(keyword_url)
65 IPC_STRUCT_TRAITS_MEMBER(frame_url)
66 IPC_STRUCT_TRAITS_MEMBER(frame_page_state)
67 IPC_STRUCT_TRAITS_MEMBER(media_flags)
68 IPC_STRUCT_TRAITS_MEMBER(selection_text)
69 IPC_STRUCT_TRAITS_MEMBER(suggested_filename)
70 IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
71 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
72 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
73 IPC_STRUCT_TRAITS_MEMBER(is_editable)
74 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
75 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
76 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
77 IPC_STRUCT_TRAITS_MEMBER(edit_flags)
78 IPC_STRUCT_TRAITS_MEMBER(security_info)
79 IPC_STRUCT_TRAITS_MEMBER(frame_charset)
80 IPC_STRUCT_TRAITS_MEMBER(referrer_policy)
81 IPC_STRUCT_TRAITS_MEMBER(custom_context)
82 IPC_STRUCT_TRAITS_MEMBER(custom_items)
83 IPC_STRUCT_TRAITS_MEMBER(source_type)
84 #if defined(OS_ANDROID)
85 IPC_STRUCT_TRAITS_MEMBER(selection_start)
86 IPC_STRUCT_TRAITS_MEMBER(selection_end)
87 #endif
88 IPC_STRUCT_TRAITS_END()
90 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
91 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
92 IPC_STRUCT_TRAITS_MEMBER(request_id)
93 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
94 IPC_STRUCT_TRAITS_MEMBER(link_followed)
95 IPC_STRUCT_TRAITS_END()
97 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement)
98 IPC_STRUCT_TRAITS_MEMBER(id)
99 IPC_STRUCT_TRAITS_MEMBER(rect)
100 IPC_STRUCT_TRAITS_END()
102 IPC_STRUCT_BEGIN(FrameHostMsg_AddNavigationTransitionData_Params)
103 IPC_STRUCT_MEMBER(int, render_frame_id)
104 IPC_STRUCT_MEMBER(std::string, allowed_destination_host_pattern)
105 IPC_STRUCT_MEMBER(std::string, selector)
106 IPC_STRUCT_MEMBER(std::string, markup)
107 IPC_STRUCT_MEMBER(std::vector<content::TransitionElement>, elements)
108 IPC_STRUCT_END()
110 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
111 // Error code as reported in the DidFailProvisionalLoad callback.
112 IPC_STRUCT_MEMBER(int, error_code)
113 // An error message generated from the error_code. This can be an empty
114 // string if we were unable to find a meaningful description.
115 IPC_STRUCT_MEMBER(base::string16, error_description)
116 // The URL that the error is reported for.
117 IPC_STRUCT_MEMBER(GURL, url)
118 // True if the failure is the result of navigating to a POST again
119 // and we're going to show the POST interstitial.
120 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial)
121 IPC_STRUCT_END()
123 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams)
124 IPC_STRUCT_TRAITS_MEMBER(page_id)
125 IPC_STRUCT_TRAITS_MEMBER(url)
126 IPC_STRUCT_TRAITS_MEMBER(base_url)
127 IPC_STRUCT_TRAITS_MEMBER(referrer)
128 IPC_STRUCT_TRAITS_MEMBER(transition)
129 IPC_STRUCT_TRAITS_MEMBER(redirects)
130 IPC_STRUCT_TRAITS_MEMBER(should_update_history)
131 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
132 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding)
133 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type)
134 IPC_STRUCT_TRAITS_MEMBER(socket_address)
135 IPC_STRUCT_TRAITS_END()
137 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has
138 // too many data parameters to be reasonably put in a predefined IPC message.
139 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params,
140 content::FrameNavigateParams)
141 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams)
143 // Information regarding the security of the connection (empty if the
144 // connection was not secure).
145 IPC_STRUCT_MEMBER(std::string, security_info)
147 // The gesture that initiated this navigation.
148 IPC_STRUCT_MEMBER(content::NavigationGesture, gesture)
150 // True if this was a post request.
151 IPC_STRUCT_MEMBER(bool, is_post)
153 // The POST body identifier. -1 if it doesn't exist.
154 IPC_STRUCT_MEMBER(int64, post_id)
156 // Whether the frame navigation resulted in no change to the documents within
157 // the page. For example, the navigation may have just resulted in scrolling
158 // to a named anchor.
159 IPC_STRUCT_MEMBER(bool, was_within_same_page)
161 // The status code of the HTTP request.
162 IPC_STRUCT_MEMBER(int, http_status_code)
164 // This flag is used to warn if the renderer is displaying an error page,
165 // so that we can set the appropriate page type.
166 IPC_STRUCT_MEMBER(bool, url_is_unreachable)
168 // True if the connection was proxied. In this case, socket_address
169 // will represent the address of the proxy, rather than the remote host.
170 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy)
172 // Serialized history item state to store in the navigation entry.
173 IPC_STRUCT_MEMBER(content::PageState, page_state)
175 // Original request's URL.
176 IPC_STRUCT_MEMBER(GURL, original_request_url)
178 // User agent override used to navigate.
179 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
181 // Notifies the browser that for this navigation, the session history was
182 // successfully cleared.
183 IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
185 // The routing_id of the render view associated with the navigation.
186 // We need to track the RenderViewHost routing_id because of downstream
187 // dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager,
188 // ResourceDispatcherHostImpl, MediaStreamUIProxy,
189 // SpeechRecognitionDispatcherHost and possibly others). They look up the view
190 // based on the ID stored in the resource requests. Once those dependencies
191 // are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the
192 // client to be based on the routing_id of the RenderFrameHost.
193 IPC_STRUCT_MEMBER(int, render_view_routing_id)
195 // Origin of the frame. This will be replicated to any associated
196 // RenderFrameProxies.
197 IPC_STRUCT_MEMBER(url::Origin, origin)
199 // How navigation metrics starting on UI action for this load should be
200 // reported.
201 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value, report_type)
203 // Timestamp at which the UI action that triggered the navigation originated.
204 IPC_STRUCT_MEMBER(base::TimeTicks, ui_timestamp)
205 IPC_STRUCT_END()
207 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams)
208 IPC_STRUCT_TRAITS_MEMBER(url)
209 IPC_STRUCT_TRAITS_MEMBER(referrer)
210 IPC_STRUCT_TRAITS_MEMBER(transition)
211 IPC_STRUCT_TRAITS_MEMBER(navigation_type)
212 IPC_STRUCT_TRAITS_MEMBER(allow_download)
213 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp)
214 IPC_STRUCT_TRAITS_MEMBER(report_type)
215 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url)
216 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url)
217 IPC_STRUCT_TRAITS_END()
219 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
220 IPC_STRUCT_TRAITS_MEMBER(method)
221 IPC_STRUCT_TRAITS_MEMBER(headers)
222 IPC_STRUCT_TRAITS_MEMBER(load_flags)
223 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
224 IPC_STRUCT_TRAITS_END()
226 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams)
227 IPC_STRUCT_TRAITS_MEMBER(page_state)
228 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent)
229 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start)
230 IPC_STRUCT_TRAITS_END()
232 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState)
233 IPC_STRUCT_TRAITS_MEMBER(origin)
234 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags)
235 IPC_STRUCT_TRAITS_MEMBER(name)
236 IPC_STRUCT_TRAITS_END()
238 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams)
239 // Gives the routing ID for the RenderWidget that will be attached to the
240 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this
241 // is MSG_ROUTING_NONE and the other parameters are not read.
242 IPC_STRUCT_MEMBER(int, routing_id)
244 // Identifier for the output surface for the new RenderWidget.
245 IPC_STRUCT_MEMBER(int, surface_id)
247 // Tells the new RenderWidget whether it is initially hidden.
248 IPC_STRUCT_MEMBER(bool, hidden)
249 IPC_STRUCT_END()
251 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params)
252 // TODO(clamy): investigate which parameters are also needed in PlzNavigate
253 // and move them to the appropriate NavigationParams struct.
255 // These structs contain parameters shared by other navigation IPCs.
256 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params)
257 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params)
259 // Whether the navigation is a POST request (as opposed to a GET).
260 IPC_STRUCT_MEMBER(bool, is_post)
262 // Extra headers (separated by \n) to send during the request.
263 IPC_STRUCT_MEMBER(std::string, extra_headers)
265 // If is_post is true, holds the post_data information from browser. Empty
266 // otherwise.
267 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data)
269 // The page_id for this navigation, or -1 if it is a new navigation. Back,
270 // Forward, and Reload navigations should have a valid page_id. If the load
271 // succeeds, then this page_id will be reflected in the resultant
272 // FrameHostMsg_DidCommitProvisionalLoad message.
273 IPC_STRUCT_MEMBER(int32, page_id)
275 // For history navigations, this is the offset in the history list of the
276 // pending load. For non-history navigations, this will be ignored.
277 IPC_STRUCT_MEMBER(int, pending_history_list_offset)
279 // Informs the RenderView of where its current page contents reside in
280 // session history and the total size of the session history list.
281 IPC_STRUCT_MEMBER(int, current_history_list_offset)
282 IPC_STRUCT_MEMBER(int, current_history_list_length)
284 // Informs the RenderView the session history should be cleared. In that
285 // case, the RenderView needs to notify the browser that the clearing was
286 // succesful when the navigation commits.
287 IPC_STRUCT_MEMBER(bool, should_clear_history_list)
289 // Any redirect URLs that occurred before |url|. Useful for cross-process
290 // navigations; defaults to empty.
291 IPC_STRUCT_MEMBER(std::vector<GURL>, redirects)
293 // Informs the RenderView the pending navigation should replace the current
294 // history entry when it commits. This is used for cross-process redirects so
295 // the transferred navigation can recover the navigation state.
296 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
298 // The time the request was created. This is used by the old performance
299 // infrastructure to set up DocumentState associated with the RenderView.
300 // TODO(ppi): make it go away.
301 IPC_STRUCT_MEMBER(base::Time, request_time)
303 // The following two members identify a previous request that has been
304 // created before this navigation is being transferred to a new render view.
305 // This serves the purpose of recycling the old request.
306 // Unless this refers to a transferred navigation, these values are -1 and -1.
307 IPC_STRUCT_MEMBER(int, transferred_request_child_id)
308 IPC_STRUCT_MEMBER(int, transferred_request_request_id)
310 // Whether or not this url should be allowed to access local file://
311 // resources.
312 IPC_STRUCT_MEMBER(bool, can_load_local_resources)
314 // If not empty, which frame to navigate.
315 IPC_STRUCT_MEMBER(std::string, frame_to_navigate)
316 IPC_STRUCT_END()
318 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
319 IPC_STRUCT_MEMBER(GURL, url)
320 IPC_STRUCT_MEMBER(content::Referrer, referrer)
321 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
322 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
323 IPC_STRUCT_MEMBER(bool, user_gesture)
324 IPC_STRUCT_END()
326 #if defined(OS_MACOSX) || defined(OS_ANDROID)
327 // This message is used for supporting popup menus on Mac OS X and Android using
328 // native controls. See the FrameHostMsg_ShowPopup message.
329 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params)
330 // Position on the screen.
331 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
333 // The height of each item in the menu.
334 IPC_STRUCT_MEMBER(int, item_height)
336 // The size of the font to use for those items.
337 IPC_STRUCT_MEMBER(double, item_font_size)
339 // The currently selected (displayed) item in the menu.
340 IPC_STRUCT_MEMBER(int, selected_item)
342 // The entire list of items in the popup menu.
343 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
345 // Whether items should be right-aligned.
346 IPC_STRUCT_MEMBER(bool, right_aligned)
348 // Whether this is a multi-select popup.
349 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
350 IPC_STRUCT_END()
351 #endif
353 // -----------------------------------------------------------------------------
354 // Messages sent from the browser to the renderer.
356 // Notifies the embedding frame that a new CompositorFrame is ready to be
357 // presented. When the frame finishes presenting, a matching
358 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
359 // RenderViewHost that was produced the CompositorFrame.
361 // This is used in the ubercomp compositing path.
362 IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped,
363 FrameMsg_CompositorFrameSwapped_Params /* params */)
365 // Notifies the embedding frame that the process rendering the child frame's
366 // contents has terminated.
367 IPC_MESSAGE_ROUTED0(FrameMsg_ChildFrameProcessGone)
369 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that
370 // the menu has been closed.
371 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed,
372 content::CustomContextMenuContext /* custom_context */)
374 // Executes custom context menu action that was provided from Blink.
375 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
376 content::CustomContextMenuContext /* custom_context */,
377 unsigned /* action */)
379 // Requests that the RenderFrame or RenderFrameProxy sets its opener to null.
380 IPC_MESSAGE_ROUTED0(FrameMsg_DisownOpener)
382 // Requests that the RenderFrame send back a response after waiting for the
383 // commit, activation and frame swap of the current DOM tree in blink.
384 IPC_MESSAGE_ROUTED1(FrameMsg_VisualStateRequest, uint64 /* id */)
386 // Instructs the renderer to create a new RenderFrame object with |routing_id|.
387 // The new frame should be created as a child of the object identified by
388 // |parent_routing_id| or as top level if that is MSG_ROUTING_NONE.
389 // If a valid |proxy_routing_id| is provided, the new frame will be configured
390 // to replace the proxy on commit. When the new frame has a parent,
391 // |replication_state| holds properties replicated from the process rendering
392 // the parent frame, such as the new frame's sandbox flags.
393 IPC_MESSAGE_CONTROL5(FrameMsg_NewFrame,
394 int /* routing_id */,
395 int /* parent_routing_id */,
396 int /* proxy_routing_id */,
397 content::FrameReplicationState /* replication_state */,
398 FrameMsg_NewFrame_WidgetParams /* widget_params */)
400 // Instructs the renderer to create a new RenderFrameProxy object with
401 // |routing_id|. The new proxy should be created as a child of the object
402 // identified by |parent_routing_id| or as top level if that is
403 // MSG_ROUTING_NONE.
404 IPC_MESSAGE_CONTROL4(FrameMsg_NewFrameProxy,
405 int /* routing_id */,
406 int /* parent_routing_id */,
407 int /* render_view_routing_id */,
408 content::FrameReplicationState /* replication_state */)
410 // Tells the renderer to perform the specified navigation, interrupting any
411 // existing navigation.
412 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params)
414 // Instructs the renderer to invoke the frame's beforeunload event handler.
415 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK.
416 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload)
418 // Instructs the frame to swap out for a cross-site transition, including
419 // running the unload event handler and creating a RenderFrameProxy with the
420 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished.
421 IPC_MESSAGE_ROUTED3(FrameMsg_SwapOut,
422 int /* proxy_routing_id */,
423 bool /* is_loading */,
424 content::FrameReplicationState /* replication_state */)
426 // Instructs the frame to stop the load in progress, if any.
427 IPC_MESSAGE_ROUTED0(FrameMsg_Stop)
429 // A message sent to RenderFrameProxy to indicate that its corresponding
430 // RenderFrame has started loading a document.
431 IPC_MESSAGE_ROUTED0(FrameMsg_DidStartLoading)
433 // A message sent to RenderFrameProxy to indicate that its corresponding
434 // RenderFrame has completed loading.
435 IPC_MESSAGE_ROUTED0(FrameMsg_DidStopLoading)
437 // Request for the renderer to insert CSS into the frame.
438 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest,
439 std::string /* css */)
441 // Request for the renderer to execute JavaScript in the frame's context.
443 // javascript is the string containing the JavaScript to be executed in the
444 // target frame's context.
446 // If the third parameter is true the result is sent back to the browser using
447 // the message FrameHostMsg_JavaScriptExecuteResponse.
448 // FrameHostMsg_JavaScriptExecuteResponse is passed the ID parameter so that the
449 // host can uniquely identify the request.
450 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequest,
451 base::string16, /* javascript */
452 int, /* ID */
453 bool /* if true, a reply is requested */)
455 // ONLY FOR TESTS: Same as above but adds a fake UserGestureindicator around
456 // execution. (crbug.com/408426)
457 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequestForTests,
458 base::string16, /* javascript */
459 int, /* ID */
460 bool /* if true, a reply is requested */)
462 // Selects between the given start and end offsets in the currently focused
463 // editable field.
464 IPC_MESSAGE_ROUTED2(FrameMsg_SetEditableSelectionOffsets,
465 int /* start */,
466 int /* end */)
468 // Requests a navigation to the supplied markup, in an iframe with sandbox
469 // attributes.
470 IPC_MESSAGE_ROUTED1(FrameMsg_SetupTransitionView,
471 std::string /* markup */)
473 // Tells the renderer to hide the elements specified by the supplied CSS
474 // selector, and activates any exiting-transition stylesheets.
475 IPC_MESSAGE_ROUTED2(FrameMsg_BeginExitTransition,
476 std::string /* css_selector */,
477 bool /* exit_to_native_app */)
479 // Tell the renderer to revert the exit transition done before
480 IPC_MESSAGE_ROUTED0(FrameMsg_RevertExitTransition)
482 // Tell the renderer to hide transition elements.
483 IPC_MESSAGE_ROUTED1(FrameMsg_HideTransitionElements,
484 std::string /* css_selector */)
486 // Tell the renderer to hide transition elements.
487 IPC_MESSAGE_ROUTED1(FrameMsg_ShowTransitionElements,
488 std::string /* css_selector */)
490 // Tells the renderer to reload the frame, optionally ignoring the cache while
491 // doing so.
492 IPC_MESSAGE_ROUTED1(FrameMsg_Reload,
493 bool /* ignore_cache */)
495 // Notifies the color chooser client that the user selected a color.
496 IPC_MESSAGE_ROUTED2(FrameMsg_DidChooseColorResponse, unsigned, SkColor)
498 // Notifies the color chooser client that the color chooser has ended.
499 IPC_MESSAGE_ROUTED1(FrameMsg_DidEndColorChooser, unsigned)
501 // Notifies the corresponding RenderFrameProxy object to replace itself with the
502 // RenderFrame object it is associated with.
503 IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy)
505 // Request the text surrounding the selection with a |max_length|. The response
506 // will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
507 IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest,
508 size_t /* max_length */)
510 // Tells the renderer to insert a link to the specified stylesheet. This is
511 // needed to support navigation transitions.
512 IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL, std::string)
514 // Change the accessibility mode in the renderer process.
515 IPC_MESSAGE_ROUTED1(FrameMsg_SetAccessibilityMode,
516 AccessibilityMode)
518 // Dispatch a load event in the iframe element containing this frame.
519 IPC_MESSAGE_ROUTED0(FrameMsg_DispatchLoad)
521 #if defined(OS_ANDROID)
523 // External popup menus.
524 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems,
525 bool /* user canceled the popup */,
526 std::vector<int> /* selected indices */)
528 #elif defined(OS_MACOSX)
530 // External popup menus.
531 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem,
532 int /* selected index, -1 means no selection */)
534 #endif
536 // PlzNavigate
537 // Tells the renderer that a navigation is ready to commit. The renderer should
538 // request |stream_url| to get access to the stream containing the body of the
539 // response.
540 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation,
541 content::ResourceResponseHead, /* response */
542 GURL, /* stream_url */
543 content::CommonNavigationParams, /* common_params */
544 content::CommitNavigationParams /* commit_params */)
546 #if defined(ENABLE_PLUGINS)
547 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist.
548 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist,
549 std::set<GURL> /* origin_whitelist */)
550 #endif // defined(ENABLE_PLUGINS)
552 // -----------------------------------------------------------------------------
553 // Messages sent from the renderer to the browser.
555 // Blink and JavaScript error messages to log to the console
556 // or debugger UI.
557 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
558 int32, /* log level */
559 base::string16, /* msg */
560 int32, /* line number */
561 base::string16 /* source id */ )
563 // Sent by the renderer when a child frame is created in the renderer.
565 // Each of these messages will have a corresponding FrameHostMsg_Detach message
566 // sent when the frame is detached from the DOM.
567 IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_CreateChildFrame,
568 int32 /* parent_routing_id */,
569 std::string /* frame_name */,
570 content::SandboxFlags /* sandbox flags */,
571 int32 /* new_routing_id */)
573 // Sent by the renderer to the parent RenderFrameHost when a child frame is
574 // detached from the DOM.
575 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach)
577 // Indicates the renderer process is gone. This actually is sent by the
578 // browser process to itself, but keeps the interface cleaner.
579 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone,
580 int, /* this really is base::TerminationStatus */
581 int /* exit_code */)
583 // Sent by the renderer when the frame becomes focused.
584 IPC_MESSAGE_ROUTED0(FrameHostMsg_FrameFocused)
586 // Sent when the renderer starts a provisional load for a frame.
587 // |is_transition_navigation| signals that the frame has defined transition
588 // elements which can be animated by the navigation destination to provide
589 // a transition effect during load.
590 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidStartProvisionalLoadForFrame,
591 GURL /* url */,
592 bool /* is_transition_navigation */)
594 // Sent when the renderer fails a provisional load with an error.
595 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError,
596 FrameHostMsg_DidFailProvisionalLoadWithError_Params)
598 // Notifies the browser that a frame in the view has changed. This message
599 // has a lot of parameters and is packed/unpacked by functions defined in
600 // render_messages.h.
601 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidCommitProvisionalLoad,
602 FrameHostMsg_DidCommitProvisionalLoad_Params)
604 // Notifies the browser that a document has been loaded.
605 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFinishDocumentLoad)
607 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidFailLoadWithError,
608 GURL /* validated_url */,
609 int /* error_code */,
610 base::string16 /* error_description */)
612 // Sent when the renderer decides to ignore a navigation.
613 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDropNavigation)
615 // Sent when the renderer starts loading the page. |to_different_document| will
616 // be true unless the load is a fragment navigation, or triggered by
617 // history.pushState/replaceState.
618 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading,
619 bool /* to_different_document */)
621 // Sent when the renderer is done loading a page.
622 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading)
624 // Sent when the renderer changed the progress of a load.
625 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress,
626 double /* load_progress */)
628 // Requests that the given URL be opened in the specified manner.
629 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL, FrameHostMsg_OpenURL_Params)
631 // Notifies the browser that a frame finished loading.
632 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFinishLoad,
633 GURL /* validated_url */)
635 // Sent when after the onload handler has been invoked for the document
636 // in this frame. Sent for top-level frames. |report_type| and |ui_timestamp|
637 // are used to report navigation metrics starting on the ui input event that
638 // triggered the navigation timestamp.
639 IPC_MESSAGE_ROUTED2(FrameHostMsg_DocumentOnLoadCompleted,
640 FrameMsg_UILoadMetricsReportType::Value /* report_type */,
641 base::TimeTicks /* ui_timestamp */)
643 // Notifies that the initial empty document of a view has been accessed.
644 // After this, it is no longer safe to show a pending navigation's URL without
645 // making a URL spoof possible.
646 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidAccessInitialDocument)
648 // Sent when the frame sets its opener to null, disowning it for the lifetime of
649 // the window. Sent for top-level frames.
650 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDisownOpener)
652 // Notifies the browser that a page id was assigned.
653 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId,
654 int32 /* page_id */)
656 // Changes the title for the page in the UI when the page is navigated or the
657 // title changes. Sent for top-level frames.
658 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle,
659 base::string16 /* title */,
660 blink::WebTextDirection /* title direction */)
662 // Change the encoding name of the page in UI when the page has detected
663 // proper encoding name. Sent for top-level frames.
664 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
665 std::string /* new encoding name */)
667 // Following message is used to communicate the values received by the
668 // callback binding the JS to Cpp.
669 // An instance of browser that has an automation host listening to it can
670 // have a javascript send a native value (string, number, boolean) to the
671 // listener in Cpp. (DomAutomationController)
672 IPC_MESSAGE_ROUTED2(FrameHostMsg_DomOperationResponse,
673 std::string /* json_string */,
674 int /* automation_id */)
676 #if defined(ENABLE_PLUGINS)
677 // Sent to the browser when the renderer detects it is blocked on a pepper
678 // plugin message for too long. This is also sent when it becomes unhung
679 // (according to the value of is_hung). The browser can give the user the
680 // option of killing the plugin.
681 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung,
682 int /* plugin_child_id */,
683 base::FilePath /* path */,
684 bool /* is_hung */)
686 // Sent by the renderer process to indicate that a plugin instance has crashed.
687 // Note: |plugin_pid| should not be trusted. The corresponding process has
688 // probably died. Moreover, the ID may have been reused by a new process. Any
689 // usage other than displaying it in a prompt to the user is very likely to be
690 // wrong.
691 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed,
692 base::FilePath /* plugin_path */,
693 base::ProcessId /* plugin_pid */)
695 // Return information about a plugin for the given URL and MIME
696 // type. If there is no matching plugin, |found| is false.
697 // |actual_mime_type| is the actual mime type supported by the
698 // found plugin.
699 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
700 int /* render_frame_id */,
701 GURL /* url */,
702 GURL /* page_url */,
703 std::string /* mime_type */,
704 bool /* found */,
705 content::WebPluginInfo /* plugin info */,
706 std::string /* actual_mime_type */)
708 // A renderer sends this to the browser process when it wants to temporarily
709 // whitelist an origin's plugin content as essential. This temporary whitelist
710 // is specific to a top level frame, and is cleared when the whitelisting
711 // RenderFrame is destroyed.
712 IPC_MESSAGE_ROUTED1(FrameHostMsg_PluginContentOriginAllowed,
713 GURL /* content_origin */)
714 #endif // defined(ENABLE_PLUGINS)
716 // A renderer sends this to the browser process when it wants to
717 // create a plugin. The browser will create the plugin process if
718 // necessary, and will return a handle to the channel on success.
719 // On error an empty string is returned.
720 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin,
721 int /* render_frame_id */,
722 GURL /* url */,
723 GURL /* page_url */,
724 std::string /* mime_type */,
725 IPC::ChannelHandle /* channel_handle */,
726 content::WebPluginInfo /* info */)
728 // Acknowledge that we presented an ubercomp frame.
730 // See FrameMsg_CompositorFrameSwapped
731 IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK,
732 FrameHostMsg_CompositorFrameSwappedACK_Params /* params */)
734 // Provides the result from handling BeforeUnload. |proceed| matches the return
735 // value of the frame's beforeunload handler: true if the user decided to
736 // proceed with leaving the page.
737 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeforeUnload_ACK,
738 bool /* proceed */,
739 base::TimeTicks /* before_unload_start_time */,
740 base::TimeTicks /* before_unload_end_time */)
742 // Indicates that the current frame has swapped out, after a SwapOut message.
743 IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK)
745 IPC_MESSAGE_ROUTED1(FrameHostMsg_ReclaimCompositorResources,
746 FrameHostMsg_ReclaimCompositorResources_Params /* params */)
748 // Forwards an input event to a child.
749 // TODO(nick): Temporary bridge, revisit once the browser process can route
750 // input directly to subframes. http://crbug.com/339659
751 IPC_MESSAGE_ROUTED1(FrameHostMsg_ForwardInputEvent,
752 IPC::WebInputEventPointer /* event */)
754 // Used to tell the parent that the user right clicked on an area of the
755 // content area, and a context menu should be shown for it. The params
756 // object contains information about the node(s) that were selected when the
757 // user right clicked.
758 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu, content::ContextMenuParams)
760 // Initial drawing parameters for a child frame that has been swapped out to
761 // another process.
762 IPC_MESSAGE_ROUTED2(FrameHostMsg_InitializeChildFrame,
763 gfx::Rect /* frame_rect */,
764 float /* scale_factor */)
766 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was
767 // requested. The ID is the parameter supplied to
768 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the
769 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
770 // String.
771 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse,
772 int /* id */,
773 base::ListValue /* result */)
775 // A request to run a JavaScript dialog.
776 IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage,
777 base::string16 /* in - alert message */,
778 base::string16 /* in - default prompt */,
779 GURL /* in - originating page URL */,
780 content::JavaScriptMessageType /* in - type */,
781 bool /* out - success */,
782 base::string16 /* out - user_input field */)
784 // Displays a dialog to confirm that the user wants to navigate away from the
785 // page. Replies true if yes, and false otherwise. The reply string is ignored,
786 // but is included so that we can use OnJavaScriptMessageBoxClosed.
787 IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm,
788 GURL, /* in - originating frame URL */
789 base::string16 /* in - alert message */,
790 bool /* in - is a reload */,
791 bool /* out - success */,
792 base::string16 /* out - This is ignored.*/)
794 // Asks the browser to open the color chooser.
795 IPC_MESSAGE_ROUTED3(FrameHostMsg_OpenColorChooser,
796 int /* id */,
797 SkColor /* color */,
798 std::vector<content::ColorSuggestion> /* suggestions */)
800 // Asks the browser to end the color chooser.
801 IPC_MESSAGE_ROUTED1(FrameHostMsg_EndColorChooser, int /* id */)
803 // Change the selected color in the color chooser.
804 IPC_MESSAGE_ROUTED2(FrameHostMsg_SetSelectedColorInColorChooser,
805 int /* id */,
806 SkColor /* color */)
808 // Notifies the browser that media has started/stopped playing.
809 IPC_MESSAGE_ROUTED4(FrameHostMsg_MediaPlayingNotification,
810 int64 /* player_cookie, distinguishes instances */,
811 bool /* has_video */,
812 bool /* has_audio */,
813 bool /* is_remote */)
815 IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification,
816 int64 /* player_cookie, distinguishes instances */)
818 // Notify browser the theme color has been changed.
819 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeThemeColor,
820 SkColor /* theme_color */)
822 // Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
823 // |endOffset| are the offsets of the selection in the returned |content|.
824 IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse,
825 base::string16, /* content */
826 size_t, /* startOffset */
827 size_t /* endOffset */)
829 // Notifies the browser that the renderer has a pending navigation transition.
830 // The string parameters are all UTF8.
831 IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData,
832 FrameHostMsg_AddNavigationTransitionData_Params)
834 // PlzNavigate
835 // Tells the browser to perform a navigation.
836 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeginNavigation,
837 content::CommonNavigationParams,
838 content::BeginNavigationParams,
839 scoped_refptr<content::ResourceRequestBody>)
841 // Sent once a paint happens after the first non empty layout. In other words
842 // after the frame has painted something.
843 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint)
845 // Sent as a response to FrameMsg_VisualStateRequest.
846 // The message is delivered using RenderWidget::QueueMessage.
847 IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse, uint64 /* id */)
849 // Puts the browser into "tab fullscreen" mode for the sending renderer.
850 // See the comment in chrome/browser/ui/browser.h for more details.
851 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */)
853 // Messages to signal the presence or absence of BeforeUnload or Unload handlers
854 // for a frame. |present| is true if there is at least one of the handlers for
855 // the frame.
856 IPC_MESSAGE_ROUTED1(FrameHostMsg_BeforeUnloadHandlersPresent,
857 bool /* present */)
858 IPC_MESSAGE_ROUTED1(FrameHostMsg_UnloadHandlersPresent,
859 bool /* present */)
861 // Dispatch a load event for this frame in the iframe element of an
862 // out-of-process parent frame.
863 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad)
865 #if defined(OS_MACOSX) || defined(OS_ANDROID)
867 // Message to show/hide a popup menu using native controls.
868 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
869 FrameHostMsg_ShowPopup_Params)
870 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
872 #endif