1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // IPC messages for interacting with frames.
6 // Multiply-included message file, hence no include guard.
8 #include "content/common/content_export.h"
9 #include "content/common/content_param_traits.h"
10 #include "content/common/frame_message_enums.h"
11 #include "content/common/frame_param.h"
12 #include "content/common/navigation_gesture.h"
13 #include "content/common/resource_request_body.h"
14 #include "content/public/common/color_suggestion.h"
15 #include "content/public/common/common_param_traits.h"
16 #include "content/public/common/context_menu_params.h"
17 #include "content/public/common/frame_navigate_params.h"
18 #include "content/public/common/javascript_message_type.h"
19 #include "content/public/common/page_state.h"
20 #include "ipc/ipc_message_macros.h"
21 #include "ui/gfx/ipc/gfx_param_traits.h"
24 #undef IPC_MESSAGE_EXPORT
25 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
27 #define IPC_MESSAGE_START FrameMsgStart
29 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType
,
30 content::JAVASCRIPT_MESSAGE_TYPE_ALERT
,
31 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT
)
32 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value
,
33 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST
)
34 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType
,
35 blink::WebContextMenuData::MediaTypeLast
)
36 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType
, ui::MENU_SOURCE_TYPE_LAST
)
38 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion
)
39 IPC_STRUCT_TRAITS_MEMBER(color
)
40 IPC_STRUCT_TRAITS_MEMBER(label
)
41 IPC_STRUCT_TRAITS_END()
43 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams
)
44 IPC_STRUCT_TRAITS_MEMBER(media_type
)
45 IPC_STRUCT_TRAITS_MEMBER(x
)
46 IPC_STRUCT_TRAITS_MEMBER(y
)
47 IPC_STRUCT_TRAITS_MEMBER(link_url
)
48 IPC_STRUCT_TRAITS_MEMBER(link_text
)
49 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url
)
50 IPC_STRUCT_TRAITS_MEMBER(src_url
)
51 IPC_STRUCT_TRAITS_MEMBER(has_image_contents
)
52 IPC_STRUCT_TRAITS_MEMBER(page_url
)
53 IPC_STRUCT_TRAITS_MEMBER(keyword_url
)
54 IPC_STRUCT_TRAITS_MEMBER(frame_url
)
55 IPC_STRUCT_TRAITS_MEMBER(frame_page_state
)
56 IPC_STRUCT_TRAITS_MEMBER(media_flags
)
57 IPC_STRUCT_TRAITS_MEMBER(selection_text
)
58 IPC_STRUCT_TRAITS_MEMBER(suggested_filename
)
59 IPC_STRUCT_TRAITS_MEMBER(misspelled_word
)
60 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash
)
61 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions
)
62 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled
)
63 IPC_STRUCT_TRAITS_MEMBER(is_editable
)
64 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default
)
65 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right
)
66 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left
)
67 IPC_STRUCT_TRAITS_MEMBER(edit_flags
)
68 IPC_STRUCT_TRAITS_MEMBER(security_info
)
69 IPC_STRUCT_TRAITS_MEMBER(frame_charset
)
70 IPC_STRUCT_TRAITS_MEMBER(referrer_policy
)
71 IPC_STRUCT_TRAITS_MEMBER(custom_context
)
72 IPC_STRUCT_TRAITS_MEMBER(custom_items
)
73 IPC_STRUCT_TRAITS_MEMBER(source_type
)
74 #if defined(OS_ANDROID)
75 IPC_STRUCT_TRAITS_MEMBER(selection_start
)
76 IPC_STRUCT_TRAITS_MEMBER(selection_end
)
78 IPC_STRUCT_TRAITS_END()
80 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext
)
81 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu
)
82 IPC_STRUCT_TRAITS_MEMBER(request_id
)
83 IPC_STRUCT_TRAITS_MEMBER(render_widget_id
)
84 IPC_STRUCT_TRAITS_END()
86 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params
)
87 // Error code as reported in the DidFailProvisionalLoad callback.
88 IPC_STRUCT_MEMBER(int, error_code
)
89 // An error message generated from the error_code. This can be an empty
90 // string if we were unable to find a meaningful description.
91 IPC_STRUCT_MEMBER(base::string16
, error_description
)
92 // The URL that the error is reported for.
93 IPC_STRUCT_MEMBER(GURL
, url
)
94 // True if the failure is the result of navigating to a POST again
95 // and we're going to show the POST interstitial.
96 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial
)
99 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams
)
100 IPC_STRUCT_TRAITS_MEMBER(page_id
)
101 IPC_STRUCT_TRAITS_MEMBER(url
)
102 IPC_STRUCT_TRAITS_MEMBER(base_url
)
103 IPC_STRUCT_TRAITS_MEMBER(referrer
)
104 IPC_STRUCT_TRAITS_MEMBER(transition
)
105 IPC_STRUCT_TRAITS_MEMBER(redirects
)
106 IPC_STRUCT_TRAITS_MEMBER(should_update_history
)
107 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url
)
108 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding
)
109 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type
)
110 IPC_STRUCT_TRAITS_MEMBER(socket_address
)
111 IPC_STRUCT_TRAITS_END()
113 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has
114 // too many data parameters to be reasonably put in a predefined IPC message.
115 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params
,
116 content::FrameNavigateParams
)
117 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams
)
119 // Information regarding the security of the connection (empty if the
120 // connection was not secure).
121 IPC_STRUCT_MEMBER(std::string
, security_info
)
123 // The gesture that initiated this navigation.
124 IPC_STRUCT_MEMBER(content::NavigationGesture
, gesture
)
126 // True if this was a post request.
127 IPC_STRUCT_MEMBER(bool, is_post
)
129 // The POST body identifier. -1 if it doesn't exist.
130 IPC_STRUCT_MEMBER(int64
, post_id
)
132 // Whether the frame navigation resulted in no change to the documents within
133 // the page. For example, the navigation may have just resulted in scrolling
134 // to a named anchor.
135 IPC_STRUCT_MEMBER(bool, was_within_same_page
)
137 // The status code of the HTTP request.
138 IPC_STRUCT_MEMBER(int, http_status_code
)
140 // True if the connection was proxied. In this case, socket_address
141 // will represent the address of the proxy, rather than the remote host.
142 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy
)
144 // Serialized history item state to store in the navigation entry.
145 IPC_STRUCT_MEMBER(content::PageState
, page_state
)
147 // Original request's URL.
148 IPC_STRUCT_MEMBER(GURL
, original_request_url
)
150 // User agent override used to navigate.
151 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
153 // Notifies the browser that for this navigation, the session history was
154 // successfully cleared.
155 IPC_STRUCT_MEMBER(bool, history_list_was_cleared
)
158 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params
)
159 // The page_id for this navigation, or -1 if it is a new navigation. Back,
160 // Forward, and Reload navigations should have a valid page_id. If the load
161 // succeeds, then this page_id will be reflected in the resultant
162 // FrameHostMsg_DidCommitProvisionalLoad message.
163 IPC_STRUCT_MEMBER(int32
, page_id
)
165 // If page_id is -1, then pending_history_list_offset will also be -1.
166 // Otherwise, it contains the offset into the history list corresponding to
167 // the current navigation.
168 IPC_STRUCT_MEMBER(int, pending_history_list_offset
)
170 // Informs the RenderView of where its current page contents reside in
171 // session history and the total size of the session history list.
172 IPC_STRUCT_MEMBER(int, current_history_list_offset
)
173 IPC_STRUCT_MEMBER(int, current_history_list_length
)
175 // Informs the RenderView the session history should be cleared. In that
176 // case, the RenderView needs to notify the browser that the clearing was
177 // succesful when the navigation commits.
178 IPC_STRUCT_MEMBER(bool, should_clear_history_list
)
181 IPC_STRUCT_MEMBER(GURL
, url
)
183 // Base URL for use in WebKit's SubstituteData.
184 // Is only used with data: URLs.
185 IPC_STRUCT_MEMBER(GURL
, base_url_for_data_url
)
187 // History URL for use in WebKit's SubstituteData.
188 // Is only used with data: URLs.
189 IPC_STRUCT_MEMBER(GURL
, history_url_for_data_url
)
191 // The URL to send in the "Referer" header field. Can be empty if there is
193 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
195 // Any redirect URLs that occurred before |url|. Useful for cross-process
196 // navigations; defaults to empty.
197 IPC_STRUCT_MEMBER(std::vector
<GURL
>, redirects
)
199 // The type of transition.
200 IPC_STRUCT_MEMBER(content::PageTransition
, transition
)
202 // Informs the RenderView the pending navigation should replace the current
203 // history entry when it commits. This is used for cross-process redirects so
204 // the transferred navigation can recover the navigation state.
205 IPC_STRUCT_MEMBER(bool, should_replace_current_entry
)
207 // Opaque history state (received by ViewHostMsg_UpdateState).
208 IPC_STRUCT_MEMBER(content::PageState
, page_state
)
210 // Type of navigation.
211 IPC_STRUCT_MEMBER(FrameMsg_Navigate_Type::Value
, navigation_type
)
213 // The time the request was created. This is used by the old performance
214 // infrastructure to set up DocumentState associated with the RenderView.
215 // TODO(ppi): make it go away.
216 IPC_STRUCT_MEMBER(base::Time
, request_time
)
218 // Extra headers (separated by \n) to send during the request.
219 IPC_STRUCT_MEMBER(std::string
, extra_headers
)
221 // The following two members identify a previous request that has been
222 // created before this navigation is being transferred to a new render view.
223 // This serves the purpose of recycling the old request.
224 // Unless this refers to a transferred navigation, these values are -1 and -1.
225 IPC_STRUCT_MEMBER(int, transferred_request_child_id
)
226 IPC_STRUCT_MEMBER(int, transferred_request_request_id
)
228 // Whether or not we should allow the url to download.
229 IPC_STRUCT_MEMBER(bool, allow_download
)
231 // Whether or not the user agent override string should be used.
232 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
234 // True if this was a post request.
235 IPC_STRUCT_MEMBER(bool, is_post
)
237 // If is_post is true, holds the post_data information from browser. Empty
239 IPC_STRUCT_MEMBER(std::vector
<unsigned char>, browser_initiated_post_data
)
241 // Whether or not this url should be allowed to access local file://
243 IPC_STRUCT_MEMBER(bool, can_load_local_resources
)
245 // If not empty, which frame to navigate.
246 IPC_STRUCT_MEMBER(std::string
, frame_to_navigate
)
248 // The navigationStart time to expose through the Navigation Timing API to JS.
249 IPC_STRUCT_MEMBER(base::TimeTicks
, browser_navigation_start
)
252 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params
)
253 IPC_STRUCT_MEMBER(GURL
, url
)
254 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
255 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
256 IPC_STRUCT_MEMBER(bool, should_replace_current_entry
)
257 IPC_STRUCT_MEMBER(bool, user_gesture
)
260 IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params
)
261 // The request method: GET, POST, etc.
262 IPC_STRUCT_MEMBER(std::string
, method
)
264 // The requested URL.
265 IPC_STRUCT_MEMBER(GURL
, url
)
267 // The referrer to use (may be empty).
268 IPC_STRUCT_MEMBER(GURL
, referrer
)
270 // The referrer policy to use.
271 IPC_STRUCT_MEMBER(blink::WebReferrerPolicy
, referrer_policy
)
273 // Additional HTTP request headers.
274 IPC_STRUCT_MEMBER(std::string
, headers
)
276 // net::URLRequest load flags (net::LOAD_NORMAL | net::LOAD_ENABLE_LOAD_TIMING
278 IPC_STRUCT_MEMBER(int, load_flags
)
280 // Optional resource request body (may be null).
281 IPC_STRUCT_MEMBER(scoped_refptr
<content::ResourceRequestBody
>,
284 // True if the request was user initiated.
285 IPC_STRUCT_MEMBER(bool, has_user_gesture
)
287 IPC_STRUCT_MEMBER(content::PageTransition
, transition_type
)
289 // Whether this navigation should replace the current session history entry on
291 IPC_STRUCT_MEMBER(bool, should_replace_current_entry
)
293 // Whether or not we should allow the URL to download.
294 IPC_STRUCT_MEMBER(bool, allow_download
)
297 // -----------------------------------------------------------------------------
298 // Messages sent from the browser to the renderer.
300 // When HW accelerated buffers are swapped in an out-of-process child frame
301 // renderer, the message is forwarded to the embedding frame to notify it of
302 // a new texture available for compositing. When the buffer has finished
303 // presenting, a FrameHostMsg_BuffersSwappedACK should be sent back to
304 // gpu host that produced this buffer.
306 // This is used in the non-ubercomp HW accelerated compositing path.
307 IPC_MESSAGE_ROUTED1(FrameMsg_BuffersSwapped
,
308 FrameMsg_BuffersSwapped_Params
/* params */)
310 // Notifies the embedding frame that a new CompositorFrame is ready to be
311 // presented. When the frame finishes presenting, a matching
312 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
313 // RenderViewHost that was produced the CompositorFrame.
315 // This is used in the ubercomp compositing path.
316 IPC_MESSAGE_ROUTED1(FrameMsg_CompositorFrameSwapped
,
317 FrameMsg_CompositorFrameSwapped_Params
/* params */)
319 // Notifies the embedding frame that the process rendering the child frame's
320 // contents has terminated.
321 IPC_MESSAGE_ROUTED0(FrameMsg_ChildFrameProcessGone
)
323 // Sent in response to a FrameHostMsg_ContextMenu to let the renderer know that
324 // the menu has been closed.
325 IPC_MESSAGE_ROUTED1(FrameMsg_ContextMenuClosed
,
326 content::CustomContextMenuContext
/* custom_context */)
328 // Executes custom context menu action that was provided from Blink.
329 IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction
,
330 content::CustomContextMenuContext
/* custom_context */,
331 unsigned /* action */)
333 // Tells the renderer to perform the specified navigation, interrupting any
334 // existing navigation.
335 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate
, FrameMsg_Navigate_Params
)
337 // Instructs the renderer to invoke the frame's beforeunload event handler.
338 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK.
339 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload
)
341 // Instructs the frame to swap out for a cross-site transition, including
342 // running the unload event handler and creating a RenderFrameProxy with the
343 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished.
344 IPC_MESSAGE_ROUTED1(FrameMsg_SwapOut
,
345 int /* proxy_routing_id */)
347 // Request for the renderer to insert CSS into the frame.
348 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest
,
349 std::string
/* css */)
351 // Request for the renderer to execute JavaScript in the frame's context.
353 // javascript is the string containing the JavaScript to be executed in the
354 // target frame's context.
356 // If the third parameter is true the result is sent back to the browser using
357 // the message FrameHostMsg_JavaScriptExecuteResponse.
358 // FrameHostMsg_JavaScriptExecuteResponse is passed the ID parameter so that the
359 // host can uniquely identify the request.
360 IPC_MESSAGE_ROUTED3(FrameMsg_JavaScriptExecuteRequest
,
361 base::string16
, /* javascript */
363 bool /* if true, a reply is requested */)
365 // Selects between the given start and end offsets in the currently focused
367 IPC_MESSAGE_ROUTED2(FrameMsg_SetEditableSelectionOffsets
,
371 // Tells the renderer to reload the frame, optionally ignoring the cache while
373 IPC_MESSAGE_ROUTED1(FrameMsg_Reload
,
374 bool /* ignore_cache */)
376 // Notifies the color chooser client that the user selected a color.
377 IPC_MESSAGE_ROUTED2(FrameMsg_DidChooseColorResponse
, unsigned, SkColor
)
379 // Notifies the color chooser client that the color chooser has ended.
380 IPC_MESSAGE_ROUTED1(FrameMsg_DidEndColorChooser
, unsigned)
382 // Notifies the corresponding RenderFrameProxy object to replace itself with the
383 // RenderFrame object it is associated with.
384 IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy
)
386 // Request the text surrounding the selection with a |max_length|. The response
387 // will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
388 IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest
,
389 size_t /* max_length */)
391 // Tells the renderer to insert a link to the specified stylesheet. This is
392 // needed to support navigation transitions.
393 IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL
, std::string
)
395 // -----------------------------------------------------------------------------
396 // Messages sent from the renderer to the browser.
398 // Blink and JavaScript error messages to log to the console
400 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole
,
401 int32
, /* log level */
402 base::string16
, /* msg */
403 int32
, /* line number */
404 base::string16
/* source id */ )
406 // Sent by the renderer when a child frame is created in the renderer.
408 // Each of these messages will have a corresponding FrameHostMsg_Detach message
409 // sent when the frame is detached from the DOM.
410 IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_CreateChildFrame
,
411 int32
/* parent_routing_id */,
412 std::string
/* frame_name */,
413 int32
/* new_routing_id */)
415 // Sent by the renderer to the parent RenderFrameHost when a child frame is
416 // detached from the DOM.
417 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach
)
419 // Sent by the renderer when the frame becomes focused.
420 IPC_MESSAGE_ROUTED0(FrameHostMsg_FrameFocused
)
422 // Sent when the renderer starts a provisional load for a frame.
423 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartProvisionalLoadForFrame
,
426 // Sent when the renderer fails a provisional load with an error.
427 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFailProvisionalLoadWithError
,
428 FrameHostMsg_DidFailProvisionalLoadWithError_Params
)
430 // Sent when a provisional load on the main frame redirects.
431 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidRedirectProvisionalLoad
,
433 GURL
/* source_url*/,
434 GURL
/* target_url */)
436 // Notifies the browser that a frame in the view has changed. This message
437 // has a lot of parameters and is packed/unpacked by functions defined in
438 // render_messages.h.
439 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidCommitProvisionalLoad
,
440 FrameHostMsg_DidCommitProvisionalLoad_Params
)
442 // Notifies the browser that a document has been loaded.
443 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFinishDocumentLoad
)
445 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidFailLoadWithError
,
446 GURL
/* validated_url */,
447 int /* error_code */,
448 base::string16
/* error_description */)
450 // Sent when the renderer starts loading the page. |to_different_document| will
451 // be true unless the load is a fragment navigation, or triggered by
452 // history.pushState/replaceState.
453 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading
,
454 bool /* to_different_document */)
456 // Sent when the renderer is done loading a page.
457 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading
)
459 // Sent when the renderer changed the progress of a load.
460 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress
,
461 double /* load_progress */)
463 // Requests that the given URL be opened in the specified manner.
464 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL
, FrameHostMsg_OpenURL_Params
)
466 // Notifies the browser that a frame finished loading.
467 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFinishLoad
,
468 GURL
/* validated_url */)
470 // Sent when after the onload handler has been invoked for the document
471 // in this frame. Sent for top-level frames.
472 IPC_MESSAGE_ROUTED0(FrameHostMsg_DocumentOnLoadCompleted
)
474 // Notifies that the initial empty document of a view has been accessed.
475 // After this, it is no longer safe to show a pending navigation's URL without
476 // making a URL spoof possible.
477 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidAccessInitialDocument
)
479 // Sent when the frame sets its opener to null, disowning it for the lifetime of
480 // the window. Sent for top-level frames.
481 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidDisownOpener
)
483 // Changes the title for the page in the UI when the page is navigated or the
484 // title changes. Sent for top-level frames.
485 IPC_MESSAGE_ROUTED3(FrameHostMsg_UpdateTitle
,
487 base::string16
/* title */,
488 blink::WebTextDirection
/* title direction */)
490 // Change the encoding name of the page in UI when the page has detected
491 // proper encoding name. Sent for top-level frames.
492 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding
,
493 std::string
/* new encoding name */)
495 // Following message is used to communicate the values received by the
496 // callback binding the JS to Cpp.
497 // An instance of browser that has an automation host listening to it can
498 // have a javascript send a native value (string, number, boolean) to the
499 // listener in Cpp. (DomAutomationController)
500 IPC_MESSAGE_ROUTED2(FrameHostMsg_DomOperationResponse
,
501 std::string
/* json_string */,
502 int /* automation_id */)
504 // Sent to the browser when the renderer detects it is blocked on a pepper
505 // plugin message for too long. This is also sent when it becomes unhung
506 // (according to the value of is_hung). The browser can give the user the
507 // option of killing the plugin.
508 IPC_MESSAGE_ROUTED3(FrameHostMsg_PepperPluginHung
,
509 int /* plugin_child_id */,
510 base::FilePath
/* path */,
513 // Sent by the renderer process to indicate that a plugin instance has crashed.
514 // Note: |plugin_pid| should not be trusted. The corresponding process has
515 // probably died. Moreover, the ID may have been reused by a new process. Any
516 // usage other than displaying it in a prompt to the user is very likely to be
518 IPC_MESSAGE_ROUTED2(FrameHostMsg_PluginCrashed
,
519 base::FilePath
/* plugin_path */,
520 base::ProcessId
/* plugin_pid */)
522 // Return information about a plugin for the given URL and MIME
523 // type. If there is no matching plugin, |found| is false.
524 // |actual_mime_type| is the actual mime type supported by the
526 IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo
,
527 int /* render_frame_id */,
530 std::string
/* mime_type */,
532 content::WebPluginInfo
/* plugin info */,
533 std::string
/* actual_mime_type */)
535 // A renderer sends this to the browser process when it wants to
536 // create a plugin. The browser will create the plugin process if
537 // necessary, and will return a handle to the channel on success.
538 // On error an empty string is returned.
539 IPC_SYNC_MESSAGE_CONTROL4_2(FrameHostMsg_OpenChannelToPlugin
,
540 int /* render_frame_id */,
543 std::string
/* mime_type */,
544 IPC::ChannelHandle
/* channel_handle */,
545 content::WebPluginInfo
/* info */)
547 // Acknowledge that we presented a HW buffer and provide a sync point
548 // to specify the location in the command stream when the compositor
549 // is no longer using it.
551 // See FrameMsg_BuffersSwapped.
552 IPC_MESSAGE_ROUTED1(FrameHostMsg_BuffersSwappedACK
,
553 FrameHostMsg_BuffersSwappedACK_Params
/* params */)
555 // Acknowledge that we presented an ubercomp frame.
557 // See FrameMsg_CompositorFrameSwapped
558 IPC_MESSAGE_ROUTED1(FrameHostMsg_CompositorFrameSwappedACK
,
559 FrameHostMsg_CompositorFrameSwappedACK_Params
/* params */)
561 // Provides the result from handling BeforeUnload. |proceed| matches the return
562 // value of the frame's beforeunload handler: true if the user decided to
563 // proceed with leaving the page.
564 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeforeUnload_ACK
,
566 base::TimeTicks
/* before_unload_start_time */,
567 base::TimeTicks
/* before_unload_end_time */)
569 // Indicates that the current frame has swapped out, after a SwapOut message.
570 IPC_MESSAGE_ROUTED0(FrameHostMsg_SwapOut_ACK
)
572 IPC_MESSAGE_ROUTED1(FrameHostMsg_ReclaimCompositorResources
,
573 FrameHostMsg_ReclaimCompositorResources_Params
/* params */)
575 // Forwards an input event to a child.
576 // TODO(nick): Temporary bridge, revisit once the browser process can route
577 // input directly to subframes. http://crbug.com/339659
578 IPC_MESSAGE_ROUTED1(FrameHostMsg_ForwardInputEvent
,
579 IPC::WebInputEventPointer
/* event */)
581 // Used to tell the parent that the user right clicked on an area of the
582 // content area, and a context menu should be shown for it. The params
583 // object contains information about the node(s) that were selected when the
584 // user right clicked.
585 IPC_MESSAGE_ROUTED1(FrameHostMsg_ContextMenu
, content::ContextMenuParams
)
587 // Sent when the renderer detects an XSS in a page.
588 IPC_MESSAGE_ROUTED3(FrameHostMsg_DidDetectXSS
,
591 bool /* blocked entire page */)
593 // Initial drawing parameters for a child frame that has been swapped out to
595 IPC_MESSAGE_ROUTED2(FrameHostMsg_InitializeChildFrame
,
596 gfx::Rect
/* frame_rect */,
597 float /* scale_factor */)
599 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was
600 // requested. The ID is the parameter supplied to
601 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the
602 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
604 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse
,
606 base::ListValue
/* result */)
608 // A request to run a JavaScript dialog.
609 IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage
,
610 base::string16
/* in - alert message */,
611 base::string16
/* in - default prompt */,
612 GURL
/* in - originating page URL */,
613 content::JavaScriptMessageType
/* in - type */,
614 bool /* out - success */,
615 base::string16
/* out - user_input field */)
617 // Displays a dialog to confirm that the user wants to navigate away from the
618 // page. Replies true if yes, and false otherwise. The reply string is ignored,
619 // but is included so that we can use OnJavaScriptMessageBoxClosed.
620 IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm
,
621 GURL
, /* in - originating frame URL */
622 base::string16
/* in - alert message */,
623 bool /* in - is a reload */,
624 bool /* out - success */,
625 base::string16
/* out - This is ignored.*/)
627 // Asks the browser to open the color chooser.
628 IPC_MESSAGE_ROUTED3(FrameHostMsg_OpenColorChooser
,
631 std::vector
<content::ColorSuggestion
> /* suggestions */)
633 // Asks the browser to end the color chooser.
634 IPC_MESSAGE_ROUTED1(FrameHostMsg_EndColorChooser
, int /* id */)
636 // Change the selected color in the color chooser.
637 IPC_MESSAGE_ROUTED2(FrameHostMsg_SetSelectedColorInColorChooser
,
641 // Notifies the browser that media has started/stopped playing.
642 IPC_MESSAGE_ROUTED3(FrameHostMsg_MediaPlayingNotification
,
643 int64
/* player_cookie, distinguishes instances */,
644 bool /* has_video */,
645 bool /* has_audio */)
647 IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification
,
648 int64
/* player_cookie, distinguishes instances */)
650 // Notify browser the theme color has been changed.
651 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeThemeColor
,
652 SkColor
/* theme_color */)
654 // Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
655 // |endOffset| are the offsets of the selection in the returned |content|.
656 IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse
,
657 base::string16
, /* content */
658 size_t, /* startOffset */
659 size_t /* endOffset */)
661 // Notifies the browser that the renderer has a pending navigation transition.
662 IPC_MESSAGE_CONTROL2(FrameHostMsg_SetHasPendingTransitionRequest
,
663 int /* render_frame_id */,
664 bool /* is_transition */)
666 // Tells the browser to perform a navigation.
667 IPC_MESSAGE_ROUTED1(FrameHostMsg_BeginNavigation
,
668 FrameHostMsg_BeginNavigation_Params
)