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 "cc/surfaces/surface_id.h"
9 #include "cc/surfaces/surface_sequence.h"
10 #include "content/common/content_export.h"
11 #include "content/common/content_param_traits.h"
12 #include "content/common/frame_message_enums.h"
13 #include "content/common/frame_param.h"
14 #include "content/common/frame_replication_state.h"
15 #include "content/common/navigation_gesture.h"
16 #include "content/common/navigation_params.h"
17 #include "content/common/resource_request_body.h"
18 #include "content/public/common/color_suggestion.h"
19 #include "content/public/common/common_param_traits.h"
20 #include "content/public/common/console_message_level.h"
21 #include "content/public/common/context_menu_params.h"
22 #include "content/public/common/frame_navigate_params.h"
23 #include "content/public/common/javascript_message_type.h"
24 #include "content/public/common/message_port_types.h"
25 #include "content/public/common/page_state.h"
26 #include "content/public/common/resource_response.h"
27 #include "content/public/common/three_d_api_types.h"
28 #include "content/public/common/transition_element.h"
29 #include "ipc/ipc_message_macros.h"
30 #include "third_party/WebKit/public/web/WebTreeScopeType.h"
31 #include "ui/gfx/ipc/gfx_param_traits.h"
33 #include "url/origin.h"
35 #if defined(ENABLE_PLUGINS)
36 #include "content/common/pepper_renderer_instance_data.h"
39 #undef IPC_MESSAGE_EXPORT
40 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
42 #define IPC_MESSAGE_START FrameMsgStart
44 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode
,
46 AccessibilityModeComplete
)
47 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType
,
48 content::JAVASCRIPT_MESSAGE_TYPE_ALERT
,
49 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT
)
50 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value
,
51 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST
)
52 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value
,
53 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST
)
54 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType
,
55 blink::WebContextMenuData::MediaTypeLast
)
56 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType
,
57 blink::WebContextMenuData::InputFieldTypeLast
)
58 IPC_ENUM_TRAITS(blink::WebSandboxFlags
) // Bitmask.
59 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType
,
60 blink::WebTreeScopeType::Last
)
61 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType
, ui::MENU_SOURCE_TYPE_LAST
)
63 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion
)
64 IPC_STRUCT_TRAITS_MEMBER(color
)
65 IPC_STRUCT_TRAITS_MEMBER(label
)
66 IPC_STRUCT_TRAITS_END()
68 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams
)
69 IPC_STRUCT_TRAITS_MEMBER(media_type
)
70 IPC_STRUCT_TRAITS_MEMBER(x
)
71 IPC_STRUCT_TRAITS_MEMBER(y
)
72 IPC_STRUCT_TRAITS_MEMBER(link_url
)
73 IPC_STRUCT_TRAITS_MEMBER(link_text
)
74 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url
)
75 IPC_STRUCT_TRAITS_MEMBER(src_url
)
76 IPC_STRUCT_TRAITS_MEMBER(has_image_contents
)
77 IPC_STRUCT_TRAITS_MEMBER(properties
)
78 IPC_STRUCT_TRAITS_MEMBER(page_url
)
79 IPC_STRUCT_TRAITS_MEMBER(keyword_url
)
80 IPC_STRUCT_TRAITS_MEMBER(frame_url
)
81 IPC_STRUCT_TRAITS_MEMBER(frame_page_state
)
82 IPC_STRUCT_TRAITS_MEMBER(media_flags
)
83 IPC_STRUCT_TRAITS_MEMBER(selection_text
)
84 IPC_STRUCT_TRAITS_MEMBER(title_text
)
85 IPC_STRUCT_TRAITS_MEMBER(suggested_filename
)
86 IPC_STRUCT_TRAITS_MEMBER(misspelled_word
)
87 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash
)
88 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions
)
89 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled
)
90 IPC_STRUCT_TRAITS_MEMBER(is_editable
)
91 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default
)
92 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right
)
93 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left
)
94 IPC_STRUCT_TRAITS_MEMBER(edit_flags
)
95 IPC_STRUCT_TRAITS_MEMBER(security_info
)
96 IPC_STRUCT_TRAITS_MEMBER(frame_charset
)
97 IPC_STRUCT_TRAITS_MEMBER(referrer_policy
)
98 IPC_STRUCT_TRAITS_MEMBER(custom_context
)
99 IPC_STRUCT_TRAITS_MEMBER(custom_items
)
100 IPC_STRUCT_TRAITS_MEMBER(source_type
)
101 #if defined(OS_ANDROID)
102 IPC_STRUCT_TRAITS_MEMBER(selection_start
)
103 IPC_STRUCT_TRAITS_MEMBER(selection_end
)
105 IPC_STRUCT_TRAITS_MEMBER(input_field_type
)
106 IPC_STRUCT_TRAITS_END()
108 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext
)
109 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu
)
110 IPC_STRUCT_TRAITS_MEMBER(request_id
)
111 IPC_STRUCT_TRAITS_MEMBER(render_widget_id
)
112 IPC_STRUCT_TRAITS_MEMBER(link_followed
)
113 IPC_STRUCT_TRAITS_END()
115 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement
)
116 IPC_STRUCT_TRAITS_MEMBER(id
)
117 IPC_STRUCT_TRAITS_MEMBER(rect
)
118 IPC_STRUCT_TRAITS_END()
121 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params
)
122 // Error code as reported in the DidFailProvisionalLoad callback.
123 IPC_STRUCT_MEMBER(int, error_code
)
124 // An error message generated from the error_code. This can be an empty
125 // string if we were unable to find a meaningful description.
126 IPC_STRUCT_MEMBER(base::string16
, error_description
)
127 // The URL that the error is reported for.
128 IPC_STRUCT_MEMBER(GURL
, url
)
129 // True if the failure is the result of navigating to a POST again
130 // and we're going to show the POST interstitial.
131 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial
)
132 // True if the navigation was canceled because it was ignored by a handler,
133 // e.g. shouldOverrideUrlLoading.
134 IPC_STRUCT_MEMBER(bool, was_ignored_by_handler
)
137 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams
)
138 IPC_STRUCT_TRAITS_MEMBER(page_id
)
139 IPC_STRUCT_TRAITS_MEMBER(nav_entry_id
)
140 IPC_STRUCT_TRAITS_MEMBER(item_sequence_number
)
141 IPC_STRUCT_TRAITS_MEMBER(document_sequence_number
)
142 IPC_STRUCT_TRAITS_MEMBER(url
)
143 IPC_STRUCT_TRAITS_MEMBER(base_url
)
144 IPC_STRUCT_TRAITS_MEMBER(referrer
)
145 IPC_STRUCT_TRAITS_MEMBER(transition
)
146 IPC_STRUCT_TRAITS_MEMBER(redirects
)
147 IPC_STRUCT_TRAITS_MEMBER(should_update_history
)
148 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url
)
149 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding
)
150 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type
)
151 IPC_STRUCT_TRAITS_MEMBER(socket_address
)
152 IPC_STRUCT_TRAITS_END()
154 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has
155 // too many data parameters to be reasonably put in a predefined IPC message.
156 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params
,
157 content::FrameNavigateParams
)
158 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams
)
160 // This is the value from the browser (copied from the navigation request)
161 // indicating whether it intended to make a new entry. TODO(avi): Remove this
162 // when the pending entry situation is made sane and the browser keeps them
163 // around long enough to match them via nav_entry_id.
164 IPC_STRUCT_MEMBER(bool, intended_as_new_entry
)
166 // Whether this commit created a new entry.
167 IPC_STRUCT_MEMBER(bool, did_create_new_entry
)
169 // Information regarding the security of the connection (empty if the
170 // connection was not secure).
171 IPC_STRUCT_MEMBER(std::string
, security_info
)
173 // The gesture that initiated this navigation.
174 IPC_STRUCT_MEMBER(content::NavigationGesture
, gesture
)
176 // True if this was a post request.
177 IPC_STRUCT_MEMBER(bool, is_post
)
179 // The POST body identifier. -1 if it doesn't exist.
180 IPC_STRUCT_MEMBER(int64
, post_id
)
182 // Whether the frame navigation resulted in no change to the documents within
183 // the page. For example, the navigation may have just resulted in scrolling
184 // to a named anchor.
185 IPC_STRUCT_MEMBER(bool, was_within_same_page
)
187 // The status code of the HTTP request.
188 IPC_STRUCT_MEMBER(int, http_status_code
)
190 // This flag is used to warn if the renderer is displaying an error page,
191 // so that we can set the appropriate page type.
192 IPC_STRUCT_MEMBER(bool, url_is_unreachable
)
194 // True if the connection was proxied. In this case, socket_address
195 // will represent the address of the proxy, rather than the remote host.
196 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy
)
198 // Serialized history item state to store in the navigation entry.
199 IPC_STRUCT_MEMBER(content::PageState
, page_state
)
201 // Original request's URL.
202 IPC_STRUCT_MEMBER(GURL
, original_request_url
)
204 // User agent override used to navigate.
205 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
207 // Notifies the browser that for this navigation, the session history was
208 // successfully cleared.
209 IPC_STRUCT_MEMBER(bool, history_list_was_cleared
)
211 // The routing_id of the render view associated with the navigation.
212 // We need to track the RenderViewHost routing_id because of downstream
213 // dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager,
214 // ResourceDispatcherHostImpl, MediaStreamUIProxy,
215 // SpeechRecognitionDispatcherHost and possibly others). They look up the view
216 // based on the ID stored in the resource requests. Once those dependencies
217 // are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the
218 // client to be based on the routing_id of the RenderFrameHost.
219 IPC_STRUCT_MEMBER(int, render_view_routing_id
)
221 // Origin of the frame. This will be replicated to any associated
222 // RenderFrameProxies.
223 IPC_STRUCT_MEMBER(url::Origin
, origin
)
225 // How navigation metrics starting on UI action for this load should be
227 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value
, report_type
)
229 // Timestamp at which the UI action that triggered the navigation originated.
230 IPC_STRUCT_MEMBER(base::TimeTicks
, ui_timestamp
)
233 IPC_STRUCT_BEGIN(FrameMsg_PostMessage_Params
)
234 // Whether the data format is supplied as serialized script value, or as
235 // a simple string. If it is a raw string, must be converted from string to a
236 // WebSerializedScriptValue in the renderer process.
237 IPC_STRUCT_MEMBER(bool, is_data_raw_string
)
239 // The serialized script value.
240 IPC_STRUCT_MEMBER(base::string16
, data
)
242 // When sent to the browser, this is the routing ID of the source frame in
243 // the source process. The browser replaces it with the routing ID of the
244 // equivalent frame proxy in the destination process.
245 IPC_STRUCT_MEMBER(int, source_routing_id
)
247 // The origin of the source frame.
248 IPC_STRUCT_MEMBER(base::string16
, source_origin
)
250 // The origin for the message's target.
251 IPC_STRUCT_MEMBER(base::string16
, target_origin
)
253 // Information about the MessagePorts this message contains.
254 IPC_STRUCT_MEMBER(std::vector
<content::TransferredMessagePort
>, message_ports
)
255 IPC_STRUCT_MEMBER(std::vector
<int>, new_routing_ids
)
258 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams
)
259 IPC_STRUCT_TRAITS_MEMBER(url
)
260 IPC_STRUCT_TRAITS_MEMBER(referrer
)
261 IPC_STRUCT_TRAITS_MEMBER(transition
)
262 IPC_STRUCT_TRAITS_MEMBER(navigation_type
)
263 IPC_STRUCT_TRAITS_MEMBER(allow_download
)
264 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry
)
265 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp
)
266 IPC_STRUCT_TRAITS_MEMBER(report_type
)
267 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url
)
268 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url
)
269 IPC_STRUCT_TRAITS_END()
271 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams
)
272 IPC_STRUCT_TRAITS_MEMBER(method
)
273 IPC_STRUCT_TRAITS_MEMBER(headers
)
274 IPC_STRUCT_TRAITS_MEMBER(load_flags
)
275 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture
)
276 IPC_STRUCT_TRAITS_END()
278 IPC_STRUCT_TRAITS_BEGIN(content::StartNavigationParams
)
279 IPC_STRUCT_TRAITS_MEMBER(is_post
)
280 IPC_STRUCT_TRAITS_MEMBER(extra_headers
)
281 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data
)
282 #if defined(OS_ANDROID)
283 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture
)
285 IPC_STRUCT_TRAITS_MEMBER(transferred_request_child_id
)
286 IPC_STRUCT_TRAITS_MEMBER(transferred_request_request_id
)
287 IPC_STRUCT_TRAITS_END()
289 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams
)
290 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent
)
291 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start
)
292 IPC_STRUCT_TRAITS_MEMBER(redirects
)
293 IPC_STRUCT_TRAITS_MEMBER(can_load_local_resources
)
294 IPC_STRUCT_TRAITS_MEMBER(request_time
)
295 IPC_STRUCT_TRAITS_MEMBER(page_state
)
296 IPC_STRUCT_TRAITS_MEMBER(page_id
)
297 IPC_STRUCT_TRAITS_MEMBER(nav_entry_id
)
298 IPC_STRUCT_TRAITS_MEMBER(is_same_document_history_load
)
299 IPC_STRUCT_TRAITS_MEMBER(has_committed_real_load
)
300 IPC_STRUCT_TRAITS_MEMBER(intended_as_new_entry
)
301 IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset
)
302 IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset
)
303 IPC_STRUCT_TRAITS_MEMBER(current_history_list_length
)
304 IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list
)
305 IPC_STRUCT_TRAITS_END()
307 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState
)
308 IPC_STRUCT_TRAITS_MEMBER(origin
)
309 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags
)
310 IPC_STRUCT_TRAITS_MEMBER(name
)
311 IPC_STRUCT_TRAITS_END()
313 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams
)
314 // Gives the routing ID for the RenderWidget that will be attached to the
315 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this
316 // is MSG_ROUTING_NONE and the other parameters are not read.
317 IPC_STRUCT_MEMBER(int, routing_id
)
319 // Identifier for the output surface for the new RenderWidget.
320 IPC_STRUCT_MEMBER(int, surface_id
)
322 // Tells the new RenderWidget whether it is initially hidden.
323 IPC_STRUCT_MEMBER(bool, hidden
)
326 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_Params
)
327 // Specifies the routing ID of the new RenderFrame object.
328 IPC_STRUCT_MEMBER(int, routing_id
)
330 // If a valid |proxy_routing_id| is provided, the new frame will be
331 // configured to replace the proxy on commit.
332 IPC_STRUCT_MEMBER(int, proxy_routing_id
)
334 // Specifies the new frame's opener. The opener will be null if this is
336 IPC_STRUCT_MEMBER(int, opener_routing_id
)
338 // The new frame should be created as a child of the object
339 // identified by |parent_routing_id| or as top level if that is
341 IPC_STRUCT_MEMBER(int, parent_routing_id
)
343 // Identifies the previous sibling of the new frame, so that the new frame is
344 // inserted into the correct place in the frame tree. If this is
345 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its
346 // parent frame, in front of any other children.
347 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id
)
349 // When the new frame has a parent, |replication_state| holds the new frame's
350 // properties replicated from the process rendering the parent frame, such as
351 // the new frame's sandbox flags.
352 IPC_STRUCT_MEMBER(content::FrameReplicationState
, replication_state
)
354 // Specifies properties for a new RenderWidget that will be attached to the
355 // new RenderFrame (if one is needed).
356 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams
, widget_params
)
359 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params
)
360 IPC_STRUCT_MEMBER(GURL
, url
)
361 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
362 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
363 IPC_STRUCT_MEMBER(bool, should_replace_current_entry
)
364 IPC_STRUCT_MEMBER(bool, user_gesture
)
367 IPC_STRUCT_BEGIN(FrameMsg_TextTrackSettings_Params
)
368 // Text tracks on/off state
369 IPC_STRUCT_MEMBER(bool, text_tracks_enabled
)
371 // Background color of the text track.
372 IPC_STRUCT_MEMBER(std::string
, text_track_background_color
)
374 // Font family of the text track text.
375 IPC_STRUCT_MEMBER(std::string
, text_track_font_family
)
377 // Font style of the text track text.
378 IPC_STRUCT_MEMBER(std::string
, text_track_font_style
)
380 // Font variant of the text track text.
381 IPC_STRUCT_MEMBER(std::string
, text_track_font_variant
)
383 // Color of the text track text.
384 IPC_STRUCT_MEMBER(std::string
, text_track_text_color
)
386 // Text shadow (edge style) of the text track text.
387 IPC_STRUCT_MEMBER(std::string
, text_track_text_shadow
)
389 // Size of the text track text.
390 IPC_STRUCT_MEMBER(std::string
, text_track_text_size
)
393 #if defined(OS_MACOSX) || defined(OS_ANDROID)
394 // This message is used for supporting popup menus on Mac OS X and Android using
395 // native controls. See the FrameHostMsg_ShowPopup message.
396 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params
)
397 // Position on the screen.
398 IPC_STRUCT_MEMBER(gfx::Rect
, bounds
)
400 // The height of each item in the menu.
401 IPC_STRUCT_MEMBER(int, item_height
)
403 // The size of the font to use for those items.
404 IPC_STRUCT_MEMBER(double, item_font_size
)
406 // The currently selected (displayed) item in the menu.
407 IPC_STRUCT_MEMBER(int, selected_item
)
409 // The entire list of items in the popup menu.
410 IPC_STRUCT_MEMBER(std::vector
<content::MenuItem
>, popup_items
)
412 // Whether items should be right-aligned.
413 IPC_STRUCT_MEMBER(bool, right_aligned
)
415 // Whether this is a multi-select popup.
416 IPC_STRUCT_MEMBER(bool, allow_multiple_selection
)
420 #if defined(ENABLE_PLUGINS)
421 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
422 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
423 IPC_STRUCT_TRAITS_MEMBER(render_frame_id
)
424 IPC_STRUCT_TRAITS_MEMBER(document_url
)
425 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
426 IPC_STRUCT_TRAITS_MEMBER(is_potentially_secure_plugin_context
)
427 IPC_STRUCT_TRAITS_END()
430 // -----------------------------------------------------------------------------
431 // Messages sent from the browser to the renderer.
433 // Notifies the embedding frame that a new CompositorFrame is ready to be
434 // presented. When the frame finishes presenting, a matching
435 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
436 // RenderViewHost that was produced the CompositorFrame.
438 // This is used in the ubercomp compositing path.
439 IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped
,
440 FrameMsg_CompositorFrameSwapped_Params
/* params */)
442 IPC_MESSAGE_ROUTED4(FrameMsg_SetChildFrameSurface
,
443 cc::SurfaceId
/* surface_id */,
444 gfx::Size
/* frame_size */,
445 float /* scale_factor */,
446 cc::SurfaceSequence
/* sequence */)
448 // Notifies the embedding frame that the process rendering the child frame's
449 // contents has terminated.
450 IPC_MESSAGE_ROUTED0(FrameMsg_ChildFrameProcessGone
)
452 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that
453 // the menu has been closed.
454 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed
,
455 content::CustomContextMenuContext
/* custom_context */)
457 // Executes custom context menu action that was provided from Blink.
458 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction
,
459 content::CustomContextMenuContext
/* custom_context */,
460 unsigned /* action */)
462 // Requests that the RenderFrame or RenderFrameProxy updates its opener to the
463 // specified frame. The routing ID may be MSG_ROUTING_NONE if the opener was
465 IPC_MESSAGE_ROUTED1(FrameMsg_UpdateOpener
, int /* opener_routing_id */)
467 // Requests that the RenderFrame send back a response after waiting for the
468 // commit, activation and frame swap of the current DOM tree in blink.
469 IPC_MESSAGE_ROUTED1(FrameMsg_VisualStateRequest
, uint64
/* id */)
471 // Instructs the renderer to create a new RenderFrame object.
472 IPC_MESSAGE_CONTROL1(FrameMsg_NewFrame
, FrameMsg_NewFrame_Params
/* params */)
474 // Instructs the renderer to create a new RenderFrameProxy object with
475 // |routing_id|. |render_view_routing_id| identifies the
476 // RenderView to be associated with this proxy. The new proxy's opener should
477 // be set to the object identified by |opener_routing_id|, or to null if that
478 // is MSG_ROUTING_NONE. The new proxy should be created as a child of the
479 // object identified by |parent_routing_id| or as top level if that is
481 IPC_MESSAGE_CONTROL5(FrameMsg_NewFrameProxy
,
482 int /* routing_id */,
483 int /* render_view_routing_id */,
484 int /* opener_routing_id */,
485 int /* parent_routing_id */,
486 content::FrameReplicationState
/* replication_state */)
488 // Tells the renderer to perform the specified navigation, interrupting any
489 // existing navigation.
490 IPC_MESSAGE_ROUTED3(FrameMsg_Navigate
,
491 content::CommonNavigationParams
, /* common_params */
492 content::StartNavigationParams
, /* start_params */
493 content::RequestNavigationParams
/* request_params */)
495 // Instructs the renderer to invoke the frame's beforeunload event handler.
496 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK.
497 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload
)
499 // Instructs the frame to swap out for a cross-site transition, including
500 // running the unload event handler and creating a RenderFrameProxy with the
501 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished.
502 IPC_MESSAGE_ROUTED3(FrameMsg_SwapOut
,
503 int /* proxy_routing_id */,
504 bool /* is_loading */,
505 content::FrameReplicationState
/* replication_state */)
507 // Instructs the frame to stop the load in progress, if any.
508 IPC_MESSAGE_ROUTED0(FrameMsg_Stop
)
510 // A message sent to RenderFrameProxy to indicate that its corresponding
511 // RenderFrame has started loading a document.
512 IPC_MESSAGE_ROUTED0(FrameMsg_DidStartLoading
)
514 // A message sent to RenderFrameProxy to indicate that its corresponding
515 // RenderFrame has completed loading.
516 IPC_MESSAGE_ROUTED0(FrameMsg_DidStopLoading
)
518 // Request for the renderer to insert CSS into the frame.
519 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest
,
520 std::string
/* css */)
522 // Add message to the devtools console.
523 IPC_MESSAGE_ROUTED2(FrameMsg_AddMessageToConsole
,
524 content::ConsoleMessageLevel
/* level */,
525 std::string
/* message */)
527 // Request for the renderer to execute JavaScript in the frame's context.
529 // javascript is the string containing the JavaScript to be executed in the
530 // target frame's context.
532 // If the third parameter is true the result is sent back to the browser using
533 // the message FrameHostMsg_JavaScriptExecuteResponse.
534 // FrameHostMsg_JavaScriptExecuteResponse is passed the ID parameter so that the
535 // host can uniquely identify the request.
536 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequest
,
537 base::string16
, /* javascript */
539 bool /* if true, a reply is requested */)
541 // ONLY FOR TESTS: Same as above but adds a fake UserGestureindicator around
542 // execution. (crbug.com/408426)
543 IPC_MESSAGE_ROUTED4(FrameMsg_JavaScriptExecuteRequestForTests
,
544 base::string16
, /* javascript */
546 bool, /* if true, a reply is requested */
547 bool /* if true, a user gesture indicator is created */)
549 // Same as FrameMsg_JavaScriptExecuteRequest above except the script is
550 // run in the isolated world specified by the fourth parameter.
551 IPC_MESSAGE_ROUTED4(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld
,
552 base::string16
, /* javascript */
554 bool, /* if true, a reply is requested */
557 // Selects between the given start and end offsets in the currently focused
559 IPC_MESSAGE_ROUTED2(FrameMsg_SetEditableSelectionOffsets
,
563 // Requests a navigation to the supplied markup, in an iframe with sandbox
565 IPC_MESSAGE_ROUTED1(FrameMsg_SetupTransitionView
,
566 std::string
/* markup */)
568 // Tells the renderer to hide the elements specified by the supplied CSS
569 // selector, and activates any exiting-transition stylesheets.
570 IPC_MESSAGE_ROUTED2(FrameMsg_BeginExitTransition
,
571 std::string
/* css_selector */,
572 bool /* exit_to_native_app */)
574 // Tell the renderer to revert the exit transition done before
575 IPC_MESSAGE_ROUTED0(FrameMsg_RevertExitTransition
)
577 // Tell the renderer to hide transition elements.
578 IPC_MESSAGE_ROUTED1(FrameMsg_HideTransitionElements
,
579 std::string
/* css_selector */)
581 // Tell the renderer to hide transition elements.
582 IPC_MESSAGE_ROUTED1(FrameMsg_ShowTransitionElements
,
583 std::string
/* css_selector */)
585 // Tells the renderer to reload the frame, optionally ignoring the cache while
587 IPC_MESSAGE_ROUTED1(FrameMsg_Reload
,
588 bool /* ignore_cache */)
590 // Notifies the color chooser client that the user selected a color.
591 IPC_MESSAGE_ROUTED2(FrameMsg_DidChooseColorResponse
, unsigned, SkColor
)
593 // Notifies the color chooser client that the color chooser has ended.
594 IPC_MESSAGE_ROUTED1(FrameMsg_DidEndColorChooser
, unsigned)
596 // Notifies the corresponding RenderFrameProxy object to replace itself with the
597 // RenderFrame object it is associated with.
598 IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy
)
600 // Request the text surrounding the selection with a |max_length|. The response
601 // will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
602 IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest
,
603 size_t /* max_length */)
605 // Tells the renderer to insert a link to the specified stylesheet. This is
606 // needed to support navigation transitions.
607 IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL
, std::string
)
609 // Change the accessibility mode in the renderer process.
610 IPC_MESSAGE_ROUTED1(FrameMsg_SetAccessibilityMode
,
613 // Dispatch a load event in the iframe element containing this frame.
614 IPC_MESSAGE_ROUTED0(FrameMsg_DispatchLoad
)
616 // Notifies the frame that its parent has changed the frame's sandbox flags.
617 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags
, blink::WebSandboxFlags
)
619 // Update a proxy's window.name property. Used when the frame's name is
620 // changed in another process.
621 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateName
, std::string
/* name */)
623 // Update a proxy's replicated origin. Used when the frame is navigated to a
625 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateOrigin
, url::Origin
/* origin */)
627 // Send to the RenderFrame to set text tracks state and style settings.
628 // Sent for top-level frames.
629 IPC_MESSAGE_ROUTED1(FrameMsg_SetTextTrackSettings
,
630 FrameMsg_TextTrackSettings_Params
/* params */)
632 // Posts a message from a frame in another process to the current renderer.
633 IPC_MESSAGE_ROUTED1(FrameMsg_PostMessageEvent
, FrameMsg_PostMessage_Params
)
635 #if defined(OS_ANDROID)
637 // External popup menus.
638 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems
,
639 bool /* user canceled the popup */,
640 std::vector
<int> /* selected indices */)
642 #elif defined(OS_MACOSX)
644 // External popup menus.
645 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem
,
646 int /* selected index, -1 means no selection */)
651 // Tells the renderer that a navigation is ready to commit. The renderer should
652 // request |stream_url| to get access to the stream containing the body of the
654 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation
,
655 content::ResourceResponseHead
, /* response */
656 GURL
, /* stream_url */
657 content::CommonNavigationParams
, /* common_params */
658 content::RequestNavigationParams
/* request_params */)
661 // Tells the renderer that a navigation failed with the error code |error_code|
662 // and that the renderer should display an appropriate error page.
663 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation
,
664 content::CommonNavigationParams
, /* common_params */
665 content::RequestNavigationParams
, /* request_params */
666 bool, /* stale_copy_in_cache */
667 int /* error_code */)
669 #if defined(ENABLE_PLUGINS)
670 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist.
671 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist
,
672 std::set
<url::Origin
> /* origin_whitelist */)
673 #endif // defined(ENABLE_PLUGINS)
675 // -----------------------------------------------------------------------------
676 // Messages sent from the renderer to the browser.
678 // Blink and JavaScript error messages to log to the console
680 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole
,
681 int32
, /* log level */
682 base::string16
, /* msg */
683 int32
, /* line number */
684 base::string16
/* source id */ )
686 // Sent by the renderer when a child frame is created in the renderer.
688 // Each of these messages will have a corresponding FrameHostMsg_Detach message
689 // sent when the frame is detached from the DOM.
690 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame
,
691 int32
/* parent_routing_id */,
692 blink::WebTreeScopeType
/* scope */,
693 std::string
/* frame_name */,
694 blink::WebSandboxFlags
/* sandbox flags */,
695 int32
/* new_routing_id */)
697 // Sent by the renderer to the parent RenderFrameHost when a child frame is
698 // detached from the DOM.
699 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach
)
701 // Indicates the renderer process is gone. This actually is sent by the
702 // browser process to itself, but keeps the interface cleaner.
703 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone
,
704 int, /* this really is base::TerminationStatus */
707 // Sent by the renderer when the frame becomes focused.
708 IPC_MESSAGE_ROUTED0(FrameHostMsg_FrameFocused
)
710 // Sent when the renderer starts a provisional load for a frame.
711 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartProvisionalLoadForFrame
,
714 // Sent when the renderer fails a provisional load with an error.
715 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError
,
716 FrameHostMsg_DidFailProvisionalLoadWithError_Params
)
718 // Notifies the browser that a frame in the view has changed. This message
719 // has a lot of parameters and is packed/unpacked by functions defined in
720 // render_messages.h.
721 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidCommitProvisionalLoad
,
722 FrameHostMsg_DidCommitProvisionalLoad_Params
)
724 // Notifies the browser that a document has been loaded.
725 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFinishDocumentLoad
)
727 IPC_MESSAGE_ROUTED4(FrameHostMsg_DidFailLoadWithError
,
728 GURL
/* validated_url */,
729 int /* error_code */,
730 base::string16
/* error_description */,
731 bool /* was_ignored_by_handler */)
733 // Sent when the renderer decides to ignore a navigation.
734 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDropNavigation
)
736 // Sent when the renderer starts loading the page. |to_different_document| will
737 // be true unless the load is a fragment navigation, or triggered by
738 // history.pushState/replaceState.
739 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading
,
740 bool /* to_different_document */)
742 // Sent when the renderer is done loading a page.
743 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading
)
745 // Sent when the frame changes its window.name.
746 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeName
, std::string
/* name */)
748 // Sent when the renderer changed the progress of a load.
749 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress
,
750 double /* load_progress */)
752 // Requests that the given URL be opened in the specified manner.
753 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL
, FrameHostMsg_OpenURL_Params
)
755 // Notifies the browser that a frame finished loading.
756 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFinishLoad
,
757 GURL
/* validated_url */)
759 // Sent when after the onload handler has been invoked for the document
760 // in this frame. Sent for top-level frames. |report_type| and |ui_timestamp|
761 // are used to report navigation metrics starting on the ui input event that
762 // triggered the navigation timestamp.
763 IPC_MESSAGE_ROUTED2(FrameHostMsg_DocumentOnLoadCompleted
,
764 FrameMsg_UILoadMetricsReportType::Value
/* report_type */,
765 base::TimeTicks
/* ui_timestamp */)
767 // Notifies that the initial empty document of a view has been accessed.
768 // After this, it is no longer safe to show a pending navigation's URL without
769 // making a URL spoof possible.
770 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidAccessInitialDocument
)
772 // Sent when the RenderFrame or RenderFrameProxy either updates its opener to
773 // another frame identified by |opener_routing_id|, or, if |opener_routing_id|
774 // is MSG_ROUTING_NONE, the frame disowns its opener for the lifetime of the
776 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeOpener
, int /* opener_routing_id */)
778 // Notifies the browser that a page id was assigned.
779 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId
,
782 // Notifies the browser that sandbox flags have changed for a subframe of this
784 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags
,
785 int32
/* subframe_routing_id */,
786 blink::WebSandboxFlags
/* updated_flags */)
788 // Changes the title for the page in the UI when the page is navigated or the
789 // title changes. Sent for top-level frames.
790 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle
,
791 base::string16
/* title */,
792 blink::WebTextDirection
/* title direction */)
794 // Change the encoding name of the page in UI when the page has detected
795 // proper encoding name. Sent for top-level frames.
796 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding
,
797 std::string
/* new encoding name */)
799 // Following message is used to communicate the values received by the
800 // callback binding the JS to Cpp.
801 // An instance of browser that has an automation host listening to it can
802 // have a javascript send a native value (string, number, boolean) to the
803 // listener in Cpp. (DomAutomationController)
804 IPC_MESSAGE_ROUTED2(FrameHostMsg_DomOperationResponse
,
805 std::string
/* json_string */,
806 int /* automation_id */)
808 // Used to set a cookie. The cookie is set asynchronously, but will be
809 // available to a subsequent FrameHostMsg_GetCookies request.
810 IPC_MESSAGE_CONTROL4(FrameHostMsg_SetCookie
,
811 int /* render_frame_id */,
813 GURL
/* first_party_for_cookies */,
814 std::string
/* cookie */)
816 // Used to get cookies for the given URL. This may block waiting for a
817 // previous SetCookie message to be processed.
818 IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_GetCookies
,
819 int /* render_frame_id */,
821 GURL
/* first_party_for_cookies */,
822 std::string
/* cookies */)
824 // Used to check if cookies are enabled for the given URL. This may block
825 // waiting for a previous SetCookie message to be processed.
826 IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_CookiesEnabled
,
827 int /* render_frame_id */,
829 GURL
/* first_party_for_cookies */,
830 bool /* cookies_enabled */)
832 // Sent by the renderer process to check whether client 3D APIs
833 // (Pepper 3D, WebGL) are explicitly blocked.
834 IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_Are3DAPIsBlocked
,
835 int /* render_frame_id */,
836 GURL
/* top_origin_url */,
837 content::ThreeDAPIType
/* requester */,
840 // Sent by the renderer process to indicate that a context was lost by
841 // client 3D content (Pepper 3D, WebGL) running on the page at the
843 IPC_MESSAGE_CONTROL3(FrameHostMsg_DidLose3DContext
,
844 GURL
/* top_origin_url */,
845 content::ThreeDAPIType
/* context_type */,
846 int /* arb_robustness_status_code */)
848 #if defined(ENABLE_PLUGINS)
849 // Notification sent from a renderer to the browser that a Pepper plugin
850 // instance is created in the DOM.
851 IPC_MESSAGE_ROUTED0(FrameHostMsg_PepperInstanceCreated
)
853 // Notification sent from a renderer to the browser that a Pepper plugin
854 // instance is deleted from the DOM.
855 IPC_MESSAGE_ROUTED0(FrameHostMsg_PepperInstanceDeleted
)
857 // Sent to the browser when the renderer detects it is blocked on a pepper
858 // plugin message for too long. This is also sent when it becomes unhung
859 // (according to the value of is_hung). The browser can give the user the
860 // option of killing the plugin.
861 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung
,
862 int /* plugin_child_id */,
863 base::FilePath
/* path */,
866 // Sent by the renderer process to indicate that a plugin instance has crashed.
867 // Note: |plugin_pid| should not be trusted. The corresponding process has
868 // probably died. Moreover, the ID may have been reused by a new process. Any
869 // usage other than displaying it in a prompt to the user is very likely to be
871 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed
,
872 base::FilePath
/* plugin_path */,
873 base::ProcessId
/* plugin_pid */)
875 // Used to get the list of plugins
876 IPC_SYNC_MESSAGE_CONTROL1_1(FrameHostMsg_GetPlugins
,
878 std::vector
<content::WebPluginInfo
> /* plugins */)
880 // Return information about a plugin for the given URL and MIME
881 // type. If there is no matching plugin, |found| is false.
882 // |actual_mime_type| is the actual mime type supported by the
884 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo
,
885 int /* render_frame_id */,
888 std::string
/* mime_type */,
890 content::WebPluginInfo
/* plugin info */,
891 std::string
/* actual_mime_type */)
893 // A renderer sends this to the browser process when it wants to temporarily
894 // whitelist an origin's plugin content as essential. This temporary whitelist
895 // is specific to a top level frame, and is cleared when the whitelisting
896 // RenderFrame is destroyed.
897 IPC_MESSAGE_ROUTED1(FrameHostMsg_PluginContentOriginAllowed
,
898 url::Origin
/* content_origin */)
900 // A renderer sends this to the browser process when it wants to
901 // create a plugin. The browser will create the plugin process if
902 // necessary, and will return a handle to the channel on success.
903 // On error an empty string is returned.
904 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin
,
905 int /* render_frame_id */,
908 std::string
/* mime_type */,
909 IPC::ChannelHandle
/* channel_handle */,
910 content::WebPluginInfo
/* info */)
912 // A renderer sends this to the browser process when it wants to create a ppapi
913 // plugin. The browser will create the plugin process if necessary, and will
914 // return a handle to the channel on success.
916 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
917 // process. This ID is valid only in the context of the browser process and is
918 // used to identify the proper process when the renderer notifies it that the
921 // On error an empty string and null handles are returned.
922 IPC_SYNC_MESSAGE_CONTROL1_3(FrameHostMsg_OpenChannelToPepperPlugin
,
923 base::FilePath
/* path */,
924 IPC::ChannelHandle
/* handle to channel */,
925 base::ProcessId
/* plugin_pid */,
926 int /* plugin_child_id */)
928 // Message from the renderer to the browser indicating the in-process instance
930 IPC_MESSAGE_CONTROL2(FrameHostMsg_DidCreateInProcessInstance
,
931 int32
/* instance */,
932 content::PepperRendererInstanceData
/* instance_data */)
934 // Message from the renderer to the browser indicating the in-process instance
935 // has been destroyed.
936 IPC_MESSAGE_CONTROL1(FrameHostMsg_DidDeleteInProcessInstance
,
937 int32
/* instance */)
939 // Notification that a plugin has created a new plugin instance. The parameters
941 // - The plugin process ID that we're creating the instance for.
942 // - The instance ID of the instance being created.
943 // - A PepperRendererInstanceData struct which contains properties from the
944 // renderer which are associated with the plugin instance. This includes the
945 // routing ID of the associated RenderFrame and the URL of plugin.
946 // - Whether the plugin we're creating an instance for is external or internal.
948 // This message must be sync even though it returns no parameters to avoid
949 // a race condition with the plugin process. The plugin process sends messages
950 // to the browser that assume the browser knows about the instance. We need to
951 // make sure that the browser actually knows about the instance before we tell
952 // the plugin to run.
953 IPC_SYNC_MESSAGE_CONTROL4_0(
954 FrameHostMsg_DidCreateOutOfProcessPepperInstance
,
955 int /* plugin_child_id */,
956 int32
/* pp_instance */,
957 content::PepperRendererInstanceData
/* creation_data */,
958 bool /* is_external */)
960 // Notification that a plugin has destroyed an instance. This is the opposite of
961 // the "DidCreate" message above.
962 IPC_MESSAGE_CONTROL3(FrameHostMsg_DidDeleteOutOfProcessPepperInstance
,
963 int /* plugin_child_id */,
964 int32
/* pp_instance */,
965 bool /* is_external */)
967 // A renderer sends this to the browser process when it wants to
968 // create a ppapi broker. The browser will create the broker process
969 // if necessary, and will return a handle to the channel on success.
970 // On error an empty string is returned.
971 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
972 IPC_MESSAGE_CONTROL2(FrameHostMsg_OpenChannelToPpapiBroker
,
973 int /* routing_id */,
974 base::FilePath
/* path */)
976 // A renderer sends this to the browser process when it throttles or unthrottles
977 // a plugin instance for the Plugin Power Saver feature.
978 IPC_MESSAGE_CONTROL3(FrameHostMsg_PluginInstanceThrottleStateChange
,
979 int /* plugin_child_id */,
980 int32
/* pp_instance */,
981 bool /* is_throttled */)
982 #endif // defined(ENABLE_PLUGINS)
984 // Acknowledge that we presented an ubercomp frame.
986 // See FrameMsg_CompositorFrameSwapped
987 IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK
,
988 FrameHostMsg_CompositorFrameSwappedACK_Params
/* params */)
990 // Satisfies a Surface destruction dependency associated with |sequence|.
991 IPC_MESSAGE_ROUTED1(FrameHostMsg_SatisfySequence
,
992 cc::SurfaceSequence
/* sequence */)
994 // Creates a destruction dependency for the Surface specified by the given
996 IPC_MESSAGE_ROUTED2(FrameHostMsg_RequireSequence
,
997 cc::SurfaceId
/* surface_id */,
998 cc::SurfaceSequence
/* sequence */)
1000 // Provides the result from handling BeforeUnload. |proceed| matches the return
1001 // value of the frame's beforeunload handler: true if the user decided to
1002 // proceed with leaving the page.
1003 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeforeUnload_ACK
,
1005 base::TimeTicks
/* before_unload_start_time */,
1006 base::TimeTicks
/* before_unload_end_time */)
1008 // Indicates that the current frame has swapped out, after a SwapOut message.
1009 IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK
)
1011 IPC_MESSAGE_ROUTED1(FrameHostMsg_ReclaimCompositorResources
,
1012 FrameHostMsg_ReclaimCompositorResources_Params
/* params */)
1014 // Forwards an input event to a child.
1015 // TODO(nick): Temporary bridge, revisit once the browser process can route
1016 // input directly to subframes. http://crbug.com/339659
1017 IPC_MESSAGE_ROUTED1(FrameHostMsg_ForwardInputEvent
,
1018 IPC::WebInputEventPointer
/* event */)
1020 // Tells the parent that a child's frame rect has changed (or the rect/scroll
1021 // position of a child's ancestor has changed).
1022 IPC_MESSAGE_ROUTED1(FrameHostMsg_FrameRectChanged
, gfx::Rect
/* frame_rect */)
1024 // Used to tell the parent that the user right clicked on an area of the
1025 // content area, and a context menu should be shown for it. The params
1026 // object contains information about the node(s) that were selected when the
1027 // user right clicked.
1028 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu
, content::ContextMenuParams
)
1030 // Initial drawing parameters for a child frame that has been swapped out to
1032 IPC_MESSAGE_ROUTED2(FrameHostMsg_InitializeChildFrame
,
1033 gfx::Rect
/* frame_rect */,
1034 float /* scale_factor */)
1036 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was
1037 // requested. The ID is the parameter supplied to
1038 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the
1039 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
1041 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse
,
1043 base::ListValue
/* result */)
1045 // A request to run a JavaScript dialog.
1046 IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage
,
1047 base::string16
/* in - alert message */,
1048 base::string16
/* in - default prompt */,
1049 GURL
/* in - originating page URL */,
1050 content::JavaScriptMessageType
/* in - type */,
1051 bool /* out - success */,
1052 base::string16
/* out - user_input field */)
1054 // Displays a dialog to confirm that the user wants to navigate away from the
1055 // page. Replies true if yes, and false otherwise. The reply string is ignored,
1056 // but is included so that we can use OnJavaScriptMessageBoxClosed.
1057 IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm
,
1058 GURL
, /* in - originating frame URL */
1059 base::string16
/* in - alert message */,
1060 bool /* in - is a reload */,
1061 bool /* out - success */,
1062 base::string16
/* out - This is ignored.*/)
1064 // Asks the browser to open the color chooser.
1065 IPC_MESSAGE_ROUTED3(FrameHostMsg_OpenColorChooser
,
1067 SkColor
/* color */,
1068 std::vector
<content::ColorSuggestion
> /* suggestions */)
1070 // Asks the browser to end the color chooser.
1071 IPC_MESSAGE_ROUTED1(FrameHostMsg_EndColorChooser
, int /* id */)
1073 // Change the selected color in the color chooser.
1074 IPC_MESSAGE_ROUTED2(FrameHostMsg_SetSelectedColorInColorChooser
,
1076 SkColor
/* color */)
1078 // Notifies the browser that media has started/stopped playing.
1079 IPC_MESSAGE_ROUTED4(FrameHostMsg_MediaPlayingNotification
,
1080 int64
/* player_cookie, distinguishes instances */,
1081 bool /* has_video */,
1082 bool /* has_audio */,
1083 bool /* is_remote */)
1085 IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification
,
1086 int64
/* player_cookie, distinguishes instances */)
1088 // Notify browser the theme color has been changed.
1089 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeThemeColor
,
1090 SkColor
/* theme_color */)
1092 // Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
1093 // |endOffset| are the offsets of the selection in the returned |content|.
1094 IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse
,
1095 base::string16
, /* content */
1096 size_t, /* startOffset */
1097 size_t /* endOffset */)
1099 // Register a new handler for URL requests with the given scheme.
1100 IPC_MESSAGE_ROUTED4(FrameHostMsg_RegisterProtocolHandler
,
1101 std::string
/* scheme */,
1103 base::string16
/* title */,
1104 bool /* user_gesture */)
1106 // Unregister the registered handler for URL requests with the given scheme.
1107 IPC_MESSAGE_ROUTED3(FrameHostMsg_UnregisterProtocolHandler
,
1108 std::string
/* scheme */,
1110 bool /* user_gesture */)
1112 // Sent when the renderer loads a resource from its memory cache.
1113 // The security info is non empty if the resource was originally loaded over
1114 // a secure connection.
1115 // Note: May only be sent once per URL per frame per committed load.
1116 IPC_MESSAGE_ROUTED5(FrameHostMsg_DidLoadResourceFromMemoryCache
,
1118 std::string
/* security info */,
1119 std::string
/* http method */,
1120 std::string
/* mime type */,
1121 content::ResourceType
/* resource type */)
1124 // Tells the browser to perform a navigation.
1125 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeginNavigation
,
1126 content::CommonNavigationParams
,
1127 content::BeginNavigationParams
,
1128 scoped_refptr
<content::ResourceRequestBody
>)
1130 // Sent as a response to FrameMsg_VisualStateRequest.
1131 // The message is delivered using RenderWidget::QueueMessage.
1132 IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse
, uint64
/* id */)
1134 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1135 // See the comment in chrome/browser/ui/browser.h for more details.
1136 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen
, bool /* enter_fullscreen */)
1138 // Dispatch a load event for this frame in the iframe element of an
1139 // out-of-process parent frame.
1140 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad
)
1142 // Sent to the browser from a frame proxy to post a message to the frame's
1144 IPC_MESSAGE_ROUTED1(FrameHostMsg_RouteMessageEvent
,
1145 FrameMsg_PostMessage_Params
)
1147 // Sent when the renderer displays insecure content in a secure origin.
1148 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDisplayInsecureContent
)
1150 // Sent when the renderer runs insecure content in a secure origin.
1151 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidRunInsecureContent
,
1152 std::string
/* security_origin */,
1153 GURL
/* target URL */)
1155 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1157 // Message to show/hide a popup menu using native controls.
1158 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup
,
1159 FrameHostMsg_ShowPopup_Params
)
1160 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup
)
1164 // Adding a new message? Stick to the sort order above: first platform
1165 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1166 // platform independent FrameHostMsg, then ifdefs for platform specific