1 // Copyright (c) 2012 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 page rendering.
6 // Multiply-included message file, hence no include guard.
8 #include "base/process.h"
9 #include "base/shared_memory.h"
10 #include "base/string16.h"
11 #include "cc/compositor_frame.h"
12 #include "cc/compositor_frame_ack.h"
13 #include "content/common/content_export.h"
14 #include "content/common/content_param_traits.h"
15 #include "content/common/edit_command.h"
16 #include "content/common/navigation_gesture.h"
17 #include "content/common/pepper_renderer_instance_data.h"
18 #include "content/common/view_message_enums.h"
19 #include "content/port/common/input_event_ack_state.h"
20 #include "content/public/common/common_param_traits.h"
21 #include "content/public/common/context_menu_params.h"
22 #include "content/public/common/file_chooser_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/page_zoom.h"
26 #include "content/public/common/referrer.h"
27 #include "content/public/common/renderer_preferences.h"
28 #include "content/public/common/stop_find_action.h"
29 #include "content/public/common/three_d_api_types.h"
30 #include "content/public/common/window_container_type.h"
31 #include "ipc/ipc_channel_handle.h"
32 #include "ipc/ipc_message_macros.h"
33 #include "ipc/ipc_platform_file.h"
34 #include "media/base/channel_layout.h"
35 #include "media/base/media_log_event.h"
36 #include "third_party/skia/include/core/SkBitmap.h"
37 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
38 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginAction.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
47 #include "ui/base/dialogs/selected_file_info.h"
48 #include "ui/base/ime/text_input_type.h"
49 #include "ui/base/range/range.h"
50 #include "ui/gfx/point.h"
51 #include "ui/gfx/rect.h"
52 #include "ui/gfx/rect_f.h"
53 #include "ui/gfx/vector2d.h"
54 #include "webkit/glue/webcookie.h"
55 #include "webkit/glue/webmenuitem.h"
56 #include "webkit/plugins/npapi/webplugin.h"
58 #if defined(OS_MACOSX)
59 #include "content/common/mac/font_descriptor.h"
62 #undef IPC_MESSAGE_EXPORT
63 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
65 #define IPC_MESSAGE_START ViewMsgStart
67 IPC_ENUM_TRAITS(AccessibilityMode
)
68 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value
)
69 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType
)
70 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type
)
71 IPC_ENUM_TRAITS(WebKit::WebPluginAction::Type
)
72 IPC_ENUM_TRAITS(WebKit::WebPopupType
)
73 IPC_ENUM_TRAITS(WebKit::WebTextDirection
)
74 IPC_ENUM_TRAITS(WebMenuItem::Type
)
75 IPC_ENUM_TRAITS(WindowContainerType
)
76 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
77 IPC_ENUM_TRAITS(content::InputEventAckState
)
78 IPC_ENUM_TRAITS(content::JavaScriptMessageType
)
79 IPC_ENUM_TRAITS(content::NavigationGesture
)
80 IPC_ENUM_TRAITS(content::PageZoom
)
81 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum
)
82 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum
)
83 IPC_ENUM_TRAITS(content::StopFindAction
)
84 IPC_ENUM_TRAITS(content::ThreeDAPIType
)
85 IPC_ENUM_TRAITS(media::ChannelLayout
)
86 IPC_ENUM_TRAITS(media::MediaLogEvent::Type
)
87 IPC_ENUM_TRAITS(ui::TextInputType
)
89 #if defined(OS_MACOSX)
90 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
91 IPC_STRUCT_TRAITS_MEMBER(font_name
)
92 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
93 IPC_STRUCT_TRAITS_END()
96 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCompositionUnderline
)
97 IPC_STRUCT_TRAITS_MEMBER(startOffset
)
98 IPC_STRUCT_TRAITS_MEMBER(endOffset
)
99 IPC_STRUCT_TRAITS_MEMBER(color
)
100 IPC_STRUCT_TRAITS_MEMBER(thick
)
101 IPC_STRUCT_TRAITS_END()
103 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFindOptions
)
104 IPC_STRUCT_TRAITS_MEMBER(forward
)
105 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
106 IPC_STRUCT_TRAITS_MEMBER(findNext
)
107 IPC_STRUCT_TRAITS_END()
109 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction
)
110 IPC_STRUCT_TRAITS_MEMBER(type
)
111 IPC_STRUCT_TRAITS_MEMBER(enable
)
112 IPC_STRUCT_TRAITS_END()
114 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebPluginAction
)
115 IPC_STRUCT_TRAITS_MEMBER(type
)
116 IPC_STRUCT_TRAITS_MEMBER(enable
)
117 IPC_STRUCT_TRAITS_END()
119 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatPoint
)
120 IPC_STRUCT_TRAITS_MEMBER(x
)
121 IPC_STRUCT_TRAITS_MEMBER(y
)
122 IPC_STRUCT_TRAITS_END()
124 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatRect
)
125 IPC_STRUCT_TRAITS_MEMBER(x
)
126 IPC_STRUCT_TRAITS_MEMBER(y
)
127 IPC_STRUCT_TRAITS_MEMBER(width
)
128 IPC_STRUCT_TRAITS_MEMBER(height
)
129 IPC_STRUCT_TRAITS_END()
131 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo
)
132 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
133 IPC_STRUCT_TRAITS_MEMBER(depth
)
134 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
135 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
136 IPC_STRUCT_TRAITS_MEMBER(rect
)
137 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
138 IPC_STRUCT_TRAITS_END()
140 IPC_STRUCT_TRAITS_BEGIN(WebMenuItem
)
141 IPC_STRUCT_TRAITS_MEMBER(label
)
142 IPC_STRUCT_TRAITS_MEMBER(toolTip
)
143 IPC_STRUCT_TRAITS_MEMBER(type
)
144 IPC_STRUCT_TRAITS_MEMBER(action
)
145 IPC_STRUCT_TRAITS_MEMBER(rtl
)
146 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
147 IPC_STRUCT_TRAITS_MEMBER(enabled
)
148 IPC_STRUCT_TRAITS_MEMBER(checked
)
149 IPC_STRUCT_TRAITS_MEMBER(submenu
)
150 IPC_STRUCT_TRAITS_END()
152 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams
)
153 IPC_STRUCT_TRAITS_MEMBER(media_type
)
154 IPC_STRUCT_TRAITS_MEMBER(x
)
155 IPC_STRUCT_TRAITS_MEMBER(y
)
156 IPC_STRUCT_TRAITS_MEMBER(link_url
)
157 IPC_STRUCT_TRAITS_MEMBER(link_text
)
158 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url
)
159 IPC_STRUCT_TRAITS_MEMBER(src_url
)
160 IPC_STRUCT_TRAITS_MEMBER(is_image_blocked
)
161 IPC_STRUCT_TRAITS_MEMBER(page_url
)
162 IPC_STRUCT_TRAITS_MEMBER(keyword_url
)
163 IPC_STRUCT_TRAITS_MEMBER(frame_url
)
164 IPC_STRUCT_TRAITS_MEMBER(frame_content_state
)
165 IPC_STRUCT_TRAITS_MEMBER(media_flags
)
166 IPC_STRUCT_TRAITS_MEMBER(selection_text
)
167 IPC_STRUCT_TRAITS_MEMBER(misspelled_word
)
168 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions
)
169 IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled
)
170 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled
)
171 IPC_STRUCT_TRAITS_MEMBER(is_editable
)
172 #if defined(OS_MACOSX)
173 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default
)
174 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right
)
175 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left
)
177 IPC_STRUCT_TRAITS_MEMBER(edit_flags
)
178 IPC_STRUCT_TRAITS_MEMBER(security_info
)
179 IPC_STRUCT_TRAITS_MEMBER(frame_charset
)
180 IPC_STRUCT_TRAITS_MEMBER(referrer_policy
)
181 IPC_STRUCT_TRAITS_MEMBER(custom_context
)
182 IPC_STRUCT_TRAITS_MEMBER(custom_items
)
183 #if defined(OS_ANDROID)
184 IPC_STRUCT_TRAITS_MEMBER(selection_start
)
185 IPC_STRUCT_TRAITS_MEMBER(selection_end
)
187 IPC_STRUCT_TRAITS_END()
189 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext
)
190 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu
)
191 IPC_STRUCT_TRAITS_MEMBER(request_id
)
192 IPC_STRUCT_TRAITS_MEMBER(render_widget_id
)
193 IPC_STRUCT_TRAITS_END()
195 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand
)
196 IPC_STRUCT_TRAITS_MEMBER(name
)
197 IPC_STRUCT_TRAITS_MEMBER(value
)
198 IPC_STRUCT_TRAITS_END()
200 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
201 IPC_STRUCT_TRAITS_MEMBER(mode
)
202 IPC_STRUCT_TRAITS_MEMBER(title
)
203 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
204 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
205 #if defined(OS_ANDROID)
206 IPC_STRUCT_TRAITS_MEMBER(capture
)
208 IPC_STRUCT_TRAITS_END()
210 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams
)
211 IPC_STRUCT_TRAITS_MEMBER(page_id
)
212 IPC_STRUCT_TRAITS_MEMBER(url
)
213 IPC_STRUCT_TRAITS_MEMBER(base_url
)
214 IPC_STRUCT_TRAITS_MEMBER(referrer
)
215 IPC_STRUCT_TRAITS_MEMBER(transition
)
216 IPC_STRUCT_TRAITS_MEMBER(redirects
)
217 IPC_STRUCT_TRAITS_MEMBER(should_update_history
)
218 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url
)
219 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding
)
220 IPC_STRUCT_TRAITS_MEMBER(password_form
)
221 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type
)
222 IPC_STRUCT_TRAITS_MEMBER(socket_address
)
223 IPC_STRUCT_TRAITS_END()
225 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
226 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
227 IPC_STRUCT_TRAITS_MEMBER(render_view_id
)
228 IPC_STRUCT_TRAITS_MEMBER(document_url
)
229 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
230 IPC_STRUCT_TRAITS_END()
232 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
233 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
234 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
235 IPC_STRUCT_TRAITS_MEMBER(hinting
)
236 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
237 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
238 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
239 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
240 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
241 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
242 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
243 IPC_STRUCT_TRAITS_MEMBER(track_color
)
244 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
245 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
246 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
247 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
248 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests
)
249 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
250 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
251 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
252 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
253 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
254 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
255 IPC_STRUCT_TRAITS_MEMBER(throttle_input_events
)
256 IPC_STRUCT_TRAITS_END()
258 IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebCookie
)
259 IPC_STRUCT_TRAITS_MEMBER(name
)
260 IPC_STRUCT_TRAITS_MEMBER(value
)
261 IPC_STRUCT_TRAITS_MEMBER(domain
)
262 IPC_STRUCT_TRAITS_MEMBER(path
)
263 IPC_STRUCT_TRAITS_MEMBER(expires
)
264 IPC_STRUCT_TRAITS_MEMBER(http_only
)
265 IPC_STRUCT_TRAITS_MEMBER(secure
)
266 IPC_STRUCT_TRAITS_MEMBER(session
)
267 IPC_STRUCT_TRAITS_END()
269 IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginGeometry
)
270 IPC_STRUCT_TRAITS_MEMBER(window
)
271 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
272 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
273 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
274 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
275 IPC_STRUCT_TRAITS_MEMBER(visible
)
276 IPC_STRUCT_TRAITS_END()
278 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
279 IPC_STRUCT_TRAITS_MEMBER(id
)
280 IPC_STRUCT_TRAITS_MEMBER(type
)
281 IPC_STRUCT_TRAITS_MEMBER(params
)
282 IPC_STRUCT_TRAITS_MEMBER(time
)
283 IPC_STRUCT_TRAITS_END()
285 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo
)
286 IPC_STRUCT_TRAITS_MEMBER(file_path
)
287 IPC_STRUCT_TRAITS_MEMBER(local_path
)
288 IPC_STRUCT_TRAITS_MEMBER(display_name
)
289 IPC_STRUCT_TRAITS_END()
291 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
292 // Routing ID of the view initiating the open.
293 IPC_STRUCT_MEMBER(int, opener_id
)
295 // True if this open request came in the context of a user gesture.
296 IPC_STRUCT_MEMBER(bool, user_gesture
)
298 // Type of window requested.
299 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
301 // The session storage namespace ID this view should use.
302 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
304 // The name of the resulting frame that should be created (empty if none
305 // has been specified).
306 IPC_STRUCT_MEMBER(string16
, frame_name
)
308 // The frame identifier of the frame initiating the open.
309 IPC_STRUCT_MEMBER(int64
, opener_frame_id
)
311 // The URL of the frame initiating the open.
312 IPC_STRUCT_MEMBER(GURL
, opener_url
)
314 // The security origin of the frame initiating the open.
315 IPC_STRUCT_MEMBER(std::string
, opener_security_origin
)
317 // Whether the opener will be suppressed in the new window, in which case
318 // scripting the new window is not allowed.
319 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
321 // Whether the window should be opened in the foreground, background, etc.
322 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
324 // The URL that will be loaded in the new window (empty if none has been
326 IPC_STRUCT_MEMBER(GURL
, target_url
)
329 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
330 // The type of input field
331 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
333 // The value of the input field
334 IPC_STRUCT_MEMBER(std::string
, value
)
336 // The cursor position of the current selection start, or the caret position
337 // if nothing is selected
338 IPC_STRUCT_MEMBER(int, selection_start
)
340 // The cursor position of the current selection end, or the caret position
341 // if nothing is selected
342 IPC_STRUCT_MEMBER(int, selection_end
)
344 // The start position of the current composition, or -1 if there is none
345 IPC_STRUCT_MEMBER(int, composition_start
)
347 // The end position of the current composition, or -1 if there is none
348 IPC_STRUCT_MEMBER(int, composition_end
)
350 // Whether or not inline composition can be performed for the current input.
351 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
353 // Whether or not the IME should be shown as a result of this update. Even if
354 // true, the IME will only be shown if the type is appropriate (e.g. not
355 // TEXT_INPUT_TYPE_NONE).
356 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
359 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
360 // URL for the worker script.
361 IPC_STRUCT_MEMBER(GURL
, url
)
363 // Name for a SharedWorker, otherwise empty string.
364 IPC_STRUCT_MEMBER(string16
, name
)
366 // The ID of the parent document (unique within parent renderer).
367 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
369 // RenderView routing id used to send messages back to the parent.
370 IPC_STRUCT_MEMBER(int, render_view_route_id
)
372 // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed,
373 // a new unique ID is created and assigned to the worker.
374 IPC_STRUCT_MEMBER(int, route_id
)
376 // The ID of the appcache the main shared worker script resource was loaded
377 // from, only valid for shared workers.
378 IPC_STRUCT_MEMBER(int64
, script_resource_appcache_id
)
381 // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
382 // parameters to be reasonably put in a predefined IPC message.
383 IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params
,
384 content::FrameNavigateParams
)
385 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams
)
386 // The frame ID for this navigation. The frame ID uniquely identifies the
387 // frame the navigation happened in for a given renderer.
388 IPC_STRUCT_MEMBER(int64
, frame_id
)
390 // Information regarding the security of the connection (empty if the
391 // connection was not secure).
392 IPC_STRUCT_MEMBER(std::string
, security_info
)
394 // The gesture that initiated this navigation.
395 IPC_STRUCT_MEMBER(content::NavigationGesture
, gesture
)
397 // True if this was a post request.
398 IPC_STRUCT_MEMBER(bool, is_post
)
400 // The POST body identifier. -1 if it doesn't exist.
401 IPC_STRUCT_MEMBER(int64
, post_id
)
403 // Whether the frame navigation resulted in no change to the documents within
404 // the page. For example, the navigation may have just resulted in scrolling
405 // to a named anchor.
406 IPC_STRUCT_MEMBER(bool, was_within_same_page
)
408 // The status code of the HTTP request.
409 IPC_STRUCT_MEMBER(int, http_status_code
)
411 // True if the connection was proxied. In this case, socket_address
412 // will represent the address of the proxy, rather than the remote host.
413 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy
)
415 // Serialized history item state to store in the navigation entry.
416 IPC_STRUCT_MEMBER(std::string
, content_state
)
418 // Original request's URL.
419 IPC_STRUCT_MEMBER(GURL
, original_request_url
)
421 // User agent override used to navigate.
422 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
425 // This message is used for supporting popup menus on Mac OS X using native
426 // Cocoa controls. The renderer sends us this message which we use to populate
428 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params
)
429 // Position on the screen.
430 IPC_STRUCT_MEMBER(gfx::Rect
, bounds
)
432 // The height of each item in the menu.
433 IPC_STRUCT_MEMBER(int, item_height
)
435 // The size of the font to use for those items.
436 IPC_STRUCT_MEMBER(double, item_font_size
)
438 // The currently selected (displayed) item in the menu.
439 IPC_STRUCT_MEMBER(int, selected_item
)
441 // The entire list of items in the popup menu.
442 IPC_STRUCT_MEMBER(std::vector
<WebMenuItem
>, popup_items
)
444 // Whether items should be right-aligned.
445 IPC_STRUCT_MEMBER(bool, right_aligned
)
447 // Whether this is a multi-select popup.
448 IPC_STRUCT_MEMBER(bool, allow_multiple_selection
)
451 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
452 // The bitmap to be painted into the view at the locations specified by
454 IPC_STRUCT_MEMBER(TransportDIB::Id
, bitmap
)
456 // The position and size of the bitmap.
457 IPC_STRUCT_MEMBER(gfx::Rect
, bitmap_rect
)
459 // The scroll delta. Only one of the delta components can be non-zero, and if
460 // they are both zero, then it means there is no scrolling and the scroll_rect
462 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_delta
)
464 // The rectangular region to scroll.
465 IPC_STRUCT_MEMBER(gfx::Rect
, scroll_rect
)
467 // The scroll offset of the render view.
468 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_offset
)
470 // The regions of the bitmap (in view coords) that contain updated pixels.
471 // In the case of scrolling, this includes the scroll damage rect.
472 IPC_STRUCT_MEMBER(std::vector
<gfx::Rect
>, copy_rects
)
474 // The size of the RenderView when this message was generated. This is
475 // included so the host knows how large the view is from the perspective of
476 // the renderer process. This is necessary in case a resize operation is in
477 // progress. If auto-resize is enabled, this should update the corresponding
479 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
481 // New window locations for plugin child windows.
482 IPC_STRUCT_MEMBER(std::vector
<webkit::npapi::WebPluginGeometry
>,
485 // The following describes the various bits that may be set in flags:
487 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
488 // Indicates that this is a response to a ViewMsg_Resize message.
490 // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
491 // Indicates that this is a response to a ViewMsg_WasShown message.
493 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
494 // Indicates that this is a response to a ViewMsg_Repaint message.
496 // If flags is zero, then this message corresponds to an unsolicited paint
497 // request by the render view. Any of the above bits may be set in flags,
498 // which would indicate that this paint message is an ACK for multiple
500 IPC_STRUCT_MEMBER(int, flags
)
502 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
503 // update. True for 2D painting, but false for accelerated compositing.
504 IPC_STRUCT_MEMBER(bool, needs_ack
)
506 // All the above coordinates are in DIP. This is the scale factor needed
507 // to convert them to pixels.
508 IPC_STRUCT_MEMBER(float, scale_factor
)
511 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params
)
512 // The serialized script value.
513 IPC_STRUCT_MEMBER(string16
, data
)
515 // When sent to the browser, this is the routing ID of the source frame in
516 // the source process. The browser replaces it with the routing ID of the
517 // equivalent (swapped out) frame in the destination process.
518 IPC_STRUCT_MEMBER(int, source_routing_id
)
519 // The identifier of the source frame in the source process.
520 IPC_STRUCT_MEMBER(int, source_frame_id
)
522 // The full set of identifiers to uniquely describe the target frame. See
523 // the comment on ViewMsg_FrameTreeUpdated for details.
524 IPC_STRUCT_MEMBER(int, target_process_id
)
525 IPC_STRUCT_MEMBER(int, target_routing_id
)
526 IPC_STRUCT_MEMBER(int, target_frame_id
)
528 // The origin of the source frame.
529 IPC_STRUCT_MEMBER(string16
, source_origin
)
531 // The origin for the message's target.
532 IPC_STRUCT_MEMBER(string16
, target_origin
)
535 IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params
)
536 // The frame ID for the failure report.
537 IPC_STRUCT_MEMBER(int64
, frame_id
)
538 // True if this is the top-most frame.
539 IPC_STRUCT_MEMBER(bool, is_main_frame
)
540 // Error code as reported in the DidFailProvisionalLoad callback.
541 IPC_STRUCT_MEMBER(int, error_code
)
542 // An error message generated from the error_code. This can be an empty
543 // string if we were unable to find a meaningful description.
544 IPC_STRUCT_MEMBER(string16
, error_description
)
545 // The URL that the error is reported for.
546 IPC_STRUCT_MEMBER(GURL
, url
)
547 // True if the failure is the result of navigating to a POST again
548 // and we're going to show the POST interstitial.
549 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial
)
552 IPC_STRUCT_BEGIN(ViewMsg_SwapOut_Params
)
553 // The identifier of the RenderProcessHost for the currently closing view.
555 // These first two parameters are technically redundant since they are
556 // needed only when processing the ACK message, and the processor
557 // theoretically knows both the process and route ID. However, this is
558 // difficult to figure out with our current implementation, so this
559 // information is duplicated here.
560 IPC_STRUCT_MEMBER(int, closing_process_id
)
562 // The route identifier for the currently closing RenderView.
563 IPC_STRUCT_MEMBER(int, closing_route_id
)
565 // The identifier of the RenderProcessHost for the new view attempting to
566 // replace the closing one above.
567 IPC_STRUCT_MEMBER(int, new_render_process_host_id
)
569 // The identifier of the *request* the new view made that is causing the
570 // cross-site transition. This is *not* a route_id, but the request that we
571 // will resume once the ACK from the closing view has been received.
572 IPC_STRUCT_MEMBER(int, new_request_id
)
575 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params
)
576 // The page_id for this navigation, or -1 if it is a new navigation. Back,
577 // Forward, and Reload navigations should have a valid page_id. If the load
578 // succeeds, then this page_id will be reflected in the resultant
579 // ViewHostMsg_FrameNavigate message.
580 IPC_STRUCT_MEMBER(int32
, page_id
)
582 // If page_id is -1, then pending_history_list_offset will also be -1.
583 // Otherwise, it contains the offset into the history list corresponding to
584 // the current navigation.
585 IPC_STRUCT_MEMBER(int, pending_history_list_offset
)
587 // Informs the RenderView of where its current page contents reside in
588 // session history and the total size of the session history list.
589 IPC_STRUCT_MEMBER(int, current_history_list_offset
)
590 IPC_STRUCT_MEMBER(int, current_history_list_length
)
593 IPC_STRUCT_MEMBER(GURL
, url
)
595 // Base URL for use in WebKit's SubstituteData.
596 // Is only used with data: URLs.
597 IPC_STRUCT_MEMBER(GURL
, base_url_for_data_url
)
599 // History URL for use in WebKit's SubstituteData.
600 // Is only used with data: URLs.
601 IPC_STRUCT_MEMBER(GURL
, history_url_for_data_url
)
603 // The URL to send in the "Referer" header field. Can be empty if there is
605 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
607 // The type of transition.
608 IPC_STRUCT_MEMBER(content::PageTransition
, transition
)
610 // Opaque history state (received by ViewHostMsg_UpdateState).
611 IPC_STRUCT_MEMBER(std::string
, state
)
613 // Type of navigation.
614 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value
, navigation_type
)
616 // The time the request was created
617 IPC_STRUCT_MEMBER(base::Time
, request_time
)
619 // Extra headers (separated by \n) to send during the request.
620 IPC_STRUCT_MEMBER(std::string
, extra_headers
)
622 // The following two members identify a previous request that has been
623 // created before this navigation is being transferred to a new render view.
624 // This serves the purpose of recycling the old request.
625 // Unless this refers to a transferred navigation, these values are -1 and -1.
626 IPC_STRUCT_MEMBER(int, transferred_request_child_id
)
627 IPC_STRUCT_MEMBER(int, transferred_request_request_id
)
629 // Whether or not we should allow the url to download.
630 IPC_STRUCT_MEMBER(bool, allow_download
)
632 // Whether or not the user agent override string should be used.
633 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
635 // True if this was a post request.
636 IPC_STRUCT_MEMBER(bool, is_post
)
638 // If is_post is true, holds the post_data information from browser. Empty
640 IPC_STRUCT_MEMBER(std::vector
<unsigned char>, browser_initiated_post_data
)
642 // Whether or not this url should be allowed to access local file://
644 IPC_STRUCT_MEMBER(bool, can_load_local_resources
)
647 // Parameters for an OpenURL request.
648 IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params
)
649 IPC_STRUCT_MEMBER(GURL
, url
)
650 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
651 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
652 IPC_STRUCT_MEMBER(int64
, frame_id
)
653 IPC_STRUCT_MEMBER(bool, is_cross_site_redirect
)
656 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
657 // Renderer-wide preferences.
658 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
660 // Preferences for this view.
661 IPC_STRUCT_MEMBER(webkit_glue::WebPreferences
, web_preferences
)
663 // The ID of the view to be created.
664 IPC_STRUCT_MEMBER(int32
, view_id
)
666 // The ID of the rendering surface.
667 IPC_STRUCT_MEMBER(int32
, surface_id
)
669 // The session storage namespace ID this view should use.
670 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
672 // The name of the frame associated with this view (or empty if none).
673 IPC_STRUCT_MEMBER(string16
, frame_name
)
675 // The route ID of the opener RenderView if we need to set one
676 // (MSG_ROUTING_NONE otherwise).
677 IPC_STRUCT_MEMBER(int, opener_route_id
)
679 // Whether the RenderView should initially be swapped out.
680 IPC_STRUCT_MEMBER(bool, swapped_out
)
682 // The initial page ID to use for this view, which must be larger than any
683 // existing navigation that might be loaded in the view. Page IDs are unique
684 // to a view and are only updated by the renderer after this initial value.
685 IPC_STRUCT_MEMBER(int32
, next_page_id
)
687 // The properties of the screen associated with the view.
688 IPC_STRUCT_MEMBER(WebKit::WebScreenInfo
, screen_info
)
690 // The accessibility mode of the renderer.
691 IPC_STRUCT_MEMBER(AccessibilityMode
, accessibility_mode
)
694 // Messages sent from the browser to the renderer.
696 // Sent to the RenderView when a new tab is swapped into an existing
697 // tab and the histories need to be merged. The existing tab has a history of
698 // |merged_history_length| which precedes the history of the new tab. All
699 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
701 // For example, suppose the history of page_ids in the new tab's RenderView
702 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
703 // all pages in the new tab with page_id >= 7 are to be preserved.
704 // The resulting page history is [-1 -1 -1 7 8].
705 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune
,
706 int, /* merge_history_length */
707 int32
/* minimum_page_id */)
709 // Asks the browser for a unique routing ID.
710 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
711 int /* routing_id */)
713 // Asks the browser for the default audio hardware buffer-size.
714 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetHardwareBufferSize
,
715 uint32
/* buffer_size */)
717 // Asks the browser for the default audio input hardware sample-rate.
718 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetHardwareInputSampleRate
,
719 int /* sample_rate */)
721 // Asks the browser for the default audio hardware sample-rate.
722 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetHardwareSampleRate
,
723 int /* sample_rate */)
725 // Asks the browser for the default channel layout.
726 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetHardwareInputChannelLayout
,
727 media::ChannelLayout
/* channel layout */)
729 // Asks the browser for CPU usage of the renderer process in percents.
730 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage
,
731 int /* CPU usage in percents */)
733 // Asks the browser for the user's monitor profile.
734 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile
,
735 std::vector
<char> /* profile */)
737 // Tells the renderer to create a new view.
738 // This message is slightly different, the view it takes (via
739 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
740 // non-view control message.
741 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
744 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
745 // similar to the new command, but used when the renderer created a view
746 // first, and we need to update it.
747 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
749 // Sends updated preferences to the renderer.
750 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
751 content::RendererPreferences
)
753 // This passes a set of webkit preferences down to the renderer.
754 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
755 webkit_glue::WebPreferences
)
757 // Informs the renderer that the timezone has changed.
758 IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange
)
760 // Tells the render view to close.
761 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
763 // Tells the render view to change its size. A ViewHostMsg_PaintRect message
764 // is generated in response provided new_size is not empty and not equal to
765 // the view's current size. The generated ViewHostMsg_PaintRect message will
766 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
767 // we don't have to fetch it every time WebKit asks for it.
768 IPC_MESSAGE_ROUTED3(ViewMsg_Resize
,
769 gfx::Size
/* new_size */,
770 gfx::Rect
/* resizer_rect */,
771 bool /* is_fullscreen */)
773 // Tells the render view that the resize rect has changed.
774 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
775 gfx::Rect
/* resizer_rect */)
777 // Sent to inform the view that it was hidden. This allows it to reduce its
778 // resource utilization.
779 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
781 // Tells the render view that it is no longer hidden (see WasHidden), and the
782 // render view is expected to respond with a full repaint if needs_repainting
783 // is true. In that case, the generated ViewHostMsg_PaintRect message will
784 // have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this
785 // message does not trigger a message in response.
786 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown
,
787 bool /* needs_repainting */)
789 // Sent to inform the view that it was swapped out. This allows the process to
790 // exit if no other views are using it.
791 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut
)
793 // Sent to render the view into the supplied transport DIB, resize
794 // the web widget to match the |page_size|, scale it by the
795 // appropriate scale to make it fit the |desired_size|, and return
796 // it. In response to this message, the host generates a
797 // ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be
798 // the right size to receive an RGBA image at the |desired_size|.
799 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
800 // identify the PaintAtSize message the ACK belongs to.
801 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize
,
802 TransportDIB::Handle
/* dib_handle */,
804 gfx::Size
/* page_size */,
805 gfx::Size
/* desired_size */)
807 // Tells the render view that a ViewHostMsg_UpdateRect message was processed.
808 // This signals the render view that it can send another UpdateRect message.
809 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK
)
811 // Tells the render view that a SwapBuffers was completed. Typically,
812 // SwapBuffers requests go from renderer -> GPU process -> browser. Most
813 // platforms still use the GfxCxt3D Echo for receiving the SwapBuffers Ack.
814 // Using Echo routes the ack from browser -> GPU process -> renderer, while this
815 // Ack goes directly from browser -> renderer. This is not used for the threaded
817 IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK
)
819 // Sends an input event to the render widget.
820 IPC_MESSAGE_ROUTED2(ViewMsg_HandleInputEvent
,
821 IPC::WebInputEventPointer
/* event */,
822 bool /* is_keyboard_shortcut */)
824 // Tells the render widget that a smooth scroll completed.
825 IPC_MESSAGE_ROUTED1(ViewMsg_SmoothScrollCompleted
,
826 int /* gesture_id */)
828 // This message notifies the renderer that the next key event is bound to one
829 // or more pre-defined edit commands. If the next key event is not handled
830 // by webkit, the specified edit commands shall be executed against current
833 // * edit_commands (see chrome/common/edit_command_types.h)
834 // Contains one or more edit commands.
835 // See third_party/WebKit/Source/WebCore/editing/EditorCommand.cpp for detailed
836 // definition of webkit edit commands.
838 // This message must be sent just before sending a key event.
839 IPC_MESSAGE_ROUTED1(ViewMsg_SetEditCommandsForNextKeyEvent
,
840 std::vector
<content::EditCommand
> /* edit_commands */)
842 // Message payload is the name/value of a WebCore edit command to execute.
843 IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteEditCommand
,
844 std::string
, /* name */
845 std::string
/* value */)
847 IPC_MESSAGE_ROUTED0(ViewMsg_MouseCaptureLost
)
849 // TODO(darin): figure out how this meshes with RestoreFocus
850 IPC_MESSAGE_ROUTED1(ViewMsg_SetFocus
,
853 // Tells the renderer to focus the first (last if reverse is true) focusable
855 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
858 // Tells the renderer to scroll the currently focused node into rect only if
859 // the currently focused node is a Text node (textfield, text area or content
861 IPC_MESSAGE_ROUTED1(ViewMsg_ScrollFocusedEditableNodeIntoRect
, gfx::Rect
)
863 // Executes custom context menu action that was provided from WebKit.
864 IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction
,
865 content::CustomContextMenuContext
/* custom_context */,
866 unsigned /* action */)
868 // Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that
869 // the menu has been closed.
870 IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed
,
871 content::CustomContextMenuContext
/* custom_context */)
873 // Tells the renderer to perform the specified navigation, interrupting any
874 // existing navigation.
875 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate
, ViewMsg_Navigate_Params
)
877 IPC_MESSAGE_ROUTED0(ViewMsg_Stop
)
879 // Tells the renderer to reload the current focused frame
880 IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame
)
882 // Sent when the user wants to search for a word on the page (find in page).
883 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
884 int /* request_id */,
885 string16
/* search_text */,
886 WebKit::WebFindOptions
)
888 // This message notifies the renderer that the user has closed the FindInPage
889 // window (and what action to take regarding the selection).
890 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
891 content::StopFindAction
/* action */)
893 // These messages are typically generated from context menus and request the
894 // renderer to apply the specified operation to the current selection.
895 IPC_MESSAGE_ROUTED0(ViewMsg_Undo
)
896 IPC_MESSAGE_ROUTED0(ViewMsg_Redo
)
897 IPC_MESSAGE_ROUTED0(ViewMsg_Cut
)
898 IPC_MESSAGE_ROUTED0(ViewMsg_Copy
)
899 #if defined(OS_MACOSX)
900 IPC_MESSAGE_ROUTED0(ViewMsg_CopyToFindPboard
)
902 IPC_MESSAGE_ROUTED0(ViewMsg_Paste
)
903 IPC_MESSAGE_ROUTED0(ViewMsg_PasteAndMatchStyle
)
904 // Replaces the selected region or a word around the cursor with the
906 IPC_MESSAGE_ROUTED1(ViewMsg_Replace
,
908 IPC_MESSAGE_ROUTED0(ViewMsg_Delete
)
909 IPC_MESSAGE_ROUTED0(ViewMsg_SelectAll
)
911 // Replaces a date time input field.
912 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
, string16
/* text */)
914 IPC_MESSAGE_ROUTED0(ViewMsg_Unselect
)
916 // Requests the renderer to select the region between two points.
917 // Expects a SelectRange_ACK message when finished.
918 IPC_MESSAGE_ROUTED2(ViewMsg_SelectRange
,
919 gfx::Point
/* start */,
920 gfx::Point
/* end */)
922 // Copies the image at location x, y to the clipboard (if there indeed is an
923 // image at that location).
924 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
928 // Tells the renderer to perform the given action on the media player
929 // located at the given point.
930 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
931 gfx::Point
, /* location */
932 WebKit::WebMediaPlayerAction
)
934 // Tells the renderer to perform the given action on the plugin located at
936 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
937 gfx::Point
, /* location */
938 WebKit::WebPluginAction
)
940 // Request for the renderer to evaluate an xpath to a frame and execute a
941 // javascript: url in that frame's context. The message is completely
942 // asynchronous and no corresponding response message is sent back.
944 // frame_xpath contains the modified xpath notation to identify an inner
945 // subframe (starting from the root frame). It is a concatenation of
946 // number of smaller xpaths delimited by '\n'. Each chunk in the string can
947 // be evaluated to a frame in its parent-frame's context.
949 // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
950 // can be broken into 3 xpaths
951 // /html/body/iframe evaluates to an iframe within the root frame
952 // /html/body/div/iframe evaluates to an iframe within the level-1 iframe
953 // /frameset/frame[0] evaluates to first frame within the level-2 iframe
955 // jscript_url is the string containing the javascript: url to be executed
956 // in the target frame's context. The string should start with "javascript:"
957 // and continue with a valid JS text.
959 // If the fourth parameter is true the result is sent back to the renderer
960 // using the message ViewHostMsg_ScriptEvalResponse.
961 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
962 // client can uniquely identify the request.
963 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest
,
964 string16
, /* frame_xpath */
965 string16
, /* jscript_url */
967 bool /* If true, result is sent back. */)
969 // Posts a message from a frame in another process to the current renderer.
970 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent
,
971 ViewMsg_PostMessage_Params
)
973 // Requests that the RenderView's main frame sets its opener to null.
974 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener
)
976 // Sends a JSON serialized frame tree to RenderView along with the process id
977 // and route id of the source renderer.
979 // This message must be sent to swapped out RenderViews every time the browser
980 // receives a ViewHostMsg_FrameTreeUpdated message.
981 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateFrameTree
,
982 int, /* the child process id of the active renderer */
983 int, /* route_id of the active renderer */
984 std::string
/* json encoded frame tree */)
986 // Request for the renderer to evaluate an xpath to a frame and insert css
987 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
988 // allowed xpath expressions.
989 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest
,
990 string16
, /* frame_xpath */
991 std::string
/* css string */)
993 // Change the zoom level for the current main frame. If the level actually
994 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
995 // telling it what url got zoomed and what its current zoom level is.
996 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
997 content::PageZoom
/* function */)
999 // Set the zoom level for the current main frame. If the level actually
1000 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1001 // telling it what url got zoomed and what its current zoom level is.
1002 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel
,
1003 double /* zoom_level */)
1005 // Zooms the page by the factor defined in the renderer.
1006 IPC_MESSAGE_ROUTED3(ViewMsg_ZoomFactor
,
1008 int /* zoom center_x */,
1009 int /* zoom center_y */)
1011 // Set the zoom level for a particular url that the renderer is in the
1012 // process of loading. This will be stored, to be used if the load commits
1013 // and ignored otherwise.
1014 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
1016 double /* zoom_level */)
1018 // Set the zoom level for a particular url, so all render views
1019 // displaying this url can update their zoom levels to match.
1020 IPC_MESSAGE_CONTROL2(ViewMsg_SetZoomLevelForCurrentURL
,
1021 std::string
/* host */,
1022 double /* zoom_level */)
1024 // Change encoding of page in the renderer.
1025 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
1026 std::string
/*new encoding name*/)
1028 // Reset encoding of page in the renderer back to default.
1029 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
1031 // Used to tell a render view whether it should expose various bindings
1032 // that allow JS content extended privileges. See BindingsPolicy for valid
1034 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
1035 int /* enabled_bindings_flags */)
1037 // Tell the renderer to add a property to the WebUI binding object. This
1038 // only works if we allowed WebUI bindings.
1039 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
1040 std::string
/* property_name */,
1041 std::string
/* property_value_json */)
1043 // This message starts/stop monitoring the input method status of the focused
1044 // edit control of a renderer process.
1046 // * is_active (bool)
1047 // Indicates if an input method is active in the browser process.
1048 // The possible actions when a renderer process receives this message are
1051 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
1052 // to notify the input method status of the focused edit control.
1053 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
1054 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive
,
1055 bool /* is_active */)
1057 // This message sends a string being composed with an input method.
1058 IPC_MESSAGE_ROUTED4(
1059 ViewMsg_ImeSetComposition
,
1060 string16
, /* text */
1061 std::vector
<WebKit::WebCompositionUnderline
>, /* underlines */
1062 int, /* selectiont_start */
1063 int /* selection_end */)
1065 // This message confirms an ongoing composition.
1066 IPC_MESSAGE_ROUTED2(ViewMsg_ImeConfirmComposition
,
1067 string16
/* text */,
1068 ui::Range
/* replacement_range */)
1070 // Sets the text composition to be between the given start and end offsets
1071 // in the currently focused editable field.
1072 IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText
,
1075 std::vector
<WebKit::WebCompositionUnderline
> /* underlines */)
1077 // Selects between the given start and end offsets in the currently focused
1079 IPC_MESSAGE_ROUTED2(ViewMsg_SetEditableSelectionOffsets
,
1083 // Deletes the current selection plus the specified number of characters before
1084 // and after the selection or caret.
1085 IPC_MESSAGE_ROUTED2(ViewMsg_ExtendSelectionAndDelete
,
1089 // Used to notify the render-view that we have received a target URL. Used
1090 // to prevent target URLs spamming the browser.
1091 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
1094 // Sets the alternate error page URL (link doctor) for the renderer process.
1095 IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL
,
1098 // Notifies the color chooser client that the user selected a color.
1099 IPC_MESSAGE_ROUTED2(ViewMsg_DidChooseColorResponse
, unsigned, SkColor
)
1101 // Notifies the color chooser client that the color chooser has ended.
1102 IPC_MESSAGE_ROUTED1(ViewMsg_DidEndColorChooser
, unsigned)
1104 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
1105 std::vector
<ui::SelectedFileInfo
>)
1107 // Provides the results of directory enumeration.
1108 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
1109 int /* request_id */,
1110 std::vector
<FilePath
> /* files_in_directory */)
1112 // When a renderer sends a ViewHostMsg_Focus to the browser process,
1113 // the browser has the option of sending a ViewMsg_CantFocus back to
1115 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus
)
1117 // Instructs the renderer to invoke the frame's shouldClose method, which
1118 // runs the onbeforeunload event handler. Expects the result to be returned
1119 // via ViewHostMsg_ShouldClose.
1120 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose
)
1122 // Instructs the renderer to swap out for a cross-site transition, including
1123 // running the unload event handler. See the struct above for more details.
1125 // Expects a SwapOut_ACK message when finished, where the parameters are
1127 IPC_MESSAGE_ROUTED1(ViewMsg_SwapOut
,
1128 ViewMsg_SwapOut_Params
)
1130 // Instructs the renderer to close the current page, including running the
1131 // onunload event handler.
1133 // Expects a ClosePage_ACK message when finished.
1134 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
1136 // Notifies the renderer about ui theme changes
1137 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
1139 // Notifies the renderer that a paint is to be generated for the rectangle
1141 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
1142 gfx::Size
/* The view size to be repainted */)
1144 // Notification that a move or resize renderer's containing window has
1146 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
1148 IPC_MESSAGE_ROUTED1(ViewMsg_ScreenInfoChanged
,
1149 WebKit::WebScreenInfo
/* screen_info */)
1151 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
1152 gfx::Rect
/* view_screen_rect */,
1153 gfx::Rect
/* window_screen_rect */)
1155 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
1156 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
1157 // processed the move. The browser may have ignored the move, but it finished
1158 // processing. This is used because the renderer keeps a temporary cache of
1159 // the widget position while these asynchronous operations are in progress.
1160 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
1162 // Used to instruct the RenderView to send back updates to the preferred size.
1163 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
1165 // Used to instruct the RenderView to automatically resize and send back
1166 // updates for the new size.
1167 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
1168 gfx::Size
/* min_size */,
1169 gfx::Size
/* max_size */)
1171 // Used to instruct the RenderView to disalbe automatically resize.
1172 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
1173 gfx::Size
/* new_size */)
1175 // Changes the text direction of the currently selected input field (if any).
1176 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
1177 WebKit::WebTextDirection
/* direction */)
1179 // Tells the renderer to clear the focused node (if any).
1180 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode
)
1182 // Make the RenderView transparent and render it onto a custom background. The
1183 // background will be tiled in both directions if it is not large enough.
1184 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground
,
1185 SkBitmap
/* background */)
1187 // Used to tell the renderer not to add scrollbars with height and
1188 // width below a threshold.
1189 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
1190 gfx::Size
/* disable_scrollbar_size_limit */)
1192 // Activate/deactivate the RenderView (i.e., set its controls' tint
1193 // accordingly, etc.).
1194 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
1197 IPC_MESSAGE_ROUTED1(ViewMsg_SetNavigationStartTime
,
1198 base::TimeTicks
/* browser_navigation_start */)
1200 // Response message to ViewHostMsg_CreateShared/DedicatedWorker.
1201 // Sent when the worker has started.
1202 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
1204 // The response to ViewHostMsg_AsyncOpenFile.
1205 IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK
,
1206 base::PlatformFileError
/* error_code */,
1207 IPC::PlatformFileForTransit
/* file descriptor */,
1208 int /* message_id */)
1210 // Tells the renderer that the network state has changed and that
1211 // window.navigator.onLine should be updated for all WebViews.
1212 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged
,
1215 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
1216 // Tells the renderer that the channel to the broker has been created.
1217 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated
,
1218 int /* request_id */,
1219 IPC::ChannelHandle
/* handle */)
1221 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
1222 // Tells the renderer whether permission to access to PPAPI broker was granted
1224 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerPermissionResult
,
1225 int /* request_id */,
1228 // Tells the renderer to empty its plugin list cache, optional reloading
1229 // pages containing plugins.
1230 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
1231 bool /* reload_pages */)
1233 // Sent to the renderer when a popup window should no longer count against
1234 // the current popup count (either because it's not a popup or because it was
1235 // a generated by a user action).
1236 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount
)
1238 // Used to instruct the RenderView to go into "view source" mode.
1239 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
1241 // Instructs the renderer to save the current page to MHTML.
1242 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
1244 IPC::PlatformFileForTransit
/* file handle */)
1246 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
1247 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData
,
1250 // Change the accessibility mode in the renderer process.
1251 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode
,
1254 #if defined(OS_ANDROID)
1255 // Sent when the user clicks on the find result bar to activate a find result.
1256 // The point (x,y) is in fractions of the content document's width and height.
1257 IPC_MESSAGE_ROUTED3(ViewMsg_ActivateNearestFindResult
,
1258 int /* request_id */,
1262 // Sent when the browser wants the bounding boxes of the current find matches.
1264 // If match rects are already cached on the browser side, |current_version|
1265 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
1266 // they came in, so the renderer can tell if it needs to send updated rects.
1267 // Otherwise just pass -1 to always receive the list of rects.
1269 // There must be an active search string (it is probably most useful to call
1270 // this immediately after a ViewHostMsg_Find_Reply message arrives with
1271 // final_update set to true).
1272 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
1273 int /* current_version */)
1275 // Sent when the user wants to search for all occurrences of a word or find
1276 // the next result in a synchronous way. This method forces the UI thread in
1277 // the browser to wait for the renderer to reply, therefore blocking the UI.
1279 // This functionality is required for compatibility with the legacy Android
1280 // WebView API. As this goes strongly against the Chromium design guidelines,
1281 // don't use this as inspiration.
1283 IPC_SYNC_MESSAGE_ROUTED3_2(ViewMsg_SynchronousFind
,
1284 int /* request_id */,
1285 string16
/* search_string */,
1286 WebKit::WebFindOptions
/* options */,
1287 int /* match_count */,
1288 int /* active_ordinal */)
1290 // External popup menus.
1291 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems
,
1292 bool /* user canceled the popup */,
1293 std::vector
<int> /* selected indices */)
1295 // Tells the renderer to try to revert to the zoom level we were at before
1296 // ViewMsg_ScrollFocusedEditableNodeIntoView was called.
1297 IPC_MESSAGE_ROUTED0(ViewMsg_UndoScrollFocusedEditableNodeIntoView
)
1299 // Message sent when the renderer changed the background color for the view.
1300 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor
,
1301 uint32
/* bg_color */)
1303 // Information about current document scroll, scale and size. Sent on a
1304 // best-effort basis.
1305 IPC_MESSAGE_ROUTED5(ViewHostMsg_UpdateFrameInfo
,
1306 gfx::Vector2d
/* scroll_offset */,
1307 float /* page_scale_factor */,
1308 float /* min_page_scale_factor */,
1309 float /* max_page_scale_factor */,
1310 gfx::Size
/* content_size */)
1312 #elif defined(OS_MACOSX)
1313 // Let the RenderView know its window has changed visibility.
1314 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
1315 bool /* visibile */)
1317 // Let the RenderView know its window's frame has changed.
1318 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
1319 gfx::Rect
/* window frame */,
1320 gfx::Rect
/* content view frame */)
1322 // Message sent from the browser to the renderer when the user starts or stops
1323 // resizing the view.
1324 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
1327 // Tell the renderer that plugin IME has completed.
1328 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
1329 string16
/* text */,
1330 int /* plugin_id */)
1332 // External popup menus.
1333 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem
,
1334 int /* selected index, -1 means no selection */)
1337 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
1338 // process to release the magnified image.
1339 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupDIB
,
1340 TransportDIB::Handle
/* DIB handle */)
1342 // Notifies the renderer that a snapshot has been retrieved.
1343 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted
,
1344 int /* snapshot_id */,
1345 gfx::Size
/* size */,
1346 std::vector
<unsigned char> /* png */)
1348 // -----------------------------------------------------------------------------
1349 // Messages sent from the renderer to the browser.
1351 // Sent by the renderer when it is creating a new window. The browser creates
1352 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1353 // MSG_ROUTING_NONE, the view couldn't be created.
1354 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_CreateWindow
,
1355 ViewHostMsg_CreateWindow_Params
,
1357 int32
/* surface_id */,
1358 int64
/* cloned_session_storage_namespace_id */)
1360 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1361 // <select> dropdowns. This message is sent to the WebContentsImpl that
1362 // contains the widget being created.
1363 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
1364 int /* opener_id */,
1365 WebKit::WebPopupType
/* popup type */,
1367 int32
/* surface_id */)
1369 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1371 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1372 int /* opener_id */,
1374 int32
/* surface_id */)
1376 // Get all savable resource links from current webpage, include main
1377 // frame and sub-frame.
1378 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage
,
1379 GURL
/* url of page which is needed to save */)
1381 // Get html data by serializing all frames of current page with lists
1382 // which contain all resource links that have local copy.
1383 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
1384 std::vector
<GURL
> /* urls that have local copy */,
1385 std::vector
<FilePath
> /* paths of local copy */,
1386 FilePath
/* local directory path */)
1388 // Tells the render side that a ViewHostMsg_LockMouse message has been
1389 // processed. |succeeded| indicates whether the mouse has been successfully
1391 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
1392 bool /* succeeded */)
1393 // Tells the render side that the mouse has been unlocked.
1394 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
1396 // These three messages are sent to the parent RenderViewHost to display the
1397 // page/widget that was created by
1398 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1399 // refers to the id that was returned from the Create message above.
1400 // The initial_position parameter is a rectangle in screen coordinates.
1402 // FUTURE: there will probably be flags here to control if the result is
1404 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1406 WindowOpenDisposition
/* disposition */,
1407 gfx::Rect
/* initial_pos */,
1408 bool /* opened_by_user_gesture */)
1410 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1412 gfx::Rect
/* initial_pos */)
1414 // Message to show a full screen widget.
1415 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1418 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1419 // to run in a modal fashion until it is closed.
1420 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal
,
1421 int /* opener_id */)
1423 // Indicates the renderer is ready in response to a ViewMsg_New or
1424 // a ViewMsg_CreatingNew_ACK.
1425 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1427 // Indicates the renderer process is gone. This actually is sent by the
1428 // browser process to itself, but keeps the interface cleaner.
1429 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone
,
1430 int, /* this really is base::TerminationStatus */
1431 int /* exit_code */)
1433 // Sent by the renderer process to request that the browser close the view.
1434 // This corresponds to the window.close() API, and the browser may ignore
1435 // this message. Otherwise, the browser will generates a ViewMsg_Close
1436 // message to close the view.
1437 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1439 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1440 // throttle these messages.
1441 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1443 // Sent by the renderer process to request that the browser move the view.
1444 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1445 // the browser may ignore this message.
1446 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1447 gfx::Rect
/* position */)
1449 // Notifies the browser that a frame in the view has changed. This message
1450 // has a lot of parameters and is packed/unpacked by functions defined in
1451 // render_messages.h.
1452 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate
,
1453 ViewHostMsg_FrameNavigate_Params
)
1455 // Used to tell the parent that the user right clicked on an area of the
1456 // content area, and a context menu should be shown for it. The params
1457 // object contains information about the node(s) that were selected when the
1458 // user right clicked.
1459 IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu
, content::ContextMenuParams
)
1461 // Message to show a popup menu using native cocoa controls (Mac only).
1462 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup
,
1463 ViewHostMsg_ShowPopup_Params
)
1465 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
1466 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the
1467 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
1469 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse
,
1471 base::ListValue
/* result */)
1473 // Result of string search in the page.
1474 // Response to ViewMsg_Find with the results of the requested find-in-page
1475 // search, the number of matches found and the selection rect (in screen
1476 // coordinates) for the string found. If |final_update| is false, it signals
1477 // that this is not the last Find_Reply message - more will be sent as the
1478 // scoping effort continues.
1479 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1480 int /* request_id */,
1481 int /* number of matches */,
1482 gfx::Rect
/* selection_rect */,
1483 int /* active_match_ordinal */,
1484 bool /* final_update */)
1486 // Provides the result from running OnMsgShouldClose. |proceed| matches the
1487 // return value of the the frame's shouldClose method (which includes the
1488 // onbeforeunload handler): true if the user decided to proceed with leaving
1490 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK
,
1492 base::TimeTicks
/* before_unload_start_time */,
1493 base::TimeTicks
/* before_unload_end_time */)
1495 // Indicates that the current renderer has swapped out, after a SwapOut
1496 // message. The parameters are just echoed from the SwapOut request.
1497 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapOut_ACK
,
1498 ViewMsg_SwapOut_Params
)
1500 // Indicates that the current page has been closed, after a ClosePage
1502 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1504 // Notifies the browser that media has started/stopped playing.
1505 IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification
,
1506 int64
/* player_cookie, distinguishes instances */,
1507 bool /* has_video */,
1508 bool /* has_audio */,
1509 bool /* is_playing */)
1511 // Notifies the browser that we have session history information.
1512 // page_id: unique ID that allows us to distinguish between history entries.
1513 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1514 int32
/* page_id */,
1515 std::string
/* state */)
1517 // Notifies the browser that a document has been loaded in a frame.
1518 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame
,
1519 int64
/* frame_id */)
1521 // Notifies the browser that a frame finished loading.
1522 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad
,
1523 int64
/* frame_id */,
1524 GURL
/* validated_url */,
1525 bool /* is_main_frame */)
1527 // Changes the title for the page in the UI when the page is navigated or the
1529 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle
,
1530 int32
/* page_id */,
1531 string16
/* title */,
1532 WebKit::WebTextDirection
/* title direction */)
1534 // Changes the icon url for the page in the UI.
1535 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL
,
1539 // Change the encoding name of the page in UI when the page has detected
1540 // proper encoding name.
1541 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding
,
1542 std::string
/* new encoding name */)
1544 // Notifies the browser that we want to show a destination url for a potential
1545 // action (e.g. when the user is hovering over a link).
1546 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL
,
1550 // Sent when the renderer starts loading the page. This corresponds to
1551 // WebKit's notion of the throbber starting. Note that sometimes you may get
1552 // duplicates of these during a single load.
1553 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading
)
1555 // Sent when the renderer is done loading a page. This corresponds to WebKit's
1556 // notion of the throbber stopping.
1557 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading
)
1559 // Sent when the renderer main frame has made progress loading.
1560 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress
,
1561 double /* load_progress */)
1563 // Sent when the renderer main frame sets its opener to null, disowning it for
1564 // the lifetime of the window.
1565 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisownOpener
)
1567 // Sent when the document element is available for the top-level frame. This
1568 // happens after the page starts loading, but before all resources are
1570 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame
)
1572 // Sent when after the onload handler has been invoked for the document
1573 // in the top-level frame.
1574 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame
,
1575 int32
/* page_id */)
1577 // Sent when the renderer loads a resource from its memory cache.
1578 // The security info is non empty if the resource was originally loaded over
1579 // a secure connection.
1580 // Note: May only be sent once per URL per frame per committed load.
1581 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache
,
1583 std::string
/* security info */,
1584 std::string
/* http method */,
1585 std::string
/* mime type */,
1586 ResourceType::Type
/* resource type */)
1588 // Sent when the renderer displays insecure content in a secure page.
1589 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent
)
1591 // Sent when the renderer runs insecure content in a secure origin.
1592 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent
,
1593 std::string
/* security_origin */,
1594 GURL
/* target URL */)
1596 // Sent when the renderer starts a provisional load for a frame.
1597 IPC_MESSAGE_ROUTED4(ViewHostMsg_DidStartProvisionalLoadForFrame
,
1598 int64
/* frame_id */,
1599 int64
/* parent_frame_id */,
1600 bool /* true if it is the main frame */,
1603 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError
,
1604 int64
/* frame_id */,
1605 GURL
/* validated_url */,
1606 bool /* is_main_frame */,
1607 int /* error_code */,
1608 string16
/* error_description */)
1610 // Sent when the renderer fails a provisional load with an error.
1611 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFailProvisionalLoadWithError
,
1612 ViewHostMsg_DidFailProvisionalLoadWithError_Params
)
1614 // Tells the render view that a ViewHostMsg_PaintAtSize message was
1615 // processed, and the DIB is ready for use. |tag| has the same value that
1616 // the tag sent along with ViewMsg_PaintAtSize.
1617 IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK
,
1619 gfx::Size
/* size */)
1621 // Sent to update part of the view. In response to this message, the host
1622 // generates a ViewMsg_UpdateRect_ACK message.
1623 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1624 ViewHostMsg_UpdateRect_Params
)
1626 // Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
1627 // which may get delayed until the browser's UI unblocks.
1628 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed
)
1630 // Sent by the renderer when the parameters for vsync alignment have changed.
1631 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
1632 base::TimeTicks
/* timebase */,
1633 base::TimeDelta
/* interval */)
1635 // Sent by the renderer when accelerated compositing is enabled or disabled to
1636 // notify the browser whether or not is should do painting.
1637 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing
,
1638 bool /* true if the accelerated compositor is actve */)
1640 // Acknowledges receipt of a ViewMsg_HandleInputEvent message.
1641 IPC_MESSAGE_ROUTED2(ViewHostMsg_HandleInputEvent_ACK
,
1642 WebKit::WebInputEvent::Type
,
1643 content::InputEventAckState
/* ack_result */)
1645 IPC_STRUCT_BEGIN(ViewHostMsg_BeginSmoothScroll_Params
)
1646 IPC_STRUCT_MEMBER(bool, scroll_down
)
1647 IPC_STRUCT_MEMBER(int, pixels_to_scroll
)
1648 IPC_STRUCT_MEMBER(int, mouse_event_x
)
1649 IPC_STRUCT_MEMBER(int, mouse_event_y
)
1652 IPC_MESSAGE_ROUTED2(ViewHostMsg_BeginSmoothScroll
,
1653 int /* gesture_id */,
1654 ViewHostMsg_BeginSmoothScroll_Params
/* params */)
1656 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1657 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1659 // Message sent from renderer to the browser when focus changes inside the
1660 // webpage. The parameter says whether the newly focused element needs
1661 // keyboard input (true for textfields, text areas and content editable divs).
1662 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged
,
1663 bool /* is_editable_node */)
1665 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
,
1668 // Used to set a cookie. The cookie is set asynchronously, but will be
1669 // available to a subsequent ViewHostMsg_GetCookies request.
1670 IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie
,
1672 GURL
/* first_party_for_cookies */,
1673 std::string
/* cookie */)
1675 // Used to get cookies for the given URL. This may block waiting for a
1676 // previous SetCookie message to be processed.
1677 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies
,
1679 GURL
/* first_party_for_cookies */,
1680 std::string
/* cookies */)
1682 // Used to get raw cookie information for the given URL. This may block
1683 // waiting for a previous SetCookie message to be processed.
1684 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies
,
1686 GURL
/* first_party_for_cookies */,
1687 std::vector
<webkit_glue::WebCookie
>
1690 // Used to delete cookie for the given URL and name
1691 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie
,
1693 std::string
/* cookie_name */)
1695 // Used to check if cookies are enabled for the given URL. This may block
1696 // waiting for a previous SetCookie message to be processed.
1697 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled
,
1699 GURL
/* first_party_for_cookies */,
1700 bool /* cookies_enabled */)
1702 // Used to get the list of plugins
1703 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins
,
1705 std::vector
<webkit::WebPluginInfo
> /* plugins */)
1707 // Return information about a plugin for the given URL and MIME
1708 // type. If there is no matching plugin, |found| is false.
1709 // |actual_mime_type| is the actual mime type supported by the
1711 IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo
,
1712 int /* routing_id */,
1714 GURL
/* page_url */,
1715 std::string
/* mime_type */,
1717 webkit::WebPluginInfo
/* plugin info */,
1718 std::string
/* actual_mime_type */)
1720 // A renderer sends this to the browser process when it wants to
1721 // create a plugin. The browser will create the plugin process if
1722 // necessary, and will return a handle to the channel on success.
1723 // On error an empty string is returned.
1724 IPC_SYNC_MESSAGE_CONTROL4_2(ViewHostMsg_OpenChannelToPlugin
,
1725 int /* routing_id */,
1727 GURL
/* page_url */,
1728 std::string
/* mime_type */,
1729 IPC::ChannelHandle
/* channel_handle */,
1730 webkit::WebPluginInfo
/* info */)
1733 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1734 gfx::NativeViewId
/* dummy_activation_window */)
1736 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1737 gfx::NativeViewId
/* dummy_activation_window */)
1740 // Get the list of proxies to use for |url|, as a semicolon delimited list
1741 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1742 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1745 std::string
/* proxy list */)
1747 // A renderer sends this to the browser process when it wants to create a
1748 // worker. The browser will create the worker process if necessary, and
1749 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1750 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1751 ViewHostMsg_CreateWorker_Params
,
1754 // This message is sent to the browser to see if an instance of this shared
1755 // worker already exists. If so, it returns exists == true. If a
1756 // non-empty name is passed, also validates that the url matches the url of
1757 // the existing worker. If a matching worker is found, the passed-in
1758 // document_id is associated with that worker, to ensure that the worker
1759 // stays alive until the document is detached.
1760 // The route_id returned can be used to forward messages to the worker via
1761 // ForwardToWorker if it exists, otherwise it should be passed in to any
1762 // future call to CreateWorker to avoid creating duplicate workers.
1763 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker
,
1764 ViewHostMsg_CreateWorker_Params
,
1767 bool /* url_mismatch */)
1769 // A renderer sends this to the browser process when a document has been
1770 // detached. The browser will use this to constrain the lifecycle of worker
1771 // processes (SharedWorkers are shut down when their last associated document
1773 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1774 uint64
/* document_id */)
1776 // Wraps an IPC message that's destined to the worker on the renderer->browser
1778 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1779 IPC::Message
/* message */)
1781 // Tells the browser that a specific Appcache manifest in the current page
1783 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1784 GURL
/* manifest url */,
1785 bool /* blocked by policy */)
1787 // Initiates a download based on user actions like 'ALT+click'.
1788 IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl
,
1790 content::Referrer
/* referrer */,
1791 string16
/* suggested_name */)
1793 // Used to go to the session history entry at the given offset (ie, -1 will
1794 // return the "back" item).
1795 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1796 int /* offset (from current) of history item to get */)
1798 // Sent from an inactive renderer for the browser to route to the active
1799 // renderer, instructing it to close.
1800 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1802 // Sent to the browser from an inactive renderer to post a message to the
1804 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent
,
1805 ViewMsg_PostMessage_Params
)
1807 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage
,
1808 string16
/* in - alert message */,
1809 string16
/* in - default prompt */,
1810 GURL
/* in - originating page URL */,
1811 content::JavaScriptMessageType
/* in - type */,
1812 bool /* out - success */,
1813 string16
/* out - user_input field */)
1815 // Requests that the given URL be opened in the specified manner.
1816 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL
, ViewHostMsg_OpenURL_Params
)
1818 // Notifies that the preferred size of the content changed.
1819 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1820 gfx::Size
/* pref_size */)
1822 // Notifies that the scrollbars-visible state of the content changed.
1823 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame
,
1824 bool /* has_horizontal_scrollbar */,
1825 bool /* has_vertical_scrollbar */)
1827 // Notifies that the pinned-to-side state of the content changed.
1828 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame
,
1829 bool /* pinned_to_left */,
1830 bool /* pinned_to_right */)
1832 // Notifies that the number of JavaScript scroll handlers changed.
1833 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents
,
1836 // Notifies whether there are JavaScript touche event handlers or not.
1837 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers
,
1838 bool /* has_handlers */)
1840 // A message from HTML-based UI. When (trusted) Javascript calls
1841 // send(message, args), this message is sent to the browser.
1842 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend
,
1843 GURL
/* source_url */,
1844 std::string
/* message */,
1845 base::ListValue
/* args */)
1847 // Requests a snapshot of the given window.
1848 IPC_MESSAGE_ROUTED1(ViewHostMsg_GetWindowSnapshot
,
1849 int /* snapshot_id */)
1851 // A renderer sends this to the browser process when it wants to create a ppapi
1852 // plugin. The browser will create the plugin process if necessary, and will
1853 // return a handle to the channel on success.
1855 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1856 // process. This ID is valid only in the context of the browser process and is
1857 // used to identify the proper process when the renderer notifies it that the
1860 // On error an empty string and null handles are returned.
1861 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_OpenChannelToPepperPlugin
,
1862 FilePath
/* path */,
1863 IPC::ChannelHandle
/* handle to channel */,
1864 int /* plugin_child_id */)
1866 // Notification that a plugin has created a new plugin instance. The parameters
1868 // -The plugin process ID that we're creating the instance for.
1869 // -The instance ID of the instance being created.
1870 // -A PepperRendererInstanceData struct which contains properties from the
1871 // renderer which are associated with the plugin instance. This includes the
1872 // routing ID of the associated render view and the URL of plugin.
1873 // -Whether the plugin we're creating an instance for is external or internal.
1875 // This message must be sync even though it returns no parameters to avoid
1876 // a race condition with the plugin process. The plugin process sends messages
1877 // to the browser that assume the browser knows about the instance. We need to
1878 // make sure that the browser actually knows about the instance before we tell
1879 // the plugin to run.
1880 IPC_SYNC_MESSAGE_CONTROL4_0(
1881 ViewHostMsg_DidCreateOutOfProcessPepperInstance
,
1882 int /* plugin_child_id */,
1883 int32
/* pp_instance */,
1884 content::PepperRendererInstanceData
/* creation_data */,
1885 bool /* is_external */)
1887 // Notification that a plugin has destroyed an instance. This is the opposite of
1888 // the "DidCreate" message above.
1889 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance
,
1890 int /* plugin_child_id */,
1891 int32
/* pp_instance */,
1892 bool /* is_external */)
1894 // A renderer sends this to the browser process when it wants to
1895 // create a ppapi broker. The browser will create the broker process
1896 // if necessary, and will return a handle to the channel on success.
1897 // On error an empty string is returned.
1898 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1899 IPC_MESSAGE_CONTROL3(ViewHostMsg_OpenChannelToPpapiBroker
,
1900 int /* routing_id */,
1901 int /* request_id */,
1902 FilePath
/* path */)
1904 // A renderer sends this to the browser process when it wants to access a PPAPI
1905 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1906 // for every connection.
1907 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1908 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission
,
1909 int /* request_id */,
1910 GURL
/* document_url */,
1911 FilePath
/* plugin_path */)
1913 #if defined(USE_X11)
1914 // A renderer sends this when it needs a browser-side widget for
1915 // hosting a windowed plugin. id is the XID of the plugin window, for which
1916 // the container is created.
1917 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer
,
1918 gfx::PluginWindowHandle
/* id */)
1920 // Destroy a plugin container previously created using CreatePluginContainer.
1921 // id is the XID of the plugin window corresponding to the container that is
1923 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer
,
1924 gfx::PluginWindowHandle
/* id */)
1927 // Send the tooltip text for the current mouse position to the browser.
1928 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText
,
1929 string16
/* tooltip text string */,
1930 WebKit::WebTextDirection
/* text direction hint */)
1932 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK
)
1934 // Notification that the text selection has changed.
1935 // Note: The secound parameter is the character based offset of the string16
1936 // text in the document.
1937 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged
,
1938 string16
/* text covers the selection range */,
1939 size_t /* the offset of the text in the document */,
1940 ui::Range
/* selection range in the document */)
1942 // Notification that the selection bounds have changed.
1943 IPC_MESSAGE_ROUTED4(ViewHostMsg_SelectionBoundsChanged
,
1944 gfx::Rect
/* start rect */,
1945 WebKit::WebTextDirection
/* start text dir */,
1946 gfx::Rect
/* end rect */,
1947 WebKit::WebTextDirection
/* end text dir */)
1949 // Asks the browser to open the color chooser.
1950 IPC_MESSAGE_ROUTED2(ViewHostMsg_OpenColorChooser
,
1952 SkColor
/* color */)
1954 // Asks the browser to end the color chooser.
1955 IPC_MESSAGE_ROUTED1(ViewHostMsg_EndColorChooser
, int /* id */)
1957 // Change the selected color in the color chooser.
1958 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSelectedColorInColorChooser
,
1960 SkColor
/* color */)
1962 // Asks the browser to display the file chooser. The result is returned in a
1963 // ViewHost_RunFileChooserResponse message.
1964 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
1965 content::FileChooserParams
)
1967 // Asks the browser to enumerate a directory. This is equivalent to running
1968 // the file chooser in directory-enumeration mode and having the user select
1969 // the given directory. The result is returned in a
1970 // ViewMsg_EnumerateDirectoryResponse message.
1971 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
1972 int /* request_id */,
1973 FilePath
/* file_path */)
1975 // Tells the browser to move the focus to the next (previous if reverse is
1976 // true) focusable element.
1977 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
1980 // Required for updating text input state.
1981 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
1982 ViewHostMsg_TextInputState_Params
/* input state params */)
1984 // Message sent when the IME text composition range changes.
1985 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged
,
1986 ui::Range
/* composition range */,
1987 std::vector
<gfx::Rect
> /* character bounds */)
1989 // Required for cancelling an ongoing input method composition.
1990 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition
)
1992 // Tells the renderer to cancel an opened date/time dialog.
1993 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
1995 // WebKit and JavaScript error messages to log to the console
1997 IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole
,
1998 int32
, /* log level */
2000 int32
, /* line number */
2001 string16
/* source id */)
2003 // Sent by the renderer process to indicate that a plugin instance has
2005 IPC_MESSAGE_ROUTED1(ViewHostMsg_CrashedPlugin
,
2006 FilePath
/* plugin_path */)
2008 // Displays a box to confirm that the user wants to navigate away from the
2009 // page. Replies true if yes, false otherwise, the reply string is ignored,
2010 // but is included so that we can use OnJavaScriptMessageBoxClosed.
2011 IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm
,
2012 GURL
, /* in - originating frame URL */
2013 string16
/* in - alert message */,
2014 bool /* in - is a reload */,
2015 bool /* out - success */,
2016 string16
/* out - This is ignored.*/)
2018 // Sent when the renderer process is done processing a DataReceived
2020 IPC_MESSAGE_ROUTED1(ViewHostMsg_DataReceived_ACK
,
2021 int /* request_id */)
2023 // Sent when a provisional load on the main frame redirects.
2024 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad
,
2026 GURL
/* last url */,
2027 GURL
/* url redirected to */)
2029 // Sent when the renderer changes the zoom level for a particular url, so the
2030 // browser can update its records. If remember is true, then url is used to
2031 // update the zoom level for all pages in that site. Otherwise, the render
2032 // view's id is used so that only the menu is updated.
2033 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL
,
2034 double /* zoom_level */,
2035 bool /* remember */,
2038 // Updates the minimum/maximum allowed zoom percent for this tab from the
2039 // default values. If |remember| is true, then the zoom setting is applied to
2040 // other pages in the site and is saved, otherwise it only applies to this
2042 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits
,
2043 int /* minimum_percent */,
2044 int /* maximum_percent */,
2045 bool /* remember */)
2047 // Notify the browser that this render process can or can't be suddenly
2049 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged
,
2052 #if defined(OS_MACOSX)
2053 // Request that the browser load a font into shared memory for us.
2054 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont
,
2055 FontDescriptor
/* font to load */,
2056 uint32
/* buffer size */,
2057 base::SharedMemoryHandle
/* font data */,
2058 uint32
/* font id */)
2060 // On OSX, we cannot allocated shared memory from within the sandbox, so
2061 // this call exists for the renderer to ask the browser to allocate memory
2062 // on its behalf. We return a file descriptor to the POSIX shared memory.
2063 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
2064 // by the browser, and it is the caller's repsonsibility to send a
2065 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
2066 // In all cases, the caller is responsible for deleting the resulting
2068 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB
,
2069 size_t, /* bytes requested */
2070 bool, /* cache in the browser */
2071 TransportDIB::Handle
/* DIB */)
2073 // Since the browser keeps handles to the allocated transport DIBs, this
2074 // message is sent to tell the browser that it may release them when the
2075 // renderer is finished with them.
2076 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB
,
2077 TransportDIB::Id
/* DIB id */)
2079 // Informs the browser that a plugin has gained or lost focus.
2080 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
2082 int /* plugin_id */)
2084 // Instructs the browser to start plugin IME.
2085 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
2087 //---------------------------------------------------------------------------
2088 // Messages related to accelerated plugins
2090 // This is sent from the renderer to the browser to allocate a fake
2091 // PluginWindowHandle on the browser side which is used to identify
2092 // the plugin to the browser later when backing store is allocated
2093 // or reallocated. |opaque| indicates whether the plugin's output is
2094 // considered to be opaque, as opposed to translucent. This message
2095 // is reused for rendering the accelerated compositor's output.
2096 // |root| indicates whether the output is supposed to cover the
2098 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_AllocateFakePluginWindowHandle
,
2101 gfx::PluginWindowHandle
/* id */)
2103 // Destroys a fake window handle previously allocated using
2104 // AllocateFakePluginWindowHandle.
2105 IPC_MESSAGE_ROUTED1(ViewHostMsg_DestroyFakePluginWindowHandle
,
2106 gfx::PluginWindowHandle
/* id */)
2108 // This message, used on Mac OS X 10.5 and earlier (no IOSurface support),
2109 // is sent from the renderer to the browser on behalf of the plug-in
2110 // to indicate that a new backing store was allocated for that plug-in
2112 IPC_MESSAGE_ROUTED4(ViewHostMsg_AcceleratedSurfaceSetTransportDIB
,
2113 gfx::PluginWindowHandle
/* window */,
2116 TransportDIB::Handle
/* handle for the DIB */)
2118 // This message, used on Mac OS X 10.6 and later (where IOSurface is
2119 // supported), is sent from the renderer to the browser on behalf of the
2120 // plug-in to indicate that a new backing store was allocated for that
2121 // plug-in instance.
2123 // NOTE: the original intent was to pass a mach port as the IOSurface
2124 // identifier but it looks like that will be a lot of work. For now we pass an
2125 // ID from IOSurfaceGetID.
2126 IPC_MESSAGE_ROUTED4(ViewHostMsg_AcceleratedSurfaceSetIOSurface
,
2127 gfx::PluginWindowHandle
/* window */,
2130 uint64
/* surface_id */)
2132 // This message notifies the browser process that the plug-in
2133 // swapped the buffers associated with the given "window", which
2134 // should cause the browser to redraw the various plug-ins'
2136 IPC_MESSAGE_ROUTED2(ViewHostMsg_AcceleratedSurfaceBuffersSwapped
,
2137 gfx::PluginWindowHandle
/* window */,
2138 uint64
/* surface_handle */)
2141 // This message is synthesized by GpuProcessHost to pass through a swap message
2142 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
2143 // software or GPU frame.
2144 IPC_MESSAGE_ROUTED5(ViewHostMsg_CompositorSurfaceBuffersSwapped
,
2145 int32
/* surface id */,
2146 uint64
/* surface_handle */,
2147 int32
/* route_id */,
2148 gfx::Size
/* size */,
2149 int32
/* gpu_process_host_id */)
2151 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapCompositorFrame
,
2152 cc::CompositorFrame
/* frame */)
2153 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapCompositorFrameAck
,
2154 cc::CompositorFrameAck
/* ack */)
2156 // Opens a file asynchronously. The response returns a file descriptor
2157 // and an error code from base/platform_file.h.
2158 IPC_MESSAGE_ROUTED3(ViewHostMsg_AsyncOpenFile
,
2159 FilePath
/* file path */,
2161 int /* message_id */)
2163 //---------------------------------------------------------------------------
2164 // Request for cryptographic operation messages:
2165 // These are messages from the renderer to the browser to perform a
2166 // cryptographic operation.
2168 // Asks the browser process to generate a keypair for grabbing a client
2169 // certificate from a CA (<keygen> tag), and returns the signed public
2170 // key and challenge string.
2171 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen
,
2172 uint32
/* key size index */,
2173 std::string
/* challenge string */,
2174 GURL
/* URL of requestor */,
2175 std::string
/* signed public key and challenge */)
2177 // Message sent from the renderer to the browser to request that the browser
2178 // cache |data| associated with |url|.
2179 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata
,
2181 double /* expected_response_time */,
2182 std::vector
<char> /* data */)
2184 // Updates the content restrictions, i.e. to disable print/copy.
2185 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions
,
2186 int /* restrictions */)
2188 // Brings up SaveAs... dialog to save specified URL.
2189 IPC_MESSAGE_ROUTED2(ViewHostMsg_SaveURLAs
,
2191 content::Referrer
/* referrer */)
2193 // Displays a JavaScript out-of-memory message in the infobar.
2194 IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory
)
2196 // Register a new handler for URL requests with the given scheme.
2197 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler
,
2198 std::string
/* scheme */,
2200 string16
/* title */,
2201 bool /* user_gesture */)
2203 // Stores new inspector setting in the profile.
2204 // TODO(jam): this should be in the chrome module
2205 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting
,
2206 std::string
, /* key */
2207 std::string
/* value */)
2209 // Puts the browser into "tab fullscreen" mode for the sending renderer.
2210 // See the comment in chrome/browser/ui/browser.h for more details.
2211 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen
,
2212 bool /* enter_fullscreen */)
2214 // Send back a string to be recorded by UserMetrics.
2215 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
2216 std::string
/* action */)
2218 // Notifies the browser that the page was or was not saved as MHTML.
2219 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
2221 int64
/* size of the MHTML file, -1 if error */)
2223 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks
,
2224 std::vector
<GURL
> /* all savable resource links */,
2225 std::vector
<content::Referrer
> /* all referrers */,
2226 std::vector
<GURL
> /* all frame links */)
2228 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
2229 GURL
/* frame's url */,
2230 std::string
/* data buffer */,
2231 int32
/* complete status */)
2233 // Notifies the browser of an event occurring in the media pipeline.
2234 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvent
,
2235 media::MediaLogEvent
/* event */)
2237 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
2239 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
2240 // pop up a bubble to ask for user permission or take mouse lock content into
2242 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
2243 bool /* user_gesture */,
2244 bool /* last_unlocked_by_target */,
2245 bool /* privileged */)
2247 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
2248 // whenever the mouse is unlocked (which may or may not be caused by
2249 // ViewHostMsg_UnlockMouse).
2250 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
2252 // Following message is used to communicate the values received by the
2253 // callback binding the JS to Cpp.
2254 // An instance of browser that has an automation host listening to it can
2255 // have a javascript send a native value (string, number, boolean) to the
2256 // listener in Cpp. (DomAutomationController)
2257 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse
,
2258 std::string
/* json_string */,
2259 int /* automation_id */)
2261 // Sent to the browser when the renderer detects it is blocked on a pepper
2262 // plugin message for too long. This is also sent when it becomes unhung
2263 // (according to the value of is_hung). The browser can give the user the
2264 // option of killing the plugin.
2265 IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung
,
2266 int /* plugin_child_id */,
2267 FilePath
/* path */,
2270 // Screen was rotated. Dispatched to the onorientationchange javascript API.
2271 IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent
,
2272 int /* orientation */)
2274 // Chrome allows JavaScript calls to be routed across process boundaries. To
2275 // achieve this, each active RenderView in the source process has a swapped out
2276 // "mirror" in the target process. The active RenderView and its mirror
2277 // need to have identical frame tree structure, so calls originating in and
2278 // targeting subframes can be routed properly. This is achieved by each active
2279 // RenderView sending a ViewHostMsg_FrameTreeUpdated message to the browser,
2280 // which in turn sends the update to the corresponding mirror RenderView(s)
2281 // through the ViewMsg_UpdateFrameTree. We use best effort to keep these
2282 // trees synchronized across processes.
2284 // When routing JavaScript calls across processes, the target information
2285 // is kept in the renderer process instead of the browser process. This design
2286 // was chosen because frame ids are allocated by the renderer process. If the
2287 // browser was to keep a mapping of the frame ids across processes, it would
2288 // require an extra IPC message with the newly allocated frame ids, as a
2289 // response to this particular message.
2291 // The frame tree for a RenderView is serialized to JSON, so it can be sent to
2292 // the browser process. Each node in the tree is an object with three
2294 // * id - (integer) the frame identifier in this RenderView
2295 // * name - (string) the name of the frame, if one has been assigned
2296 // * subtree - an array of the same type of objects for each frame that is a
2297 // direct child of the current frame. This property can be omitted if
2298 // there are no direct child frames, so less data is transferred.
2300 // This message must be sent on any events that modify the tree structure or
2301 // the names of any frames.
2302 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameTreeUpdated
,
2303 std::string
/* json encoded frame tree */)
2305 #if defined(OS_ANDROID)
2306 // Response to ViewMsg_FindMatchRects.
2308 // |version| will contain the current version number of the renderer's find
2309 // match list (incremented whenever they change), which should be passed in the
2310 // next call to ViewMsg_FindMatchRects.
2312 // |rects| will either contain a list of the enclosing rects of all matches
2313 // found by the most recent Find operation, or will be empty if |version| is not
2314 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
2315 // your locally cached rects should still be valid). The rect coords will be
2316 // custom normalized fractions of the document size. The rects will be sorted by
2317 // frame traversal order starting in the main frame, then by dom order.
2319 // |active_rect| will contain the bounding box of the active find-in-page match
2320 // marker, in similarly normalized coords (or an empty rect if there isn't one).
2321 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
2323 std::vector
<gfx::RectF
> /* rects */,
2324 gfx::RectF
/* active_rect */)
2326 // Start an android intent with the given URI.
2327 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
2328 GURL
/* content_url */)
2331 // Notifies that multiple touch targets may have been pressed, and to show
2332 // the disambiguation popup.
2333 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
2334 gfx::Rect
, /* Border of touched targets */
2335 gfx::Size
, /* Size of zoomed image */
2336 TransportDIB::Id
/* DIB of zoomed image */)
2338 // Sent by the renderer process to check whether client 3D APIs
2339 // (Pepper 3D, WebGL) are explicitly blocked.
2340 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked
,
2341 int /* render_view_id */,
2342 GURL
/* top_origin_url */,
2343 content::ThreeDAPIType
/* requester */,
2346 // Sent by the renderer process to indicate that a context was lost by
2347 // client 3D content (Pepper 3D, WebGL) running on the page at the
2349 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext
,
2350 GURL
/* top_origin_url */,
2351 content::ThreeDAPIType
/* context_type */,
2352 int /* arb_robustness_status_code */)
2355 // Request that the given font characters be loaded by the browser so it's
2356 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
2358 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters
,
2359 LOGFONT
/* font_data */,
2360 string16
/* characters */)