GPU workaround to simulate Out of Memory errors with large textures
[chromium-blink-merge.git] / content / common / frame_messages.h
blob8a4fb0c3d2a45029db222d5bfa051d74aeb36b09
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(misspelling_hash)
72 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
73 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
74 IPC_STRUCT_TRAITS_MEMBER(is_editable)
75 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
76 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
77 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
78 IPC_STRUCT_TRAITS_MEMBER(edit_flags)
79 IPC_STRUCT_TRAITS_MEMBER(security_info)
80 IPC_STRUCT_TRAITS_MEMBER(frame_charset)
81 IPC_STRUCT_TRAITS_MEMBER(referrer_policy)
82 IPC_STRUCT_TRAITS_MEMBER(custom_context)
83 IPC_STRUCT_TRAITS_MEMBER(custom_items)
84 IPC_STRUCT_TRAITS_MEMBER(source_type)
85 #if defined(OS_ANDROID)
86 IPC_STRUCT_TRAITS_MEMBER(selection_start)
87 IPC_STRUCT_TRAITS_MEMBER(selection_end)
88 #endif
89 IPC_STRUCT_TRAITS_END()
91 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
92 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
93 IPC_STRUCT_TRAITS_MEMBER(request_id)
94 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
95 IPC_STRUCT_TRAITS_MEMBER(link_followed)
96 IPC_STRUCT_TRAITS_END()
98 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement)
99 IPC_STRUCT_TRAITS_MEMBER(id)
100 IPC_STRUCT_TRAITS_MEMBER(rect)
101 IPC_STRUCT_TRAITS_END()
103 IPC_STRUCT_BEGIN(FrameHostMsg_AddNavigationTransitionData_Params)
104 IPC_STRUCT_MEMBER(int, render_frame_id)
105 IPC_STRUCT_MEMBER(std::string, allowed_destination_host_pattern)
106 IPC_STRUCT_MEMBER(std::string, selector)
107 IPC_STRUCT_MEMBER(std::string, markup)
108 IPC_STRUCT_MEMBER(std::vector<content::TransitionElement>, elements)
109 IPC_STRUCT_END()
111 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
112 // Error code as reported in the DidFailProvisionalLoad callback.
113 IPC_STRUCT_MEMBER(int, error_code)
114 // An error message generated from the error_code. This can be an empty
115 // string if we were unable to find a meaningful description.
116 IPC_STRUCT_MEMBER(base::string16, error_description)
117 // The URL that the error is reported for.
118 IPC_STRUCT_MEMBER(GURL, url)
119 // True if the failure is the result of navigating to a POST again
120 // and we're going to show the POST interstitial.
121 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial)
122 IPC_STRUCT_END()
124 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams)
125 IPC_STRUCT_TRAITS_MEMBER(page_id)
126 IPC_STRUCT_TRAITS_MEMBER(url)
127 IPC_STRUCT_TRAITS_MEMBER(base_url)
128 IPC_STRUCT_TRAITS_MEMBER(referrer)
129 IPC_STRUCT_TRAITS_MEMBER(transition)
130 IPC_STRUCT_TRAITS_MEMBER(redirects)
131 IPC_STRUCT_TRAITS_MEMBER(should_update_history)
132 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
133 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding)
134 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type)
135 IPC_STRUCT_TRAITS_MEMBER(socket_address)
136 IPC_STRUCT_TRAITS_END()
138 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has
139 // too many data parameters to be reasonably put in a predefined IPC message.
140 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params,
141 content::FrameNavigateParams)
142 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams)
144 // Information regarding the security of the connection (empty if the
145 // connection was not secure).
146 IPC_STRUCT_MEMBER(std::string, security_info)
148 // The gesture that initiated this navigation.
149 IPC_STRUCT_MEMBER(content::NavigationGesture, gesture)
151 // True if this was a post request.
152 IPC_STRUCT_MEMBER(bool, is_post)
154 // The POST body identifier. -1 if it doesn't exist.
155 IPC_STRUCT_MEMBER(int64, post_id)
157 // Whether the frame navigation resulted in no change to the documents within
158 // the page. For example, the navigation may have just resulted in scrolling
159 // to a named anchor.
160 IPC_STRUCT_MEMBER(bool, was_within_same_page)
162 // The status code of the HTTP request.
163 IPC_STRUCT_MEMBER(int, http_status_code)
165 // This flag is used to warn if the renderer is displaying an error page,
166 // so that we can set the appropriate page type.
167 IPC_STRUCT_MEMBER(bool, url_is_unreachable)
169 // True if the connection was proxied. In this case, socket_address
170 // will represent the address of the proxy, rather than the remote host.
171 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy)
173 // Serialized history item state to store in the navigation entry.
174 IPC_STRUCT_MEMBER(content::PageState, page_state)
176 // Original request's URL.
177 IPC_STRUCT_MEMBER(GURL, original_request_url)
179 // User agent override used to navigate.
180 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
182 // Notifies the browser that for this navigation, the session history was
183 // successfully cleared.
184 IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
186 // The routing_id of the render view associated with the navigation.
187 // We need to track the RenderViewHost routing_id because of downstream
188 // dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager,
189 // ResourceDispatcherHostImpl, MediaStreamUIProxy,
190 // SpeechRecognitionDispatcherHost and possibly others). They look up the view
191 // based on the ID stored in the resource requests. Once those dependencies
192 // are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the
193 // client to be based on the routing_id of the RenderFrameHost.
194 IPC_STRUCT_MEMBER(int, render_view_routing_id)
196 // Origin of the frame. This will be replicated to any associated
197 // RenderFrameProxies.
198 IPC_STRUCT_MEMBER(url::Origin, origin)
200 // How navigation metrics starting on UI action for this load should be
201 // reported.
202 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value, report_type)
204 // Timestamp at which the UI action that triggered the navigation originated.
205 IPC_STRUCT_MEMBER(base::TimeTicks, ui_timestamp)
206 IPC_STRUCT_END()
208 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams)
209 IPC_STRUCT_TRAITS_MEMBER(url)
210 IPC_STRUCT_TRAITS_MEMBER(referrer)
211 IPC_STRUCT_TRAITS_MEMBER(transition)
212 IPC_STRUCT_TRAITS_MEMBER(navigation_type)
213 IPC_STRUCT_TRAITS_MEMBER(allow_download)
214 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp)
215 IPC_STRUCT_TRAITS_MEMBER(report_type)
216 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url)
217 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url)
218 IPC_STRUCT_TRAITS_END()
220 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
221 IPC_STRUCT_TRAITS_MEMBER(method)
222 IPC_STRUCT_TRAITS_MEMBER(headers)
223 IPC_STRUCT_TRAITS_MEMBER(load_flags)
224 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
225 IPC_STRUCT_TRAITS_END()
227 IPC_STRUCT_TRAITS_BEGIN(content::StartNavigationParams)
228 IPC_STRUCT_TRAITS_MEMBER(is_post)
229 IPC_STRUCT_TRAITS_MEMBER(extra_headers)
230 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data)
231 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
232 IPC_STRUCT_TRAITS_MEMBER(transferred_request_child_id)
233 IPC_STRUCT_TRAITS_MEMBER(transferred_request_request_id)
234 IPC_STRUCT_TRAITS_END()
236 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams)
237 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent)
238 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start)
239 IPC_STRUCT_TRAITS_MEMBER(redirects)
240 IPC_STRUCT_TRAITS_MEMBER(can_load_local_resources)
241 IPC_STRUCT_TRAITS_MEMBER(frame_to_navigate)
242 IPC_STRUCT_TRAITS_MEMBER(request_time)
243 IPC_STRUCT_TRAITS_MEMBER(page_state)
244 IPC_STRUCT_TRAITS_MEMBER(page_id)
245 IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset)
246 IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset)
247 IPC_STRUCT_TRAITS_MEMBER(current_history_list_length)
248 IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list)
249 IPC_STRUCT_TRAITS_END()
251 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState)
252 IPC_STRUCT_TRAITS_MEMBER(origin)
253 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags)
254 IPC_STRUCT_TRAITS_MEMBER(name)
255 IPC_STRUCT_TRAITS_END()
257 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams)
258 // Gives the routing ID for the RenderWidget that will be attached to the
259 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this
260 // is MSG_ROUTING_NONE and the other parameters are not read.
261 IPC_STRUCT_MEMBER(int, routing_id)
263 // Identifier for the output surface for the new RenderWidget.
264 IPC_STRUCT_MEMBER(int, surface_id)
266 // Tells the new RenderWidget whether it is initially hidden.
267 IPC_STRUCT_MEMBER(bool, hidden)
268 IPC_STRUCT_END()
270 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
271 IPC_STRUCT_MEMBER(GURL, url)
272 IPC_STRUCT_MEMBER(content::Referrer, referrer)
273 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
274 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
275 IPC_STRUCT_MEMBER(bool, user_gesture)
276 IPC_STRUCT_END()
278 IPC_STRUCT_BEGIN(FrameMsg_TextTrackSettings_Params)
279 // Background color of the text track.
280 IPC_STRUCT_MEMBER(std::string, text_track_background_color)
282 // Font family of the text track text.
283 IPC_STRUCT_MEMBER(std::string, text_track_font_family)
285 // Font style of the text track text.
286 IPC_STRUCT_MEMBER(std::string, text_track_font_style)
288 // Font variant of the text track text.
289 IPC_STRUCT_MEMBER(std::string, text_track_font_variant)
291 // Color of the text track text.
292 IPC_STRUCT_MEMBER(std::string, text_track_text_color)
294 // Text shadow (edge style) of the text track text.
295 IPC_STRUCT_MEMBER(std::string, text_track_text_shadow)
297 // Size of the text track text.
298 IPC_STRUCT_MEMBER(std::string, text_track_text_size)
299 IPC_STRUCT_END()
301 #if defined(OS_MACOSX) || defined(OS_ANDROID)
302 // This message is used for supporting popup menus on Mac OS X and Android using
303 // native controls. See the FrameHostMsg_ShowPopup message.
304 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params)
305 // Position on the screen.
306 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
308 // The height of each item in the menu.
309 IPC_STRUCT_MEMBER(int, item_height)
311 // The size of the font to use for those items.
312 IPC_STRUCT_MEMBER(double, item_font_size)
314 // The currently selected (displayed) item in the menu.
315 IPC_STRUCT_MEMBER(int, selected_item)
317 // The entire list of items in the popup menu.
318 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
320 // Whether items should be right-aligned.
321 IPC_STRUCT_MEMBER(bool, right_aligned)
323 // Whether this is a multi-select popup.
324 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
325 IPC_STRUCT_END()
326 #endif
328 // -----------------------------------------------------------------------------
329 // Messages sent from the browser to the renderer.
331 // Notifies the embedding frame that a new CompositorFrame is ready to be
332 // presented. When the frame finishes presenting, a matching
333 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
334 // RenderViewHost that was produced the CompositorFrame.
336 // This is used in the ubercomp compositing path.
337 IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped,
338 FrameMsg_CompositorFrameSwapped_Params /* params */)
340 // Notifies the embedding frame that the process rendering the child frame's
341 // contents has terminated.
342 IPC_MESSAGE_ROUTED0(FrameMsg_ChildFrameProcessGone)
344 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that
345 // the menu has been closed.
346 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed,
347 content::CustomContextMenuContext /* custom_context */)
349 // Executes custom context menu action that was provided from Blink.
350 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
351 content::CustomContextMenuContext /* custom_context */,
352 unsigned /* action */)
354 // Requests that the RenderFrame or RenderFrameProxy sets its opener to null.
355 IPC_MESSAGE_ROUTED0(FrameMsg_DisownOpener)
357 // Requests that the RenderFrame send back a response after waiting for the
358 // commit, activation and frame swap of the current DOM tree in blink.
359 IPC_MESSAGE_ROUTED1(FrameMsg_VisualStateRequest, uint64 /* id */)
361 // Instructs the renderer to create a new RenderFrame object with |routing_id|.
362 // The new frame should be created as a child of the object identified by
363 // |parent_routing_id| or as top level if that is MSG_ROUTING_NONE.
364 // If a valid |proxy_routing_id| is provided, the new frame will be configured
365 // to replace the proxy on commit. When the new frame has a parent,
366 // |replication_state| holds properties replicated from the process rendering
367 // the parent frame, such as the new frame's sandbox flags.
368 IPC_MESSAGE_CONTROL5(FrameMsg_NewFrame,
369 int /* routing_id */,
370 int /* parent_routing_id */,
371 int /* proxy_routing_id */,
372 content::FrameReplicationState /* replication_state */,
373 FrameMsg_NewFrame_WidgetParams /* widget_params */)
375 // Instructs the renderer to create a new RenderFrameProxy object with
376 // |routing_id|. The new proxy should be created as a child of the object
377 // identified by |parent_routing_id| or as top level if that is
378 // MSG_ROUTING_NONE.
379 IPC_MESSAGE_CONTROL4(FrameMsg_NewFrameProxy,
380 int /* routing_id */,
381 int /* parent_routing_id */,
382 int /* render_view_routing_id */,
383 content::FrameReplicationState /* replication_state */)
385 // Tells the renderer to perform the specified navigation, interrupting any
386 // existing navigation.
387 IPC_MESSAGE_ROUTED3(FrameMsg_Navigate,
388 content::CommonNavigationParams, /* common_params */
389 content::StartNavigationParams, /* start_params */
390 content::RequestNavigationParams /* request_params */)
392 // Instructs the renderer to invoke the frame's beforeunload event handler.
393 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK.
394 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload)
396 // Instructs the frame to swap out for a cross-site transition, including
397 // running the unload event handler and creating a RenderFrameProxy with the
398 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished.
399 IPC_MESSAGE_ROUTED3(FrameMsg_SwapOut,
400 int /* proxy_routing_id */,
401 bool /* is_loading */,
402 content::FrameReplicationState /* replication_state */)
404 // Instructs the frame to stop the load in progress, if any.
405 IPC_MESSAGE_ROUTED0(FrameMsg_Stop)
407 // A message sent to RenderFrameProxy to indicate that its corresponding
408 // RenderFrame has started loading a document.
409 IPC_MESSAGE_ROUTED0(FrameMsg_DidStartLoading)
411 // A message sent to RenderFrameProxy to indicate that its corresponding
412 // RenderFrame has completed loading.
413 IPC_MESSAGE_ROUTED0(FrameMsg_DidStopLoading)
415 // Request for the renderer to insert CSS into the frame.
416 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest,
417 std::string /* css */)
419 // Request for the renderer to execute JavaScript in the frame's context.
421 // javascript is the string containing the JavaScript to be executed in the
422 // target frame's context.
424 // If the third parameter is true the result is sent back to the browser using
425 // the message FrameHostMsg_JavaScriptExecuteResponse.
426 // FrameHostMsg_JavaScriptExecuteResponse is passed the ID parameter so that the
427 // host can uniquely identify the request.
428 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequest,
429 base::string16, /* javascript */
430 int, /* ID */
431 bool /* if true, a reply is requested */)
433 // ONLY FOR TESTS: Same as above but adds a fake UserGestureindicator around
434 // execution. (crbug.com/408426)
435 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequestForTests,
436 base::string16, /* javascript */
437 int, /* ID */
438 bool /* if true, a reply is requested */)
440 // Selects between the given start and end offsets in the currently focused
441 // editable field.
442 IPC_MESSAGE_ROUTED2(FrameMsg_SetEditableSelectionOffsets,
443 int /* start */,
444 int /* end */)
446 // Requests a navigation to the supplied markup, in an iframe with sandbox
447 // attributes.
448 IPC_MESSAGE_ROUTED1(FrameMsg_SetupTransitionView,
449 std::string /* markup */)
451 // Tells the renderer to hide the elements specified by the supplied CSS
452 // selector, and activates any exiting-transition stylesheets.
453 IPC_MESSAGE_ROUTED2(FrameMsg_BeginExitTransition,
454 std::string /* css_selector */,
455 bool /* exit_to_native_app */)
457 // Tell the renderer to revert the exit transition done before
458 IPC_MESSAGE_ROUTED0(FrameMsg_RevertExitTransition)
460 // Tell the renderer to hide transition elements.
461 IPC_MESSAGE_ROUTED1(FrameMsg_HideTransitionElements,
462 std::string /* css_selector */)
464 // Tell the renderer to hide transition elements.
465 IPC_MESSAGE_ROUTED1(FrameMsg_ShowTransitionElements,
466 std::string /* css_selector */)
468 // Tells the renderer to reload the frame, optionally ignoring the cache while
469 // doing so.
470 IPC_MESSAGE_ROUTED1(FrameMsg_Reload,
471 bool /* ignore_cache */)
473 // Notifies the color chooser client that the user selected a color.
474 IPC_MESSAGE_ROUTED2(FrameMsg_DidChooseColorResponse, unsigned, SkColor)
476 // Notifies the color chooser client that the color chooser has ended.
477 IPC_MESSAGE_ROUTED1(FrameMsg_DidEndColorChooser, unsigned)
479 // Notifies the corresponding RenderFrameProxy object to replace itself with the
480 // RenderFrame object it is associated with.
481 IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy)
483 // Request the text surrounding the selection with a |max_length|. The response
484 // will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
485 IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest,
486 size_t /* max_length */)
488 // Tells the renderer to insert a link to the specified stylesheet. This is
489 // needed to support navigation transitions.
490 IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL, std::string)
492 // Change the accessibility mode in the renderer process.
493 IPC_MESSAGE_ROUTED1(FrameMsg_SetAccessibilityMode,
494 AccessibilityMode)
496 // Dispatch a load event in the iframe element containing this frame.
497 IPC_MESSAGE_ROUTED0(FrameMsg_DispatchLoad)
499 // Notifies the frame that its parent has changed the frame's sandbox flags.
500 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, content::SandboxFlags)
502 // Update a proxy's window.name property. Used when the frame's name is
503 // changed in another process.
504 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateName, std::string /* name */)
506 // Send to the RenderFrame to set text track style settings.
507 // Sent for top-level frames.
508 IPC_MESSAGE_ROUTED1(FrameMsg_SetTextTrackSettings,
509 FrameMsg_TextTrackSettings_Params /* params */)
511 #if defined(OS_ANDROID)
513 // External popup menus.
514 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems,
515 bool /* user canceled the popup */,
516 std::vector<int> /* selected indices */)
518 #elif defined(OS_MACOSX)
520 // External popup menus.
521 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem,
522 int /* selected index, -1 means no selection */)
524 #endif
526 // PlzNavigate
527 // Tells the renderer that a navigation is ready to commit. The renderer should
528 // request |stream_url| to get access to the stream containing the body of the
529 // response.
530 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation,
531 content::ResourceResponseHead, /* response */
532 GURL, /* stream_url */
533 content::CommonNavigationParams, /* common_params */
534 content::RequestNavigationParams /* request_params */)
536 #if defined(ENABLE_PLUGINS)
537 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist.
538 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist,
539 std::set<GURL> /* origin_whitelist */)
540 #endif // defined(ENABLE_PLUGINS)
542 // -----------------------------------------------------------------------------
543 // Messages sent from the renderer to the browser.
545 // Blink and JavaScript error messages to log to the console
546 // or debugger UI.
547 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
548 int32, /* log level */
549 base::string16, /* msg */
550 int32, /* line number */
551 base::string16 /* source id */ )
553 // Sent by the renderer when a child frame is created in the renderer.
555 // Each of these messages will have a corresponding FrameHostMsg_Detach message
556 // sent when the frame is detached from the DOM.
557 IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_CreateChildFrame,
558 int32 /* parent_routing_id */,
559 std::string /* frame_name */,
560 content::SandboxFlags /* sandbox flags */,
561 int32 /* new_routing_id */)
563 // Sent by the renderer to the parent RenderFrameHost when a child frame is
564 // detached from the DOM.
565 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach)
567 // Indicates the renderer process is gone. This actually is sent by the
568 // browser process to itself, but keeps the interface cleaner.
569 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone,
570 int, /* this really is base::TerminationStatus */
571 int /* exit_code */)
573 // Sent by the renderer when the frame becomes focused.
574 IPC_MESSAGE_ROUTED0(FrameHostMsg_FrameFocused)
576 // Sent when the renderer starts a provisional load for a frame.
577 // |is_transition_navigation| signals that the frame has defined transition
578 // elements which can be animated by the navigation destination to provide
579 // a transition effect during load.
580 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidStartProvisionalLoadForFrame,
581 GURL /* url */,
582 bool /* is_transition_navigation */)
584 // Sent when the renderer fails a provisional load with an error.
585 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError,
586 FrameHostMsg_DidFailProvisionalLoadWithError_Params)
588 // Notifies the browser that a frame in the view has changed. This message
589 // has a lot of parameters and is packed/unpacked by functions defined in
590 // render_messages.h.
591 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidCommitProvisionalLoad,
592 FrameHostMsg_DidCommitProvisionalLoad_Params)
594 // Notifies the browser that a document has been loaded.
595 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFinishDocumentLoad)
597 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidFailLoadWithError,
598 GURL /* validated_url */,
599 int /* error_code */,
600 base::string16 /* error_description */)
602 // Sent when the renderer decides to ignore a navigation.
603 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDropNavigation)
605 // Sent when the renderer starts loading the page. |to_different_document| will
606 // be true unless the load is a fragment navigation, or triggered by
607 // history.pushState/replaceState.
608 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading,
609 bool /* to_different_document */)
611 // Sent when the renderer is done loading a page.
612 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading)
614 // Sent when the frame changes its window.name.
615 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeName, std::string /* name */)
617 // Sent when the renderer changed the progress of a load.
618 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress,
619 double /* load_progress */)
621 // Requests that the given URL be opened in the specified manner.
622 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL, FrameHostMsg_OpenURL_Params)
624 // Notifies the browser that a frame finished loading.
625 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFinishLoad,
626 GURL /* validated_url */)
628 // Sent when after the onload handler has been invoked for the document
629 // in this frame. Sent for top-level frames. |report_type| and |ui_timestamp|
630 // are used to report navigation metrics starting on the ui input event that
631 // triggered the navigation timestamp.
632 IPC_MESSAGE_ROUTED2(FrameHostMsg_DocumentOnLoadCompleted,
633 FrameMsg_UILoadMetricsReportType::Value /* report_type */,
634 base::TimeTicks /* ui_timestamp */)
636 // Notifies that the initial empty document of a view has been accessed.
637 // After this, it is no longer safe to show a pending navigation's URL without
638 // making a URL spoof possible.
639 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidAccessInitialDocument)
641 // Sent when the frame sets its opener to null, disowning it for the lifetime of
642 // the window. Sent for top-level frames.
643 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDisownOpener)
645 // Notifies the browser that a page id was assigned.
646 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId,
647 int32 /* page_id */)
649 // Notifies the browser that sandbox flags have changed for a subframe of this
650 // frame.
651 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags,
652 int32 /* subframe_routing_id */,
653 content::SandboxFlags /* updated_flags */)
655 // Changes the title for the page in the UI when the page is navigated or the
656 // title changes. Sent for top-level frames.
657 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle,
658 base::string16 /* title */,
659 blink::WebTextDirection /* title direction */)
661 // Change the encoding name of the page in UI when the page has detected
662 // proper encoding name. Sent for top-level frames.
663 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
664 std::string /* new encoding name */)
666 // Following message is used to communicate the values received by the
667 // callback binding the JS to Cpp.
668 // An instance of browser that has an automation host listening to it can
669 // have a javascript send a native value (string, number, boolean) to the
670 // listener in Cpp. (DomAutomationController)
671 IPC_MESSAGE_ROUTED2(FrameHostMsg_DomOperationResponse,
672 std::string /* json_string */,
673 int /* automation_id */)
675 #if defined(ENABLE_PLUGINS)
676 // Sent to the browser when the renderer detects it is blocked on a pepper
677 // plugin message for too long. This is also sent when it becomes unhung
678 // (according to the value of is_hung). The browser can give the user the
679 // option of killing the plugin.
680 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung,
681 int /* plugin_child_id */,
682 base::FilePath /* path */,
683 bool /* is_hung */)
685 // Sent by the renderer process to indicate that a plugin instance has crashed.
686 // Note: |plugin_pid| should not be trusted. The corresponding process has
687 // probably died. Moreover, the ID may have been reused by a new process. Any
688 // usage other than displaying it in a prompt to the user is very likely to be
689 // wrong.
690 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed,
691 base::FilePath /* plugin_path */,
692 base::ProcessId /* plugin_pid */)
694 // Return information about a plugin for the given URL and MIME
695 // type. If there is no matching plugin, |found| is false.
696 // |actual_mime_type| is the actual mime type supported by the
697 // found plugin.
698 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
699 int /* render_frame_id */,
700 GURL /* url */,
701 GURL /* page_url */,
702 std::string /* mime_type */,
703 bool /* found */,
704 content::WebPluginInfo /* plugin info */,
705 std::string /* actual_mime_type */)
707 // A renderer sends this to the browser process when it wants to temporarily
708 // whitelist an origin's plugin content as essential. This temporary whitelist
709 // is specific to a top level frame, and is cleared when the whitelisting
710 // RenderFrame is destroyed.
711 IPC_MESSAGE_ROUTED1(FrameHostMsg_PluginContentOriginAllowed,
712 GURL /* content_origin */)
713 #endif // defined(ENABLE_PLUGINS)
715 // A renderer sends this to the browser process when it wants to
716 // create a plugin. The browser will create the plugin process if
717 // necessary, and will return a handle to the channel on success.
718 // On error an empty string is returned.
719 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin,
720 int /* render_frame_id */,
721 GURL /* url */,
722 GURL /* page_url */,
723 std::string /* mime_type */,
724 IPC::ChannelHandle /* channel_handle */,
725 content::WebPluginInfo /* info */)
727 // Acknowledge that we presented an ubercomp frame.
729 // See FrameMsg_CompositorFrameSwapped
730 IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK,
731 FrameHostMsg_CompositorFrameSwappedACK_Params /* params */)
733 // Provides the result from handling BeforeUnload. |proceed| matches the return
734 // value of the frame's beforeunload handler: true if the user decided to
735 // proceed with leaving the page.
736 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeforeUnload_ACK,
737 bool /* proceed */,
738 base::TimeTicks /* before_unload_start_time */,
739 base::TimeTicks /* before_unload_end_time */)
741 // Indicates that the current frame has swapped out, after a SwapOut message.
742 IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK)
744 IPC_MESSAGE_ROUTED1(FrameHostMsg_ReclaimCompositorResources,
745 FrameHostMsg_ReclaimCompositorResources_Params /* params */)
747 // Forwards an input event to a child.
748 // TODO(nick): Temporary bridge, revisit once the browser process can route
749 // input directly to subframes. http://crbug.com/339659
750 IPC_MESSAGE_ROUTED1(FrameHostMsg_ForwardInputEvent,
751 IPC::WebInputEventPointer /* event */)
753 // Used to tell the parent that the user right clicked on an area of the
754 // content area, and a context menu should be shown for it. The params
755 // object contains information about the node(s) that were selected when the
756 // user right clicked.
757 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu, content::ContextMenuParams)
759 // Initial drawing parameters for a child frame that has been swapped out to
760 // another process.
761 IPC_MESSAGE_ROUTED2(FrameHostMsg_InitializeChildFrame,
762 gfx::Rect /* frame_rect */,
763 float /* scale_factor */)
765 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was
766 // requested. The ID is the parameter supplied to
767 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the
768 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
769 // String.
770 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse,
771 int /* id */,
772 base::ListValue /* result */)
774 // A request to run a JavaScript dialog.
775 IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage,
776 base::string16 /* in - alert message */,
777 base::string16 /* in - default prompt */,
778 GURL /* in - originating page URL */,
779 content::JavaScriptMessageType /* in - type */,
780 bool /* out - success */,
781 base::string16 /* out - user_input field */)
783 // Displays a dialog to confirm that the user wants to navigate away from the
784 // page. Replies true if yes, and false otherwise. The reply string is ignored,
785 // but is included so that we can use OnJavaScriptMessageBoxClosed.
786 IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm,
787 GURL, /* in - originating frame URL */
788 base::string16 /* in - alert message */,
789 bool /* in - is a reload */,
790 bool /* out - success */,
791 base::string16 /* out - This is ignored.*/)
793 // Asks the browser to open the color chooser.
794 IPC_MESSAGE_ROUTED3(FrameHostMsg_OpenColorChooser,
795 int /* id */,
796 SkColor /* color */,
797 std::vector<content::ColorSuggestion> /* suggestions */)
799 // Asks the browser to end the color chooser.
800 IPC_MESSAGE_ROUTED1(FrameHostMsg_EndColorChooser, int /* id */)
802 // Change the selected color in the color chooser.
803 IPC_MESSAGE_ROUTED2(FrameHostMsg_SetSelectedColorInColorChooser,
804 int /* id */,
805 SkColor /* color */)
807 // Notifies the browser that media has started/stopped playing.
808 IPC_MESSAGE_ROUTED4(FrameHostMsg_MediaPlayingNotification,
809 int64 /* player_cookie, distinguishes instances */,
810 bool /* has_video */,
811 bool /* has_audio */,
812 bool /* is_remote */)
814 IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification,
815 int64 /* player_cookie, distinguishes instances */)
817 // Notify browser the theme color has been changed.
818 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeThemeColor,
819 SkColor /* theme_color */)
821 // Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
822 // |endOffset| are the offsets of the selection in the returned |content|.
823 IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse,
824 base::string16, /* content */
825 size_t, /* startOffset */
826 size_t /* endOffset */)
828 // Notifies the browser that the renderer has a pending navigation transition.
829 // The string parameters are all UTF8.
830 IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData,
831 FrameHostMsg_AddNavigationTransitionData_Params)
833 // PlzNavigate
834 // Tells the browser to perform a navigation.
835 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeginNavigation,
836 content::CommonNavigationParams,
837 content::BeginNavigationParams,
838 scoped_refptr<content::ResourceRequestBody>)
840 // Sent once a paint happens after the first non empty layout. In other words
841 // after the frame has painted something.
842 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint)
844 // Sent as a response to FrameMsg_VisualStateRequest.
845 // The message is delivered using RenderWidget::QueueMessage.
846 IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse, uint64 /* id */)
848 // Puts the browser into "tab fullscreen" mode for the sending renderer.
849 // See the comment in chrome/browser/ui/browser.h for more details.
850 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */)
852 // Dispatch a load event for this frame in the iframe element of an
853 // out-of-process parent frame.
854 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad)
856 #if defined(OS_MACOSX) || defined(OS_ANDROID)
858 // Message to show/hide a popup menu using native controls.
859 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
860 FrameHostMsg_ShowPopup_Params)
861 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
863 #endif