Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / common / frame_messages.h
blobd9aca27058cc49c017d423b5357fa2cc16eaa94e
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/navigation_gesture.h"
13 #include "content/common/resource_request_body.h"
14 #include "content/public/common/color_suggestion.h"
15 #include "content/public/common/common_param_traits.h"
16 #include "content/public/common/context_menu_params.h"
17 #include "content/public/common/frame_navigate_params.h"
18 #include "content/public/common/javascript_message_type.h"
19 #include "content/public/common/page_state.h"
20 #include "ipc/ipc_message_macros.h"
21 #include "ui/gfx/ipc/gfx_param_traits.h"
22 #include "url/gurl.h"
24 #undef IPC_MESSAGE_EXPORT
25 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
27 #define IPC_MESSAGE_START FrameMsgStart
29 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode,
30 AccessibilityModeOff,
31 AccessibilityModeComplete)
32 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType,
33 content::JAVASCRIPT_MESSAGE_TYPE_ALERT,
34 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT)
35 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value,
36 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST)
37 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType,
38 blink::WebContextMenuData::MediaTypeLast)
39 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST)
41 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
42 IPC_STRUCT_TRAITS_MEMBER(color)
43 IPC_STRUCT_TRAITS_MEMBER(label)
44 IPC_STRUCT_TRAITS_END()
46 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams)
47 IPC_STRUCT_TRAITS_MEMBER(media_type)
48 IPC_STRUCT_TRAITS_MEMBER(x)
49 IPC_STRUCT_TRAITS_MEMBER(y)
50 IPC_STRUCT_TRAITS_MEMBER(link_url)
51 IPC_STRUCT_TRAITS_MEMBER(link_text)
52 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
53 IPC_STRUCT_TRAITS_MEMBER(src_url)
54 IPC_STRUCT_TRAITS_MEMBER(has_image_contents)
55 IPC_STRUCT_TRAITS_MEMBER(page_url)
56 IPC_STRUCT_TRAITS_MEMBER(keyword_url)
57 IPC_STRUCT_TRAITS_MEMBER(frame_url)
58 IPC_STRUCT_TRAITS_MEMBER(frame_page_state)
59 IPC_STRUCT_TRAITS_MEMBER(media_flags)
60 IPC_STRUCT_TRAITS_MEMBER(selection_text)
61 IPC_STRUCT_TRAITS_MEMBER(suggested_filename)
62 IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
63 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash)
64 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
65 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
66 IPC_STRUCT_TRAITS_MEMBER(is_editable)
67 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
68 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
69 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
70 IPC_STRUCT_TRAITS_MEMBER(edit_flags)
71 IPC_STRUCT_TRAITS_MEMBER(security_info)
72 IPC_STRUCT_TRAITS_MEMBER(frame_charset)
73 IPC_STRUCT_TRAITS_MEMBER(referrer_policy)
74 IPC_STRUCT_TRAITS_MEMBER(custom_context)
75 IPC_STRUCT_TRAITS_MEMBER(custom_items)
76 IPC_STRUCT_TRAITS_MEMBER(source_type)
77 #if defined(OS_ANDROID)
78 IPC_STRUCT_TRAITS_MEMBER(selection_start)
79 IPC_STRUCT_TRAITS_MEMBER(selection_end)
80 #endif
81 IPC_STRUCT_TRAITS_END()
83 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
84 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
85 IPC_STRUCT_TRAITS_MEMBER(request_id)
86 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
87 IPC_STRUCT_TRAITS_MEMBER(link_followed)
88 IPC_STRUCT_TRAITS_END()
90 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
91 // Error code as reported in the DidFailProvisionalLoad callback.
92 IPC_STRUCT_MEMBER(int, error_code)
93 // An error message generated from the error_code. This can be an empty
94 // string if we were unable to find a meaningful description.
95 IPC_STRUCT_MEMBER(base::string16, error_description)
96 // The URL that the error is reported for.
97 IPC_STRUCT_MEMBER(GURL, url)
98 // True if the failure is the result of navigating to a POST again
99 // and we're going to show the POST interstitial.
100 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial)
101 IPC_STRUCT_END()
103 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams)
104 IPC_STRUCT_TRAITS_MEMBER(page_id)
105 IPC_STRUCT_TRAITS_MEMBER(url)
106 IPC_STRUCT_TRAITS_MEMBER(base_url)
107 IPC_STRUCT_TRAITS_MEMBER(referrer)
108 IPC_STRUCT_TRAITS_MEMBER(transition)
109 IPC_STRUCT_TRAITS_MEMBER(redirects)
110 IPC_STRUCT_TRAITS_MEMBER(should_update_history)
111 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
112 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding)
113 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type)
114 IPC_STRUCT_TRAITS_MEMBER(socket_address)
115 IPC_STRUCT_TRAITS_END()
117 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has
118 // too many data parameters to be reasonably put in a predefined IPC message.
119 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params,
120 content::FrameNavigateParams)
121 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams)
123 // Information regarding the security of the connection (empty if the
124 // connection was not secure).
125 IPC_STRUCT_MEMBER(std::string, security_info)
127 // The gesture that initiated this navigation.
128 IPC_STRUCT_MEMBER(content::NavigationGesture, gesture)
130 // True if this was a post request.
131 IPC_STRUCT_MEMBER(bool, is_post)
133 // The POST body identifier. -1 if it doesn't exist.
134 IPC_STRUCT_MEMBER(int64, post_id)
136 // Whether the frame navigation resulted in no change to the documents within
137 // the page. For example, the navigation may have just resulted in scrolling
138 // to a named anchor.
139 IPC_STRUCT_MEMBER(bool, was_within_same_page)
141 // The status code of the HTTP request.
142 IPC_STRUCT_MEMBER(int, http_status_code)
144 // True if the connection was proxied. In this case, socket_address
145 // will represent the address of the proxy, rather than the remote host.
146 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy)
148 // Serialized history item state to store in the navigation entry.
149 IPC_STRUCT_MEMBER(content::PageState, page_state)
151 // Original request's URL.
152 IPC_STRUCT_MEMBER(GURL, original_request_url)
154 // User agent override used to navigate.
155 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
157 // Notifies the browser that for this navigation, the session history was
158 // successfully cleared.
159 IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
161 // The routing_id of the render view associated with the navigation.
162 // We need to track the RenderViewHost routing_id because of downstream
163 // dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager,
164 // ResourceDispatcherHostImpl, MediaStreamUIProxy,
165 // SpeechRecognitionDispatcherHost and possibly others). They look up the view
166 // based on the ID stored in the resource requests. Once those dependencies
167 // are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the
168 // client to be based on the routing_id of the RenderFrameHost.
169 IPC_STRUCT_MEMBER(int, render_view_routing_id)
170 IPC_STRUCT_END()
172 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params)
173 // The page_id for this navigation, or -1 if it is a new navigation. Back,
174 // Forward, and Reload navigations should have a valid page_id. If the load
175 // succeeds, then this page_id will be reflected in the resultant
176 // FrameHostMsg_DidCommitProvisionalLoad message.
177 IPC_STRUCT_MEMBER(int32, page_id)
179 // If page_id is -1, then pending_history_list_offset will also be -1.
180 // Otherwise, it contains the offset into the history list corresponding to
181 // the current navigation.
182 IPC_STRUCT_MEMBER(int, pending_history_list_offset)
184 // Informs the RenderView of where its current page contents reside in
185 // session history and the total size of the session history list.
186 IPC_STRUCT_MEMBER(int, current_history_list_offset)
187 IPC_STRUCT_MEMBER(int, current_history_list_length)
189 // Informs the RenderView the session history should be cleared. In that
190 // case, the RenderView needs to notify the browser that the clearing was
191 // succesful when the navigation commits.
192 IPC_STRUCT_MEMBER(bool, should_clear_history_list)
194 // The URL to load.
195 IPC_STRUCT_MEMBER(GURL, url)
197 // Base URL for use in WebKit's SubstituteData.
198 // Is only used with data: URLs.
199 IPC_STRUCT_MEMBER(GURL, base_url_for_data_url)
201 // History URL for use in WebKit's SubstituteData.
202 // Is only used with data: URLs.
203 IPC_STRUCT_MEMBER(GURL, history_url_for_data_url)
205 // The URL to send in the "Referer" header field. Can be empty if there is
206 // no referrer.
207 IPC_STRUCT_MEMBER(content::Referrer, referrer)
209 // Any redirect URLs that occurred before |url|. Useful for cross-process
210 // navigations; defaults to empty.
211 IPC_STRUCT_MEMBER(std::vector<GURL>, redirects)
213 // The type of transition.
214 IPC_STRUCT_MEMBER(content::PageTransition, transition)
216 // Informs the RenderView the pending navigation should replace the current
217 // history entry when it commits. This is used for cross-process redirects so
218 // the transferred navigation can recover the navigation state.
219 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
221 // Opaque history state (received by ViewHostMsg_UpdateState).
222 IPC_STRUCT_MEMBER(content::PageState, page_state)
224 // Type of navigation.
225 IPC_STRUCT_MEMBER(FrameMsg_Navigate_Type::Value, navigation_type)
227 // The time the request was created. This is used by the old performance
228 // infrastructure to set up DocumentState associated with the RenderView.
229 // TODO(ppi): make it go away.
230 IPC_STRUCT_MEMBER(base::Time, request_time)
232 // Extra headers (separated by \n) to send during the request.
233 IPC_STRUCT_MEMBER(std::string, extra_headers)
235 // The following two members identify a previous request that has been
236 // created before this navigation is being transferred to a new render view.
237 // This serves the purpose of recycling the old request.
238 // Unless this refers to a transferred navigation, these values are -1 and -1.
239 IPC_STRUCT_MEMBER(int, transferred_request_child_id)
240 IPC_STRUCT_MEMBER(int, transferred_request_request_id)
242 // Whether or not we should allow the url to download.
243 IPC_STRUCT_MEMBER(bool, allow_download)
245 // Whether or not the user agent override string should be used.
246 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
248 // True if this was a post request.
249 IPC_STRUCT_MEMBER(bool, is_post)
251 // If is_post is true, holds the post_data information from browser. Empty
252 // otherwise.
253 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data)
255 // Whether or not this url should be allowed to access local file://
256 // resources.
257 IPC_STRUCT_MEMBER(bool, can_load_local_resources)
259 // If not empty, which frame to navigate.
260 IPC_STRUCT_MEMBER(std::string, frame_to_navigate)
262 // The navigationStart time to expose through the Navigation Timing API to JS.
263 IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start)
264 IPC_STRUCT_END()
266 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
267 IPC_STRUCT_MEMBER(GURL, url)
268 IPC_STRUCT_MEMBER(content::Referrer, referrer)
269 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
270 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
271 IPC_STRUCT_MEMBER(bool, user_gesture)
272 IPC_STRUCT_END()
274 // PlzNavigate
275 IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params)
276 // The request method: GET, POST, etc.
277 IPC_STRUCT_MEMBER(std::string, method)
279 // The requested URL.
280 IPC_STRUCT_MEMBER(GURL, url)
282 // The referrer to use (may be empty).
283 IPC_STRUCT_MEMBER(content::Referrer, referrer)
285 // Additional HTTP request headers.
286 IPC_STRUCT_MEMBER(std::string, headers)
288 // net::URLRequest load flags (net::LOAD_NORMAL) by default).
289 IPC_STRUCT_MEMBER(int, load_flags)
291 // Optional resource request body (may be null).
292 IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>,
293 request_body)
295 // True if the request was user initiated.
296 IPC_STRUCT_MEMBER(bool, has_user_gesture)
298 IPC_STRUCT_MEMBER(content::PageTransition, transition_type)
300 // Whether this navigation should replace the current session history entry on
301 // commit.
302 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
304 // Whether or not we should allow the URL to download.
305 IPC_STRUCT_MEMBER(bool, allow_download)
306 IPC_STRUCT_END()
308 #if defined(OS_MACOSX) || defined(OS_ANDROID)
309 // This message is used for supporting popup menus on Mac OS X and Android using
310 // native controls. See the FrameHostMsg_ShowPopup message.
311 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params)
312 // Position on the screen.
313 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
315 // The height of each item in the menu.
316 IPC_STRUCT_MEMBER(int, item_height)
318 // The size of the font to use for those items.
319 IPC_STRUCT_MEMBER(double, item_font_size)
321 // The currently selected (displayed) item in the menu.
322 IPC_STRUCT_MEMBER(int, selected_item)
324 // The entire list of items in the popup menu.
325 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
327 // Whether items should be right-aligned.
328 IPC_STRUCT_MEMBER(bool, right_aligned)
330 // Whether this is a multi-select popup.
331 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
332 IPC_STRUCT_END()
333 #endif
335 // -----------------------------------------------------------------------------
336 // Messages sent from the browser to the renderer.
338 // When HW accelerated buffers are swapped in an out-of-process child frame
339 // renderer, the message is forwarded to the embedding frame to notify it of
340 // a new texture available for compositing. When the buffer has finished
341 // presenting, a FrameHostMsg_BuffersSwappedACK should be sent back to
342 // gpu host that produced this buffer.
344 // This is used in the non-ubercomp HW accelerated compositing path.
345 IPC_MESSAGE_ROUTED1(FrameMsg_BuffersSwapped,
346 FrameMsg_BuffersSwapped_Params /* params */)
348 // Notifies the embedding frame that a new CompositorFrame is ready to be
349 // presented. When the frame finishes presenting, a matching
350 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
351 // RenderViewHost that was produced the CompositorFrame.
353 // This is used in the ubercomp compositing path.
354 IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped,
355 FrameMsg_CompositorFrameSwapped_Params /* params */)
357 // Notifies the embedding frame that the process rendering the child frame's
358 // contents has terminated.
359 IPC_MESSAGE_ROUTED0(FrameMsg_ChildFrameProcessGone)
361 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that
362 // the menu has been closed.
363 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed,
364 content::CustomContextMenuContext /* custom_context */)
366 // Executes custom context menu action that was provided from Blink.
367 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
368 content::CustomContextMenuContext /* custom_context */,
369 unsigned /* action */)
371 // Requests that the RenderFrame or RenderFrameProxy sets its opener to null.
372 IPC_MESSAGE_ROUTED0(FrameMsg_DisownOpener)
374 // Instructs the renderer to create a new RenderFrame object with |routing_id|.
375 // The new frame should be created as a child of the object identified by
376 // |parent_routing_id| or as top level if that is MSG_ROUTING_NONE.
377 IPC_MESSAGE_CONTROL2(FrameMsg_NewFrame,
378 int /* routing_id */,
379 int /* parent_routing_id */)
381 // Instructs the renderer to create a new RenderFrameProxy object with
382 // |routing_id|. The new proxy should be created as a child of the object
383 // identified by |parent_routing_id| or as top level if that is
384 // MSG_ROUTING_NONE.
385 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrameProxy,
386 int /* routing_id */,
387 int /* parent_routing_id */,
388 int /* render_view_routing_id */)
390 // Tells the renderer to perform the specified navigation, interrupting any
391 // existing navigation.
392 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params)
394 // Instructs the renderer to invoke the frame's beforeunload event handler.
395 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK.
396 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload)
398 // Instructs the frame to swap out for a cross-site transition, including
399 // running the unload event handler and creating a RenderFrameProxy with the
400 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished.
401 IPC_MESSAGE_ROUTED1(FrameMsg_SwapOut,
402 int /* proxy_routing_id */)
404 // Request for the renderer to insert CSS into the frame.
405 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest,
406 std::string /* css */)
408 // Request for the renderer to execute JavaScript in the frame's context.
410 // javascript is the string containing the JavaScript to be executed in the
411 // target frame's context.
413 // If the third parameter is true the result is sent back to the browser using
414 // the message FrameHostMsg_JavaScriptExecuteResponse.
415 // FrameHostMsg_JavaScriptExecuteResponse is passed the ID parameter so that the
416 // host can uniquely identify the request.
417 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequest,
418 base::string16, /* javascript */
419 int, /* ID */
420 bool /* if true, a reply is requested */)
422 // Selects between the given start and end offsets in the currently focused
423 // editable field.
424 IPC_MESSAGE_ROUTED2(FrameMsg_SetEditableSelectionOffsets,
425 int /* start */,
426 int /* end */)
428 // Requests a navigation to the supplied markup, in an iframe with sandbox
429 // attributes.
430 IPC_MESSAGE_ROUTED1(FrameMsg_SetupTransitionView,
431 std::string /* markup */)
433 // Tells the renderer to hide the elements specified by the supplied CSS
434 // selector, and activates any exiting-transition stylesheets.
435 IPC_MESSAGE_ROUTED1(FrameMsg_BeginExitTransition,
436 std::string /* css_selector */)
438 // Tells the renderer to reload the frame, optionally ignoring the cache while
439 // doing so.
440 IPC_MESSAGE_ROUTED1(FrameMsg_Reload,
441 bool /* ignore_cache */)
443 // Notifies the color chooser client that the user selected a color.
444 IPC_MESSAGE_ROUTED2(FrameMsg_DidChooseColorResponse, unsigned, SkColor)
446 // Notifies the color chooser client that the color chooser has ended.
447 IPC_MESSAGE_ROUTED1(FrameMsg_DidEndColorChooser, unsigned)
449 // Notifies the corresponding RenderFrameProxy object to replace itself with the
450 // RenderFrame object it is associated with.
451 IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy)
453 // Request the text surrounding the selection with a |max_length|. The response
454 // will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
455 IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest,
456 size_t /* max_length */)
458 // Tells the renderer to insert a link to the specified stylesheet. This is
459 // needed to support navigation transitions.
460 IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL, std::string)
462 // Change the accessibility mode in the renderer process.
463 IPC_MESSAGE_ROUTED1(FrameMsg_SetAccessibilityMode,
464 AccessibilityMode)
466 #if defined(OS_ANDROID)
468 // External popup menus.
469 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems,
470 bool /* user canceled the popup */,
471 std::vector<int> /* selected indices */)
473 #elif defined(OS_MACOSX)
475 // External popup menus.
476 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem,
477 int /* selected index, -1 means no selection */)
479 #endif
481 // -----------------------------------------------------------------------------
482 // Messages sent from the renderer to the browser.
484 // Blink and JavaScript error messages to log to the console
485 // or debugger UI.
486 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
487 int32, /* log level */
488 base::string16, /* msg */
489 int32, /* line number */
490 base::string16 /* source id */ )
492 // Sent by the renderer when a child frame is created in the renderer.
494 // Each of these messages will have a corresponding FrameHostMsg_Detach message
495 // sent when the frame is detached from the DOM.
496 IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_CreateChildFrame,
497 int32 /* parent_routing_id */,
498 std::string /* frame_name */,
499 int32 /* new_routing_id */)
501 // Sent by the renderer to the parent RenderFrameHost when a child frame is
502 // detached from the DOM.
503 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach)
505 // Sent by the renderer when the frame becomes focused.
506 IPC_MESSAGE_ROUTED0(FrameHostMsg_FrameFocused)
508 // Sent when the renderer starts a provisional load for a frame.
509 // |is_transition_navigation| signals that the frame has defined transition
510 // elements which can be animated by the navigation destination to provide
511 // a transition effect during load.
512 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidStartProvisionalLoadForFrame,
513 GURL /* url */,
514 bool /* is_transition_navigation */)
516 // Sent when the renderer fails a provisional load with an error.
517 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError,
518 FrameHostMsg_DidFailProvisionalLoadWithError_Params)
520 // Sent when a provisional load on the main frame redirects.
521 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidRedirectProvisionalLoad,
522 int /* page_id */,
523 GURL /* source_url*/,
524 GURL /* target_url */)
526 // Notifies the browser that a frame in the view has changed. This message
527 // has a lot of parameters and is packed/unpacked by functions defined in
528 // render_messages.h.
529 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidCommitProvisionalLoad,
530 FrameHostMsg_DidCommitProvisionalLoad_Params)
532 // Notifies the browser that a document has been loaded.
533 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFinishDocumentLoad)
535 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidFailLoadWithError,
536 GURL /* validated_url */,
537 int /* error_code */,
538 base::string16 /* error_description */)
540 // Sent when the renderer starts loading the page. |to_different_document| will
541 // be true unless the load is a fragment navigation, or triggered by
542 // history.pushState/replaceState.
543 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading,
544 bool /* to_different_document */)
546 // Sent when the renderer is done loading a page.
547 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading)
549 // Sent when the renderer changed the progress of a load.
550 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress,
551 double /* load_progress */)
553 // Requests that the given URL be opened in the specified manner.
554 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL, FrameHostMsg_OpenURL_Params)
556 // Notifies the browser that a frame finished loading.
557 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFinishLoad,
558 GURL /* validated_url */)
560 // Sent when after the onload handler has been invoked for the document
561 // in this frame. Sent for top-level frames.
562 IPC_MESSAGE_ROUTED0(FrameHostMsg_DocumentOnLoadCompleted)
564 // Notifies that the initial empty document of a view has been accessed.
565 // After this, it is no longer safe to show a pending navigation's URL without
566 // making a URL spoof possible.
567 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidAccessInitialDocument)
569 // Sent when the frame sets its opener to null, disowning it for the lifetime of
570 // the window. Sent for top-level frames.
571 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDisownOpener)
573 // Changes the title for the page in the UI when the page is navigated or the
574 // title changes. Sent for top-level frames.
575 IPC_MESSAGE_ROUTED3(FrameHostMsg_UpdateTitle,
576 int32 /* page_id */,
577 base::string16 /* title */,
578 blink::WebTextDirection /* title direction */)
580 // Change the encoding name of the page in UI when the page has detected
581 // proper encoding name. Sent for top-level frames.
582 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
583 std::string /* new encoding name */)
585 // Following message is used to communicate the values received by the
586 // callback binding the JS to Cpp.
587 // An instance of browser that has an automation host listening to it can
588 // have a javascript send a native value (string, number, boolean) to the
589 // listener in Cpp. (DomAutomationController)
590 IPC_MESSAGE_ROUTED2(FrameHostMsg_DomOperationResponse,
591 std::string /* json_string */,
592 int /* automation_id */)
594 // Sent to the browser when the renderer detects it is blocked on a pepper
595 // plugin message for too long. This is also sent when it becomes unhung
596 // (according to the value of is_hung). The browser can give the user the
597 // option of killing the plugin.
598 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung,
599 int /* plugin_child_id */,
600 base::FilePath /* path */,
601 bool /* is_hung */)
603 // Sent by the renderer process to indicate that a plugin instance has crashed.
604 // Note: |plugin_pid| should not be trusted. The corresponding process has
605 // probably died. Moreover, the ID may have been reused by a new process. Any
606 // usage other than displaying it in a prompt to the user is very likely to be
607 // wrong.
608 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed,
609 base::FilePath /* plugin_path */,
610 base::ProcessId /* plugin_pid */)
612 // Return information about a plugin for the given URL and MIME
613 // type. If there is no matching plugin, |found| is false.
614 // |actual_mime_type| is the actual mime type supported by the
615 // found plugin.
616 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
617 int /* render_frame_id */,
618 GURL /* url */,
619 GURL /* page_url */,
620 std::string /* mime_type */,
621 bool /* found */,
622 content::WebPluginInfo /* plugin info */,
623 std::string /* actual_mime_type */)
625 // A renderer sends this to the browser process when it wants to
626 // create a plugin. The browser will create the plugin process if
627 // necessary, and will return a handle to the channel on success.
628 // On error an empty string is returned.
629 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin,
630 int /* render_frame_id */,
631 GURL /* url */,
632 GURL /* page_url */,
633 std::string /* mime_type */,
634 IPC::ChannelHandle /* channel_handle */,
635 content::WebPluginInfo /* info */)
637 // Acknowledge that we presented a HW buffer and provide a sync point
638 // to specify the location in the command stream when the compositor
639 // is no longer using it.
641 // See FrameMsg_BuffersSwapped.
642 IPC_MESSAGE_ROUTED1(FrameHostMsg_BuffersSwappedACK,
643 FrameHostMsg_BuffersSwappedACK_Params /* params */)
645 // Acknowledge that we presented an ubercomp frame.
647 // See FrameMsg_CompositorFrameSwapped
648 IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK,
649 FrameHostMsg_CompositorFrameSwappedACK_Params /* params */)
651 // Provides the result from handling BeforeUnload. |proceed| matches the return
652 // value of the frame's beforeunload handler: true if the user decided to
653 // proceed with leaving the page.
654 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeforeUnload_ACK,
655 bool /* proceed */,
656 base::TimeTicks /* before_unload_start_time */,
657 base::TimeTicks /* before_unload_end_time */)
659 // Indicates that the current frame has swapped out, after a SwapOut message.
660 IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK)
662 IPC_MESSAGE_ROUTED1(FrameHostMsg_ReclaimCompositorResources,
663 FrameHostMsg_ReclaimCompositorResources_Params /* params */)
665 // Forwards an input event to a child.
666 // TODO(nick): Temporary bridge, revisit once the browser process can route
667 // input directly to subframes. http://crbug.com/339659
668 IPC_MESSAGE_ROUTED1(FrameHostMsg_ForwardInputEvent,
669 IPC::WebInputEventPointer /* event */)
671 // Used to tell the parent that the user right clicked on an area of the
672 // content area, and a context menu should be shown for it. The params
673 // object contains information about the node(s) that were selected when the
674 // user right clicked.
675 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu, content::ContextMenuParams)
677 // Initial drawing parameters for a child frame that has been swapped out to
678 // another process.
679 IPC_MESSAGE_ROUTED2(FrameHostMsg_InitializeChildFrame,
680 gfx::Rect /* frame_rect */,
681 float /* scale_factor */)
683 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was
684 // requested. The ID is the parameter supplied to
685 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the
686 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
687 // String.
688 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse,
689 int /* id */,
690 base::ListValue /* result */)
692 // A request to run a JavaScript dialog.
693 IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage,
694 base::string16 /* in - alert message */,
695 base::string16 /* in - default prompt */,
696 GURL /* in - originating page URL */,
697 content::JavaScriptMessageType /* in - type */,
698 bool /* out - success */,
699 base::string16 /* out - user_input field */)
701 // Displays a dialog to confirm that the user wants to navigate away from the
702 // page. Replies true if yes, and false otherwise. The reply string is ignored,
703 // but is included so that we can use OnJavaScriptMessageBoxClosed.
704 IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm,
705 GURL, /* in - originating frame URL */
706 base::string16 /* in - alert message */,
707 bool /* in - is a reload */,
708 bool /* out - success */,
709 base::string16 /* out - This is ignored.*/)
711 // Asks the browser to open the color chooser.
712 IPC_MESSAGE_ROUTED3(FrameHostMsg_OpenColorChooser,
713 int /* id */,
714 SkColor /* color */,
715 std::vector<content::ColorSuggestion> /* suggestions */)
717 // Asks the browser to end the color chooser.
718 IPC_MESSAGE_ROUTED1(FrameHostMsg_EndColorChooser, int /* id */)
720 // Change the selected color in the color chooser.
721 IPC_MESSAGE_ROUTED2(FrameHostMsg_SetSelectedColorInColorChooser,
722 int /* id */,
723 SkColor /* color */)
725 // Notifies the browser that media has started/stopped playing.
726 IPC_MESSAGE_ROUTED3(FrameHostMsg_MediaPlayingNotification,
727 int64 /* player_cookie, distinguishes instances */,
728 bool /* has_video */,
729 bool /* has_audio */)
731 IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification,
732 int64 /* player_cookie, distinguishes instances */)
734 // Notify browser the theme color has been changed.
735 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeThemeColor,
736 SkColor /* theme_color */)
738 // Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
739 // |endOffset| are the offsets of the selection in the returned |content|.
740 IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse,
741 base::string16, /* content */
742 size_t, /* startOffset */
743 size_t /* endOffset */)
745 // Notifies the browser that the renderer has a pending navigation transition.
746 // The string parameters are all UTF8.
747 IPC_MESSAGE_CONTROL4(FrameHostMsg_AddNavigationTransitionData,
748 int /* render_frame_id */,
749 std::string /* allowed_destination_host_pattern */,
750 std::string /* selector */,
751 std::string /* markup */)
753 // Tells the browser to perform a navigation.
754 IPC_MESSAGE_ROUTED1(FrameHostMsg_BeginNavigation,
755 FrameHostMsg_BeginNavigation_Params)
757 // Sent once a paint happens after the first non empty layout. In other words
758 // after the frame has painted something.
759 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint)
761 #if defined(OS_MACOSX) || defined(OS_ANDROID)
763 // Message to show/hide a popup menu using native controls.
764 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
765 FrameHostMsg_ShowPopup_Params)
766 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
768 #endif