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