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/memory/shared_memory.h"
9 #include "base/process/process.h"
10 #include "base/strings/string16.h"
11 #include "cc/output/begin_frame_args.h"
12 #include "cc/output/compositor_frame.h"
13 #include "cc/output/compositor_frame_ack.h"
14 #include "content/common/content_export.h"
15 #include "content/common/content_param_traits.h"
16 #include "content/common/cookie_data.h"
17 #include "content/common/navigation_gesture.h"
18 #include "content/common/pepper_renderer_instance_data.h"
19 #include "content/common/view_message_enums.h"
20 #include "content/common/webplugin_geometry.h"
21 #include "content/port/common/input_event_ack_state.h"
22 #include "content/public/common/color_suggestion.h"
23 #include "content/public/common/common_param_traits.h"
24 #include "content/public/common/favicon_url.h"
25 #include "content/public/common/file_chooser_params.h"
26 #include "content/public/common/frame_navigate_params.h"
27 #include "content/public/common/javascript_message_type.h"
28 #include "content/public/common/menu_item.h"
29 #include "content/public/common/page_state.h"
30 #include "content/public/common/page_zoom.h"
31 #include "content/public/common/referrer.h"
32 #include "content/public/common/renderer_preferences.h"
33 #include "content/public/common/stop_find_action.h"
34 #include "content/public/common/three_d_api_types.h"
35 #include "content/public/common/window_container_type.h"
36 #include "content/common/date_time_suggestion.h"
37 #include "ipc/ipc_channel_handle.h"
38 #include "ipc/ipc_message_macros.h"
39 #include "ipc/ipc_platform_file.h"
40 #include "media/audio/audio_parameters.h"
41 #include "media/base/channel_layout.h"
42 #include "media/base/media_log_event.h"
43 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
44 #include "third_party/WebKit/public/platform/WebFloatRect.h"
45 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
46 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
47 #include "third_party/WebKit/public/web/WebFindOptions.h"
48 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
49 #include "third_party/WebKit/public/web/WebPluginAction.h"
50 #include "third_party/WebKit/public/web/WebPopupType.h"
51 #include "third_party/WebKit/public/web/WebTextDirection.h"
52 #include "third_party/skia/include/core/SkBitmap.h"
53 #include "ui/base/ime/text_input_mode.h"
54 #include "ui/base/ime/text_input_type.h"
55 #include "ui/base/ui_base_types.h"
56 #include "ui/gfx/point.h"
57 #include "ui/gfx/range/range.h"
58 #include "ui/gfx/rect.h"
59 #include "ui/gfx/rect_f.h"
60 #include "ui/gfx/vector2d.h"
61 #include "ui/gfx/vector2d_f.h"
62 #include "ui/shell_dialogs/selected_file_info.h"
64 #if defined(OS_MACOSX)
65 #include "content/common/mac/font_descriptor.h"
66 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
69 #undef IPC_MESSAGE_EXPORT
70 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
72 #define IPC_MESSAGE_START ViewMsgStart
74 IPC_ENUM_TRAITS(AccessibilityMode
)
75 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value
)
76 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type
)
77 IPC_ENUM_TRAITS(blink::WebPluginAction::Type
)
78 IPC_ENUM_TRAITS(blink::WebPopupType
)
79 IPC_ENUM_TRAITS(blink::WebTextDirection
)
80 IPC_ENUM_TRAITS(WindowContainerType
)
81 IPC_ENUM_TRAITS(content::FaviconURL::IconType
)
82 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
83 IPC_ENUM_TRAITS(content::JavaScriptMessageType
)
84 IPC_ENUM_TRAITS(content::MenuItem::Type
)
85 IPC_ENUM_TRAITS(content::NavigationGesture
)
86 IPC_ENUM_TRAITS(content::PageZoom
)
87 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum
)
88 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum
)
89 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy
,
90 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX
)
91 IPC_ENUM_TRAITS(content::StopFindAction
)
92 IPC_ENUM_TRAITS(content::ThreeDAPIType
)
93 IPC_ENUM_TRAITS(media::ChannelLayout
)
94 IPC_ENUM_TRAITS(media::MediaLogEvent::Type
)
95 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode
, ui::TEXT_INPUT_MODE_MAX
)
96 IPC_ENUM_TRAITS(ui::TextInputType
)
98 #if defined(OS_MACOSX)
99 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
100 IPC_STRUCT_TRAITS_MEMBER(font_name
)
101 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
102 IPC_STRUCT_TRAITS_END()
105 IPC_STRUCT_TRAITS_BEGIN(blink::WebCompositionUnderline
)
106 IPC_STRUCT_TRAITS_MEMBER(startOffset
)
107 IPC_STRUCT_TRAITS_MEMBER(endOffset
)
108 IPC_STRUCT_TRAITS_MEMBER(color
)
109 IPC_STRUCT_TRAITS_MEMBER(thick
)
110 IPC_STRUCT_TRAITS_END()
112 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions
)
113 IPC_STRUCT_TRAITS_MEMBER(forward
)
114 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
115 IPC_STRUCT_TRAITS_MEMBER(findNext
)
116 IPC_STRUCT_TRAITS_END()
118 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction
)
119 IPC_STRUCT_TRAITS_MEMBER(type
)
120 IPC_STRUCT_TRAITS_MEMBER(enable
)
121 IPC_STRUCT_TRAITS_END()
123 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction
)
124 IPC_STRUCT_TRAITS_MEMBER(type
)
125 IPC_STRUCT_TRAITS_MEMBER(enable
)
126 IPC_STRUCT_TRAITS_END()
128 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint
)
129 IPC_STRUCT_TRAITS_MEMBER(x
)
130 IPC_STRUCT_TRAITS_MEMBER(y
)
131 IPC_STRUCT_TRAITS_END()
133 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect
)
134 IPC_STRUCT_TRAITS_MEMBER(x
)
135 IPC_STRUCT_TRAITS_MEMBER(y
)
136 IPC_STRUCT_TRAITS_MEMBER(width
)
137 IPC_STRUCT_TRAITS_MEMBER(height
)
138 IPC_STRUCT_TRAITS_END()
140 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo
)
141 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
142 IPC_STRUCT_TRAITS_MEMBER(depth
)
143 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
144 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
145 IPC_STRUCT_TRAITS_MEMBER(rect
)
146 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
147 IPC_STRUCT_TRAITS_END()
149 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem
)
150 IPC_STRUCT_TRAITS_MEMBER(label
)
151 IPC_STRUCT_TRAITS_MEMBER(tool_tip
)
152 IPC_STRUCT_TRAITS_MEMBER(type
)
153 IPC_STRUCT_TRAITS_MEMBER(action
)
154 IPC_STRUCT_TRAITS_MEMBER(rtl
)
155 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
156 IPC_STRUCT_TRAITS_MEMBER(enabled
)
157 IPC_STRUCT_TRAITS_MEMBER(checked
)
158 IPC_STRUCT_TRAITS_MEMBER(submenu
)
159 IPC_STRUCT_TRAITS_END()
161 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion
)
162 IPC_STRUCT_TRAITS_MEMBER(color
)
163 IPC_STRUCT_TRAITS_MEMBER(label
)
164 IPC_STRUCT_TRAITS_END()
166 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion
)
167 IPC_STRUCT_TRAITS_MEMBER(value
)
168 IPC_STRUCT_TRAITS_MEMBER(localized_value
)
169 IPC_STRUCT_TRAITS_MEMBER(label
)
170 IPC_STRUCT_TRAITS_END()
172 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL
)
173 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
174 IPC_STRUCT_TRAITS_MEMBER(icon_type
)
175 IPC_STRUCT_TRAITS_END()
177 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
178 IPC_STRUCT_TRAITS_MEMBER(mode
)
179 IPC_STRUCT_TRAITS_MEMBER(title
)
180 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
181 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
182 #if defined(OS_ANDROID)
183 IPC_STRUCT_TRAITS_MEMBER(capture
)
185 IPC_STRUCT_TRAITS_END()
187 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams
)
188 IPC_STRUCT_TRAITS_MEMBER(page_id
)
189 IPC_STRUCT_TRAITS_MEMBER(url
)
190 IPC_STRUCT_TRAITS_MEMBER(base_url
)
191 IPC_STRUCT_TRAITS_MEMBER(referrer
)
192 IPC_STRUCT_TRAITS_MEMBER(transition
)
193 IPC_STRUCT_TRAITS_MEMBER(redirects
)
194 IPC_STRUCT_TRAITS_MEMBER(should_update_history
)
195 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url
)
196 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding
)
197 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type
)
198 IPC_STRUCT_TRAITS_MEMBER(socket_address
)
199 IPC_STRUCT_TRAITS_END()
201 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
202 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
203 IPC_STRUCT_TRAITS_MEMBER(render_frame_id
)
204 IPC_STRUCT_TRAITS_MEMBER(document_url
)
205 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
206 IPC_STRUCT_TRAITS_END()
208 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
209 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
210 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
211 IPC_STRUCT_TRAITS_MEMBER(hinting
)
212 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
213 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
214 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
215 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
216 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
217 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
218 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
219 IPC_STRUCT_TRAITS_MEMBER(track_color
)
220 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
221 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
222 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
223 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
224 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests
)
225 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
226 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
227 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors
)
228 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
229 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
230 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
231 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
232 IPC_STRUCT_TRAITS_MEMBER(accept_languages
)
233 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes
)
234 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile
)
235 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile
)
236 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy
)
237 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page
)
238 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed
)
239 IPC_STRUCT_TRAITS_END()
241 IPC_STRUCT_TRAITS_BEGIN(content::CookieData
)
242 IPC_STRUCT_TRAITS_MEMBER(name
)
243 IPC_STRUCT_TRAITS_MEMBER(value
)
244 IPC_STRUCT_TRAITS_MEMBER(domain
)
245 IPC_STRUCT_TRAITS_MEMBER(path
)
246 IPC_STRUCT_TRAITS_MEMBER(expires
)
247 IPC_STRUCT_TRAITS_MEMBER(http_only
)
248 IPC_STRUCT_TRAITS_MEMBER(secure
)
249 IPC_STRUCT_TRAITS_MEMBER(session
)
250 IPC_STRUCT_TRAITS_END()
252 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry
)
253 IPC_STRUCT_TRAITS_MEMBER(window
)
254 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
255 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
256 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
257 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
258 IPC_STRUCT_TRAITS_MEMBER(visible
)
259 IPC_STRUCT_TRAITS_END()
261 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
262 IPC_STRUCT_TRAITS_MEMBER(id
)
263 IPC_STRUCT_TRAITS_MEMBER(type
)
264 IPC_STRUCT_TRAITS_MEMBER(params
)
265 IPC_STRUCT_TRAITS_MEMBER(time
)
266 IPC_STRUCT_TRAITS_END()
268 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo
)
269 IPC_STRUCT_TRAITS_MEMBER(file_path
)
270 IPC_STRUCT_TRAITS_MEMBER(local_path
)
271 IPC_STRUCT_TRAITS_MEMBER(display_name
)
272 IPC_STRUCT_TRAITS_END()
274 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
275 // Routing ID of the view initiating the open.
276 IPC_STRUCT_MEMBER(int, opener_id
)
278 // True if this open request came in the context of a user gesture.
279 IPC_STRUCT_MEMBER(bool, user_gesture
)
281 // Type of window requested.
282 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
284 // The session storage namespace ID this view should use.
285 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
287 // The name of the resulting frame that should be created (empty if none
288 // has been specified).
289 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
291 // The frame identifier of the frame initiating the open.
292 IPC_STRUCT_MEMBER(int64
, opener_frame_id
)
294 // The URL of the frame initiating the open.
295 IPC_STRUCT_MEMBER(GURL
, opener_url
)
297 // The URL of the top frame containing the opener.
298 IPC_STRUCT_MEMBER(GURL
, opener_top_level_frame_url
)
300 // The security origin of the frame initiating the open.
301 IPC_STRUCT_MEMBER(GURL
, opener_security_origin
)
303 // Whether the opener will be suppressed in the new window, in which case
304 // scripting the new window is not allowed.
305 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
307 // Whether the window should be opened in the foreground, background, etc.
308 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
310 // The URL that will be loaded in the new window (empty if none has been
312 IPC_STRUCT_MEMBER(GURL
, target_url
)
314 // The referrer that will be used to load |target_url| (empty if none has
316 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
318 // The window features to use for the new view.
319 IPC_STRUCT_MEMBER(blink::WebWindowFeatures
, features
)
321 // The additional window features to use for the new view. We pass these
322 // separately from |features| above because we cannot serialize WebStrings
324 IPC_STRUCT_MEMBER(std::vector
<base::string16
>, additional_features
)
327 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
328 // URL for the worker script.
329 IPC_STRUCT_MEMBER(GURL
, url
)
331 // Name for a SharedWorker, otherwise empty string.
332 IPC_STRUCT_MEMBER(base::string16
, name
)
334 // Security policy used in the worker.
335 IPC_STRUCT_MEMBER(base::string16
, content_security_policy
)
337 // Security policy type used in the worker.
338 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType
, security_policy_type
)
340 // The ID of the parent document (unique within parent renderer).
341 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
343 // RenderFrame routing id used to send messages back to the parent.
344 IPC_STRUCT_MEMBER(int, render_frame_route_id
)
347 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params
)
348 IPC_STRUCT_MEMBER(ui::TextInputType
, dialog_type
)
349 IPC_STRUCT_MEMBER(double, dialog_value
)
350 IPC_STRUCT_MEMBER(double, minimum
)
351 IPC_STRUCT_MEMBER(double, maximum
)
352 IPC_STRUCT_MEMBER(double, step
)
353 IPC_STRUCT_MEMBER(std::vector
<content::DateTimeSuggestion
>, suggestions
)
356 // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
357 // parameters to be reasonably put in a predefined IPC message.
358 IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params
,
359 content::FrameNavigateParams
)
360 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams
)
361 // The frame ID for this navigation. The frame ID uniquely identifies the
362 // frame the navigation happened in for a given renderer.
363 IPC_STRUCT_MEMBER(int64
, frame_id
)
365 // The WebFrame's uniqueName().
366 IPC_STRUCT_MEMBER(base::string16
, frame_unique_name
)
368 // Information regarding the security of the connection (empty if the
369 // connection was not secure).
370 IPC_STRUCT_MEMBER(std::string
, security_info
)
372 // The gesture that initiated this navigation.
373 IPC_STRUCT_MEMBER(content::NavigationGesture
, gesture
)
375 // True if this was a post request.
376 IPC_STRUCT_MEMBER(bool, is_post
)
378 // The POST body identifier. -1 if it doesn't exist.
379 IPC_STRUCT_MEMBER(int64
, post_id
)
381 // Whether the frame navigation resulted in no change to the documents within
382 // the page. For example, the navigation may have just resulted in scrolling
383 // to a named anchor.
384 IPC_STRUCT_MEMBER(bool, was_within_same_page
)
386 // The status code of the HTTP request.
387 IPC_STRUCT_MEMBER(int, http_status_code
)
389 // True if the connection was proxied. In this case, socket_address
390 // will represent the address of the proxy, rather than the remote host.
391 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy
)
393 // Serialized history item state to store in the navigation entry.
394 IPC_STRUCT_MEMBER(content::PageState
, page_state
)
396 // Original request's URL.
397 IPC_STRUCT_MEMBER(GURL
, original_request_url
)
399 // User agent override used to navigate.
400 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
402 // Notifies the browser that for this navigation, the session history was
403 // successfully cleared.
404 IPC_STRUCT_MEMBER(bool, history_list_was_cleared
)
407 IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params
)
408 IPC_STRUCT_MEMBER(GURL
, url
)
409 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
410 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
411 IPC_STRUCT_MEMBER(int64
, frame_id
)
412 IPC_STRUCT_MEMBER(bool, should_replace_current_entry
)
413 IPC_STRUCT_MEMBER(bool, user_gesture
)
416 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params
)
417 IPC_STRUCT_MEMBER(gfx::Rect
, anchor_rect
)
418 IPC_STRUCT_MEMBER(blink::WebTextDirection
, anchor_dir
)
419 IPC_STRUCT_MEMBER(gfx::Rect
, focus_rect
)
420 IPC_STRUCT_MEMBER(blink::WebTextDirection
, focus_dir
)
421 IPC_STRUCT_MEMBER(bool, is_anchor_first
)
424 // This message is used for supporting popup menus on Mac OS X using native
425 // Cocoa controls. The renderer sends us this message which we use to populate
427 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params
)
428 // Position on the screen.
429 IPC_STRUCT_MEMBER(gfx::Rect
, bounds
)
431 // The height of each item in the menu.
432 IPC_STRUCT_MEMBER(int, item_height
)
434 // The size of the font to use for those items.
435 IPC_STRUCT_MEMBER(double, item_font_size
)
437 // The currently selected (displayed) item in the menu.
438 IPC_STRUCT_MEMBER(int, selected_item
)
440 // The entire list of items in the popup menu.
441 IPC_STRUCT_MEMBER(std::vector
<content::MenuItem
>, popup_items
)
443 // Whether items should be right-aligned.
444 IPC_STRUCT_MEMBER(bool, right_aligned
)
446 // Whether this is a multi-select popup.
447 IPC_STRUCT_MEMBER(bool, allow_multiple_selection
)
450 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
451 // The type of input field
452 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
454 // The value of the input field
455 IPC_STRUCT_MEMBER(std::string
, value
)
457 // The cursor position of the current selection start, or the caret position
458 // if nothing is selected
459 IPC_STRUCT_MEMBER(int, selection_start
)
461 // The cursor position of the current selection end, or the caret position
462 // if nothing is selected
463 IPC_STRUCT_MEMBER(int, selection_end
)
465 // The start position of the current composition, or -1 if there is none
466 IPC_STRUCT_MEMBER(int, composition_start
)
468 // The end position of the current composition, or -1 if there is none
469 IPC_STRUCT_MEMBER(int, composition_end
)
471 // Whether or not inline composition can be performed for the current input.
472 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
474 // Whether or not the IME should be shown as a result of this update. Even if
475 // true, the IME will only be shown if the type is appropriate (e.g. not
476 // TEXT_INPUT_TYPE_NONE).
477 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
479 // Whether an acknowledgement is required for this update.
480 IPC_STRUCT_MEMBER(bool, require_ack
)
483 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
484 // The bitmap to be painted into the view at the locations specified by
486 IPC_STRUCT_MEMBER(TransportDIB::Id
, bitmap
)
488 // The position and size of the bitmap.
489 IPC_STRUCT_MEMBER(gfx::Rect
, bitmap_rect
)
491 // The scroll delta. Only one of the delta components can be non-zero, and if
492 // they are both zero, then it means there is no scrolling and the scroll_rect
494 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_delta
)
496 // The rectangular region to scroll.
497 IPC_STRUCT_MEMBER(gfx::Rect
, scroll_rect
)
499 // The scroll offset of the render view.
500 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_offset
)
502 // The regions of the bitmap (in view coords) that contain updated pixels.
503 // In the case of scrolling, this includes the scroll damage rect.
504 IPC_STRUCT_MEMBER(std::vector
<gfx::Rect
>, copy_rects
)
506 // The size of the RenderView when this message was generated. This is
507 // included so the host knows how large the view is from the perspective of
508 // the renderer process. This is necessary in case a resize operation is in
509 // progress. If auto-resize is enabled, this should update the corresponding
511 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
513 // New window locations for plugin child windows.
514 IPC_STRUCT_MEMBER(std::vector
<content::WebPluginGeometry
>,
517 // The following describes the various bits that may be set in flags:
519 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
520 // Indicates that this is a response to a ViewMsg_Resize message.
522 // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
523 // Indicates that this is a response to a ViewMsg_WasShown message.
525 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
526 // Indicates that this is a response to a ViewMsg_Repaint message.
528 // If flags is zero, then this message corresponds to an unsolicited paint
529 // request by the render view. Any of the above bits may be set in flags,
530 // which would indicate that this paint message is an ACK for multiple
532 IPC_STRUCT_MEMBER(int, flags
)
534 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
535 // update. True for 2D painting, but false for accelerated compositing.
536 IPC_STRUCT_MEMBER(bool, needs_ack
)
538 // All the above coordinates are in DIP. This is the scale factor needed
539 // to convert them to pixels.
540 IPC_STRUCT_MEMBER(float, scale_factor
)
542 // The latency information for the frame. Only valid when accelerated
543 // compositing is disabled.
544 IPC_STRUCT_MEMBER(std::vector
<ui::LatencyInfo
>, latency_info
)
547 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params
)
548 // The page_id for this navigation, or -1 if it is a new navigation. Back,
549 // Forward, and Reload navigations should have a valid page_id. If the load
550 // succeeds, then this page_id will be reflected in the resultant
551 // ViewHostMsg_FrameNavigate message.
552 IPC_STRUCT_MEMBER(int32
, page_id
)
554 // If page_id is -1, then pending_history_list_offset will also be -1.
555 // Otherwise, it contains the offset into the history list corresponding to
556 // the current navigation.
557 IPC_STRUCT_MEMBER(int, pending_history_list_offset
)
559 // Informs the RenderView of where its current page contents reside in
560 // session history and the total size of the session history list.
561 IPC_STRUCT_MEMBER(int, current_history_list_offset
)
562 IPC_STRUCT_MEMBER(int, current_history_list_length
)
564 // Informs the RenderView the session history should be cleared. In that
565 // case, the RenderView needs to notify the browser that the clearing was
566 // succesful when the navigation commits.
567 IPC_STRUCT_MEMBER(bool, should_clear_history_list
)
570 IPC_STRUCT_MEMBER(GURL
, url
)
572 // Base URL for use in WebKit's SubstituteData.
573 // Is only used with data: URLs.
574 IPC_STRUCT_MEMBER(GURL
, base_url_for_data_url
)
576 // History URL for use in WebKit's SubstituteData.
577 // Is only used with data: URLs.
578 IPC_STRUCT_MEMBER(GURL
, history_url_for_data_url
)
580 // The URL to send in the "Referer" header field. Can be empty if there is
582 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
584 // Any redirect URLs that occurred before |url|. Useful for cross-process
585 // navigations; defaults to empty.
586 IPC_STRUCT_MEMBER(std::vector
<GURL
>, redirects
)
588 // The type of transition.
589 IPC_STRUCT_MEMBER(content::PageTransition
, transition
)
591 // Informs the RenderView the pending navigation should replace the current
592 // history entry when it commits. This is used for cross-process redirects so
593 // the transferred navigation can recover the navigation state.
594 IPC_STRUCT_MEMBER(bool, should_replace_current_entry
)
596 // Opaque history state (received by ViewHostMsg_UpdateState).
597 IPC_STRUCT_MEMBER(content::PageState
, page_state
)
599 // Type of navigation.
600 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value
, navigation_type
)
602 // The time the request was created
603 IPC_STRUCT_MEMBER(base::Time
, request_time
)
605 // Extra headers (separated by \n) to send during the request.
606 IPC_STRUCT_MEMBER(std::string
, extra_headers
)
608 // The following two members identify a previous request that has been
609 // created before this navigation is being transferred to a new render view.
610 // This serves the purpose of recycling the old request.
611 // Unless this refers to a transferred navigation, these values are -1 and -1.
612 IPC_STRUCT_MEMBER(int, transferred_request_child_id
)
613 IPC_STRUCT_MEMBER(int, transferred_request_request_id
)
615 // Whether or not we should allow the url to download.
616 IPC_STRUCT_MEMBER(bool, allow_download
)
618 // Whether or not the user agent override string should be used.
619 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent
)
621 // True if this was a post request.
622 IPC_STRUCT_MEMBER(bool, is_post
)
624 // If is_post is true, holds the post_data information from browser. Empty
626 IPC_STRUCT_MEMBER(std::vector
<unsigned char>, browser_initiated_post_data
)
628 // Whether or not this url should be allowed to access local file://
630 IPC_STRUCT_MEMBER(bool, can_load_local_resources
)
632 // If not empty, which frame to navigate.
633 IPC_STRUCT_MEMBER(std::string
, frame_to_navigate
)
635 // The navigationStart time to expose to JS for this navigation.
636 IPC_STRUCT_MEMBER(base::TimeTicks
, browser_navigation_start
)
639 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
640 // Renderer-wide preferences.
641 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
643 // Preferences for this view.
644 IPC_STRUCT_MEMBER(WebPreferences
, web_preferences
)
646 // The ID of the view to be created.
647 IPC_STRUCT_MEMBER(int32
, view_id
)
649 // The ID of the main frame hosted in the view.
650 IPC_STRUCT_MEMBER(int32
, main_frame_routing_id
)
652 // The ID of the rendering surface.
653 IPC_STRUCT_MEMBER(int32
, surface_id
)
655 // The session storage namespace ID this view should use.
656 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
658 // The name of the frame associated with this view (or empty if none).
659 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
661 // The route ID of the opener RenderView if we need to set one
662 // (MSG_ROUTING_NONE otherwise).
663 IPC_STRUCT_MEMBER(int, opener_route_id
)
665 // Whether the RenderView should initially be swapped out.
666 IPC_STRUCT_MEMBER(bool, swapped_out
)
668 // Whether the RenderView should initially be hidden.
669 IPC_STRUCT_MEMBER(bool, hidden
)
671 // The initial page ID to use for this view, which must be larger than any
672 // existing navigation that might be loaded in the view. Page IDs are unique
673 // to a view and are only updated by the renderer after this initial value.
674 IPC_STRUCT_MEMBER(int32
, next_page_id
)
676 // The properties of the screen associated with the view.
677 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
679 // The accessibility mode of the renderer.
680 IPC_STRUCT_MEMBER(AccessibilityMode
, accessibility_mode
)
682 // Specifies whether partially swapping composited buffers is
683 // allowed for a renderer. Partial swaps will be used if they are both
684 // allowed and supported.
685 IPC_STRUCT_MEMBER(bool, allow_partial_swap
)
688 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params
)
689 // The serialized script value.
690 IPC_STRUCT_MEMBER(base::string16
, data
)
692 // When sent to the browser, this is the routing ID of the source frame in
693 // the source process. The browser replaces it with the routing ID of the
694 // equivalent (swapped out) frame in the destination process.
695 IPC_STRUCT_MEMBER(int, source_routing_id
)
697 // The origin of the source frame.
698 IPC_STRUCT_MEMBER(base::string16
, source_origin
)
700 // The origin for the message's target.
701 IPC_STRUCT_MEMBER(base::string16
, target_origin
)
703 // Information about the MessagePorts this message contains.
704 IPC_STRUCT_MEMBER(std::vector
<int>, message_port_ids
)
705 IPC_STRUCT_MEMBER(std::vector
<int>, new_routing_ids
)
708 // Messages sent from the browser to the renderer.
710 // Tells the renderer to cancel an opened date/time dialog.
711 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
713 // Get all savable resource links from current webpage, include main
714 // frame and sub-frame.
715 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage
,
716 GURL
/* url of page which is needed to save */)
718 // Get html data by serializing all frames of current page with lists
719 // which contain all resource links that have local copy.
720 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
721 std::vector
<GURL
> /* urls that have local copy */,
722 std::vector
<base::FilePath
> /* paths of local copy */,
723 base::FilePath
/* local directory path */)
725 // Tells the render side that a ViewHostMsg_LockMouse message has been
726 // processed. |succeeded| indicates whether the mouse has been successfully
728 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
729 bool /* succeeded */)
730 // Tells the render side that the mouse has been unlocked.
731 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
733 // Screen was rotated. Dispatched to the onorientationchange javascript API.
734 IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent
,
735 int /* orientation */)
737 // Sent by the browser when the parameters for vsync alignment have changed.
738 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
739 base::TimeTicks
/* timebase */,
740 base::TimeDelta
/* interval */)
742 // Set the top-level frame to the provided name.
743 IPC_MESSAGE_ROUTED1(ViewMsg_SetName
,
744 std::string
/* frame_name */)
746 // Sent to the RenderView when a new tab is swapped into an existing
747 // tab and the histories need to be merged. The existing tab has a history of
748 // |merged_history_length| which precedes the history of the new tab. All
749 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
751 // For example, suppose the history of page_ids in the new tab's RenderView
752 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
753 // all pages in the new tab with page_id >= 7 are to be preserved.
754 // The resulting page history is [-1 -1 -1 7 8].
755 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune
,
756 int, /* merge_history_length */
757 int32
/* minimum_page_id */)
759 // Tells the renderer to create a new view.
760 // This message is slightly different, the view it takes (via
761 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
762 // non-view control message.
763 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
766 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
767 // similar to the new command, but used when the renderer created a view
768 // first, and we need to update it.
769 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
771 // Sends updated preferences to the renderer.
772 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
773 content::RendererPreferences
)
775 // This passes a set of webkit preferences down to the renderer.
776 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
779 // Informs the renderer that the timezone has changed.
780 IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange
)
782 // Tells the render view to close.
783 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
785 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params
)
786 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
787 IPC_STRUCT_MEMBER(gfx::Size
, new_size
)
788 IPC_STRUCT_MEMBER(gfx::Size
, physical_backing_size
)
789 IPC_STRUCT_MEMBER(float, overdraw_bottom_height
)
790 IPC_STRUCT_MEMBER(gfx::Rect
, resizer_rect
)
791 IPC_STRUCT_MEMBER(bool, is_fullscreen
)
794 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
795 // is generated in response provided new_size is not empty and not equal to
796 // the view's current size. The generated ViewHostMsg_UpdateRect message will
797 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
798 // we don't have to fetch it every time WebKit asks for it.
799 IPC_MESSAGE_ROUTED1(ViewMsg_Resize
,
800 ViewMsg_Resize_Params
/* params */)
802 // Tells the render view that the resize rect has changed.
803 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
804 gfx::Rect
/* resizer_rect */)
806 // Sent to inform the view that it was hidden. This allows it to reduce its
807 // resource utilization.
808 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
810 // Tells the render view that it is no longer hidden (see WasHidden), and the
811 // render view is expected to respond with a full repaint if needs_repainting
812 // is true. In that case, the generated ViewHostMsg_UpdateRect message will
813 // have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this
814 // message does not trigger a message in response.
815 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown
,
816 bool /* needs_repainting */)
818 // Sent to inform the view that it was swapped out. This allows the process to
819 // exit if no other views are using it.
820 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut
)
822 // Sent to render the view into the supplied transport DIB, resize
823 // the web widget to match the |page_size|, scale it by the
824 // appropriate scale to make it fit the |desired_size|, and return
825 // it. In response to this message, the host generates a
826 // ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be
827 // the right size to receive an RGBA image at the |desired_size|.
828 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
829 // identify the PaintAtSize message the ACK belongs to.
830 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize
,
831 TransportDIB::Handle
/* dib_handle */,
833 gfx::Size
/* page_size */,
834 gfx::Size
/* desired_size */)
836 // Tells the render view that a ViewHostMsg_UpdateRect message was processed.
837 // This signals the render view that it can send another UpdateRect message.
838 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK
)
840 // Tells the render view that a SwapBuffers was completed. Typically,
841 // SwapBuffers requests go from renderer -> GPU process -> browser. Most
842 // platforms still use the GfxCxt3D Echo for receiving the SwapBuffers Ack.
843 // Using Echo routes the ack from browser -> GPU process -> renderer, while this
844 // Ack goes directly from browser -> renderer. This is not used for the threaded
846 IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK
)
848 // Tells the renderer to focus the first (last if reverse is true) focusable
850 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
853 // Sent to inform the renderer to invoke a context menu.
854 // The parameter specifies the location in the render view's coordinates.
855 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu
,
856 gfx::Point
/* location where menu should be shown */)
858 // Tells the renderer to perform the specified navigation, interrupting any
859 // existing navigation.
860 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate
, ViewMsg_Navigate_Params
)
862 IPC_MESSAGE_ROUTED0(ViewMsg_Stop
)
864 // Tells the renderer to reload the current focused frame
865 IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame
)
867 // Sent when the user wants to search for a word on the page (find in page).
868 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
869 int /* request_id */,
870 base::string16
/* search_text */,
871 blink::WebFindOptions
)
873 // This message notifies the renderer that the user has closed the FindInPage
874 // window (and what action to take regarding the selection).
875 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
876 content::StopFindAction
/* action */)
878 // Replaces a date time input field.
879 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
,
880 double /* dialog_value */)
882 // Copies the image at location x, y to the clipboard (if there indeed is an
883 // image at that location).
884 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
888 // Tells the renderer to perform the given action on the media player
889 // located at the given point.
890 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
891 gfx::Point
, /* location */
892 blink::WebMediaPlayerAction
)
894 // Tells the renderer to perform the given action on the plugin located at
896 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
897 gfx::Point
, /* location */
898 blink::WebPluginAction
)
900 // Request for the renderer to evaluate an xpath to a frame and execute a
901 // javascript: url in that frame's context. The message is completely
902 // asynchronous and no corresponding response message is sent back.
904 // frame_xpath contains the modified xpath notation to identify an inner
905 // subframe (starting from the root frame). It is a concatenation of
906 // number of smaller xpaths delimited by '\n'. Each chunk in the string can
907 // be evaluated to a frame in its parent-frame's context.
909 // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
910 // can be broken into 3 xpaths
911 // /html/body/iframe evaluates to an iframe within the root frame
912 // /html/body/div/iframe evaluates to an iframe within the level-1 iframe
913 // /frameset/frame[0] evaluates to first frame within the level-2 iframe
915 // jscript_url is the string containing the javascript: url to be executed
916 // in the target frame's context. The string should start with "javascript:"
917 // and continue with a valid JS text.
919 // If the fourth parameter is true the result is sent back to the renderer
920 // using the message ViewHostMsg_ScriptEvalResponse.
921 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
922 // client can uniquely identify the request.
923 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest
,
924 base::string16
, /* frame_xpath */
925 base::string16
, /* jscript_url */
927 bool /* If true, result is sent back. */)
929 // Posts a message from a frame in another process to the current renderer.
930 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent
,
931 ViewMsg_PostMessage_Params
)
933 // Requests that the RenderView's main frame sets its opener to null.
934 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener
)
936 // Request for the renderer to evaluate an xpath to a frame and insert css
937 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
938 // allowed xpath expressions.
939 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest
,
940 base::string16
, /* frame_xpath */
941 std::string
/* css string */)
943 // Change the zoom level for the current main frame. If the level actually
944 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
945 // telling it what url got zoomed and what its current zoom level is.
946 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
947 content::PageZoom
/* function */)
949 // Set the zoom level for the current main frame. If the level actually
950 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
951 // telling it what url got zoomed and what its current zoom level is.
952 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel
,
953 double /* zoom_level */)
955 // Zooms the page by the factor defined in the renderer.
956 IPC_MESSAGE_ROUTED3(ViewMsg_ZoomFactor
,
958 int /* zoom center_x */,
959 int /* zoom center_y */)
961 // Set the zoom level for a particular url that the renderer is in the
962 // process of loading. This will be stored, to be used if the load commits
963 // and ignored otherwise.
964 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
966 double /* zoom_level */)
968 // Set the zoom level for a particular url, so all render views
969 // displaying this url can update their zoom levels to match.
970 // If scheme is empty, then only host is used for matching.
971 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL
,
972 std::string
/* scheme */,
973 std::string
/* host */,
974 double /* zoom_level */)
976 // Change encoding of page in the renderer.
977 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
978 std::string
/*new encoding name*/)
980 // Reset encoding of page in the renderer back to default.
981 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
983 // Used to tell a render view whether it should expose various bindings
984 // that allow JS content extended privileges. See BindingsPolicy for valid
986 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
987 int /* enabled_bindings_flags */)
989 // Tell the renderer to add a property to the WebUI binding object. This
990 // only works if we allowed WebUI bindings.
991 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
992 std::string
/* property_name */,
993 std::string
/* property_value_json */)
995 // This message starts/stop monitoring the input method status of the focused
996 // edit control of a renderer process.
998 // * is_active (bool)
999 // Indicates if an input method is active in the browser process.
1000 // The possible actions when a renderer process receives this message are
1003 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
1004 // to notify the input method status of the focused edit control.
1005 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
1006 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive
,
1007 bool /* is_active */)
1009 // IME API oncandidatewindow* events for InputMethodContext.
1010 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown
)
1011 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated
)
1012 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden
)
1014 // This message sends a string being composed with an input method.
1015 IPC_MESSAGE_ROUTED4(
1016 ViewMsg_ImeSetComposition
,
1017 base::string16
, /* text */
1018 std::vector
<blink::WebCompositionUnderline
>, /* underlines */
1019 int, /* selectiont_start */
1020 int /* selection_end */)
1022 // This message confirms an ongoing composition.
1023 IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition
,
1024 base::string16
/* text */,
1025 gfx::Range
/* replacement_range */,
1026 bool /* keep_selection */)
1028 // Sets the text composition to be between the given start and end offsets
1029 // in the currently focused editable field.
1030 IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText
,
1033 std::vector
<blink::WebCompositionUnderline
> /* underlines */)
1035 // Selects between the given start and end offsets in the currently focused
1037 IPC_MESSAGE_ROUTED2(ViewMsg_SetEditableSelectionOffsets
,
1041 // Deletes the current selection plus the specified number of characters before
1042 // and after the selection or caret.
1043 IPC_MESSAGE_ROUTED2(ViewMsg_ExtendSelectionAndDelete
,
1047 // Used to notify the render-view that we have received a target URL. Used
1048 // to prevent target URLs spamming the browser.
1049 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
1051 // Notifies the color chooser client that the user selected a color.
1052 IPC_MESSAGE_ROUTED2(ViewMsg_DidChooseColorResponse
, unsigned, SkColor
)
1054 // Notifies the color chooser client that the color chooser has ended.
1055 IPC_MESSAGE_ROUTED1(ViewMsg_DidEndColorChooser
, unsigned)
1057 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
1058 std::vector
<ui::SelectedFileInfo
>)
1060 // Provides the results of directory enumeration.
1061 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
1062 int /* request_id */,
1063 std::vector
<base::FilePath
> /* files_in_directory */)
1065 // When a renderer sends a ViewHostMsg_Focus to the browser process,
1066 // the browser has the option of sending a ViewMsg_CantFocus back to
1068 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus
)
1070 // Instructs the renderer to invoke the frame's shouldClose method, which
1071 // runs the onbeforeunload event handler. Expects the result to be returned
1072 // via ViewHostMsg_ShouldClose.
1073 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose
)
1075 // Tells the renderer to suppress any further modal dialogs until it receives a
1076 // corresponding ViewMsg_SwapOut message. This ensures that no
1077 // PageGroupLoadDeferrer is on the stack for SwapOut.
1078 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut
)
1080 // Instructs the renderer to swap out for a cross-site transition, including
1081 // running the unload event handler. Expects a SwapOut_ACK message when
1083 IPC_MESSAGE_ROUTED0(ViewMsg_SwapOut
)
1085 // Instructs the renderer to close the current page, including running the
1086 // onunload event handler.
1088 // Expects a ClosePage_ACK message when finished.
1089 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
1091 // Notifies the renderer about ui theme changes
1092 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
1094 // Notifies the renderer that a paint is to be generated for the rectangle
1096 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
1097 gfx::Size
/* The view size to be repainted */)
1099 // Notification that a move or resize renderer's containing window has
1101 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
1103 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
1104 gfx::Rect
/* view_screen_rect */,
1105 gfx::Rect
/* window_screen_rect */)
1107 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
1108 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
1109 // processed the move. The browser may have ignored the move, but it finished
1110 // processing. This is used because the renderer keeps a temporary cache of
1111 // the widget position while these asynchronous operations are in progress.
1112 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
1114 // Used to instruct the RenderView to send back updates to the preferred size.
1115 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
1117 // Used to instruct the RenderView to automatically resize and send back
1118 // updates for the new size.
1119 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
1120 gfx::Size
/* min_size */,
1121 gfx::Size
/* max_size */)
1123 // Used to instruct the RenderView to disalbe automatically resize.
1124 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
1125 gfx::Size
/* new_size */)
1127 // Changes the text direction of the currently selected input field (if any).
1128 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
1129 blink::WebTextDirection
/* direction */)
1131 // Tells the renderer to clear the focused node (if any).
1132 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode
)
1134 // Make the RenderView transparent and render it onto a custom background. The
1135 // background will be tiled in both directions if it is not large enough.
1136 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground
,
1137 SkBitmap
/* background */)
1139 // Used to tell the renderer not to add scrollbars with height and
1140 // width below a threshold.
1141 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
1142 gfx::Size
/* disable_scrollbar_size_limit */)
1144 // Activate/deactivate the RenderView (i.e., set its controls' tint
1145 // accordingly, etc.).
1146 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
1149 // Response message to ViewHostMsg_CreateWorker.
1150 // Sent when the worker has started.
1151 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
1153 // Sent when the worker failed to load the worker script.
1154 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
1155 // But if the shared worker of the same URL already exists and it has failed
1156 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
1157 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
1158 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed
)
1160 // Sent when the worker has connected.
1161 // This message is sent only if the worker successfully loaded the script.
1162 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected
)
1164 // Tells the renderer that the network state has changed and that
1165 // window.navigator.onLine should be updated for all WebViews.
1166 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged
,
1169 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
1170 // Tells the renderer that the channel to the broker has been created.
1171 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated
,
1172 base::ProcessId
/* broker_pid */,
1173 IPC::ChannelHandle
/* handle */)
1175 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
1176 // Tells the renderer whether permission to access to PPAPI broker was granted
1178 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult
,
1181 // Tells the renderer to empty its plugin list cache, optional reloading
1182 // pages containing plugins.
1183 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
1184 bool /* reload_pages */)
1186 // Used to instruct the RenderView to go into "view source" mode.
1187 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
1189 // Instructs the renderer to save the current page to MHTML.
1190 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
1192 IPC::PlatformFileForTransit
/* file handle */)
1194 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
1195 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData
,
1198 // Change the accessibility mode in the renderer process.
1199 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode
,
1202 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
1203 // process to release the magnified image.
1204 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupDIB
,
1205 TransportDIB::Handle
/* DIB handle */)
1207 // Notifies the renderer that a snapshot has been retrieved.
1208 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted
,
1209 int /* snapshot_id */,
1210 gfx::Size
/* size */,
1211 std::vector
<unsigned char> /* png */)
1213 #if defined(OS_MACOSX)
1214 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle
, blink::ScrollerStyleOverlay
);
1216 // Notification of a change in scrollbar appearance and/or behavior.
1217 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme
,
1218 float /* initial_button_delay */,
1219 float /* autoscroll_button_delay */,
1220 bool /* jump_on_track_click */,
1221 blink::ScrollerStyle
/* preferred_scroller_style */,
1225 #if defined(OS_ANDROID)
1226 // Tells the renderer to suspend/resume the webkit timers.
1227 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended
,
1230 // Sent when the browser wants the bounding boxes of the current find matches.
1232 // If match rects are already cached on the browser side, |current_version|
1233 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
1234 // they came in, so the renderer can tell if it needs to send updated rects.
1235 // Otherwise just pass -1 to always receive the list of rects.
1237 // There must be an active search string (it is probably most useful to call
1238 // this immediately after a ViewHostMsg_Find_Reply message arrives with
1239 // final_update set to true).
1240 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
1241 int /* current_version */)
1243 // External popup menus.
1244 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems
,
1245 bool /* user canceled the popup */,
1246 std::vector
<int> /* selected indices */)
1248 // Tells the renderer to try to revert to the zoom level we were at before
1249 // ViewMsg_ScrollFocusedEditableNodeIntoView was called.
1250 IPC_MESSAGE_ROUTED0(ViewMsg_UndoScrollFocusedEditableNodeIntoView
)
1252 // Notifies the renderer whether hiding/showing the top controls is enabled
1253 // and whether or not to animate to the proper state.
1254 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState
,
1255 bool /* enable_hiding */,
1256 bool /* enable_showing */,
1259 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded
)
1261 // Sent by the browser when the renderer should generate a new frame.
1262 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame
,
1263 cc::BeginFrameArgs
/* args */)
1265 // Sent by the browser when an IME update that requires acknowledgement has been
1266 // processed on the browser side.
1267 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck
)
1269 // Sent by the browser when we should pause video playback.
1270 IPC_MESSAGE_ROUTED0(ViewMsg_PauseVideo
);
1272 // Extracts the data at the given rect, returning it through the
1273 // ViewHostMsg_SmartClipDataExtracted IPC.
1274 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData
,
1275 gfx::Rect
/* rect */)
1277 #elif defined(OS_MACOSX)
1278 // Let the RenderView know its window has changed visibility.
1279 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
1280 bool /* visibile */)
1282 // Let the RenderView know its window's frame has changed.
1283 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
1284 gfx::Rect
/* window frame */,
1285 gfx::Rect
/* content view frame */)
1287 // Message sent from the browser to the renderer when the user starts or stops
1288 // resizing the view.
1289 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
1292 // Tell the renderer that plugin IME has completed.
1293 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
1294 base::string16
/* text */,
1295 int /* plugin_id */)
1297 // External popup menus.
1298 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem
,
1299 int /* selected index, -1 means no selection */)
1302 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
1303 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck
,
1304 uint32
/* output_surface_id */,
1305 cc::CompositorFrameAck
/* ack */)
1307 // Sent by browser to tell renderer compositor that some resources that were
1308 // given to the browser in a swap are not being used anymore.
1309 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources
,
1310 uint32
/* output_surface_id */,
1311 cc::CompositorFrameAck
/* ack */)
1313 // Sent by the browser to ask the renderer for a snapshot of the current view.
1314 IPC_MESSAGE_ROUTED1(ViewMsg_Snapshot
,
1315 gfx::Rect
/* src_subrect */)
1317 // -----------------------------------------------------------------------------
1318 // Messages sent from the renderer to the browser.
1320 // Sent by the renderer when it is creating a new window. The browser creates
1321 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1322 // MSG_ROUTING_NONE, the view couldn't be created.
1323 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow
,
1324 ViewHostMsg_CreateWindow_Params
,
1326 int /* main_frame_route_id */,
1327 int32
/* surface_id */,
1328 int64
/* cloned_session_storage_namespace_id */)
1330 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1331 // <select> dropdowns. This message is sent to the WebContentsImpl that
1332 // contains the widget being created.
1333 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
1334 int /* opener_id */,
1335 blink::WebPopupType
/* popup type */,
1337 int32
/* surface_id */)
1339 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1341 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1342 int /* opener_id */,
1344 int32
/* surface_id */)
1346 // Asks the browser for a unique routing ID.
1347 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
1348 int /* routing_id */)
1350 // Asks the browser for the default audio hardware configuration.
1351 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig
,
1352 media::AudioParameters
/* input parameters */,
1353 media::AudioParameters
/* output parameters */)
1355 // Asks the browser for CPU usage of the renderer process in percents.
1356 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage
,
1357 int /* CPU usage in percents */)
1359 // Asks the browser for the renderer process memory size stats.
1360 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes
,
1361 size_t /* private_bytes */,
1362 size_t /* shared_bytes */)
1364 // These three messages are sent to the parent RenderViewHost to display the
1365 // page/widget that was created by
1366 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1367 // refers to the id that was returned from the Create message above.
1368 // The initial_position parameter is a rectangle in screen coordinates.
1370 // FUTURE: there will probably be flags here to control if the result is
1372 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1374 WindowOpenDisposition
/* disposition */,
1375 gfx::Rect
/* initial_pos */,
1376 bool /* opened_by_user_gesture */)
1378 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1380 gfx::Rect
/* initial_pos */)
1382 // Message to show a full screen widget.
1383 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1386 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1387 // to run in a modal fashion until it is closed.
1388 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal
,
1389 int /* opener_id */)
1391 // Indicates the renderer is ready in response to a ViewMsg_New or
1392 // a ViewMsg_CreatingNew_ACK.
1393 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1395 // Indicates the renderer process is gone. This actually is sent by the
1396 // browser process to itself, but keeps the interface cleaner.
1397 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone
,
1398 int, /* this really is base::TerminationStatus */
1399 int /* exit_code */)
1401 // Sent by the renderer process to request that the browser close the view.
1402 // This corresponds to the window.close() API, and the browser may ignore
1403 // this message. Otherwise, the browser will generates a ViewMsg_Close
1404 // message to close the view.
1405 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1407 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1408 // throttle these messages.
1409 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1411 // Sent by the renderer process to request that the browser move the view.
1412 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1413 // the browser may ignore this message.
1414 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1415 gfx::Rect
/* position */)
1417 // Notifies the browser that a frame in the view has changed. This message
1418 // has a lot of parameters and is packed/unpacked by functions defined in
1419 // render_messages.h.
1420 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate
,
1421 ViewHostMsg_FrameNavigate_Params
)
1423 // Message to show a popup menu using native cocoa controls (Mac only).
1424 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup
,
1425 ViewHostMsg_ShowPopup_Params
)
1427 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
1428 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the
1429 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
1431 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse
,
1433 base::ListValue
/* result */)
1435 // Result of string search in the page.
1436 // Response to ViewMsg_Find with the results of the requested find-in-page
1437 // search, the number of matches found and the selection rect (in screen
1438 // coordinates) for the string found. If |final_update| is false, it signals
1439 // that this is not the last Find_Reply message - more will be sent as the
1440 // scoping effort continues.
1441 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1442 int /* request_id */,
1443 int /* number of matches */,
1444 gfx::Rect
/* selection_rect */,
1445 int /* active_match_ordinal */,
1446 bool /* final_update */)
1448 // Provides the result from running OnMsgShouldClose. |proceed| matches the
1449 // return value of the the frame's shouldClose method (which includes the
1450 // onbeforeunload handler): true if the user decided to proceed with leaving
1452 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK
,
1454 base::TimeTicks
/* before_unload_start_time */,
1455 base::TimeTicks
/* before_unload_end_time */)
1457 // Indicates that the current renderer has swapped out, after a SwapOut
1459 IPC_MESSAGE_ROUTED0(ViewHostMsg_SwapOut_ACK
)
1461 // Indicates that the current page has been closed, after a ClosePage
1463 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1465 // Notifies the browser that media has started/stopped playing.
1466 IPC_MESSAGE_ROUTED3(ViewHostMsg_MediaPlayingNotification
,
1467 int64
/* player_cookie, distinguishes instances */,
1468 bool /* has_video */,
1469 bool /* has_audio */)
1470 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPausedNotification
,
1471 int64
/* player_cookie, distinguishes instances */)
1473 // Notifies the browser that we have session history information.
1474 // page_id: unique ID that allows us to distinguish between history entries.
1475 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1476 int32
/* page_id */,
1477 content::PageState
/* state */)
1479 // Notifies the browser that a document has been loaded in a frame.
1480 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame
,
1481 int64
/* frame_id */)
1483 // Notifies the browser that a frame finished loading.
1484 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad
,
1485 int64
/* frame_id */,
1486 GURL
/* validated_url */,
1487 bool /* is_main_frame */)
1489 // Changes the title for the page in the UI when the page is navigated or the
1491 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle
,
1492 int32
/* page_id */,
1493 base::string16
/* title */,
1494 blink::WebTextDirection
/* title direction */)
1496 // Change the encoding name of the page in UI when the page has detected
1497 // proper encoding name.
1498 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding
,
1499 std::string
/* new encoding name */)
1501 // Notifies the browser that we want to show a destination url for a potential
1502 // action (e.g. when the user is hovering over a link).
1503 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL
,
1507 // Sent when the renderer starts loading the page. This corresponds to
1508 // WebKit's notion of the throbber starting. Note that sometimes you may get
1509 // duplicates of these during a single load.
1510 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading
)
1512 // Sent when the renderer is done loading a page. This corresponds to WebKit's
1513 // notion of the throbber stopping.
1514 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading
)
1516 // Sent when the renderer main frame has made progress loading.
1517 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress
,
1518 double /* load_progress */)
1520 // Sent when the renderer main frame sets its opener to null, disowning it for
1521 // the lifetime of the window.
1522 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisownOpener
)
1524 // Sent when the document element is available for the top-level frame. This
1525 // happens after the page starts loading, but before all resources are
1527 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame
)
1529 // Sent when after the onload handler has been invoked for the document
1530 // in the top-level frame.
1531 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame
,
1532 int32
/* page_id */)
1534 // Sent when the renderer loads a resource from its memory cache.
1535 // The security info is non empty if the resource was originally loaded over
1536 // a secure connection.
1537 // Note: May only be sent once per URL per frame per committed load.
1538 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache
,
1540 std::string
/* security info */,
1541 std::string
/* http method */,
1542 std::string
/* mime type */,
1543 ResourceType::Type
/* resource type */)
1545 // Sent when the renderer displays insecure content in a secure page.
1546 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent
)
1548 // Sent when the renderer runs insecure content in a secure origin.
1549 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent
,
1550 std::string
/* security_origin */,
1551 GURL
/* target URL */)
1553 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError
,
1554 int64
/* frame_id */,
1555 GURL
/* validated_url */,
1556 bool /* is_main_frame */,
1557 int /* error_code */,
1558 base::string16
/* error_description */)
1560 // Tells the render view that a ViewHostMsg_PaintAtSize message was
1561 // processed, and the DIB is ready for use. |tag| has the same value that
1562 // the tag sent along with ViewMsg_PaintAtSize.
1563 IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK
,
1565 gfx::Size
/* size */)
1567 // Sent to update part of the view. In response to this message, the host
1568 // generates a ViewMsg_UpdateRect_ACK message.
1569 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1570 ViewHostMsg_UpdateRect_Params
)
1572 // Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
1573 // which may get delayed until the browser's UI unblocks.
1574 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed
)
1576 // Sent by the renderer when accelerated compositing is enabled or disabled to
1577 // notify the browser whether or not is should do painting.
1578 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing
,
1579 bool /* true if the accelerated compositor is actve */)
1581 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1582 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1584 // Message sent from renderer to the browser when focus changes inside the
1585 // webpage. The parameter says whether the newly focused element needs
1586 // keyboard input (true for textfields, text areas and content editable divs).
1587 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged
,
1588 bool /* is_editable_node */)
1590 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
,
1593 // Used to set a cookie. The cookie is set asynchronously, but will be
1594 // available to a subsequent ViewHostMsg_GetCookies request.
1595 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie
,
1596 int /* render_frame_id */,
1598 GURL
/* first_party_for_cookies */,
1599 std::string
/* cookie */)
1601 // Used to get cookies for the given URL. This may block waiting for a
1602 // previous SetCookie message to be processed.
1603 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies
,
1604 int /* render_frame_id */,
1606 GURL
/* first_party_for_cookies */,
1607 std::string
/* cookies */)
1609 // Used to get raw cookie information for the given URL. This may block
1610 // waiting for a previous SetCookie message to be processed.
1611 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies
,
1613 GURL
/* first_party_for_cookies */,
1614 std::vector
<content::CookieData
>
1617 // Used to delete cookie for the given URL and name
1618 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie
,
1620 std::string
/* cookie_name */)
1622 // Used to check if cookies are enabled for the given URL. This may block
1623 // waiting for a previous SetCookie message to be processed.
1624 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled
,
1626 GURL
/* first_party_for_cookies */,
1627 bool /* cookies_enabled */)
1629 // Used to get the list of plugins
1630 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins
,
1632 std::vector
<content::WebPluginInfo
> /* plugins */)
1635 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1636 gfx::NativeViewId
/* dummy_activation_window */)
1638 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1639 gfx::NativeViewId
/* dummy_activation_window */)
1641 // Asks the browser for the user's monitor profile.
1642 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile
,
1643 std::vector
<char> /* profile */)
1646 // Get the list of proxies to use for |url|, as a semicolon delimited list
1647 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1648 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1651 std::string
/* proxy list */)
1653 // A renderer sends this to the browser process when it wants to create a
1654 // worker. The browser will create the worker process if necessary, and
1655 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1656 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1657 ViewHostMsg_CreateWorker_Params
,
1660 // A renderer sends this to the browser process when a document has been
1661 // detached. The browser will use this to constrain the lifecycle of worker
1662 // processes (SharedWorkers are shut down when their last associated document
1664 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1665 uint64
/* document_id */)
1667 // Wraps an IPC message that's destined to the worker on the renderer->browser
1669 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1670 IPC::Message
/* message */)
1672 // Tells the browser that a specific Appcache manifest in the current page
1674 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1675 GURL
/* manifest url */,
1676 bool /* blocked by policy */)
1678 // Initiates a download based on user actions like 'ALT+click'.
1679 IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl
,
1681 content::Referrer
/* referrer */,
1682 base::string16
/* suggested_name */)
1684 // Used to go to the session history entry at the given offset (ie, -1 will
1685 // return the "back" item).
1686 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1687 int /* offset (from current) of history item to get */)
1689 // Sent from an inactive renderer for the browser to route to the active
1690 // renderer, instructing it to close.
1691 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1693 // Sent to the browser from an inactive renderer to post a message to the
1695 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent
,
1696 ViewMsg_PostMessage_Params
)
1698 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage
,
1699 base::string16
/* in - alert message */,
1700 base::string16
/* in - default prompt */,
1701 GURL
/* in - originating page URL */,
1702 content::JavaScriptMessageType
/* in - type */,
1703 bool /* out - success */,
1704 base::string16
/* out - user_input field */)
1706 // Requests that the given URL be opened in the specified manner.
1707 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL
, ViewHostMsg_OpenURL_Params
)
1709 // Notifies that the preferred size of the content changed.
1710 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1711 gfx::Size
/* pref_size */)
1713 // Notifies that the scroll offset changed.
1714 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1715 // is not sent at all when threaded compositing is enabled while
1716 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1717 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset
)
1719 // Notifies that the pinned-to-side state of the content changed.
1720 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame
,
1721 bool /* pinned_to_left */,
1722 bool /* pinned_to_right */)
1724 // Notifies that the scrollbars-visible state of the content changed.
1725 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame
,
1726 bool /* has_horizontal_scrollbar */,
1727 bool /* has_vertical_scrollbar */)
1729 // Notifies that the number of JavaScript scroll handlers changed.
1730 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents
,
1733 // Notifies whether there are JavaScript touch event handlers or not.
1734 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers
,
1735 bool /* has_handlers */)
1737 // A message from HTML-based UI. When (trusted) Javascript calls
1738 // send(message, args), this message is sent to the browser.
1739 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend
,
1740 GURL
/* source_url */,
1741 std::string
/* message */,
1742 base::ListValue
/* args */)
1744 // A renderer sends this to the browser process when it wants to create a ppapi
1745 // plugin. The browser will create the plugin process if necessary, and will
1746 // return a handle to the channel on success.
1748 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1749 // process. This ID is valid only in the context of the browser process and is
1750 // used to identify the proper process when the renderer notifies it that the
1753 // On error an empty string and null handles are returned.
1754 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin
,
1755 base::FilePath
/* path */,
1756 IPC::ChannelHandle
/* handle to channel */,
1757 base::ProcessId
/* plugin_pid */,
1758 int /* plugin_child_id */)
1760 // Notification that a plugin has created a new plugin instance. The parameters
1762 // -The plugin process ID that we're creating the instance for.
1763 // -The instance ID of the instance being created.
1764 // -A PepperRendererInstanceData struct which contains properties from the
1765 // renderer which are associated with the plugin instance. This includes the
1766 // routing ID of the associated render view and the URL of plugin.
1767 // -Whether the plugin we're creating an instance for is external or internal.
1769 // This message must be sync even though it returns no parameters to avoid
1770 // a race condition with the plugin process. The plugin process sends messages
1771 // to the browser that assume the browser knows about the instance. We need to
1772 // make sure that the browser actually knows about the instance before we tell
1773 // the plugin to run.
1774 IPC_SYNC_MESSAGE_CONTROL4_0(
1775 ViewHostMsg_DidCreateOutOfProcessPepperInstance
,
1776 int /* plugin_child_id */,
1777 int32
/* pp_instance */,
1778 content::PepperRendererInstanceData
/* creation_data */,
1779 bool /* is_external */)
1781 // Notification that a plugin has destroyed an instance. This is the opposite of
1782 // the "DidCreate" message above.
1783 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance
,
1784 int /* plugin_child_id */,
1785 int32
/* pp_instance */,
1786 bool /* is_external */)
1788 // Message from the renderer to the browser indicating the in-process instance
1789 // has been created.
1790 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance
,
1791 int32
/* instance */,
1792 content::PepperRendererInstanceData
/* instance_data */)
1794 // Message from the renderer to the browser indicating the in-process instance
1795 // has been destroyed.
1796 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance
,
1797 int32
/* instance */)
1799 // A renderer sends this to the browser process when it wants to
1800 // create a ppapi broker. The browser will create the broker process
1801 // if necessary, and will return a handle to the channel on success.
1802 // On error an empty string is returned.
1803 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1804 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker
,
1805 int /* routing_id */,
1806 base::FilePath
/* path */)
1808 // A renderer sends this to the browser process when it wants to access a PPAPI
1809 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1810 // for every connection.
1811 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1812 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission
,
1813 int /* routing_id */,
1814 GURL
/* document_url */,
1815 base::FilePath
/* plugin_path */)
1817 #if defined(USE_X11)
1818 // A renderer sends this when it needs a browser-side widget for
1819 // hosting a windowed plugin. id is the XID of the plugin window, for which
1820 // the container is created.
1821 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer
,
1822 gfx::PluginWindowHandle
/* id */)
1824 // Destroy a plugin container previously created using CreatePluginContainer.
1825 // id is the XID of the plugin window corresponding to the container that is
1827 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer
,
1828 gfx::PluginWindowHandle
/* id */)
1831 // Send the tooltip text for the current mouse position to the browser.
1832 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText
,
1833 base::string16
/* tooltip text string */,
1834 blink::WebTextDirection
/* text direction hint */)
1836 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK
)
1837 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK
)
1839 // Notification that the text selection has changed.
1840 // Note: The secound parameter is the character based offset of the
1842 // text in the document.
1843 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged
,
1844 base::string16
/* text covers the selection range */,
1845 size_t /* the offset of the text in the document */,
1846 gfx::Range
/* selection range in the document */)
1848 // Notification that the selection bounds have changed.
1849 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged
,
1850 ViewHostMsg_SelectionBounds_Params
)
1852 // Asks the browser to open the color chooser.
1853 IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenColorChooser
,
1855 SkColor
/* color */,
1856 std::vector
<content::ColorSuggestion
> /* suggestions */)
1858 // Asks the browser to end the color chooser.
1859 IPC_MESSAGE_ROUTED1(ViewHostMsg_EndColorChooser
, int /* id */)
1861 // Change the selected color in the color chooser.
1862 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSelectedColorInColorChooser
,
1864 SkColor
/* color */)
1866 // Asks the browser to display the file chooser. The result is returned in a
1867 // ViewHost_RunFileChooserResponse message.
1868 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
1869 content::FileChooserParams
)
1871 // Asks the browser to enumerate a directory. This is equivalent to running
1872 // the file chooser in directory-enumeration mode and having the user select
1873 // the given directory. The result is returned in a
1874 // ViewMsg_EnumerateDirectoryResponse message.
1875 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
1876 int /* request_id */,
1877 base::FilePath
/* file_path */)
1879 // Tells the browser to move the focus to the next (previous if reverse is
1880 // true) focusable element.
1881 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
1884 // Required for opening a date/time dialog
1885 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog
,
1886 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
1888 IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged
,
1889 ui::TextInputType
/* TextInputType of the focused node */,
1890 ui::TextInputMode
/* TextInputMode of the focused node */,
1891 bool /* can_compose_inline in the focused node */)
1893 // Required for updating text input state.
1894 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
1895 ViewHostMsg_TextInputState_Params
/* input state params */)
1897 // Required for cancelling an ongoing input method composition.
1898 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition
)
1900 // WebKit and JavaScript error messages to log to the console
1902 IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole
,
1903 int32
, /* log level */
1904 base::string16
, /* msg */
1905 int32
, /* line number */
1906 base::string16
/* source id */ )
1908 // Displays a box to confirm that the user wants to navigate away from the
1909 // page. Replies true if yes, false otherwise, the reply string is ignored,
1910 // but is included so that we can use OnJavaScriptMessageBoxClosed.
1911 IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm
,
1912 GURL
, /* in - originating frame URL */
1913 base::string16
/* in - alert message */,
1914 bool /* in - is a reload */,
1915 bool /* out - success */,
1916 base::string16
/* out - This is ignored.*/)
1918 // Sent when the renderer changes the zoom level for a particular url, so the
1919 // browser can update its records. If remember is true, then url is used to
1920 // update the zoom level for all pages in that site. Otherwise, the render
1921 // view's id is used so that only the menu is updated.
1922 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL
,
1923 double /* zoom_level */,
1924 bool /* remember */,
1927 // Updates the minimum/maximum allowed zoom percent for this tab from the
1928 // default values. If |remember| is true, then the zoom setting is applied to
1929 // other pages in the site and is saved, otherwise it only applies to this
1931 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits
,
1932 int /* minimum_percent */,
1933 int /* maximum_percent */,
1934 bool /* remember */)
1936 // Notify the browser that this render process can or can't be suddenly
1938 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged
,
1941 // Informs the browser of updated frame names.
1942 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateFrameName
,
1944 bool /* is_top_level */,
1945 std::string
/* name */)
1948 IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params
)
1949 IPC_STRUCT_MEMBER(int32
, surface_id
)
1950 IPC_STRUCT_MEMBER(uint64
, surface_handle
)
1951 IPC_STRUCT_MEMBER(int32
, route_id
)
1952 IPC_STRUCT_MEMBER(gfx::Size
, size
)
1953 IPC_STRUCT_MEMBER(float, scale_factor
)
1954 IPC_STRUCT_MEMBER(int32
, gpu_process_host_id
)
1955 IPC_STRUCT_MEMBER(std::vector
<ui::LatencyInfo
>, latency_info
)
1958 // This message is synthesized by GpuProcessHost to pass through a swap message
1959 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
1960 // software or GPU frame.
1961 IPC_MESSAGE_ROUTED1(
1962 ViewHostMsg_CompositorSurfaceBuffersSwapped
,
1963 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params
/* params */)
1965 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame
,
1966 uint32
/* output_surface_id */,
1967 cc::CompositorFrame
/* frame */)
1969 // Sent by the compositor when input scroll events are dropped due to bounds
1970 // restricions on the root scroll offset.
1971 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidOverscroll
,
1972 gfx::Vector2dF
/* accumulated_overscroll */,
1973 gfx::Vector2dF
/* current_fling_velocity */)
1975 // Sent by the compositor when a flinging animation is stopped.
1976 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging
)
1978 // Reply to a snapshot request containing whether snapshotting succeeded and the
1979 // SkBitmap if it succeeded.
1980 IPC_MESSAGE_ROUTED2(ViewHostMsg_Snapshot
,
1982 SkBitmap
/* bitmap */)
1984 //---------------------------------------------------------------------------
1985 // Request for cryptographic operation messages:
1986 // These are messages from the renderer to the browser to perform a
1987 // cryptographic operation.
1989 // Asks the browser process to generate a keypair for grabbing a client
1990 // certificate from a CA (<keygen> tag), and returns the signed public
1991 // key and challenge string.
1992 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen
,
1993 uint32
/* key size index */,
1994 std::string
/* challenge string */,
1995 GURL
/* URL of requestor */,
1996 std::string
/* signed public key and challenge */)
1998 // Message sent from the renderer to the browser to request that the browser
1999 // cache |data| associated with |url|.
2000 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata
,
2002 double /* expected_response_time */,
2003 std::vector
<char> /* data */)
2005 // Displays a JavaScript out-of-memory message in the infobar.
2006 IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory
)
2008 // Register a new handler for URL requests with the given scheme.
2009 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler
,
2010 std::string
/* scheme */,
2012 base::string16
/* title */,
2013 bool /* user_gesture */)
2015 // Stores new inspector setting in the profile.
2016 // TODO(jam): this should be in the chrome module
2017 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting
,
2018 std::string
, /* key */
2019 std::string
/* value */)
2021 // Puts the browser into "tab fullscreen" mode for the sending renderer.
2022 // See the comment in chrome/browser/ui/browser.h for more details.
2023 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen
,
2024 bool /* enter_fullscreen */)
2026 // Send back a string to be recorded by UserMetrics.
2027 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
2028 std::string
/* action */)
2030 // Notifies the browser that the page was or was not saved as MHTML.
2031 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
2033 int64
/* size of the MHTML file, -1 if error */)
2035 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks
,
2036 std::vector
<GURL
> /* all savable resource links */,
2037 std::vector
<content::Referrer
> /* all referrers */,
2038 std::vector
<GURL
> /* all frame links */)
2040 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
2041 GURL
/* frame's url */,
2042 std::string
/* data buffer */,
2043 int32
/* complete status */)
2045 // Notifies the browser of an event occurring in the media pipeline.
2046 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents
,
2047 std::vector
<media::MediaLogEvent
> /* events */)
2049 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
2051 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
2052 // pop up a bubble to ask for user permission or take mouse lock content into
2054 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
2055 bool /* user_gesture */,
2056 bool /* last_unlocked_by_target */,
2057 bool /* privileged */)
2059 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
2060 // whenever the mouse is unlocked (which may or may not be caused by
2061 // ViewHostMsg_UnlockMouse).
2062 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
2064 // Notifies that the initial empty document of a view has been accessed.
2065 // After this, it is no longer safe to show a pending navigation's URL without
2066 // making a URL spoof possible.
2067 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidAccessInitialDocument
)
2069 // Following message is used to communicate the values received by the
2070 // callback binding the JS to Cpp.
2071 // An instance of browser that has an automation host listening to it can
2072 // have a javascript send a native value (string, number, boolean) to the
2073 // listener in Cpp. (DomAutomationController)
2074 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse
,
2075 std::string
/* json_string */,
2076 int /* automation_id */)
2078 // Notifies that multiple touch targets may have been pressed, and to show
2079 // the disambiguation popup.
2080 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
2081 gfx::Rect
, /* Border of touched targets */
2082 gfx::Size
, /* Size of zoomed image */
2083 TransportDIB::Id
/* DIB of zoomed image */)
2085 // Sent by the renderer process to check whether client 3D APIs
2086 // (Pepper 3D, WebGL) are explicitly blocked.
2087 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked
,
2088 int /* render_view_id */,
2089 GURL
/* top_origin_url */,
2090 content::ThreeDAPIType
/* requester */,
2093 // Sent by the renderer process to indicate that a context was lost by
2094 // client 3D content (Pepper 3D, WebGL) running on the page at the
2096 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext
,
2097 GURL
/* top_origin_url */,
2098 content::ThreeDAPIType
/* context_type */,
2099 int /* arb_robustness_status_code */)
2101 // Notifies the browser that document has parsed the body. This is used by the
2102 // ResourceScheduler as an indication that bandwidth contention won't block
2104 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody
)
2106 // Notification that the urls for the favicon of a site has been determined.
2107 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL
,
2108 int32
/* page_id */,
2109 std::vector
<content::FaviconURL
> /* candidates */)
2111 // Sent once a paint happens after the first non empty layout. In other words
2112 // after the page has painted something.
2113 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFirstVisuallyNonEmptyPaint
,
2116 // Sent by the renderer to the browser to start a vibration with the given
2118 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate
,
2119 int64
/* milliseconds */)
2121 // Sent by the renderer to the browser to cancel the currently running
2122 // vibration, if there is one.
2123 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration
)
2125 // Message sent from renderer to the browser when the element that is focused
2126 // has been touched. A bool is passed in this message which indicates if the
2127 // node is editable.
2128 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched
,
2129 bool /* editable */)
2131 // Message sent from the renderer to the browser when an HTML form has failed
2132 // validation constraints.
2133 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage
,
2134 gfx::Rect
/* anchor rectangle in root view coordinate */,
2135 base::string16
/* validation message */,
2136 base::string16
/* supplemental text */)
2138 // Message sent from the renderer to the browser when a HTML form validation
2139 // message should be hidden from view.
2140 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage
)
2142 // Message sent from the renderer to the browser when the suggested co-ordinates
2143 // of the anchor for a HTML form validation message have changed.
2144 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage
,
2145 gfx::Rect
/* anchor rectangle in root view coordinate */)
2147 #if defined(OS_ANDROID)
2148 // Response to ViewMsg_FindMatchRects.
2150 // |version| will contain the current version number of the renderer's find
2151 // match list (incremented whenever they change), which should be passed in the
2152 // next call to ViewMsg_FindMatchRects.
2154 // |rects| will either contain a list of the enclosing rects of all matches
2155 // found by the most recent Find operation, or will be empty if |version| is not
2156 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
2157 // your locally cached rects should still be valid). The rect coords will be
2158 // custom normalized fractions of the document size. The rects will be sorted by
2159 // frame traversal order starting in the main frame, then by dom order.
2161 // |active_rect| will contain the bounding box of the active find-in-page match
2162 // marker, in similarly normalized coords (or an empty rect if there isn't one).
2163 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
2165 std::vector
<gfx::RectF
> /* rects */,
2166 gfx::RectF
/* active_rect */)
2168 // Start an android intent with the given URI.
2169 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
2170 GURL
/* content_url */)
2172 // Message sent when the renderer changed the background color for the view.
2173 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor
,
2174 uint32
/* bg_color */)
2176 // This message runs the MediaCodec for decoding audio for webaudio.
2177 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec
,
2178 base::SharedMemoryHandle
/* encoded_data_handle */,
2179 base::FileDescriptor
/* pcm_output */,
2180 uint32_t /* data_size*/)
2182 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
2183 // display events. If |enabled| is true, the BeginFrame message will continue
2184 // to be be delivered until the notification is disabled.
2185 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame
,
2188 // Reply to the ViewMsg_ExtractSmartClipData message.
2189 // TODO(juhui24.lee@samsung.com): this should be changed to a vector of structs
2190 // instead of encoding the data as a string which is not allowed normally. Since
2191 // ths is only used in Android WebView, it's allowed temporarily.
2192 // http://crbug.com/330872
2193 IPC_MESSAGE_ROUTED1(ViewHostMsg_SmartClipDataExtracted
, base::string16
)
2195 #elif defined(OS_MACOSX)
2196 // Request that the browser load a font into shared memory for us.
2197 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont
,
2198 FontDescriptor
/* font to load */,
2199 uint32
/* buffer size */,
2200 base::SharedMemoryHandle
/* font data */,
2201 uint32
/* font id */)
2203 // Informs the browser that a plugin has gained or lost focus.
2204 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
2206 int /* plugin_id */)
2208 // Instructs the browser to start plugin IME.
2209 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
2211 #elif defined(OS_WIN)
2212 // Request that the given font characters be loaded by the browser so it's
2213 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
2215 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters
,
2216 LOGFONT
/* font_data */,
2217 base::string16
/* characters */)
2220 #if defined(OS_POSIX)
2221 // On POSIX, we cannot allocated shared memory from within the sandbox, so
2222 // this call exists for the renderer to ask the browser to allocate memory
2223 // on its behalf. We return a file descriptor to the POSIX shared memory.
2224 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
2225 // by the browser, and it is the caller's repsonsibility to send a
2226 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
2227 // In all cases, the caller is responsible for deleting the resulting
2229 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB
,
2230 uint32_t, /* bytes requested */
2231 bool, /* cache in the browser */
2232 TransportDIB::Handle
/* DIB */)
2234 // Since the browser keeps handles to the allocated transport DIBs, this
2235 // message is sent to tell the browser that it may release them when the
2236 // renderer is finished with them.
2237 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB
,
2238 TransportDIB::Id
/* DIB id */)
2241 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
2242 // On MACOSX, WIN and AURA IME can request composition character bounds
2243 // synchronously (see crbug.com/120597). This IPC message sends the character
2244 // bounds after every composition change to always have correct bound info.
2245 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged
,
2246 gfx::Range
/* composition range */,
2247 std::vector
<gfx::Rect
> /* character bounds */)
2250 // Adding a new message? Stick to the sort order above: first platform
2251 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
2252 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.