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/output/compositor_frame.h"
12 #include "cc/output/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/favicon_url.h"
23 #include "content/public/common/file_chooser_params.h"
24 #include "content/public/common/frame_navigate_params.h"
25 #include "content/public/common/javascript_message_type.h"
26 #include "content/public/common/page_zoom.h"
27 #include "content/public/common/referrer.h"
28 #include "content/public/common/renderer_preferences.h"
29 #include "content/public/common/stop_find_action.h"
30 #include "content/public/common/three_d_api_types.h"
31 #include "content/public/common/window_container_type.h"
32 #include "ipc/ipc_channel_handle.h"
33 #include "ipc/ipc_message_macros.h"
34 #include "ipc/ipc_platform_file.h"
35 #include "media/audio/audio_parameters.h"
36 #include "media/base/channel_layout.h"
37 #include "media/base/media_log_event.h"
38 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
39 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginAction.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
48 #include "third_party/skia/include/core/SkBitmap.h"
49 #include "ui/base/ime/text_input_type.h"
50 #include "ui/base/range/range.h"
51 #include "ui/gfx/point.h"
52 #include "ui/gfx/rect.h"
53 #include "ui/gfx/rect_f.h"
54 #include "ui/gfx/vector2d.h"
55 #include "ui/shell_dialogs/selected_file_info.h"
56 #include "webkit/glue/webcookie.h"
57 #include "webkit/glue/webmenuitem.h"
58 #include "webkit/plugins/npapi/webplugin.h"
60 #if defined(OS_MACOSX)
61 #include "content/common/mac/font_descriptor.h"
64 #undef IPC_MESSAGE_EXPORT
65 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
67 #define IPC_MESSAGE_START ViewMsgStart
69 IPC_ENUM_TRAITS(AccessibilityMode
)
70 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value
)
71 IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType
)
72 IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type
)
73 IPC_ENUM_TRAITS(WebKit::WebPluginAction::Type
)
74 IPC_ENUM_TRAITS(WebKit::WebPopupType
)
75 IPC_ENUM_TRAITS(WebKit::WebTextDirection
)
76 IPC_ENUM_TRAITS(WebMenuItem::Type
)
77 IPC_ENUM_TRAITS(WindowContainerType
)
78 IPC_ENUM_TRAITS(content::FaviconURL::IconType
)
79 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
80 IPC_ENUM_TRAITS(content::InputEventAckState
)
81 IPC_ENUM_TRAITS(content::JavaScriptMessageType
)
82 IPC_ENUM_TRAITS(content::NavigationGesture
)
83 IPC_ENUM_TRAITS(content::PageZoom
)
84 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum
)
85 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum
)
86 IPC_ENUM_TRAITS(content::StopFindAction
)
87 IPC_ENUM_TRAITS(content::ThreeDAPIType
)
88 IPC_ENUM_TRAITS(media::ChannelLayout
)
89 IPC_ENUM_TRAITS(media::MediaLogEvent::Type
)
90 IPC_ENUM_TRAITS(ui::TextInputType
)
92 #if defined(OS_MACOSX)
93 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
94 IPC_STRUCT_TRAITS_MEMBER(font_name
)
95 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
96 IPC_STRUCT_TRAITS_END()
99 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCompositionUnderline
)
100 IPC_STRUCT_TRAITS_MEMBER(startOffset
)
101 IPC_STRUCT_TRAITS_MEMBER(endOffset
)
102 IPC_STRUCT_TRAITS_MEMBER(color
)
103 IPC_STRUCT_TRAITS_MEMBER(thick
)
104 IPC_STRUCT_TRAITS_END()
106 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFindOptions
)
107 IPC_STRUCT_TRAITS_MEMBER(forward
)
108 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
109 IPC_STRUCT_TRAITS_MEMBER(findNext
)
110 IPC_STRUCT_TRAITS_END()
112 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction
)
113 IPC_STRUCT_TRAITS_MEMBER(type
)
114 IPC_STRUCT_TRAITS_MEMBER(enable
)
115 IPC_STRUCT_TRAITS_END()
117 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebPluginAction
)
118 IPC_STRUCT_TRAITS_MEMBER(type
)
119 IPC_STRUCT_TRAITS_MEMBER(enable
)
120 IPC_STRUCT_TRAITS_END()
122 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatPoint
)
123 IPC_STRUCT_TRAITS_MEMBER(x
)
124 IPC_STRUCT_TRAITS_MEMBER(y
)
125 IPC_STRUCT_TRAITS_END()
127 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatRect
)
128 IPC_STRUCT_TRAITS_MEMBER(x
)
129 IPC_STRUCT_TRAITS_MEMBER(y
)
130 IPC_STRUCT_TRAITS_MEMBER(width
)
131 IPC_STRUCT_TRAITS_MEMBER(height
)
132 IPC_STRUCT_TRAITS_END()
134 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo
)
135 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
136 IPC_STRUCT_TRAITS_MEMBER(depth
)
137 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
138 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
139 IPC_STRUCT_TRAITS_MEMBER(rect
)
140 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
141 IPC_STRUCT_TRAITS_END()
143 IPC_STRUCT_TRAITS_BEGIN(WebMenuItem
)
144 IPC_STRUCT_TRAITS_MEMBER(label
)
145 IPC_STRUCT_TRAITS_MEMBER(toolTip
)
146 IPC_STRUCT_TRAITS_MEMBER(type
)
147 IPC_STRUCT_TRAITS_MEMBER(action
)
148 IPC_STRUCT_TRAITS_MEMBER(rtl
)
149 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
150 IPC_STRUCT_TRAITS_MEMBER(enabled
)
151 IPC_STRUCT_TRAITS_MEMBER(checked
)
152 IPC_STRUCT_TRAITS_MEMBER(submenu
)
153 IPC_STRUCT_TRAITS_END()
155 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams
)
156 IPC_STRUCT_TRAITS_MEMBER(media_type
)
157 IPC_STRUCT_TRAITS_MEMBER(x
)
158 IPC_STRUCT_TRAITS_MEMBER(y
)
159 IPC_STRUCT_TRAITS_MEMBER(link_url
)
160 IPC_STRUCT_TRAITS_MEMBER(link_text
)
161 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url
)
162 IPC_STRUCT_TRAITS_MEMBER(src_url
)
163 IPC_STRUCT_TRAITS_MEMBER(is_image_blocked
)
164 IPC_STRUCT_TRAITS_MEMBER(page_url
)
165 IPC_STRUCT_TRAITS_MEMBER(keyword_url
)
166 IPC_STRUCT_TRAITS_MEMBER(frame_url
)
167 IPC_STRUCT_TRAITS_MEMBER(frame_content_state
)
168 IPC_STRUCT_TRAITS_MEMBER(media_flags
)
169 IPC_STRUCT_TRAITS_MEMBER(selection_text
)
170 IPC_STRUCT_TRAITS_MEMBER(misspelled_word
)
171 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions
)
172 IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled
)
173 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled
)
174 IPC_STRUCT_TRAITS_MEMBER(is_editable
)
175 #if defined(OS_MACOSX)
176 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default
)
177 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right
)
178 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left
)
180 IPC_STRUCT_TRAITS_MEMBER(edit_flags
)
181 IPC_STRUCT_TRAITS_MEMBER(security_info
)
182 IPC_STRUCT_TRAITS_MEMBER(frame_charset
)
183 IPC_STRUCT_TRAITS_MEMBER(referrer_policy
)
184 IPC_STRUCT_TRAITS_MEMBER(custom_context
)
185 IPC_STRUCT_TRAITS_MEMBER(custom_items
)
186 #if defined(OS_ANDROID)
187 IPC_STRUCT_TRAITS_MEMBER(selection_start
)
188 IPC_STRUCT_TRAITS_MEMBER(selection_end
)
190 IPC_STRUCT_TRAITS_END()
192 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext
)
193 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu
)
194 IPC_STRUCT_TRAITS_MEMBER(request_id
)
195 IPC_STRUCT_TRAITS_MEMBER(render_widget_id
)
196 IPC_STRUCT_TRAITS_END()
198 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand
)
199 IPC_STRUCT_TRAITS_MEMBER(name
)
200 IPC_STRUCT_TRAITS_MEMBER(value
)
201 IPC_STRUCT_TRAITS_END()
203 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL
)
204 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
205 IPC_STRUCT_TRAITS_MEMBER(icon_type
)
206 IPC_STRUCT_TRAITS_END()
208 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
209 IPC_STRUCT_TRAITS_MEMBER(mode
)
210 IPC_STRUCT_TRAITS_MEMBER(title
)
211 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
212 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
213 #if defined(OS_ANDROID)
214 IPC_STRUCT_TRAITS_MEMBER(capture
)
216 IPC_STRUCT_TRAITS_END()
218 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams
)
219 IPC_STRUCT_TRAITS_MEMBER(page_id
)
220 IPC_STRUCT_TRAITS_MEMBER(url
)
221 IPC_STRUCT_TRAITS_MEMBER(base_url
)
222 IPC_STRUCT_TRAITS_MEMBER(referrer
)
223 IPC_STRUCT_TRAITS_MEMBER(transition
)
224 IPC_STRUCT_TRAITS_MEMBER(redirects
)
225 IPC_STRUCT_TRAITS_MEMBER(should_update_history
)
226 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url
)
227 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding
)
228 IPC_STRUCT_TRAITS_MEMBER(password_form
)
229 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type
)
230 IPC_STRUCT_TRAITS_MEMBER(socket_address
)
231 IPC_STRUCT_TRAITS_END()
233 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
234 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
235 IPC_STRUCT_TRAITS_MEMBER(render_view_id
)
236 IPC_STRUCT_TRAITS_MEMBER(document_url
)
237 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
238 IPC_STRUCT_TRAITS_END()
240 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
241 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
242 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
243 IPC_STRUCT_TRAITS_MEMBER(hinting
)
244 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
245 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
246 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
247 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
248 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
249 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
250 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
251 IPC_STRUCT_TRAITS_MEMBER(track_color
)
252 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
253 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
254 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
255 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
256 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests
)
257 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
258 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
259 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors
)
260 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
261 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
262 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
263 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
264 IPC_STRUCT_TRAITS_MEMBER(throttle_input_events
)
265 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes
)
266 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile
)
267 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile
)
268 IPC_STRUCT_TRAITS_END()
270 IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebCookie
)
271 IPC_STRUCT_TRAITS_MEMBER(name
)
272 IPC_STRUCT_TRAITS_MEMBER(value
)
273 IPC_STRUCT_TRAITS_MEMBER(domain
)
274 IPC_STRUCT_TRAITS_MEMBER(path
)
275 IPC_STRUCT_TRAITS_MEMBER(expires
)
276 IPC_STRUCT_TRAITS_MEMBER(http_only
)
277 IPC_STRUCT_TRAITS_MEMBER(secure
)
278 IPC_STRUCT_TRAITS_MEMBER(session
)
279 IPC_STRUCT_TRAITS_END()
281 IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginGeometry
)
282 IPC_STRUCT_TRAITS_MEMBER(window
)
283 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
284 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
285 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
286 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
287 IPC_STRUCT_TRAITS_MEMBER(visible
)
288 IPC_STRUCT_TRAITS_END()
290 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
291 IPC_STRUCT_TRAITS_MEMBER(id
)
292 IPC_STRUCT_TRAITS_MEMBER(type
)
293 IPC_STRUCT_TRAITS_MEMBER(params
)
294 IPC_STRUCT_TRAITS_MEMBER(time
)
295 IPC_STRUCT_TRAITS_END()
297 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo
)
298 IPC_STRUCT_TRAITS_MEMBER(file_path
)
299 IPC_STRUCT_TRAITS_MEMBER(local_path
)
300 IPC_STRUCT_TRAITS_MEMBER(display_name
)
301 IPC_STRUCT_TRAITS_END()
303 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
304 // Routing ID of the view initiating the open.
305 IPC_STRUCT_MEMBER(int, opener_id
)
307 // True if this open request came in the context of a user gesture.
308 IPC_STRUCT_MEMBER(bool, user_gesture
)
310 // Type of window requested.
311 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
313 // The session storage namespace ID this view should use.
314 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
316 // The name of the resulting frame that should be created (empty if none
317 // has been specified).
318 IPC_STRUCT_MEMBER(string16
, frame_name
)
320 // The frame identifier of the frame initiating the open.
321 IPC_STRUCT_MEMBER(int64
, opener_frame_id
)
323 // The URL of the frame initiating the open.
324 IPC_STRUCT_MEMBER(GURL
, opener_url
)
326 // The security origin of the frame initiating the open.
327 IPC_STRUCT_MEMBER(GURL
, opener_security_origin
)
329 // Whether the opener will be suppressed in the new window, in which case
330 // scripting the new window is not allowed.
331 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
333 // Whether the window should be opened in the foreground, background, etc.
334 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
336 // The URL that will be loaded in the new window (empty if none has been
338 IPC_STRUCT_MEMBER(GURL
, target_url
)
341 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
342 // URL for the worker script.
343 IPC_STRUCT_MEMBER(GURL
, url
)
345 // Name for a SharedWorker, otherwise empty string.
346 IPC_STRUCT_MEMBER(string16
, name
)
348 // The ID of the parent document (unique within parent renderer).
349 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
351 // RenderView routing id used to send messages back to the parent.
352 IPC_STRUCT_MEMBER(int, render_view_route_id
)
354 // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed,
355 // a new unique ID is created and assigned to the worker.
356 IPC_STRUCT_MEMBER(int, route_id
)
358 // The ID of the appcache the main shared worker script resource was loaded
359 // from, only valid for shared workers.
360 IPC_STRUCT_MEMBER(int64
, script_resource_appcache_id
)
363 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params
)
364 IPC_STRUCT_MEMBER(int, dialog_type
)
365 IPC_STRUCT_MEMBER(int, year
)
366 IPC_STRUCT_MEMBER(int, month
)
367 IPC_STRUCT_MEMBER(int, day
)
368 IPC_STRUCT_MEMBER(int, hour
)
369 IPC_STRUCT_MEMBER(int, minute
)
370 IPC_STRUCT_MEMBER(int, second
)
373 IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params
)
374 // The frame ID for the failure report.
375 IPC_STRUCT_MEMBER(int64
, frame_id
)
376 // True if this is the top-most frame.
377 IPC_STRUCT_MEMBER(bool, is_main_frame
)
378 // Error code as reported in the DidFailProvisionalLoad callback.
379 IPC_STRUCT_MEMBER(int, error_code
)
380 // An error message generated from the error_code. This can be an empty
381 // string if we were unable to find a meaningful description.
382 IPC_STRUCT_MEMBER(string16
, error_description
)
383 // The URL that the error is reported for.
384 IPC_STRUCT_MEMBER(GURL
, url
)
385 // True if the failure is the result of navigating to a POST again
386 // and we're going to show the POST interstitial.
387 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial
)
390 // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
391 // parameters to be reasonably put in a predefined IPC message.
392 IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params
,
393 content::FrameNavigateParams
)
394 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams
)
395 // The frame ID for this navigation. The frame ID uniquely identifies the
396 // frame the navigation happened in for a given renderer.
397 IPC_STRUCT_MEMBER(int64
, frame_id
)
399 // Information regarding the security of the connection (empty if the
400 // connection was not secure).
401 IPC_STRUCT_MEMBER(std::string
, security_info
)
403 // The gesture that initiated this navigation.
404 IPC_STRUCT_MEMBER(content::NavigationGesture
, gesture
)
406 // True if this was a post request.
407 IPC_STRUCT_MEMBER(bool, is_post
)
409 // The POST body identifier. -1 if it doesn't exist.
410 IPC_STRUCT_MEMBER(int64
, post_id
)
412 // Whether the frame navigation resulted in no change to the documents within
413 // the page. For example, the navigation may have just resulted in scrolling
414 // to a named anchor.
415 IPC_STRUCT_MEMBER(bool, was_within_same_page
)
417 // The status code of the HTTP request.
418 IPC_STRUCT_MEMBER(int, http_status_code
)
420 // True if the connection was proxied. In this case, socket_address
421 // will represent the address of the proxy, rather than the remote host.
422 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy
)
424 // Serialized history item state to store in the navigation entry.
425 IPC_STRUCT_MEMBER(std::string
, content_state
)
427 // Original request's URL.
428 IPC_STRUCT_MEMBER(GURL
, original_request_url
)
430 // User agent override used to navigate.
431 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
434 IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params
)
435 IPC_STRUCT_MEMBER(GURL
, url
)
436 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
437 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
438 IPC_STRUCT_MEMBER(int64
, frame_id
)
439 IPC_STRUCT_MEMBER(bool, is_cross_site_redirect
)
442 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params
)
443 IPC_STRUCT_MEMBER(gfx::Rect
, anchor_rect
)
444 IPC_STRUCT_MEMBER(WebKit::WebTextDirection
, anchor_dir
)
445 IPC_STRUCT_MEMBER(gfx::Rect
, focus_rect
)
446 IPC_STRUCT_MEMBER(WebKit::WebTextDirection
, focus_dir
)
447 IPC_STRUCT_MEMBER(bool, is_anchor_first
)
450 // This message is used for supporting popup menus on Mac OS X using native
451 // Cocoa controls. The renderer sends us this message which we use to populate
453 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params
)
454 // Position on the screen.
455 IPC_STRUCT_MEMBER(gfx::Rect
, bounds
)
457 // The height of each item in the menu.
458 IPC_STRUCT_MEMBER(int, item_height
)
460 // The size of the font to use for those items.
461 IPC_STRUCT_MEMBER(double, item_font_size
)
463 // The currently selected (displayed) item in the menu.
464 IPC_STRUCT_MEMBER(int, selected_item
)
466 // The entire list of items in the popup menu.
467 IPC_STRUCT_MEMBER(std::vector
<WebMenuItem
>, popup_items
)
469 // Whether items should be right-aligned.
470 IPC_STRUCT_MEMBER(bool, right_aligned
)
472 // Whether this is a multi-select popup.
473 IPC_STRUCT_MEMBER(bool, allow_multiple_selection
)
476 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
477 // The type of input field
478 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
480 // The value of the input field
481 IPC_STRUCT_MEMBER(std::string
, value
)
483 // The cursor position of the current selection start, or the caret position
484 // if nothing is selected
485 IPC_STRUCT_MEMBER(int, selection_start
)
487 // The cursor position of the current selection end, or the caret position
488 // if nothing is selected
489 IPC_STRUCT_MEMBER(int, selection_end
)
491 // The start position of the current composition, or -1 if there is none
492 IPC_STRUCT_MEMBER(int, composition_start
)
494 // The end position of the current composition, or -1 if there is none
495 IPC_STRUCT_MEMBER(int, composition_end
)
497 // Whether or not inline composition can be performed for the current input.
498 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
500 // Whether or not the IME should be shown as a result of this update. Even if
501 // true, the IME will only be shown if the type is appropriate (e.g. not
502 // TEXT_INPUT_TYPE_NONE).
503 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
506 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
507 // The bitmap to be painted into the view at the locations specified by
509 IPC_STRUCT_MEMBER(TransportDIB::Id
, bitmap
)
511 // The position and size of the bitmap.
512 IPC_STRUCT_MEMBER(gfx::Rect
, bitmap_rect
)
514 // The scroll delta. Only one of the delta components can be non-zero, and if
515 // they are both zero, then it means there is no scrolling and the scroll_rect
517 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_delta
)
519 // The rectangular region to scroll.
520 IPC_STRUCT_MEMBER(gfx::Rect
, scroll_rect
)
522 // The scroll offset of the render view.
523 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_offset
)
525 // The regions of the bitmap (in view coords) that contain updated pixels.
526 // In the case of scrolling, this includes the scroll damage rect.
527 IPC_STRUCT_MEMBER(std::vector
<gfx::Rect
>, copy_rects
)
529 // The size of the RenderView when this message was generated. This is
530 // included so the host knows how large the view is from the perspective of
531 // the renderer process. This is necessary in case a resize operation is in
532 // progress. If auto-resize is enabled, this should update the corresponding
534 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
536 // New window locations for plugin child windows.
537 IPC_STRUCT_MEMBER(std::vector
<webkit::npapi::WebPluginGeometry
>,
540 // The following describes the various bits that may be set in flags:
542 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
543 // Indicates that this is a response to a ViewMsg_Resize message.
545 // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
546 // Indicates that this is a response to a ViewMsg_WasShown message.
548 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
549 // Indicates that this is a response to a ViewMsg_Repaint message.
551 // If flags is zero, then this message corresponds to an unsolicited paint
552 // request by the render view. Any of the above bits may be set in flags,
553 // which would indicate that this paint message is an ACK for multiple
555 IPC_STRUCT_MEMBER(int, flags
)
557 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
558 // update. True for 2D painting, but false for accelerated compositing.
559 IPC_STRUCT_MEMBER(bool, needs_ack
)
561 // All the above coordinates are in DIP. This is the scale factor needed
562 // to convert them to pixels.
563 IPC_STRUCT_MEMBER(float, scale_factor
)
566 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params
)
567 // The page_id for this navigation, or -1 if it is a new navigation. Back,
568 // Forward, and Reload navigations should have a valid page_id. If the load
569 // succeeds, then this page_id will be reflected in the resultant
570 // ViewHostMsg_FrameNavigate message.
571 IPC_STRUCT_MEMBER(int32
, page_id
)
573 // If page_id is -1, then pending_history_list_offset will also be -1.
574 // Otherwise, it contains the offset into the history list corresponding to
575 // the current navigation.
576 IPC_STRUCT_MEMBER(int, pending_history_list_offset
)
578 // Informs the RenderView of where its current page contents reside in
579 // session history and the total size of the session history list.
580 IPC_STRUCT_MEMBER(int, current_history_list_offset
)
581 IPC_STRUCT_MEMBER(int, current_history_list_length
)
584 IPC_STRUCT_MEMBER(GURL
, url
)
586 // Base URL for use in WebKit's SubstituteData.
587 // Is only used with data: URLs.
588 IPC_STRUCT_MEMBER(GURL
, base_url_for_data_url
)
590 // History URL for use in WebKit's SubstituteData.
591 // Is only used with data: URLs.
592 IPC_STRUCT_MEMBER(GURL
, history_url_for_data_url
)
594 // The URL to send in the "Referer" header field. Can be empty if there is
596 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
598 // The type of transition.
599 IPC_STRUCT_MEMBER(content::PageTransition
, transition
)
601 // Opaque history state (received by ViewHostMsg_UpdateState).
602 IPC_STRUCT_MEMBER(std::string
, state
)
604 // Type of navigation.
605 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value
, navigation_type
)
607 // The time the request was created
608 IPC_STRUCT_MEMBER(base::Time
, request_time
)
610 // Extra headers (separated by \n) to send during the request.
611 IPC_STRUCT_MEMBER(std::string
, extra_headers
)
613 // The following two members identify a previous request that has been
614 // created before this navigation is being transferred to a new render view.
615 // This serves the purpose of recycling the old request.
616 // Unless this refers to a transferred navigation, these values are -1 and -1.
617 IPC_STRUCT_MEMBER(int, transferred_request_child_id
)
618 IPC_STRUCT_MEMBER(int, transferred_request_request_id
)
620 // Whether or not we should allow the url to download.
621 IPC_STRUCT_MEMBER(bool, allow_download
)
623 // Whether or not the user agent override string should be used.
624 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
626 // True if this was a post request.
627 IPC_STRUCT_MEMBER(bool, is_post
)
629 // If is_post is true, holds the post_data information from browser. Empty
631 IPC_STRUCT_MEMBER(std::vector
<unsigned char>, browser_initiated_post_data
)
633 // Whether or not this url should be allowed to access local file://
635 IPC_STRUCT_MEMBER(bool, can_load_local_resources
)
637 // If not empty, which frame to navigate.
638 IPC_STRUCT_MEMBER(std::string
, frame_to_navigate
)
640 // The navigationStart time to expose to JS for this navigation.
641 IPC_STRUCT_MEMBER(base::TimeTicks
, browser_navigation_start
)
644 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
645 // Renderer-wide preferences.
646 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
648 // Preferences for this view.
649 IPC_STRUCT_MEMBER(webkit_glue::WebPreferences
, web_preferences
)
651 // The ID of the view to be created.
652 IPC_STRUCT_MEMBER(int32
, view_id
)
654 // The ID of the rendering surface.
655 IPC_STRUCT_MEMBER(int32
, surface_id
)
657 // The session storage namespace ID this view should use.
658 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
660 // The name of the frame associated with this view (or empty if none).
661 IPC_STRUCT_MEMBER(string16
, frame_name
)
663 // The route ID of the opener RenderView if we need to set one
664 // (MSG_ROUTING_NONE otherwise).
665 IPC_STRUCT_MEMBER(int, opener_route_id
)
667 // Whether the RenderView should initially be swapped out.
668 IPC_STRUCT_MEMBER(bool, swapped_out
)
670 // The initial page ID to use for this view, which must be larger than any
671 // existing navigation that might be loaded in the view. Page IDs are unique
672 // to a view and are only updated by the renderer after this initial value.
673 IPC_STRUCT_MEMBER(int32
, next_page_id
)
675 // The properties of the screen associated with the view.
676 IPC_STRUCT_MEMBER(WebKit::WebScreenInfo
, screen_info
)
678 // The accessibility mode of the renderer.
679 IPC_STRUCT_MEMBER(AccessibilityMode
, accessibility_mode
)
681 // Specifies whether partially swapping composited buffers is
682 // allowed for a renderer. Partial swaps will be used if they are both
683 // allowed and supported.
684 IPC_STRUCT_MEMBER(bool, allow_partial_swap
)
687 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params
)
688 // The serialized script value.
689 IPC_STRUCT_MEMBER(string16
, data
)
691 // When sent to the browser, this is the routing ID of the source frame in
692 // the source process. The browser replaces it with the routing ID of the
693 // equivalent (swapped out) frame in the destination process.
694 IPC_STRUCT_MEMBER(int, source_routing_id
)
695 // The identifier of the source frame in the source process.
696 IPC_STRUCT_MEMBER(int, source_frame_id
)
698 // The full set of identifiers to uniquely describe the target frame. See
699 // the comment on ViewMsg_FrameTreeUpdated for details.
700 IPC_STRUCT_MEMBER(int, target_process_id
)
701 IPC_STRUCT_MEMBER(int, target_routing_id
)
702 IPC_STRUCT_MEMBER(int, target_frame_id
)
704 // The origin of the source frame.
705 IPC_STRUCT_MEMBER(string16
, source_origin
)
707 // The origin for the message's target.
708 IPC_STRUCT_MEMBER(string16
, target_origin
)
711 IPC_STRUCT_BEGIN(ViewMsg_SwapOut_Params
)
712 // The identifier of the RenderProcessHost for the currently closing view.
714 // These first two parameters are technically redundant since they are
715 // needed only when processing the ACK message, and the processor
716 // theoretically knows both the process and route ID. However, this is
717 // difficult to figure out with our current implementation, so this
718 // information is duplicated here.
719 IPC_STRUCT_MEMBER(int, closing_process_id
)
721 // The route identifier for the currently closing RenderView.
722 IPC_STRUCT_MEMBER(int, closing_route_id
)
724 // The identifier of the RenderProcessHost for the new view attempting to
725 // replace the closing one above.
726 IPC_STRUCT_MEMBER(int, new_render_process_host_id
)
728 // The identifier of the *request* the new view made that is causing the
729 // cross-site transition. This is *not* a route_id, but the request that we
730 // will resume once the ACK from the closing view has been received.
731 IPC_STRUCT_MEMBER(int, new_request_id
)
734 // Messages sent from the browser to the renderer.
736 // Tells the renderer to cancel an opened date/time dialog.
737 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
739 // Get all savable resource links from current webpage, include main
740 // frame and sub-frame.
741 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage
,
742 GURL
/* url of page which is needed to save */)
744 // Get html data by serializing all frames of current page with lists
745 // which contain all resource links that have local copy.
746 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
747 std::vector
<GURL
> /* urls that have local copy */,
748 std::vector
<base::FilePath
> /* paths of local copy */,
749 base::FilePath
/* local directory path */)
751 // Tells the render side that a ViewHostMsg_LockMouse message has been
752 // processed. |succeeded| indicates whether the mouse has been successfully
754 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
755 bool /* succeeded */)
756 // Tells the render side that the mouse has been unlocked.
757 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
759 // Screen was rotated. Dispatched to the onorientationchange javascript API.
760 IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent
,
761 int /* orientation */)
763 // Sent by the renderer when the parameters for vsync alignment have changed.
764 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
765 base::TimeTicks
/* timebase */,
766 base::TimeDelta
/* interval */)
768 // Set the top-level frame to the provided name.
769 IPC_MESSAGE_ROUTED1(ViewMsg_SetName
,
770 std::string
/* frame_name */)
772 // Sent to the RenderView when a new tab is swapped into an existing
773 // tab and the histories need to be merged. The existing tab has a history of
774 // |merged_history_length| which precedes the history of the new tab. All
775 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
777 // For example, suppose the history of page_ids in the new tab's RenderView
778 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
779 // all pages in the new tab with page_id >= 7 are to be preserved.
780 // The resulting page history is [-1 -1 -1 7 8].
781 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune
,
782 int, /* merge_history_length */
783 int32
/* minimum_page_id */)
785 // Tells the renderer to create a new view.
786 // This message is slightly different, the view it takes (via
787 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
788 // non-view control message.
789 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
792 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
793 // similar to the new command, but used when the renderer created a view
794 // first, and we need to update it.
795 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
797 // Sends updated preferences to the renderer.
798 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
799 content::RendererPreferences
)
801 // This passes a set of webkit preferences down to the renderer.
802 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
803 webkit_glue::WebPreferences
)
805 // Informs the renderer that the timezone has changed.
806 IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange
)
808 // Tells the render view to close.
809 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
811 // Tells the render view to change its size. A ViewHostMsg_PaintRect message
812 // is generated in response provided new_size is not empty and not equal to
813 // the view's current size. The generated ViewHostMsg_PaintRect message will
814 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
815 // we don't have to fetch it every time WebKit asks for it.
816 IPC_MESSAGE_ROUTED5(ViewMsg_Resize
,
817 gfx::Size
/* new_size */,
818 gfx::Size
/* physical_backing_size */,
819 float /* overdraw_bottom_height */,
820 gfx::Rect
/* resizer_rect */,
821 bool /* is_fullscreen */)
823 // Tells the render view that the resize rect has changed.
824 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
825 gfx::Rect
/* resizer_rect */)
827 // Sent to inform the view that it was hidden. This allows it to reduce its
828 // resource utilization.
829 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
831 // Tells the render view that it is no longer hidden (see WasHidden), and the
832 // render view is expected to respond with a full repaint if needs_repainting
833 // is true. In that case, the generated ViewHostMsg_PaintRect message will
834 // have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this
835 // message does not trigger a message in response.
836 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown
,
837 bool /* needs_repainting */)
839 // Sent to inform the view that it was swapped out. This allows the process to
840 // exit if no other views are using it.
841 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut
)
843 // Sent to render the view into the supplied transport DIB, resize
844 // the web widget to match the |page_size|, scale it by the
845 // appropriate scale to make it fit the |desired_size|, and return
846 // it. In response to this message, the host generates a
847 // ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be
848 // the right size to receive an RGBA image at the |desired_size|.
849 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
850 // identify the PaintAtSize message the ACK belongs to.
851 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize
,
852 TransportDIB::Handle
/* dib_handle */,
854 gfx::Size
/* page_size */,
855 gfx::Size
/* desired_size */)
857 // Tells the render view that a ViewHostMsg_UpdateRect message was processed.
858 // This signals the render view that it can send another UpdateRect message.
859 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK
)
861 // Tells the render view that a SwapBuffers was completed. Typically,
862 // SwapBuffers requests go from renderer -> GPU process -> browser. Most
863 // platforms still use the GfxCxt3D Echo for receiving the SwapBuffers Ack.
864 // Using Echo routes the ack from browser -> GPU process -> renderer, while this
865 // Ack goes directly from browser -> renderer. This is not used for the threaded
867 IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK
)
869 // Sends an input event to the render widget.
870 IPC_MESSAGE_ROUTED2(ViewMsg_HandleInputEvent
,
871 IPC::WebInputEventPointer
/* event */,
872 bool /* is_keyboard_shortcut */)
874 // Tells the render widget that a smooth scroll completed.
875 IPC_MESSAGE_ROUTED1(ViewMsg_SmoothScrollCompleted
,
876 int /* gesture_id */)
878 // This message notifies the renderer that the next key event is bound to one
879 // or more pre-defined edit commands. If the next key event is not handled
880 // by webkit, the specified edit commands shall be executed against current
883 // * edit_commands (see chrome/common/edit_command_types.h)
884 // Contains one or more edit commands.
885 // See third_party/WebKit/Source/WebCore/editing/EditorCommand.cpp for detailed
886 // definition of webkit edit commands.
888 // This message must be sent just before sending a key event.
889 IPC_MESSAGE_ROUTED1(ViewMsg_SetEditCommandsForNextKeyEvent
,
890 std::vector
<content::EditCommand
> /* edit_commands */)
892 // Message payload is the name/value of a WebCore edit command to execute.
893 IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteEditCommand
,
894 std::string
, /* name */
895 std::string
/* value */)
897 IPC_MESSAGE_ROUTED0(ViewMsg_MouseCaptureLost
)
899 // TODO(darin): figure out how this meshes with RestoreFocus
900 IPC_MESSAGE_ROUTED1(ViewMsg_SetFocus
,
903 // Tells the renderer to focus the first (last if reverse is true) focusable
905 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
908 // Tells the renderer to scroll the currently focused node into rect only if
909 // the currently focused node is a Text node (textfield, text area or content
911 IPC_MESSAGE_ROUTED1(ViewMsg_ScrollFocusedEditableNodeIntoRect
, gfx::Rect
)
913 // Executes custom context menu action that was provided from WebKit.
914 IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction
,
915 content::CustomContextMenuContext
/* custom_context */,
916 unsigned /* action */)
918 // Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that
919 // the menu has been closed.
920 IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed
,
921 content::CustomContextMenuContext
/* custom_context */)
923 // Tells the renderer to perform the specified navigation, interrupting any
924 // existing navigation.
925 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate
, ViewMsg_Navigate_Params
)
927 IPC_MESSAGE_ROUTED0(ViewMsg_Stop
)
929 // Tells the renderer to reload the current focused frame
930 IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame
)
932 // Sent when the user wants to search for a word on the page (find in page).
933 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
934 int /* request_id */,
935 string16
/* search_text */,
936 WebKit::WebFindOptions
)
938 // This message notifies the renderer that the user has closed the FindInPage
939 // window (and what action to take regarding the selection).
940 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
941 content::StopFindAction
/* action */)
943 // These messages are typically generated from context menus and request the
944 // renderer to apply the specified operation to the current selection.
945 IPC_MESSAGE_ROUTED0(ViewMsg_Undo
)
946 IPC_MESSAGE_ROUTED0(ViewMsg_Redo
)
947 IPC_MESSAGE_ROUTED0(ViewMsg_Cut
)
948 IPC_MESSAGE_ROUTED0(ViewMsg_Copy
)
949 #if defined(OS_MACOSX)
950 IPC_MESSAGE_ROUTED0(ViewMsg_CopyToFindPboard
)
952 IPC_MESSAGE_ROUTED0(ViewMsg_Paste
)
953 IPC_MESSAGE_ROUTED0(ViewMsg_PasteAndMatchStyle
)
954 // Replaces the selected region or a word around the cursor with the
956 IPC_MESSAGE_ROUTED1(ViewMsg_Replace
,
958 // Replaces the misspelling in the selected region with the specified string.
959 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceMisspelling
,
961 IPC_MESSAGE_ROUTED0(ViewMsg_Delete
)
962 IPC_MESSAGE_ROUTED0(ViewMsg_SelectAll
)
964 // Replaces a date time input field.
965 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
,
966 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
968 IPC_MESSAGE_ROUTED0(ViewMsg_Unselect
)
970 // Requests the renderer to select the region between two points.
971 // Expects a SelectRange_ACK message when finished.
972 IPC_MESSAGE_ROUTED2(ViewMsg_SelectRange
,
973 gfx::Point
/* start */,
974 gfx::Point
/* end */)
976 // Requests the renderer to move the caret selection toward the point.
977 // Expects a MoveCaret_ACK message when finished.
978 IPC_MESSAGE_ROUTED1(ViewMsg_MoveCaret
,
979 gfx::Point
/* location */)
981 // Copies the image at location x, y to the clipboard (if there indeed is an
982 // image at that location).
983 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
987 // Tells the renderer to perform the given action on the media player
988 // located at the given point.
989 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
990 gfx::Point
, /* location */
991 WebKit::WebMediaPlayerAction
)
993 // Tells the renderer to perform the given action on the plugin located at
995 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
996 gfx::Point
, /* location */
997 WebKit::WebPluginAction
)
999 // Request for the renderer to evaluate an xpath to a frame and execute a
1000 // javascript: url in that frame's context. The message is completely
1001 // asynchronous and no corresponding response message is sent back.
1003 // frame_xpath contains the modified xpath notation to identify an inner
1004 // subframe (starting from the root frame). It is a concatenation of
1005 // number of smaller xpaths delimited by '\n'. Each chunk in the string can
1006 // be evaluated to a frame in its parent-frame's context.
1008 // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
1009 // can be broken into 3 xpaths
1010 // /html/body/iframe evaluates to an iframe within the root frame
1011 // /html/body/div/iframe evaluates to an iframe within the level-1 iframe
1012 // /frameset/frame[0] evaluates to first frame within the level-2 iframe
1014 // jscript_url is the string containing the javascript: url to be executed
1015 // in the target frame's context. The string should start with "javascript:"
1016 // and continue with a valid JS text.
1018 // If the fourth parameter is true the result is sent back to the renderer
1019 // using the message ViewHostMsg_ScriptEvalResponse.
1020 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
1021 // client can uniquely identify the request.
1022 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest
,
1023 string16
, /* frame_xpath */
1024 string16
, /* jscript_url */
1026 bool /* If true, result is sent back. */)
1028 // Posts a message from a frame in another process to the current renderer.
1029 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent
,
1030 ViewMsg_PostMessage_Params
)
1032 // Requests that the RenderView's main frame sets its opener to null.
1033 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener
)
1035 // Sends a JSON serialized frame tree to RenderView along with the process id
1036 // and route id of the source renderer.
1038 // This message must be sent to swapped out RenderViews every time the browser
1039 // receives a ViewHostMsg_FrameTreeUpdated message.
1040 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateFrameTree
,
1041 int, /* the child process id of the active renderer */
1042 int, /* route_id of the active renderer */
1043 std::string
/* json encoded frame tree */)
1045 // Request for the renderer to evaluate an xpath to a frame and insert css
1046 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
1047 // allowed xpath expressions.
1048 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest
,
1049 string16
, /* frame_xpath */
1050 std::string
/* css string */)
1052 // Change the zoom level for the current main frame. If the level actually
1053 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1054 // telling it what url got zoomed and what its current zoom level is.
1055 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
1056 content::PageZoom
/* function */)
1058 // Set the zoom level for the current main frame. If the level actually
1059 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1060 // telling it what url got zoomed and what its current zoom level is.
1061 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel
,
1062 double /* zoom_level */)
1064 // Zooms the page by the factor defined in the renderer.
1065 IPC_MESSAGE_ROUTED3(ViewMsg_ZoomFactor
,
1067 int /* zoom center_x */,
1068 int /* zoom center_y */)
1070 // Set the zoom level for a particular url that the renderer is in the
1071 // process of loading. This will be stored, to be used if the load commits
1072 // and ignored otherwise.
1073 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
1075 double /* zoom_level */)
1077 // Set the zoom level for a particular url, so all render views
1078 // displaying this url can update their zoom levels to match.
1079 // If scheme is empty, then only host is used for matching.
1080 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL
,
1081 std::string
/* scheme */,
1082 std::string
/* host */,
1083 double /* zoom_level */)
1085 // Change encoding of page in the renderer.
1086 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
1087 std::string
/*new encoding name*/)
1089 // Reset encoding of page in the renderer back to default.
1090 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
1092 // Used to tell a render view whether it should expose various bindings
1093 // that allow JS content extended privileges. See BindingsPolicy for valid
1095 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
1096 int /* enabled_bindings_flags */)
1098 // Tell the renderer to add a property to the WebUI binding object. This
1099 // only works if we allowed WebUI bindings.
1100 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
1101 std::string
/* property_name */,
1102 std::string
/* property_value_json */)
1104 // This message starts/stop monitoring the input method status of the focused
1105 // edit control of a renderer process.
1107 // * is_active (bool)
1108 // Indicates if an input method is active in the browser process.
1109 // The possible actions when a renderer process receives this message are
1112 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
1113 // to notify the input method status of the focused edit control.
1114 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
1115 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive
,
1116 bool /* is_active */)
1118 // This message sends a string being composed with an input method.
1119 IPC_MESSAGE_ROUTED4(
1120 ViewMsg_ImeSetComposition
,
1121 string16
, /* text */
1122 std::vector
<WebKit::WebCompositionUnderline
>, /* underlines */
1123 int, /* selectiont_start */
1124 int /* selection_end */)
1126 // This message confirms an ongoing composition.
1127 IPC_MESSAGE_ROUTED2(ViewMsg_ImeConfirmComposition
,
1128 string16
/* text */,
1129 ui::Range
/* replacement_range */)
1131 // Sets the text composition to be between the given start and end offsets
1132 // in the currently focused editable field.
1133 IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText
,
1136 std::vector
<WebKit::WebCompositionUnderline
> /* underlines */)
1138 // Selects between the given start and end offsets in the currently focused
1140 IPC_MESSAGE_ROUTED2(ViewMsg_SetEditableSelectionOffsets
,
1144 // Deletes the current selection plus the specified number of characters before
1145 // and after the selection or caret.
1146 IPC_MESSAGE_ROUTED2(ViewMsg_ExtendSelectionAndDelete
,
1150 // Used to notify the render-view that we have received a target URL. Used
1151 // to prevent target URLs spamming the browser.
1152 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
1155 // Sets the alternate error page URL (link doctor) for the renderer process.
1156 IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL
,
1159 // Notifies the color chooser client that the user selected a color.
1160 IPC_MESSAGE_ROUTED2(ViewMsg_DidChooseColorResponse
, unsigned, SkColor
)
1162 // Notifies the color chooser client that the color chooser has ended.
1163 IPC_MESSAGE_ROUTED1(ViewMsg_DidEndColorChooser
, unsigned)
1165 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
1166 std::vector
<ui::SelectedFileInfo
>)
1168 // Provides the results of directory enumeration.
1169 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
1170 int /* request_id */,
1171 std::vector
<base::FilePath
> /* files_in_directory */)
1173 // When a renderer sends a ViewHostMsg_Focus to the browser process,
1174 // the browser has the option of sending a ViewMsg_CantFocus back to
1176 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus
)
1178 // Instructs the renderer to invoke the frame's shouldClose method, which
1179 // runs the onbeforeunload event handler. Expects the result to be returned
1180 // via ViewHostMsg_ShouldClose.
1181 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose
)
1183 // Instructs the renderer to swap out for a cross-site transition, including
1184 // running the unload event handler. See the struct above for more details.
1186 // Expects a SwapOut_ACK message when finished, where the parameters are
1188 IPC_MESSAGE_ROUTED1(ViewMsg_SwapOut
,
1189 ViewMsg_SwapOut_Params
)
1191 // Instructs the renderer to close the current page, including running the
1192 // onunload event handler.
1194 // Expects a ClosePage_ACK message when finished.
1195 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
1197 // Notifies the renderer about ui theme changes
1198 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
1200 // Notifies the renderer that a paint is to be generated for the rectangle
1202 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
1203 gfx::Size
/* The view size to be repainted */)
1205 // Notification that a move or resize renderer's containing window has
1207 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
1209 IPC_MESSAGE_ROUTED1(ViewMsg_ScreenInfoChanged
,
1210 WebKit::WebScreenInfo
/* screen_info */)
1212 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
1213 gfx::Rect
/* view_screen_rect */,
1214 gfx::Rect
/* window_screen_rect */)
1216 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
1217 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
1218 // processed the move. The browser may have ignored the move, but it finished
1219 // processing. This is used because the renderer keeps a temporary cache of
1220 // the widget position while these asynchronous operations are in progress.
1221 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
1223 // Used to instruct the RenderView to send back updates to the preferred size.
1224 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
1226 // Used to instruct the RenderView to automatically resize and send back
1227 // updates for the new size.
1228 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
1229 gfx::Size
/* min_size */,
1230 gfx::Size
/* max_size */)
1232 // Used to instruct the RenderView to disalbe automatically resize.
1233 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
1234 gfx::Size
/* new_size */)
1236 // Changes the text direction of the currently selected input field (if any).
1237 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
1238 WebKit::WebTextDirection
/* direction */)
1240 // Tells the renderer to clear the focused node (if any).
1241 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode
)
1243 // Make the RenderView transparent and render it onto a custom background. The
1244 // background will be tiled in both directions if it is not large enough.
1245 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground
,
1246 SkBitmap
/* background */)
1248 // Used to tell the renderer not to add scrollbars with height and
1249 // width below a threshold.
1250 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
1251 gfx::Size
/* disable_scrollbar_size_limit */)
1253 // Activate/deactivate the RenderView (i.e., set its controls' tint
1254 // accordingly, etc.).
1255 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
1258 // Response message to ViewHostMsg_CreateShared/DedicatedWorker.
1259 // Sent when the worker has started.
1260 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
1262 // The response to ViewHostMsg_AsyncOpenFile.
1263 IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK
,
1264 base::PlatformFileError
/* error_code */,
1265 IPC::PlatformFileForTransit
/* file descriptor */,
1266 int /* message_id */)
1268 // Tells the renderer that the network state has changed and that
1269 // window.navigator.onLine should be updated for all WebViews.
1270 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged
,
1273 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
1274 // Tells the renderer that the channel to the broker has been created.
1275 IPC_MESSAGE_ROUTED3(ViewMsg_PpapiBrokerChannelCreated
,
1276 int /* request_id */,
1277 base::ProcessId
/* broker_pid */,
1278 IPC::ChannelHandle
/* handle */)
1280 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
1281 // Tells the renderer whether permission to access to PPAPI broker was granted
1283 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerPermissionResult
,
1284 int /* request_id */,
1287 // Tells the renderer to empty its plugin list cache, optional reloading
1288 // pages containing plugins.
1289 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
1290 bool /* reload_pages */)
1292 // Sent to the renderer when a popup window should no longer count against
1293 // the current popup count (either because it's not a popup or because it was
1294 // a generated by a user action).
1295 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount
)
1297 // Used to instruct the RenderView to go into "view source" mode.
1298 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
1300 // Instructs the renderer to save the current page to MHTML.
1301 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
1303 IPC::PlatformFileForTransit
/* file handle */)
1305 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
1306 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData
,
1309 // Change the accessibility mode in the renderer process.
1310 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode
,
1313 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
1314 // process to release the magnified image.
1315 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupDIB
,
1316 TransportDIB::Handle
/* DIB handle */)
1318 // Notifies the renderer that a snapshot has been retrieved.
1319 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted
,
1320 int /* snapshot_id */,
1321 gfx::Size
/* size */,
1322 std::vector
<unsigned char> /* png */)
1324 // Tells the renderer to suspend/resume the webkit timers.
1325 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended
,
1328 #if defined(OS_ANDROID)
1329 // Sent when the user clicks on the find result bar to activate a find result.
1330 // The point (x,y) is in fractions of the content document's width and height.
1331 IPC_MESSAGE_ROUTED3(ViewMsg_ActivateNearestFindResult
,
1332 int /* request_id */,
1336 // Sent when the browser wants the bounding boxes of the current find matches.
1338 // If match rects are already cached on the browser side, |current_version|
1339 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
1340 // they came in, so the renderer can tell if it needs to send updated rects.
1341 // Otherwise just pass -1 to always receive the list of rects.
1343 // There must be an active search string (it is probably most useful to call
1344 // this immediately after a ViewHostMsg_Find_Reply message arrives with
1345 // final_update set to true).
1346 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
1347 int /* current_version */)
1349 // External popup menus.
1350 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems
,
1351 bool /* user canceled the popup */,
1352 std::vector
<int> /* selected indices */)
1354 // Tells the renderer to try to revert to the zoom level we were at before
1355 // ViewMsg_ScrollFocusedEditableNodeIntoView was called.
1356 IPC_MESSAGE_ROUTED0(ViewMsg_UndoScrollFocusedEditableNodeIntoView
)
1358 // This message relays the beginning or end of a batch event in the IME.
1359 IPC_MESSAGE_ROUTED1(ViewMsg_ImeBatchStateChanged
,
1360 bool /* is_begin */)
1362 // Notifies the renderer whether hiding/showing the top controls is enabled
1363 // and whether or not to animate to the proper state.
1364 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState
,
1365 bool /* enable_hiding */,
1366 bool /* enable_showing */,
1369 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded
)
1371 #elif defined(OS_MACOSX)
1372 // Let the RenderView know its window has changed visibility.
1373 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
1374 bool /* visibile */)
1376 // Let the RenderView know its window's frame has changed.
1377 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
1378 gfx::Rect
/* window frame */,
1379 gfx::Rect
/* content view frame */)
1381 // Message sent from the browser to the renderer when the user starts or stops
1382 // resizing the view.
1383 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
1386 // Tell the renderer that plugin IME has completed.
1387 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
1388 string16
/* text */,
1389 int /* plugin_id */)
1391 // External popup menus.
1392 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem
,
1393 int /* selected index, -1 means no selection */)
1396 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
1397 IPC_MESSAGE_ROUTED1(ViewMsg_SwapCompositorFrameAck
,
1398 cc::CompositorFrameAck
/* ack */)
1400 // Sent from the browser to ask the renderer for a snapshot of the current view.
1401 // The renderer replies with whether the snapshot succeeded and the SkBitmap.
1402 IPC_MESSAGE_ROUTED1(ViewMsg_Snapshot
,
1403 gfx::Rect
/* src_subrect */)
1404 IPC_MESSAGE_ROUTED2(ViewHostMsg_Snapshot
,
1406 SkBitmap
/* bitmap */)
1408 // -----------------------------------------------------------------------------
1409 // Messages sent from the renderer to the browser.
1411 // Sent by the renderer when it is creating a new window. The browser creates
1412 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1413 // MSG_ROUTING_NONE, the view couldn't be created.
1414 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_CreateWindow
,
1415 ViewHostMsg_CreateWindow_Params
,
1417 int32
/* surface_id */,
1418 int64
/* cloned_session_storage_namespace_id */)
1420 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1421 // <select> dropdowns. This message is sent to the WebContentsImpl that
1422 // contains the widget being created.
1423 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
1424 int /* opener_id */,
1425 WebKit::WebPopupType
/* popup type */,
1427 int32
/* surface_id */)
1429 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1431 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1432 int /* opener_id */,
1434 int32
/* surface_id */)
1436 // Asks the browser for a unique routing ID.
1437 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
1438 int /* routing_id */)
1440 // Asks the browser for the default audio hardware configuration.
1441 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig
,
1442 media::AudioParameters
/* input parameters */,
1443 media::AudioParameters
/* output parameters */)
1445 // Asks the browser for CPU usage of the renderer process in percents.
1446 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage
,
1447 int /* CPU usage in percents */)
1449 // Asks the browser for the user's monitor profile.
1450 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile
,
1451 std::vector
<char> /* profile */)
1453 // Asks the browser for the renderer process memory size stats.
1454 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes
,
1455 size_t /* private_bytes */,
1456 size_t /* shared_bytes */)
1458 // These three messages are sent to the parent RenderViewHost to display the
1459 // page/widget that was created by
1460 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1461 // refers to the id that was returned from the Create message above.
1462 // The initial_position parameter is a rectangle in screen coordinates.
1464 // FUTURE: there will probably be flags here to control if the result is
1466 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1468 WindowOpenDisposition
/* disposition */,
1469 gfx::Rect
/* initial_pos */,
1470 bool /* opened_by_user_gesture */)
1472 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1474 gfx::Rect
/* initial_pos */)
1476 // Message to show a full screen widget.
1477 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1480 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1481 // to run in a modal fashion until it is closed.
1482 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal
,
1483 int /* opener_id */)
1485 // Indicates the renderer is ready in response to a ViewMsg_New or
1486 // a ViewMsg_CreatingNew_ACK.
1487 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1489 // Indicates the renderer process is gone. This actually is sent by the
1490 // browser process to itself, but keeps the interface cleaner.
1491 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone
,
1492 int, /* this really is base::TerminationStatus */
1493 int /* exit_code */)
1495 // Sent by the renderer process to request that the browser close the view.
1496 // This corresponds to the window.close() API, and the browser may ignore
1497 // this message. Otherwise, the browser will generates a ViewMsg_Close
1498 // message to close the view.
1499 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1501 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1502 // throttle these messages.
1503 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1505 // Sent by the renderer process to request that the browser move the view.
1506 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1507 // the browser may ignore this message.
1508 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1509 gfx::Rect
/* position */)
1511 // Notifies the browser that a frame in the view has changed. This message
1512 // has a lot of parameters and is packed/unpacked by functions defined in
1513 // render_messages.h.
1514 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate
,
1515 ViewHostMsg_FrameNavigate_Params
)
1517 // Used to tell the parent that the user right clicked on an area of the
1518 // content area, and a context menu should be shown for it. The params
1519 // object contains information about the node(s) that were selected when the
1520 // user right clicked.
1521 IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu
, content::ContextMenuParams
)
1523 // Message to show a popup menu using native cocoa controls (Mac only).
1524 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup
,
1525 ViewHostMsg_ShowPopup_Params
)
1527 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
1528 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the
1529 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
1531 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse
,
1533 base::ListValue
/* result */)
1535 // Result of string search in the page.
1536 // Response to ViewMsg_Find with the results of the requested find-in-page
1537 // search, the number of matches found and the selection rect (in screen
1538 // coordinates) for the string found. If |final_update| is false, it signals
1539 // that this is not the last Find_Reply message - more will be sent as the
1540 // scoping effort continues.
1541 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1542 int /* request_id */,
1543 int /* number of matches */,
1544 gfx::Rect
/* selection_rect */,
1545 int /* active_match_ordinal */,
1546 bool /* final_update */)
1548 // Provides the result from running OnMsgShouldClose. |proceed| matches the
1549 // return value of the the frame's shouldClose method (which includes the
1550 // onbeforeunload handler): true if the user decided to proceed with leaving
1552 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK
,
1554 base::TimeTicks
/* before_unload_start_time */,
1555 base::TimeTicks
/* before_unload_end_time */)
1557 // Indicates that the current renderer has swapped out, after a SwapOut
1558 // message. The parameters are just echoed from the SwapOut request.
1559 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapOut_ACK
,
1560 ViewMsg_SwapOut_Params
)
1562 // Indicates that the current page has been closed, after a ClosePage
1564 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1566 // Notifies the browser that media has started/stopped playing.
1567 IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification
,
1568 int64
/* player_cookie, distinguishes instances */,
1569 bool /* has_video */,
1570 bool /* has_audio */,
1571 bool /* is_playing */)
1573 // Notifies the browser that we have session history information.
1574 // page_id: unique ID that allows us to distinguish between history entries.
1575 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1576 int32
/* page_id */,
1577 std::string
/* state */)
1579 // Notifies the browser that a document has been loaded in a frame.
1580 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame
,
1581 int64
/* frame_id */)
1583 // Notifies the browser that a frame finished loading.
1584 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad
,
1585 int64
/* frame_id */,
1586 GURL
/* validated_url */,
1587 bool /* is_main_frame */)
1589 // Changes the title for the page in the UI when the page is navigated or the
1591 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle
,
1592 int32
/* page_id */,
1593 string16
/* title */,
1594 WebKit::WebTextDirection
/* title direction */)
1596 // Change the encoding name of the page in UI when the page has detected
1597 // proper encoding name.
1598 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding
,
1599 std::string
/* new encoding name */)
1601 // Notifies the browser that we want to show a destination url for a potential
1602 // action (e.g. when the user is hovering over a link).
1603 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL
,
1607 // Sent when the renderer starts loading the page. This corresponds to
1608 // WebKit's notion of the throbber starting. Note that sometimes you may get
1609 // duplicates of these during a single load.
1610 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading
)
1612 // Sent when the renderer is done loading a page. This corresponds to WebKit's
1613 // notion of the throbber stopping.
1614 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading
)
1616 // Sent when the renderer main frame has made progress loading.
1617 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress
,
1618 double /* load_progress */)
1620 // Sent when the renderer main frame sets its opener to null, disowning it for
1621 // the lifetime of the window.
1622 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisownOpener
)
1624 // Sent when the document element is available for the top-level frame. This
1625 // happens after the page starts loading, but before all resources are
1627 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame
)
1629 // Sent when after the onload handler has been invoked for the document
1630 // in the top-level frame.
1631 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame
,
1632 int32
/* page_id */)
1634 // Sent when the renderer loads a resource from its memory cache.
1635 // The security info is non empty if the resource was originally loaded over
1636 // a secure connection.
1637 // Note: May only be sent once per URL per frame per committed load.
1638 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache
,
1640 std::string
/* security info */,
1641 std::string
/* http method */,
1642 std::string
/* mime type */,
1643 ResourceType::Type
/* resource type */)
1645 // Sent when the renderer displays insecure content in a secure page.
1646 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent
)
1648 // Sent when the renderer runs insecure content in a secure origin.
1649 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent
,
1650 std::string
/* security_origin */,
1651 GURL
/* target URL */)
1653 // Sent when the renderer starts a provisional load for a frame.
1654 IPC_MESSAGE_ROUTED4(ViewHostMsg_DidStartProvisionalLoadForFrame
,
1655 int64
/* frame_id */,
1656 int64
/* parent_frame_id */,
1657 bool /* true if it is the main frame */,
1660 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError
,
1661 int64
/* frame_id */,
1662 GURL
/* validated_url */,
1663 bool /* is_main_frame */,
1664 int /* error_code */,
1665 string16
/* error_description */)
1667 // Sent when the renderer fails a provisional load with an error.
1668 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFailProvisionalLoadWithError
,
1669 ViewHostMsg_DidFailProvisionalLoadWithError_Params
)
1671 // Tells the render view that a ViewHostMsg_PaintAtSize message was
1672 // processed, and the DIB is ready for use. |tag| has the same value that
1673 // the tag sent along with ViewMsg_PaintAtSize.
1674 IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK
,
1676 gfx::Size
/* size */)
1678 // Sent to update part of the view. In response to this message, the host
1679 // generates a ViewMsg_UpdateRect_ACK message.
1680 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1681 ViewHostMsg_UpdateRect_Params
)
1683 // Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
1684 // which may get delayed until the browser's UI unblocks.
1685 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed
)
1687 // Sent by the renderer when accelerated compositing is enabled or disabled to
1688 // notify the browser whether or not is should do painting.
1689 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing
,
1690 bool /* true if the accelerated compositor is actve */)
1692 // Acknowledges receipt of a ViewMsg_HandleInputEvent message.
1693 IPC_MESSAGE_ROUTED2(ViewHostMsg_HandleInputEvent_ACK
,
1694 WebKit::WebInputEvent::Type
,
1695 content::InputEventAckState
/* ack_result */)
1697 IPC_STRUCT_BEGIN(ViewHostMsg_BeginSmoothScroll_Params
)
1698 IPC_STRUCT_MEMBER(bool, scroll_down
)
1699 IPC_STRUCT_MEMBER(int, pixels_to_scroll
)
1700 IPC_STRUCT_MEMBER(int, mouse_event_x
)
1701 IPC_STRUCT_MEMBER(int, mouse_event_y
)
1704 IPC_MESSAGE_ROUTED2(ViewHostMsg_BeginSmoothScroll
,
1705 int /* gesture_id */,
1706 ViewHostMsg_BeginSmoothScroll_Params
/* params */)
1708 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1709 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1711 // Message sent from renderer to the browser when focus changes inside the
1712 // webpage. The parameter says whether the newly focused element needs
1713 // keyboard input (true for textfields, text areas and content editable divs).
1714 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged
,
1715 bool /* is_editable_node */)
1717 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
,
1720 // Used to set a cookie. The cookie is set asynchronously, but will be
1721 // available to a subsequent ViewHostMsg_GetCookies request.
1722 IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie
,
1724 GURL
/* first_party_for_cookies */,
1725 std::string
/* cookie */)
1727 // Used to get cookies for the given URL. This may block waiting for a
1728 // previous SetCookie message to be processed.
1729 IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies
,
1731 GURL
/* first_party_for_cookies */,
1732 std::string
/* cookies */)
1734 // Used to get raw cookie information for the given URL. This may block
1735 // waiting for a previous SetCookie message to be processed.
1736 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies
,
1738 GURL
/* first_party_for_cookies */,
1739 std::vector
<webkit_glue::WebCookie
>
1742 // Used to delete cookie for the given URL and name
1743 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie
,
1745 std::string
/* cookie_name */)
1747 // Used to check if cookies are enabled for the given URL. This may block
1748 // waiting for a previous SetCookie message to be processed.
1749 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled
,
1751 GURL
/* first_party_for_cookies */,
1752 bool /* cookies_enabled */)
1754 // Used to get the list of plugins
1755 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins
,
1757 std::vector
<webkit::WebPluginInfo
> /* plugins */)
1759 // Return information about a plugin for the given URL and MIME
1760 // type. If there is no matching plugin, |found| is false.
1761 // |actual_mime_type| is the actual mime type supported by the
1763 IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo
,
1764 int /* routing_id */,
1766 GURL
/* page_url */,
1767 std::string
/* mime_type */,
1769 webkit::WebPluginInfo
/* plugin info */,
1770 std::string
/* actual_mime_type */)
1772 // A renderer sends this to the browser process when it wants to
1773 // create a plugin. The browser will create the plugin process if
1774 // necessary, and will return a handle to the channel on success.
1775 // On error an empty string is returned.
1776 IPC_SYNC_MESSAGE_CONTROL4_2(ViewHostMsg_OpenChannelToPlugin
,
1777 int /* routing_id */,
1779 GURL
/* page_url */,
1780 std::string
/* mime_type */,
1781 IPC::ChannelHandle
/* channel_handle */,
1782 webkit::WebPluginInfo
/* info */)
1785 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1786 gfx::NativeViewId
/* dummy_activation_window */)
1788 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1789 gfx::NativeViewId
/* dummy_activation_window */)
1792 // Get the list of proxies to use for |url|, as a semicolon delimited list
1793 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1794 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1797 std::string
/* proxy list */)
1799 // A renderer sends this to the browser process when it wants to create a
1800 // worker. The browser will create the worker process if necessary, and
1801 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1802 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1803 ViewHostMsg_CreateWorker_Params
,
1806 // This message is sent to the browser to see if an instance of this shared
1807 // worker already exists. If so, it returns exists == true. If a
1808 // non-empty name is passed, also validates that the url matches the url of
1809 // the existing worker. If a matching worker is found, the passed-in
1810 // document_id is associated with that worker, to ensure that the worker
1811 // stays alive until the document is detached.
1812 // The route_id returned can be used to forward messages to the worker via
1813 // ForwardToWorker if it exists, otherwise it should be passed in to any
1814 // future call to CreateWorker to avoid creating duplicate workers.
1815 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker
,
1816 ViewHostMsg_CreateWorker_Params
,
1819 bool /* url_mismatch */)
1821 // A renderer sends this to the browser process when a document has been
1822 // detached. The browser will use this to constrain the lifecycle of worker
1823 // processes (SharedWorkers are shut down when their last associated document
1825 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1826 uint64
/* document_id */)
1828 // Wraps an IPC message that's destined to the worker on the renderer->browser
1830 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1831 IPC::Message
/* message */)
1833 // Tells the browser that a specific Appcache manifest in the current page
1835 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1836 GURL
/* manifest url */,
1837 bool /* blocked by policy */)
1839 // Initiates a download based on user actions like 'ALT+click'.
1840 IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl
,
1842 content::Referrer
/* referrer */,
1843 string16
/* suggested_name */)
1845 // Used to go to the session history entry at the given offset (ie, -1 will
1846 // return the "back" item).
1847 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1848 int /* offset (from current) of history item to get */)
1850 // Sent from an inactive renderer for the browser to route to the active
1851 // renderer, instructing it to close.
1852 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1854 // Sent to the browser from an inactive renderer to post a message to the
1856 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent
,
1857 ViewMsg_PostMessage_Params
)
1859 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage
,
1860 string16
/* in - alert message */,
1861 string16
/* in - default prompt */,
1862 GURL
/* in - originating page URL */,
1863 content::JavaScriptMessageType
/* in - type */,
1864 bool /* out - success */,
1865 string16
/* out - user_input field */)
1867 // Requests that the given URL be opened in the specified manner.
1868 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL
, ViewHostMsg_OpenURL_Params
)
1870 // Notifies that the preferred size of the content changed.
1871 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1872 gfx::Size
/* pref_size */)
1874 // Notifies that the scroll offset changed.
1875 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1876 // is not sent at all when threaded compositing is enabled while
1877 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1878 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset
)
1880 // Notifies that the scrollbars-visible state of the content changed.
1881 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame
,
1882 bool /* has_horizontal_scrollbar */,
1883 bool /* has_vertical_scrollbar */)
1885 // Notifies that the pinned-to-side state of the content changed.
1886 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame
,
1887 bool /* pinned_to_left */,
1888 bool /* pinned_to_right */)
1890 // Notifies that the number of JavaScript scroll handlers changed.
1891 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents
,
1894 // Notifies whether there are JavaScript touche event handlers or not.
1895 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers
,
1896 bool /* has_handlers */)
1898 // A message from HTML-based UI. When (trusted) Javascript calls
1899 // send(message, args), this message is sent to the browser.
1900 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend
,
1901 GURL
/* source_url */,
1902 std::string
/* message */,
1903 base::ListValue
/* args */)
1905 // Requests a snapshot of the given window.
1906 IPC_MESSAGE_ROUTED1(ViewHostMsg_GetWindowSnapshot
,
1907 int /* snapshot_id */)
1909 // A renderer sends this to the browser process when it wants to create a ppapi
1910 // plugin. The browser will create the plugin process if necessary, and will
1911 // return a handle to the channel on success.
1913 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1914 // process. This ID is valid only in the context of the browser process and is
1915 // used to identify the proper process when the renderer notifies it that the
1918 // On error an empty string and null handles are returned.
1919 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin
,
1920 base::FilePath
/* path */,
1921 IPC::ChannelHandle
/* handle to channel */,
1922 base::ProcessId
/* plugin_pid */,
1923 int /* plugin_child_id */)
1925 // Notification that a plugin has created a new plugin instance. The parameters
1927 // -The plugin process ID that we're creating the instance for.
1928 // -The instance ID of the instance being created.
1929 // -A PepperRendererInstanceData struct which contains properties from the
1930 // renderer which are associated with the plugin instance. This includes the
1931 // routing ID of the associated render view and the URL of plugin.
1932 // -Whether the plugin we're creating an instance for is external or internal.
1934 // This message must be sync even though it returns no parameters to avoid
1935 // a race condition with the plugin process. The plugin process sends messages
1936 // to the browser that assume the browser knows about the instance. We need to
1937 // make sure that the browser actually knows about the instance before we tell
1938 // the plugin to run.
1939 IPC_SYNC_MESSAGE_CONTROL4_0(
1940 ViewHostMsg_DidCreateOutOfProcessPepperInstance
,
1941 int /* plugin_child_id */,
1942 int32
/* pp_instance */,
1943 content::PepperRendererInstanceData
/* creation_data */,
1944 bool /* is_external */)
1946 // Notification that a plugin has destroyed an instance. This is the opposite of
1947 // the "DidCreate" message above.
1948 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance
,
1949 int /* plugin_child_id */,
1950 int32
/* pp_instance */,
1951 bool /* is_external */)
1953 // A renderer sends this to the browser process when it wants to
1954 // create a ppapi broker. The browser will create the broker process
1955 // if necessary, and will return a handle to the channel on success.
1956 // On error an empty string is returned.
1957 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1958 IPC_MESSAGE_CONTROL3(ViewHostMsg_OpenChannelToPpapiBroker
,
1959 int /* routing_id */,
1960 int /* request_id */,
1961 base::FilePath
/* path */)
1963 // A renderer sends this to the browser process when it wants to access a PPAPI
1964 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1965 // for every connection.
1966 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1967 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission
,
1968 int /* request_id */,
1969 GURL
/* document_url */,
1970 base::FilePath
/* plugin_path */)
1972 #if defined(USE_X11)
1973 // A renderer sends this when it needs a browser-side widget for
1974 // hosting a windowed plugin. id is the XID of the plugin window, for which
1975 // the container is created.
1976 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer
,
1977 gfx::PluginWindowHandle
/* id */)
1979 // Destroy a plugin container previously created using CreatePluginContainer.
1980 // id is the XID of the plugin window corresponding to the container that is
1982 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer
,
1983 gfx::PluginWindowHandle
/* id */)
1986 // Send the tooltip text for the current mouse position to the browser.
1987 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText
,
1988 string16
/* tooltip text string */,
1989 WebKit::WebTextDirection
/* text direction hint */)
1991 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK
)
1992 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK
)
1994 // Notification that the text selection has changed.
1995 // Note: The secound parameter is the character based offset of the string16
1996 // text in the document.
1997 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged
,
1998 string16
/* text covers the selection range */,
1999 size_t /* the offset of the text in the document */,
2000 ui::Range
/* selection range in the document */)
2002 // Notification that the selection bounds have changed.
2003 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged
,
2004 ViewHostMsg_SelectionBounds_Params
)
2006 // Asks the browser to open the color chooser.
2007 IPC_MESSAGE_ROUTED2(ViewHostMsg_OpenColorChooser
,
2009 SkColor
/* color */)
2011 // Asks the browser to end the color chooser.
2012 IPC_MESSAGE_ROUTED1(ViewHostMsg_EndColorChooser
, int /* id */)
2014 // Change the selected color in the color chooser.
2015 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSelectedColorInColorChooser
,
2017 SkColor
/* color */)
2019 // Asks the browser to display the file chooser. The result is returned in a
2020 // ViewHost_RunFileChooserResponse message.
2021 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
2022 content::FileChooserParams
)
2024 // Asks the browser to enumerate a directory. This is equivalent to running
2025 // the file chooser in directory-enumeration mode and having the user select
2026 // the given directory. The result is returned in a
2027 // ViewMsg_EnumerateDirectoryResponse message.
2028 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
2029 int /* request_id */,
2030 base::FilePath
/* file_path */)
2032 // Tells the browser to move the focus to the next (previous if reverse is
2033 // true) focusable element.
2034 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
2037 // Required for opening a date/time dialog
2038 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog
,
2039 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
2041 // Required for updating text input state.
2042 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
2043 ViewHostMsg_TextInputState_Params
/* input state params */)
2045 // Message sent when the IME text composition range changes.
2046 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged
,
2047 ui::Range
/* composition range */,
2048 std::vector
<gfx::Rect
> /* character bounds */)
2050 // Required for cancelling an ongoing input method composition.
2051 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition
)
2053 // WebKit and JavaScript error messages to log to the console
2055 IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole
,
2056 int32
, /* log level */
2058 int32
, /* line number */
2059 string16
/* source id */)
2061 // Sent by the renderer process to indicate that a plugin instance has crashed.
2062 // Note: |plugin_pid| should not be trusted. The corresponding process has
2063 // probably died. Moreover, the ID may have been reused by a new process. Any
2064 // usage other than displaying it in a prompt to the user is very likely to be
2066 IPC_MESSAGE_ROUTED2(ViewHostMsg_CrashedPlugin
,
2067 base::FilePath
/* plugin_path */,
2068 base::ProcessId
/* plugin_pid */)
2070 // Displays a box to confirm that the user wants to navigate away from the
2071 // page. Replies true if yes, false otherwise, the reply string is ignored,
2072 // but is included so that we can use OnJavaScriptMessageBoxClosed.
2073 IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm
,
2074 GURL
, /* in - originating frame URL */
2075 string16
/* in - alert message */,
2076 bool /* in - is a reload */,
2077 bool /* out - success */,
2078 string16
/* out - This is ignored.*/)
2080 // Sent when a provisional load on the main frame redirects.
2081 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad
,
2083 GURL
/* last url */,
2084 GURL
/* url redirected to */)
2086 // Sent when the renderer changes the zoom level for a particular url, so the
2087 // browser can update its records. If remember is true, then url is used to
2088 // update the zoom level for all pages in that site. Otherwise, the render
2089 // view's id is used so that only the menu is updated.
2090 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL
,
2091 double /* zoom_level */,
2092 bool /* remember */,
2095 // Updates the minimum/maximum allowed zoom percent for this tab from the
2096 // default values. If |remember| is true, then the zoom setting is applied to
2097 // other pages in the site and is saved, otherwise it only applies to this
2099 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits
,
2100 int /* minimum_percent */,
2101 int /* maximum_percent */,
2102 bool /* remember */)
2104 // Notify the browser that this render process can or can't be suddenly
2106 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged
,
2109 // Informs the browser of updated frame names.
2110 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateFrameName
,
2112 bool /* is_top_level */,
2113 std::string
/* name */)
2115 // This message is synthesized by GpuProcessHost to pass through a swap message
2116 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
2117 // software or GPU frame.
2118 IPC_MESSAGE_ROUTED5(ViewHostMsg_CompositorSurfaceBuffersSwapped
,
2119 int32
/* surface id */,
2120 uint64
/* surface_handle */,
2121 int32
/* route_id */,
2122 gfx::Size
/* size */,
2123 int32
/* gpu_process_host_id */)
2125 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapCompositorFrame
,
2126 cc::CompositorFrame
/* frame */)
2128 // Opens a file asynchronously. The response returns a file descriptor
2129 // and an error code from base/platform_file.h.
2130 IPC_MESSAGE_ROUTED3(ViewHostMsg_AsyncOpenFile
,
2131 base::FilePath
/* file path */,
2133 int /* message_id */)
2135 //---------------------------------------------------------------------------
2136 // Request for cryptographic operation messages:
2137 // These are messages from the renderer to the browser to perform a
2138 // cryptographic operation.
2140 // Asks the browser process to generate a keypair for grabbing a client
2141 // certificate from a CA (<keygen> tag), and returns the signed public
2142 // key and challenge string.
2143 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen
,
2144 uint32
/* key size index */,
2145 std::string
/* challenge string */,
2146 GURL
/* URL of requestor */,
2147 std::string
/* signed public key and challenge */)
2149 // Message sent from the renderer to the browser to request that the browser
2150 // cache |data| associated with |url|.
2151 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata
,
2153 double /* expected_response_time */,
2154 std::vector
<char> /* data */)
2156 // Updates the content restrictions, i.e. to disable print/copy.
2157 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions
,
2158 int /* restrictions */)
2160 // Brings up SaveAs... dialog to save specified URL.
2161 IPC_MESSAGE_ROUTED2(ViewHostMsg_SaveURLAs
,
2163 content::Referrer
/* referrer */)
2165 // Displays a JavaScript out-of-memory message in the infobar.
2166 IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory
)
2168 // Register a new handler for URL requests with the given scheme.
2169 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler
,
2170 std::string
/* scheme */,
2172 string16
/* title */,
2173 bool /* user_gesture */)
2175 // Stores new inspector setting in the profile.
2176 // TODO(jam): this should be in the chrome module
2177 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting
,
2178 std::string
, /* key */
2179 std::string
/* value */)
2181 // Puts the browser into "tab fullscreen" mode for the sending renderer.
2182 // See the comment in chrome/browser/ui/browser.h for more details.
2183 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen
,
2184 bool /* enter_fullscreen */)
2186 // Send back a string to be recorded by UserMetrics.
2187 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
2188 std::string
/* action */)
2190 // Notifies the browser that the page was or was not saved as MHTML.
2191 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
2193 int64
/* size of the MHTML file, -1 if error */)
2195 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks
,
2196 std::vector
<GURL
> /* all savable resource links */,
2197 std::vector
<content::Referrer
> /* all referrers */,
2198 std::vector
<GURL
> /* all frame links */)
2200 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
2201 GURL
/* frame's url */,
2202 std::string
/* data buffer */,
2203 int32
/* complete status */)
2205 // Notifies the browser of an event occurring in the media pipeline.
2206 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvent
,
2207 media::MediaLogEvent
/* event */)
2209 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
2211 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
2212 // pop up a bubble to ask for user permission or take mouse lock content into
2214 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
2215 bool /* user_gesture */,
2216 bool /* last_unlocked_by_target */,
2217 bool /* privileged */)
2219 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
2220 // whenever the mouse is unlocked (which may or may not be caused by
2221 // ViewHostMsg_UnlockMouse).
2222 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
2224 // Following message is used to communicate the values received by the
2225 // callback binding the JS to Cpp.
2226 // An instance of browser that has an automation host listening to it can
2227 // have a javascript send a native value (string, number, boolean) to the
2228 // listener in Cpp. (DomAutomationController)
2229 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse
,
2230 std::string
/* json_string */,
2231 int /* automation_id */)
2233 // Sent to the browser when the renderer detects it is blocked on a pepper
2234 // plugin message for too long. This is also sent when it becomes unhung
2235 // (according to the value of is_hung). The browser can give the user the
2236 // option of killing the plugin.
2237 IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung
,
2238 int /* plugin_child_id */,
2239 base::FilePath
/* path */,
2242 // Chrome allows JavaScript calls to be routed across process boundaries. To
2243 // achieve this, each active RenderView in the source process has a swapped out
2244 // "mirror" in the target process. The active RenderView and its mirror
2245 // need to have identical frame tree structure, so calls originating in and
2246 // targeting subframes can be routed properly. This is achieved by each active
2247 // RenderView sending a ViewHostMsg_FrameTreeUpdated message to the browser,
2248 // which in turn sends the update to the corresponding mirror RenderView(s)
2249 // through the ViewMsg_UpdateFrameTree. We use best effort to keep these
2250 // trees synchronized across processes.
2252 // When routing JavaScript calls across processes, the target information
2253 // is kept in the renderer process instead of the browser process. This design
2254 // was chosen because frame ids are allocated by the renderer process. If the
2255 // browser was to keep a mapping of the frame ids across processes, it would
2256 // require an extra IPC message with the newly allocated frame ids, as a
2257 // response to this particular message.
2259 // The frame tree for a RenderView is serialized to JSON, so it can be sent to
2260 // the browser process. Each node in the tree is an object with three
2262 // * id - (integer) the frame identifier in this RenderView
2263 // * name - (string) the name of the frame, if one has been assigned
2264 // * subtree - an array of the same type of objects for each frame that is a
2265 // direct child of the current frame. This property can be omitted if
2266 // there are no direct child frames, so less data is transferred.
2268 // This message must be sent on any events that modify the tree structure or
2269 // the names of any frames.
2270 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameTreeUpdated
,
2271 std::string
/* json encoded frame tree */)
2273 // Notifies that multiple touch targets may have been pressed, and to show
2274 // the disambiguation popup.
2275 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
2276 gfx::Rect
, /* Border of touched targets */
2277 gfx::Size
, /* Size of zoomed image */
2278 TransportDIB::Id
/* DIB of zoomed image */)
2280 // Sent by the renderer process to check whether client 3D APIs
2281 // (Pepper 3D, WebGL) are explicitly blocked.
2282 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked
,
2283 int /* render_view_id */,
2284 GURL
/* top_origin_url */,
2285 content::ThreeDAPIType
/* requester */,
2288 // Sent by the renderer process to indicate that a context was lost by
2289 // client 3D content (Pepper 3D, WebGL) running on the page at the
2291 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext
,
2292 GURL
/* top_origin_url */,
2293 content::ThreeDAPIType
/* context_type */,
2294 int /* arb_robustness_status_code */)
2296 // Notifies the browser that the frame with the given id was detached.
2297 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameDetached
,
2298 int64
/* frame_id */)
2300 // Notifies the browser that document has parsed the body. This is used by the
2301 // ResourceScheduler as an indication that bandwidth contention won't block
2303 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody
)
2305 // Notification that the urls for the favicon of a site has been determined.
2306 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL
,
2307 int32
/* page_id */,
2308 std::vector
<content::FaviconURL
> /* candidates */)
2310 // Sent once a paint happens after the first non empty layout. In other words
2311 // after the page has painted something.
2312 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFirstVisuallyNonEmptyPaint
,
2315 #if defined(OS_ANDROID)
2316 // Response to ViewMsg_FindMatchRects.
2318 // |version| will contain the current version number of the renderer's find
2319 // match list (incremented whenever they change), which should be passed in the
2320 // next call to ViewMsg_FindMatchRects.
2322 // |rects| will either contain a list of the enclosing rects of all matches
2323 // found by the most recent Find operation, or will be empty if |version| is not
2324 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
2325 // your locally cached rects should still be valid). The rect coords will be
2326 // custom normalized fractions of the document size. The rects will be sorted by
2327 // frame traversal order starting in the main frame, then by dom order.
2329 // |active_rect| will contain the bounding box of the active find-in-page match
2330 // marker, in similarly normalized coords (or an empty rect if there isn't one).
2331 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
2333 std::vector
<gfx::RectF
> /* rects */,
2334 gfx::RectF
/* active_rect */)
2336 // Start an android intent with the given URI.
2337 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
2338 GURL
/* content_url */)
2340 // Message sent when the renderer changed the background color for the view.
2341 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor
,
2342 uint32
/* bg_color */)
2344 // Information about current document scroll, scale and size. Sent on a
2345 // best-effort basis.
2346 IPC_MESSAGE_ROUTED5(ViewHostMsg_UpdateFrameInfo
,
2347 gfx::Vector2d
/* scroll_offset */,
2348 float /* page_scale_factor */,
2349 float /* min_page_scale_factor */,
2350 float /* max_page_scale_factor */,
2351 gfx::Size
/* content_size */)
2353 // This message is an ACK that the batch state change has been received by
2354 // the renderer and all IME related messages should be processed accordingly.
2355 IPC_MESSAGE_ROUTED1(ViewHostMsg_ImeBatchStateChanged_ACK
,
2356 bool /* is_begin */)
2358 // This message runs the MediaCodec for decoding audio for webaudio.
2359 IPC_MESSAGE_CONTROL2(ViewHostMsg_RunWebAudioMediaCodec
,
2360 base::SharedMemoryHandle
/* encoded_data_handle */,
2361 base::FileDescriptor
/* pcm_output */)
2363 #elif defined(OS_MACOSX)
2364 // Request that the browser load a font into shared memory for us.
2365 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont
,
2366 FontDescriptor
/* font to load */,
2367 uint32
/* buffer size */,
2368 base::SharedMemoryHandle
/* font data */,
2369 uint32
/* font id */)
2371 // On OSX, we cannot allocated shared memory from within the sandbox, so
2372 // this call exists for the renderer to ask the browser to allocate memory
2373 // on its behalf. We return a file descriptor to the POSIX shared memory.
2374 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
2375 // by the browser, and it is the caller's repsonsibility to send a
2376 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
2377 // In all cases, the caller is responsible for deleting the resulting
2379 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB
,
2380 size_t, /* bytes requested */
2381 bool, /* cache in the browser */
2382 TransportDIB::Handle
/* DIB */)
2384 // Since the browser keeps handles to the allocated transport DIBs, this
2385 // message is sent to tell the browser that it may release them when the
2386 // renderer is finished with them.
2387 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB
,
2388 TransportDIB::Id
/* DIB id */)
2390 // Informs the browser that a plugin has gained or lost focus.
2391 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
2393 int /* plugin_id */)
2395 // Instructs the browser to start plugin IME.
2396 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
2398 #elif defined(OS_WIN)
2399 // Request that the given font characters be loaded by the browser so it's
2400 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
2402 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters
,
2403 LOGFONT
/* font_data */,
2404 string16
/* characters */)
2407 // Adding a new message? Stick to the sort order above: first platform
2408 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
2409 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.