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/public/common/common_param_traits.h"
22 #include "content/public/common/favicon_url.h"
23 #include "content/public/common/file_chooser_params.h"
24 #include "content/public/common/menu_item.h"
25 #include "content/public/common/page_state.h"
26 #include "content/public/common/page_zoom.h"
27 #include "content/public/common/referrer.h"
28 #include "content/public/common/renderer_preferences.h"
29 #include "content/public/common/stop_find_action.h"
30 #include "content/public/common/three_d_api_types.h"
31 #include "content/public/common/window_container_type.h"
32 #include "content/common/date_time_suggestion.h"
33 #include "ipc/ipc_channel_handle.h"
34 #include "ipc/ipc_message_macros.h"
35 #include "ipc/ipc_platform_file.h"
36 #include "media/audio/audio_parameters.h"
37 #include "media/base/channel_layout.h"
38 #include "media/base/media_log_event.h"
39 #include "net/base/network_change_notifier.h"
40 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
41 #include "third_party/WebKit/public/platform/WebFloatRect.h"
42 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
43 #include "third_party/WebKit/public/web/WebFindOptions.h"
44 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
45 #include "third_party/WebKit/public/web/WebPluginAction.h"
46 #include "third_party/WebKit/public/web/WebPopupType.h"
47 #include "third_party/WebKit/public/web/WebTextDirection.h"
48 #include "third_party/skia/include/core/SkBitmap.h"
49 #include "ui/base/ime/text_input_mode.h"
50 #include "ui/base/ime/text_input_type.h"
51 #include "ui/base/ui_base_types.h"
52 #include "ui/gfx/point.h"
53 #include "ui/gfx/range/range.h"
54 #include "ui/gfx/rect.h"
55 #include "ui/gfx/rect_f.h"
56 #include "ui/gfx/vector2d.h"
57 #include "ui/gfx/vector2d_f.h"
58 #include "ui/shell_dialogs/selected_file_info.h"
60 #if defined(OS_MACOSX)
61 #include "content/common/mac/font_descriptor.h"
62 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
65 #undef IPC_MESSAGE_EXPORT
66 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
68 #define IPC_MESSAGE_START ViewMsgStart
70 IPC_ENUM_TRAITS(AccessibilityMode
)
71 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type
)
72 IPC_ENUM_TRAITS(blink::WebPluginAction::Type
)
73 IPC_ENUM_TRAITS(blink::WebPopupType
)
74 IPC_ENUM_TRAITS(blink::WebTextDirection
)
75 IPC_ENUM_TRAITS(WindowContainerType
)
76 IPC_ENUM_TRAITS(content::FaviconURL::IconType
)
77 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
78 IPC_ENUM_TRAITS(content::MenuItem::Type
)
79 IPC_ENUM_TRAITS(content::NavigationGesture
)
80 IPC_ENUM_TRAITS(content::PageZoom
)
81 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum
)
82 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum
)
83 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy
,
84 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX
)
85 IPC_ENUM_TRAITS(content::StopFindAction
)
86 IPC_ENUM_TRAITS(content::ThreeDAPIType
)
87 IPC_ENUM_TRAITS(media::ChannelLayout
)
88 IPC_ENUM_TRAITS(media::MediaLogEvent::Type
)
89 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode
, ui::TEXT_INPUT_MODE_MAX
)
90 IPC_ENUM_TRAITS(ui::TextInputType
)
92 #if defined(OS_MACOSX)
93 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
94 IPC_STRUCT_TRAITS_MEMBER(font_name
)
95 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
96 IPC_STRUCT_TRAITS_END()
99 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions
)
100 IPC_STRUCT_TRAITS_MEMBER(forward
)
101 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
102 IPC_STRUCT_TRAITS_MEMBER(findNext
)
103 IPC_STRUCT_TRAITS_END()
105 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction
)
106 IPC_STRUCT_TRAITS_MEMBER(type
)
107 IPC_STRUCT_TRAITS_MEMBER(enable
)
108 IPC_STRUCT_TRAITS_END()
110 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction
)
111 IPC_STRUCT_TRAITS_MEMBER(type
)
112 IPC_STRUCT_TRAITS_MEMBER(enable
)
113 IPC_STRUCT_TRAITS_END()
115 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint
)
116 IPC_STRUCT_TRAITS_MEMBER(x
)
117 IPC_STRUCT_TRAITS_MEMBER(y
)
118 IPC_STRUCT_TRAITS_END()
120 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect
)
121 IPC_STRUCT_TRAITS_MEMBER(x
)
122 IPC_STRUCT_TRAITS_MEMBER(y
)
123 IPC_STRUCT_TRAITS_MEMBER(width
)
124 IPC_STRUCT_TRAITS_MEMBER(height
)
125 IPC_STRUCT_TRAITS_END()
127 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo
)
128 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
129 IPC_STRUCT_TRAITS_MEMBER(depth
)
130 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
131 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
132 IPC_STRUCT_TRAITS_MEMBER(rect
)
133 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
134 IPC_STRUCT_TRAITS_MEMBER(orientationType
)
135 IPC_STRUCT_TRAITS_MEMBER(orientationAngle
)
136 IPC_STRUCT_TRAITS_END()
138 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem
)
139 IPC_STRUCT_TRAITS_MEMBER(label
)
140 IPC_STRUCT_TRAITS_MEMBER(tool_tip
)
141 IPC_STRUCT_TRAITS_MEMBER(type
)
142 IPC_STRUCT_TRAITS_MEMBER(action
)
143 IPC_STRUCT_TRAITS_MEMBER(rtl
)
144 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
145 IPC_STRUCT_TRAITS_MEMBER(enabled
)
146 IPC_STRUCT_TRAITS_MEMBER(checked
)
147 IPC_STRUCT_TRAITS_MEMBER(submenu
)
148 IPC_STRUCT_TRAITS_END()
150 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion
)
151 IPC_STRUCT_TRAITS_MEMBER(value
)
152 IPC_STRUCT_TRAITS_MEMBER(localized_value
)
153 IPC_STRUCT_TRAITS_MEMBER(label
)
154 IPC_STRUCT_TRAITS_END()
156 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL
)
157 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
158 IPC_STRUCT_TRAITS_MEMBER(icon_type
)
159 IPC_STRUCT_TRAITS_MEMBER(icon_sizes
)
160 IPC_STRUCT_TRAITS_END()
162 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
163 IPC_STRUCT_TRAITS_MEMBER(mode
)
164 IPC_STRUCT_TRAITS_MEMBER(title
)
165 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
166 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
167 #if defined(OS_ANDROID)
168 IPC_STRUCT_TRAITS_MEMBER(capture
)
170 IPC_STRUCT_TRAITS_END()
172 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
173 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
174 IPC_STRUCT_TRAITS_MEMBER(render_frame_id
)
175 IPC_STRUCT_TRAITS_MEMBER(document_url
)
176 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
177 IPC_STRUCT_TRAITS_END()
179 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
180 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
181 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
182 IPC_STRUCT_TRAITS_MEMBER(hinting
)
183 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
184 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
185 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
186 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
187 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
188 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
189 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
190 IPC_STRUCT_TRAITS_MEMBER(track_color
)
191 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
192 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
193 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
194 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
195 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests
)
196 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
197 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
198 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors
)
199 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
200 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
201 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
202 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
203 IPC_STRUCT_TRAITS_MEMBER(accept_languages
)
204 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes
)
205 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile
)
206 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile
)
207 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy
)
208 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page
)
209 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed
)
210 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video
)
211 IPC_STRUCT_TRAITS_END()
213 IPC_STRUCT_TRAITS_BEGIN(content::CookieData
)
214 IPC_STRUCT_TRAITS_MEMBER(name
)
215 IPC_STRUCT_TRAITS_MEMBER(value
)
216 IPC_STRUCT_TRAITS_MEMBER(domain
)
217 IPC_STRUCT_TRAITS_MEMBER(path
)
218 IPC_STRUCT_TRAITS_MEMBER(expires
)
219 IPC_STRUCT_TRAITS_MEMBER(http_only
)
220 IPC_STRUCT_TRAITS_MEMBER(secure
)
221 IPC_STRUCT_TRAITS_MEMBER(session
)
222 IPC_STRUCT_TRAITS_END()
224 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry
)
225 IPC_STRUCT_TRAITS_MEMBER(window
)
226 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
227 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
228 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
229 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
230 IPC_STRUCT_TRAITS_MEMBER(visible
)
231 IPC_STRUCT_TRAITS_END()
233 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
234 IPC_STRUCT_TRAITS_MEMBER(id
)
235 IPC_STRUCT_TRAITS_MEMBER(type
)
236 IPC_STRUCT_TRAITS_MEMBER(params
)
237 IPC_STRUCT_TRAITS_MEMBER(time
)
238 IPC_STRUCT_TRAITS_END()
240 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo
)
241 IPC_STRUCT_TRAITS_MEMBER(file_path
)
242 IPC_STRUCT_TRAITS_MEMBER(local_path
)
243 IPC_STRUCT_TRAITS_MEMBER(display_name
)
244 IPC_STRUCT_TRAITS_END()
246 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
247 // Routing ID of the view initiating the open.
248 IPC_STRUCT_MEMBER(int, opener_id
)
250 // True if this open request came in the context of a user gesture.
251 IPC_STRUCT_MEMBER(bool, user_gesture
)
253 // Type of window requested.
254 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
256 // The session storage namespace ID this view should use.
257 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
259 // The name of the resulting frame that should be created (empty if none
260 // has been specified).
261 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
263 // The routing id of the frame initiating the open.
264 IPC_STRUCT_MEMBER(int, opener_render_frame_id
)
266 // The URL of the frame initiating the open.
267 IPC_STRUCT_MEMBER(GURL
, opener_url
)
269 // The URL of the top frame containing the opener.
270 IPC_STRUCT_MEMBER(GURL
, opener_top_level_frame_url
)
272 // The security origin of the frame initiating the open.
273 IPC_STRUCT_MEMBER(GURL
, opener_security_origin
)
275 // Whether the opener will be suppressed in the new window, in which case
276 // scripting the new window is not allowed.
277 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
279 // Whether the window should be opened in the foreground, background, etc.
280 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
282 // The URL that will be loaded in the new window (empty if none has been
284 IPC_STRUCT_MEMBER(GURL
, target_url
)
286 // The referrer that will be used to load |target_url| (empty if none has
288 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
290 // The window features to use for the new view.
291 IPC_STRUCT_MEMBER(blink::WebWindowFeatures
, features
)
293 // The additional window features to use for the new view. We pass these
294 // separately from |features| above because we cannot serialize WebStrings
296 IPC_STRUCT_MEMBER(std::vector
<base::string16
>, additional_features
)
299 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
300 // URL for the worker script.
301 IPC_STRUCT_MEMBER(GURL
, url
)
303 // Name for a SharedWorker, otherwise empty string.
304 IPC_STRUCT_MEMBER(base::string16
, name
)
306 // Security policy used in the worker.
307 IPC_STRUCT_MEMBER(base::string16
, content_security_policy
)
309 // Security policy type used in the worker.
310 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType
, security_policy_type
)
312 // The ID of the parent document (unique within parent renderer).
313 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
315 // RenderFrame routing id used to send messages back to the parent.
316 IPC_STRUCT_MEMBER(int, render_frame_route_id
)
319 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params
)
320 IPC_STRUCT_MEMBER(ui::TextInputType
, dialog_type
)
321 IPC_STRUCT_MEMBER(double, dialog_value
)
322 IPC_STRUCT_MEMBER(double, minimum
)
323 IPC_STRUCT_MEMBER(double, maximum
)
324 IPC_STRUCT_MEMBER(double, step
)
325 IPC_STRUCT_MEMBER(std::vector
<content::DateTimeSuggestion
>, suggestions
)
328 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params
)
329 IPC_STRUCT_MEMBER(gfx::Rect
, anchor_rect
)
330 IPC_STRUCT_MEMBER(blink::WebTextDirection
, anchor_dir
)
331 IPC_STRUCT_MEMBER(gfx::Rect
, focus_rect
)
332 IPC_STRUCT_MEMBER(blink::WebTextDirection
, focus_dir
)
333 IPC_STRUCT_MEMBER(bool, is_anchor_first
)
336 // This message is used for supporting popup menus on Mac OS X using native
337 // Cocoa controls. The renderer sends us this message which we use to populate
339 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params
)
340 // Position on the screen.
341 IPC_STRUCT_MEMBER(gfx::Rect
, bounds
)
343 // The height of each item in the menu.
344 IPC_STRUCT_MEMBER(int, item_height
)
346 // The size of the font to use for those items.
347 IPC_STRUCT_MEMBER(double, item_font_size
)
349 // The currently selected (displayed) item in the menu.
350 IPC_STRUCT_MEMBER(int, selected_item
)
352 // The entire list of items in the popup menu.
353 IPC_STRUCT_MEMBER(std::vector
<content::MenuItem
>, popup_items
)
355 // Whether items should be right-aligned.
356 IPC_STRUCT_MEMBER(bool, right_aligned
)
358 // Whether this is a multi-select popup.
359 IPC_STRUCT_MEMBER(bool, allow_multiple_selection
)
362 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
363 // The type of input field
364 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
366 // The value of the input field
367 IPC_STRUCT_MEMBER(std::string
, value
)
369 // The cursor position of the current selection start, or the caret position
370 // if nothing is selected
371 IPC_STRUCT_MEMBER(int, selection_start
)
373 // The cursor position of the current selection end, or the caret position
374 // if nothing is selected
375 IPC_STRUCT_MEMBER(int, selection_end
)
377 // The start position of the current composition, or -1 if there is none
378 IPC_STRUCT_MEMBER(int, composition_start
)
380 // The end position of the current composition, or -1 if there is none
381 IPC_STRUCT_MEMBER(int, composition_end
)
383 // Whether or not inline composition can be performed for the current input.
384 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
386 // Whether or not the IME should be shown as a result of this update. Even if
387 // true, the IME will only be shown if the type is appropriate (e.g. not
388 // TEXT_INPUT_TYPE_NONE).
389 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
391 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
392 IPC_STRUCT_MEMBER(bool, is_non_ime_change
)
395 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
396 // The scroll offset of the render view.
397 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_offset
)
399 // The size of the RenderView when this message was generated. This is
400 // included so the host knows how large the view is from the perspective of
401 // the renderer process. This is necessary in case a resize operation is in
402 // progress. If auto-resize is enabled, this should update the corresponding
404 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
406 // New window locations for plugin child windows.
407 IPC_STRUCT_MEMBER(std::vector
<content::WebPluginGeometry
>,
410 // The following describes the various bits that may be set in flags:
412 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
413 // Indicates that this is a response to a ViewMsg_Resize message.
415 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
416 // Indicates that this is a response to a ViewMsg_Repaint message.
418 // If flags is zero, then this message corresponds to an unsolicited paint
419 // request by the render view. Any of the above bits may be set in flags,
420 // which would indicate that this paint message is an ACK for multiple
422 IPC_STRUCT_MEMBER(int, flags
)
424 // All the above coordinates are in DIP. This is the scale factor needed
425 // to convert them to pixels.
426 IPC_STRUCT_MEMBER(float, scale_factor
)
429 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
430 // Renderer-wide preferences.
431 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
433 // Preferences for this view.
434 IPC_STRUCT_MEMBER(WebPreferences
, web_preferences
)
436 // The ID of the view to be created.
437 IPC_STRUCT_MEMBER(int32
, view_id
)
439 // The ID of the main frame hosted in the view.
440 IPC_STRUCT_MEMBER(int32
, main_frame_routing_id
)
442 // The ID of the rendering surface.
443 IPC_STRUCT_MEMBER(int32
, surface_id
)
445 // The session storage namespace ID this view should use.
446 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
448 // The name of the frame associated with this view (or empty if none).
449 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
451 // The route ID of the opener RenderView if we need to set one
452 // (MSG_ROUTING_NONE otherwise).
453 IPC_STRUCT_MEMBER(int, opener_route_id
)
455 // Whether the RenderView should initially be swapped out.
456 IPC_STRUCT_MEMBER(bool, swapped_out
)
458 // The ID of the proxy object for the main frame in this view. It is only
459 // used if |swapped_out| is true.
460 IPC_STRUCT_MEMBER(int32
, proxy_routing_id
)
462 // Whether the RenderView should initially be hidden.
463 IPC_STRUCT_MEMBER(bool, hidden
)
465 // Whether the RenderView will never be visible.
466 IPC_STRUCT_MEMBER(bool, never_visible
)
468 // Whether the window associated with this view was created with an opener.
469 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener
)
471 // The initial page ID to use for this view, which must be larger than any
472 // existing navigation that might be loaded in the view. Page IDs are unique
473 // to a view and are only updated by the renderer after this initial value.
474 IPC_STRUCT_MEMBER(int32
, next_page_id
)
476 // The properties of the screen associated with the view.
477 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
479 // The accessibility mode of the renderer.
480 IPC_STRUCT_MEMBER(AccessibilityMode
, accessibility_mode
)
483 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params
)
484 // The serialized script value.
485 IPC_STRUCT_MEMBER(base::string16
, data
)
487 // When sent to the browser, this is the routing ID of the source frame in
488 // the source process. The browser replaces it with the routing ID of the
489 // equivalent (swapped out) frame in the destination process.
490 IPC_STRUCT_MEMBER(int, source_routing_id
)
492 // The origin of the source frame.
493 IPC_STRUCT_MEMBER(base::string16
, source_origin
)
495 // The origin for the message's target.
496 IPC_STRUCT_MEMBER(base::string16
, target_origin
)
498 // Information about the MessagePorts this message contains.
499 IPC_STRUCT_MEMBER(std::vector
<int>, message_port_ids
)
500 IPC_STRUCT_MEMBER(std::vector
<int>, new_routing_ids
)
503 // Messages sent from the browser to the renderer.
505 // Tells the renderer to cancel an opened date/time dialog.
506 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
508 // Get all savable resource links from current webpage, include main
509 // frame and sub-frame.
510 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage
,
511 GURL
/* url of page which is needed to save */)
513 // Get html data by serializing all frames of current page with lists
514 // which contain all resource links that have local copy.
515 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
516 std::vector
<GURL
> /* urls that have local copy */,
517 std::vector
<base::FilePath
> /* paths of local copy */,
518 base::FilePath
/* local directory path */)
520 // Tells the render side that a ViewHostMsg_LockMouse message has been
521 // processed. |succeeded| indicates whether the mouse has been successfully
523 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
524 bool /* succeeded */)
525 // Tells the render side that the mouse has been unlocked.
526 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
528 // Sent by the browser when the parameters for vsync alignment have changed.
529 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
530 base::TimeTicks
/* timebase */,
531 base::TimeDelta
/* interval */)
533 // Sent to the RenderView when a new tab is swapped into an existing
534 // tab and the histories need to be merged. The existing tab has a history of
535 // |merged_history_length| which precedes the history of the new tab. All
536 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
538 // For example, suppose the history of page_ids in the new tab's RenderView
539 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
540 // all pages in the new tab with page_id >= 7 are to be preserved.
541 // The resulting page history is [-1 -1 -1 7 8].
542 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune
,
543 int, /* merge_history_length */
544 int32
/* minimum_page_id */)
546 // Tells the renderer to create a new view.
547 // This message is slightly different, the view it takes (via
548 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
549 // non-view control message.
550 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
553 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
554 // similar to the new command, but used when the renderer created a view
555 // first, and we need to update it.
556 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
558 // Sends updated preferences to the renderer.
559 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
560 content::RendererPreferences
)
562 // This passes a set of webkit preferences down to the renderer.
563 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
566 // Informs the renderer that the timezone has changed.
567 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange
)
569 // Tells the render view to close.
570 // Expects a Close_ACK message when finished.
571 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
573 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params
)
574 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
575 IPC_STRUCT_MEMBER(gfx::Size
, new_size
)
576 IPC_STRUCT_MEMBER(gfx::Size
, physical_backing_size
)
577 IPC_STRUCT_MEMBER(float, overdraw_bottom_height
)
578 IPC_STRUCT_MEMBER(gfx::Size
, visible_viewport_size
)
579 IPC_STRUCT_MEMBER(gfx::Rect
, resizer_rect
)
580 IPC_STRUCT_MEMBER(bool, is_fullscreen
)
583 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
584 // is generated in response provided new_size is not empty and not equal to
585 // the view's current size. The generated ViewHostMsg_UpdateRect message will
586 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
587 // we don't have to fetch it every time WebKit asks for it.
588 IPC_MESSAGE_ROUTED1(ViewMsg_Resize
,
589 ViewMsg_Resize_Params
/* params */)
591 // Tells the render view that the resize rect has changed.
592 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
593 gfx::Rect
/* resizer_rect */)
595 // Sent to inform the view that it was hidden. This allows it to reduce its
596 // resource utilization.
597 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
599 // Tells the render view that it is no longer hidden (see WasHidden), and the
600 // render view is expected to respond with a full repaint if needs_repainting
601 // is true. If needs_repainting is false, then this message does not trigger a
602 // message in response.
603 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown
,
604 bool /* needs_repainting */)
606 // Sent to inform the view that it was swapped out. This allows the process to
607 // exit if no other views are using it.
608 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut
)
610 // Tells the renderer to focus the first (last if reverse is true) focusable
612 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
615 // Sent to inform the renderer to invoke a context menu.
616 // The parameter specifies the location in the render view's coordinates.
617 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu
,
618 gfx::Point
/* location where menu should be shown */)
620 IPC_MESSAGE_ROUTED0(ViewMsg_Stop
)
622 // Sent when the user wants to search for a word on the page (find in page).
623 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
624 int /* request_id */,
625 base::string16
/* search_text */,
626 blink::WebFindOptions
)
628 // This message notifies the renderer that the user has closed the FindInPage
629 // window (and what action to take regarding the selection).
630 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
631 content::StopFindAction
/* action */)
633 // Replaces a date time input field.
634 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
,
635 double /* dialog_value */)
637 // Copies the image at location x, y to the clipboard (if there indeed is an
638 // image at that location).
639 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
643 // Saves the image at location x, y to the disk (if there indeed is an
644 // image at that location).
645 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt
,
649 // Tells the renderer to perform the given action on the media player
650 // located at the given point.
651 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
652 gfx::Point
, /* location */
653 blink::WebMediaPlayerAction
)
655 // Tells the renderer to perform the given action on the plugin located at
657 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
658 gfx::Point
, /* location */
659 blink::WebPluginAction
)
661 // Posts a message from a frame in another process to the current renderer.
662 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent
,
663 ViewMsg_PostMessage_Params
)
665 // Requests that the RenderView's main frame sets its opener to null.
666 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener
)
668 // Change the zoom level for the current main frame. If the level actually
669 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
670 // telling it what url got zoomed and what its current zoom level is.
671 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
672 content::PageZoom
/* function */)
674 // Set the zoom level for a particular url that the renderer is in the
675 // process of loading. This will be stored, to be used if the load commits
676 // and ignored otherwise.
677 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
679 double /* zoom_level */)
681 // Set the zoom level for a particular url, so all render views
682 // displaying this url can update their zoom levels to match.
683 // If scheme is empty, then only host is used for matching.
684 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL
,
685 std::string
/* scheme */,
686 std::string
/* host */,
687 double /* zoom_level */)
689 // Change encoding of page in the renderer.
690 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
691 std::string
/*new encoding name*/)
693 // Reset encoding of page in the renderer back to default.
694 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
696 // Used to tell a render view whether it should expose various bindings
697 // that allow JS content extended privileges. See BindingsPolicy for valid
699 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
700 int /* enabled_bindings_flags */)
702 // Tell the renderer to add a property to the WebUI binding object. This
703 // only works if we allowed WebUI bindings.
704 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
705 std::string
/* property_name */,
706 std::string
/* property_value_json */)
708 // This message starts/stop monitoring the input method status of the focused
709 // edit control of a renderer process.
711 // * is_active (bool)
712 // Indicates if an input method is active in the browser process.
713 // The possible actions when a renderer process receives this message are
716 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
717 // to notify the input method status of the focused edit control.
718 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
719 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive
,
720 bool /* is_active */)
722 // IME API oncandidatewindow* events for InputMethodContext.
723 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown
)
724 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated
)
725 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden
)
727 // This message sends a string being composed with an input method.
729 ViewMsg_ImeSetComposition
,
730 base::string16
, /* text */
731 std::vector
<blink::WebCompositionUnderline
>, /* underlines */
732 int, /* selectiont_start */
733 int /* selection_end */)
735 // This message confirms an ongoing composition.
736 IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition
,
737 base::string16
/* text */,
738 gfx::Range
/* replacement_range */,
739 bool /* keep_selection */)
741 // Used to notify the render-view that we have received a target URL. Used
742 // to prevent target URLs spamming the browser.
743 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
745 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
746 std::vector
<ui::SelectedFileInfo
>)
748 // Provides the results of directory enumeration.
749 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
750 int /* request_id */,
751 std::vector
<base::FilePath
> /* files_in_directory */)
753 // When a renderer sends a ViewHostMsg_Focus to the browser process,
754 // the browser has the option of sending a ViewMsg_CantFocus back to
756 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus
)
758 // Tells the renderer to suppress any further modal dialogs until it receives a
759 // corresponding ViewMsg_SwapOut message. This ensures that no
760 // PageGroupLoadDeferrer is on the stack for SwapOut.
761 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut
)
763 // Instructs the renderer to close the current page, including running the
764 // onunload event handler.
766 // Expects a ClosePage_ACK message when finished.
767 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
769 // Notifies the renderer about ui theme changes
770 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
772 // Notifies the renderer that a paint is to be generated for the rectangle
774 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
775 gfx::Size
/* The view size to be repainted */)
777 // Notification that a move or resize renderer's containing window has
779 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
781 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
782 gfx::Rect
/* view_screen_rect */,
783 gfx::Rect
/* window_screen_rect */)
785 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
786 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
787 // processed the move. The browser may have ignored the move, but it finished
788 // processing. This is used because the renderer keeps a temporary cache of
789 // the widget position while these asynchronous operations are in progress.
790 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
792 // Used to instruct the RenderView to send back updates to the preferred size.
793 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
795 // Used to instruct the RenderView to automatically resize and send back
796 // updates for the new size.
797 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
798 gfx::Size
/* min_size */,
799 gfx::Size
/* max_size */)
801 // Used to instruct the RenderView to disalbe automatically resize.
802 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
803 gfx::Size
/* new_size */)
805 // Changes the text direction of the currently selected input field (if any).
806 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
807 blink::WebTextDirection
/* direction */)
809 // Tells the renderer to clear the focused element (if any).
810 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement
)
812 // Make the RenderView background transparent or opaque.
813 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque
, bool /* opaque */)
815 // Used to tell the renderer not to add scrollbars with height and
816 // width below a threshold.
817 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
818 gfx::Size
/* disable_scrollbar_size_limit */)
820 // Activate/deactivate the RenderView (i.e., set its controls' tint
821 // accordingly, etc.).
822 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
825 // Response message to ViewHostMsg_CreateWorker.
826 // Sent when the worker has started.
827 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
829 // Sent when the worker failed to load the worker script.
830 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
831 // But if the shared worker of the same URL already exists and it has failed
832 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
833 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
834 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed
)
836 // Sent when the worker has connected.
837 // This message is sent only if the worker successfully loaded the script.
838 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected
)
840 // Tells the renderer that the network type has changed so that navigator.onLine
841 // and navigator.connection can be updated.
842 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged
,
843 net::NetworkChangeNotifier::ConnectionType
/* type */)
845 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
846 // Tells the renderer that the channel to the broker has been created.
847 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated
,
848 base::ProcessId
/* broker_pid */,
849 IPC::ChannelHandle
/* handle */)
851 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
852 // Tells the renderer whether permission to access to PPAPI broker was granted
854 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult
,
857 // Tells the renderer to empty its plugin list cache, optional reloading
858 // pages containing plugins.
859 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
860 bool /* reload_pages */)
862 // Used to instruct the RenderView to go into "view source" mode.
863 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
865 // Instructs the renderer to save the current page to MHTML.
866 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
868 IPC::PlatformFileForTransit
/* file handle */)
870 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
871 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData
,
874 // Change the accessibility mode in the renderer process.
875 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode
,
878 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
879 // process to release the magnified image.
880 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap
,
881 cc::SharedBitmapId
/* id */)
883 // Notifies the renderer that a snapshot has been retrieved.
884 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted
,
885 int /* snapshot_id */,
886 gfx::Size
/* size */,
887 std::vector
<unsigned char> /* png */)
889 #if defined(OS_MACOSX)
890 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle
, blink::ScrollerStyleOverlay
);
892 // Notification of a change in scrollbar appearance and/or behavior.
893 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme
,
894 float /* initial_button_delay */,
895 float /* autoscroll_button_delay */,
896 bool /* jump_on_track_click */,
897 blink::ScrollerStyle
/* preferred_scroller_style */,
901 #if defined(OS_ANDROID)
902 // Tells the renderer to suspend/resume the webkit timers.
903 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended
,
906 // Sent when the browser wants the bounding boxes of the current find matches.
908 // If match rects are already cached on the browser side, |current_version|
909 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
910 // they came in, so the renderer can tell if it needs to send updated rects.
911 // Otherwise just pass -1 to always receive the list of rects.
913 // There must be an active search string (it is probably most useful to call
914 // this immediately after a ViewHostMsg_Find_Reply message arrives with
915 // final_update set to true).
916 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
917 int /* current_version */)
919 // External popup menus.
920 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems
,
921 bool /* user canceled the popup */,
922 std::vector
<int> /* selected indices */)
924 // Notifies the renderer whether hiding/showing the top controls is enabled
925 // and whether or not to animate to the proper state.
926 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState
,
927 bool /* enable_hiding */,
928 bool /* enable_showing */,
931 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded
)
933 // Sent by the browser when the renderer should generate a new frame.
934 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame
,
935 cc::BeginFrameArgs
/* args */)
937 // Sent by the browser when an IME update that requires acknowledgement has been
938 // processed on the browser side.
939 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck
)
941 // Extracts the data at the given rect, returning it through the
942 // ViewHostMsg_SmartClipDataExtracted IPC.
943 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData
,
944 gfx::Rect
/* rect */)
946 #elif defined(OS_MACOSX)
947 // Let the RenderView know its window has changed visibility.
948 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
951 // Let the RenderView know its window's frame has changed.
952 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
953 gfx::Rect
/* window frame */,
954 gfx::Rect
/* content view frame */)
956 // Message sent from the browser to the renderer when the user starts or stops
957 // resizing the view.
958 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
961 // Tell the renderer that plugin IME has completed.
962 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
963 base::string16
/* text */,
966 // External popup menus.
967 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem
,
968 int /* selected index, -1 means no selection */)
971 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
972 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck
,
973 uint32
/* output_surface_id */,
974 cc::CompositorFrameAck
/* ack */)
976 // Sent by browser to tell renderer compositor that some resources that were
977 // given to the browser in a swap are not being used anymore.
978 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources
,
979 uint32
/* output_surface_id */,
980 cc::CompositorFrameAck
/* ack */)
982 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret
)
984 // -----------------------------------------------------------------------------
985 // Messages sent from the renderer to the browser.
987 // Sent by the renderer when it is creating a new window. The browser creates
988 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
989 // MSG_ROUTING_NONE, the view couldn't be created.
990 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow
,
991 ViewHostMsg_CreateWindow_Params
,
993 int /* main_frame_route_id */,
994 int32
/* surface_id */,
995 int64
/* cloned_session_storage_namespace_id */)
997 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
998 // <select> dropdowns. This message is sent to the WebContentsImpl that
999 // contains the widget being created.
1000 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
1001 int /* opener_id */,
1002 blink::WebPopupType
/* popup type */,
1004 int32
/* surface_id */)
1006 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1008 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1009 int /* opener_id */,
1011 int32
/* surface_id */)
1013 // Asks the browser for a unique routing ID.
1014 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
1015 int /* routing_id */)
1017 // Asks the browser for the default audio hardware configuration.
1018 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig
,
1019 media::AudioParameters
/* input parameters */,
1020 media::AudioParameters
/* output parameters */)
1022 // Asks the browser for CPU usage of the renderer process in percents.
1023 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage
,
1024 int /* CPU usage in percents */)
1026 // Asks the browser for the renderer process memory size stats.
1027 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes
,
1028 size_t /* private_bytes */,
1029 size_t /* shared_bytes */)
1031 // These three messages are sent to the parent RenderViewHost to display the
1032 // page/widget that was created by
1033 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1034 // refers to the id that was returned from the Create message above.
1035 // The initial_position parameter is a rectangle in screen coordinates.
1037 // FUTURE: there will probably be flags here to control if the result is
1039 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1041 WindowOpenDisposition
/* disposition */,
1042 gfx::Rect
/* initial_pos */,
1043 bool /* opened_by_user_gesture */)
1045 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1047 gfx::Rect
/* initial_pos */)
1049 // Message to show a full screen widget.
1050 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1053 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1054 // to run in a modal fashion until it is closed.
1055 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal
,
1056 int /* opener_id */)
1058 // Indicates the renderer is ready in response to a ViewMsg_New or
1059 // a ViewMsg_CreatingNew_ACK.
1060 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1062 // Indicates the renderer process is gone. This actually is sent by the
1063 // browser process to itself, but keeps the interface cleaner.
1064 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone
,
1065 int, /* this really is base::TerminationStatus */
1066 int /* exit_code */)
1068 // Sent by the renderer process to request that the browser close the view.
1069 // This corresponds to the window.close() API, and the browser may ignore
1070 // this message. Otherwise, the browser will generates a ViewMsg_Close
1071 // message to close the view.
1072 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1074 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1075 // throttle these messages.
1076 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1078 // Sent by the renderer process to request that the browser move the view.
1079 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1080 // the browser may ignore this message.
1081 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1082 gfx::Rect
/* position */)
1084 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1085 // Message to show/hide a popup menu using native controls.
1086 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup
,
1087 ViewHostMsg_ShowPopup_Params
)
1088 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup
)
1091 // Result of string search in the page.
1092 // Response to ViewMsg_Find with the results of the requested find-in-page
1093 // search, the number of matches found and the selection rect (in screen
1094 // coordinates) for the string found. If |final_update| is false, it signals
1095 // that this is not the last Find_Reply message - more will be sent as the
1096 // scoping effort continues.
1097 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1098 int /* request_id */,
1099 int /* number of matches */,
1100 gfx::Rect
/* selection_rect */,
1101 int /* active_match_ordinal */,
1102 bool /* final_update */)
1104 // Indicates that the render view has been closed in respose to a
1106 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK
,
1107 int /* old_route_id */);
1109 // Indicates that the current page has been closed, after a ClosePage
1111 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1113 // Notifies the browser that we have session history information.
1114 // page_id: unique ID that allows us to distinguish between history entries.
1115 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1116 int32
/* page_id */,
1117 content::PageState
/* state */)
1119 // Notifies the browser that we want to show a destination url for a potential
1120 // action (e.g. when the user is hovering over a link).
1121 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL
,
1125 // Sent when the document element is available for the top-level frame. This
1126 // happens after the page starts loading, but before all resources are
1128 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame
,
1129 bool /* uses_temporary_zoom_level */)
1131 // Sent when the renderer loads a resource from its memory cache.
1132 // The security info is non empty if the resource was originally loaded over
1133 // a secure connection.
1134 // Note: May only be sent once per URL per frame per committed load.
1135 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache
,
1137 std::string
/* security info */,
1138 std::string
/* http method */,
1139 std::string
/* mime type */,
1140 ResourceType::Type
/* resource type */)
1142 // Sent when the renderer displays insecure content in a secure page.
1143 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent
)
1145 // Sent when the renderer runs insecure content in a secure origin.
1146 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent
,
1147 std::string
/* security_origin */,
1148 GURL
/* target URL */)
1150 // Sent to update part of the view. In response to this message, the host
1151 // generates a ViewMsg_UpdateRect_ACK message.
1152 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1153 ViewHostMsg_UpdateRect_Params
)
1155 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1156 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1158 // Message sent from renderer to the browser when focus changes inside the
1159 // webpage. The parameter says whether the newly focused element needs
1160 // keyboard input (true for textfields, text areas and content editable divs).
1161 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged
,
1162 bool /* is_editable_node */)
1164 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
, content::WebCursor
)
1166 // Message sent from renderer requesting touch emulation using mouse.
1167 // Shift-scrolling should be converted to pinch, if |allow_pinch| is true.
1168 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchEventEmulationEnabled
,
1170 bool /* allow_pinch */)
1172 // Used to set a cookie. The cookie is set asynchronously, but will be
1173 // available to a subsequent ViewHostMsg_GetCookies request.
1174 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie
,
1175 int /* render_frame_id */,
1177 GURL
/* first_party_for_cookies */,
1178 std::string
/* cookie */)
1180 // Used to get cookies for the given URL. This may block waiting for a
1181 // previous SetCookie message to be processed.
1182 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies
,
1183 int /* render_frame_id */,
1185 GURL
/* first_party_for_cookies */,
1186 std::string
/* cookies */)
1188 // Used to get raw cookie information for the given URL. This may block
1189 // waiting for a previous SetCookie message to be processed.
1190 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies
,
1192 GURL
/* first_party_for_cookies */,
1193 std::vector
<content::CookieData
>
1196 // Used to delete cookie for the given URL and name
1197 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie
,
1199 std::string
/* cookie_name */)
1201 // Used to check if cookies are enabled for the given URL. This may block
1202 // waiting for a previous SetCookie message to be processed.
1203 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled
,
1204 int /* render_frame_id */,
1206 GURL
/* first_party_for_cookies */,
1207 bool /* cookies_enabled */)
1209 // Used to get the list of plugins
1210 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins
,
1212 std::vector
<content::WebPluginInfo
> /* plugins */)
1215 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1216 gfx::NativeViewId
/* dummy_activation_window */)
1218 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1219 gfx::NativeViewId
/* dummy_activation_window */)
1221 // Asks the browser for the user's monitor profile.
1222 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile
,
1223 std::vector
<char> /* profile */)
1226 // Get the list of proxies to use for |url|, as a semicolon delimited list
1227 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1228 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1231 std::string
/* proxy list */)
1233 // A renderer sends this to the browser process when it wants to create a
1234 // worker. The browser will create the worker process if necessary, and
1235 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1236 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1237 ViewHostMsg_CreateWorker_Params
,
1240 // A renderer sends this to the browser process when a document has been
1241 // detached. The browser will use this to constrain the lifecycle of worker
1242 // processes (SharedWorkers are shut down when their last associated document
1244 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1245 uint64
/* document_id */)
1247 // Wraps an IPC message that's destined to the worker on the renderer->browser
1249 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1250 IPC::Message
/* message */)
1252 // Tells the browser that a specific Appcache manifest in the current page
1254 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1255 GURL
/* manifest url */,
1256 bool /* blocked by policy */)
1258 // Initiates a download based on user actions like 'ALT+click'.
1259 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl
,
1260 int /* render_view_id */,
1262 content::Referrer
/* referrer */,
1263 base::string16
/* suggested_name */,
1264 bool /* use prompt for save location */)
1266 // Used to go to the session history entry at the given offset (ie, -1 will
1267 // return the "back" item).
1268 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1269 int /* offset (from current) of history item to get */)
1271 // Sent from an inactive renderer for the browser to route to the active
1272 // renderer, instructing it to close.
1273 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1275 // Sent to the browser from an inactive renderer to post a message to the
1277 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent
,
1278 ViewMsg_PostMessage_Params
)
1280 // Notifies that the preferred size of the content changed.
1281 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1282 gfx::Size
/* pref_size */)
1284 // Notifies that the scroll offset changed.
1285 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1286 // is not sent at all when threaded compositing is enabled while
1287 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1288 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset
)
1290 // Notifies that the pinned-to-side state of the content changed.
1291 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame
,
1292 bool /* pinned_to_left */,
1293 bool /* pinned_to_right */)
1295 // Notifies whether there are JavaScript touch event handlers or not.
1296 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers
,
1297 bool /* has_handlers */)
1299 // A message from HTML-based UI. When (trusted) Javascript calls
1300 // send(message, args), this message is sent to the browser.
1301 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend
,
1302 GURL
/* source_url */,
1303 std::string
/* message */,
1304 base::ListValue
/* args */)
1306 // A renderer sends this to the browser process when it wants to create a ppapi
1307 // plugin. The browser will create the plugin process if necessary, and will
1308 // return a handle to the channel on success.
1310 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1311 // process. This ID is valid only in the context of the browser process and is
1312 // used to identify the proper process when the renderer notifies it that the
1315 // On error an empty string and null handles are returned.
1316 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin
,
1317 base::FilePath
/* path */,
1318 IPC::ChannelHandle
/* handle to channel */,
1319 base::ProcessId
/* plugin_pid */,
1320 int /* plugin_child_id */)
1322 // Notification that a plugin has created a new plugin instance. The parameters
1324 // -The plugin process ID that we're creating the instance for.
1325 // -The instance ID of the instance being created.
1326 // -A PepperRendererInstanceData struct which contains properties from the
1327 // renderer which are associated with the plugin instance. This includes the
1328 // routing ID of the associated render view and the URL of plugin.
1329 // -Whether the plugin we're creating an instance for is external or internal.
1331 // This message must be sync even though it returns no parameters to avoid
1332 // a race condition with the plugin process. The plugin process sends messages
1333 // to the browser that assume the browser knows about the instance. We need to
1334 // make sure that the browser actually knows about the instance before we tell
1335 // the plugin to run.
1336 IPC_SYNC_MESSAGE_CONTROL4_0(
1337 ViewHostMsg_DidCreateOutOfProcessPepperInstance
,
1338 int /* plugin_child_id */,
1339 int32
/* pp_instance */,
1340 content::PepperRendererInstanceData
/* creation_data */,
1341 bool /* is_external */)
1343 // Notification that a plugin has destroyed an instance. This is the opposite of
1344 // the "DidCreate" message above.
1345 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance
,
1346 int /* plugin_child_id */,
1347 int32
/* pp_instance */,
1348 bool /* is_external */)
1350 // Message from the renderer to the browser indicating the in-process instance
1351 // has been created.
1352 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance
,
1353 int32
/* instance */,
1354 content::PepperRendererInstanceData
/* instance_data */)
1356 // Message from the renderer to the browser indicating the in-process instance
1357 // has been destroyed.
1358 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance
,
1359 int32
/* instance */)
1361 // A renderer sends this to the browser process when it wants to
1362 // create a ppapi broker. The browser will create the broker process
1363 // if necessary, and will return a handle to the channel on success.
1364 // On error an empty string is returned.
1365 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1366 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker
,
1367 int /* routing_id */,
1368 base::FilePath
/* path */)
1370 // A renderer sends this to the browser process when it wants to access a PPAPI
1371 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1372 // for every connection.
1373 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1374 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission
,
1375 int /* routing_id */,
1376 GURL
/* document_url */,
1377 base::FilePath
/* plugin_path */)
1379 // Send the tooltip text for the current mouse position to the browser.
1380 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText
,
1381 base::string16
/* tooltip text string */,
1382 blink::WebTextDirection
/* text direction hint */)
1384 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK
)
1385 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK
)
1387 // Notification that the text selection has changed.
1388 // Note: The secound parameter is the character based offset of the
1390 // text in the document.
1391 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged
,
1392 base::string16
/* text covers the selection range */,
1393 size_t /* the offset of the text in the document */,
1394 gfx::Range
/* selection range in the document */)
1396 // Notification that the selection bounds have changed.
1397 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged
,
1398 ViewHostMsg_SelectionBounds_Params
)
1400 // Asks the browser to display the file chooser. The result is returned in a
1401 // ViewMsg_RunFileChooserResponse message.
1402 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
1403 content::FileChooserParams
)
1405 // Asks the browser to enumerate a directory. This is equivalent to running
1406 // the file chooser in directory-enumeration mode and having the user select
1407 // the given directory. The result is returned in a
1408 // ViewMsg_EnumerateDirectoryResponse message.
1409 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
1410 int /* request_id */,
1411 base::FilePath
/* file_path */)
1413 // Tells the browser to move the focus to the next (previous if reverse is
1414 // true) focusable element.
1415 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
1418 // Required for opening a date/time dialog
1419 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog
,
1420 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
1422 IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged
,
1423 ui::TextInputType
/* TextInputType of the focused node */,
1424 ui::TextInputMode
/* TextInputMode of the focused node */,
1425 bool /* can_compose_inline in the focused node */)
1427 // Required for updating text input state.
1428 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
1429 ViewHostMsg_TextInputState_Params
/* input state params */)
1431 // Required for cancelling an ongoing input method composition.
1432 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition
)
1434 // Sent when the renderer changes the zoom level for a particular url, so the
1435 // browser can update its records. If the view is a plugin doc, then url is
1436 // used to update the zoom level for all pages in that site. Otherwise, the
1437 // render view's id is used so that only the menu is updated.
1438 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL
,
1439 double /* zoom_level */,
1442 // Updates the minimum/maximum allowed zoom percent for this tab from the
1443 // default values. If |remember| is true, then the zoom setting is applied to
1444 // other pages in the site and is saved, otherwise it only applies to this
1446 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits
,
1447 int /* minimum_percent */,
1448 int /* maximum_percent */)
1450 // Notify the browser that this render process can or can't be suddenly
1452 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged
,
1455 IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params
)
1456 IPC_STRUCT_MEMBER(int32
, surface_id
)
1457 IPC_STRUCT_MEMBER(uint64
, surface_handle
)
1458 IPC_STRUCT_MEMBER(int32
, route_id
)
1459 IPC_STRUCT_MEMBER(gfx::Size
, size
)
1460 IPC_STRUCT_MEMBER(float, scale_factor
)
1461 IPC_STRUCT_MEMBER(int32
, gpu_process_host_id
)
1462 IPC_STRUCT_MEMBER(std::vector
<ui::LatencyInfo
>, latency_info
)
1465 // This message is synthesized by GpuProcessHost to pass through a swap message
1466 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
1467 // software or GPU frame.
1468 IPC_MESSAGE_ROUTED1(
1469 ViewHostMsg_CompositorSurfaceBuffersSwapped
,
1470 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params
/* params */)
1472 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame
,
1473 uint32
/* output_surface_id */,
1474 cc::CompositorFrame
/* frame */)
1476 // Sent by the compositor when a flinging animation is stopped.
1477 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging
)
1479 //---------------------------------------------------------------------------
1480 // Request for cryptographic operation messages:
1481 // These are messages from the renderer to the browser to perform a
1482 // cryptographic operation.
1484 // Asks the browser process to generate a keypair for grabbing a client
1485 // certificate from a CA (<keygen> tag), and returns the signed public
1486 // key and challenge string.
1487 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen
,
1488 uint32
/* key size index */,
1489 std::string
/* challenge string */,
1490 GURL
/* URL of requestor */,
1491 std::string
/* signed public key and challenge */)
1493 // Message sent from the renderer to the browser to request that the browser
1494 // cache |data| associated with |url|.
1495 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata
,
1497 double /* expected_response_time */,
1498 std::vector
<char> /* data */)
1500 // Register a new handler for URL requests with the given scheme.
1501 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler
,
1502 std::string
/* scheme */,
1504 base::string16
/* title */,
1505 bool /* user_gesture */)
1507 // Stores new inspector setting in the profile.
1508 // TODO(jam): this should be in the chrome module
1509 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting
,
1510 std::string
, /* key */
1511 std::string
/* value */)
1513 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1514 // See the comment in chrome/browser/ui/browser.h for more details.
1515 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen
,
1516 bool /* enter_fullscreen */)
1518 // Send back a string to be recorded by UserMetrics.
1519 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
1520 std::string
/* action */)
1522 // Notifies the browser that the page was or was not saved as MHTML.
1523 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
1525 int64
/* size of the MHTML file, -1 if error */)
1527 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks
,
1528 std::vector
<GURL
> /* all savable resource links */,
1529 std::vector
<content::Referrer
> /* all referrers */,
1530 std::vector
<GURL
> /* all frame links */)
1532 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
1533 GURL
/* frame's url */,
1534 std::string
/* data buffer */,
1535 int32
/* complete status */)
1537 // Notifies the browser of an event occurring in the media pipeline.
1538 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents
,
1539 std::vector
<media::MediaLogEvent
> /* events */)
1541 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1543 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1544 // pop up a bubble to ask for user permission or take mouse lock content into
1546 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
1547 bool /* user_gesture */,
1548 bool /* last_unlocked_by_target */,
1549 bool /* privileged */)
1551 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1552 // whenever the mouse is unlocked (which may or may not be caused by
1553 // ViewHostMsg_UnlockMouse).
1554 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
1556 // Notifies that multiple touch targets may have been pressed, and to show
1557 // the disambiguation popup.
1558 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
1559 gfx::Rect
, /* Border of touched targets */
1560 gfx::Size
, /* Size of zoomed image */
1561 cc::SharedBitmapId
/* id */)
1563 // Sent by the renderer process to check whether client 3D APIs
1564 // (Pepper 3D, WebGL) are explicitly blocked.
1565 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked
,
1566 int /* render_view_id */,
1567 GURL
/* top_origin_url */,
1568 content::ThreeDAPIType
/* requester */,
1571 // Sent by the renderer process to indicate that a context was lost by
1572 // client 3D content (Pepper 3D, WebGL) running on the page at the
1574 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext
,
1575 GURL
/* top_origin_url */,
1576 content::ThreeDAPIType
/* context_type */,
1577 int /* arb_robustness_status_code */)
1579 // Notifies the browser that document has parsed the body. This is used by the
1580 // ResourceScheduler as an indication that bandwidth contention won't block
1582 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody
)
1584 // Notification that the urls for the favicon of a site has been determined.
1585 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL
,
1586 std::vector
<content::FaviconURL
> /* candidates */)
1588 // Sent once a paint happens after the first non empty layout. In other words
1589 // after the page has painted something.
1590 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint
)
1592 // Sent by the renderer to the browser to start a vibration with the given
1594 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate
,
1595 int64
/* milliseconds */)
1597 // Sent by the renderer to the browser to cancel the currently running
1598 // vibration, if there is one.
1599 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration
)
1601 // Message sent from renderer to the browser when the element that is focused
1602 // has been touched. A bool is passed in this message which indicates if the
1603 // node is editable.
1604 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched
,
1605 bool /* editable */)
1607 // Message sent from the renderer to the browser when an HTML form has failed
1608 // validation constraints.
1609 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage
,
1610 gfx::Rect
/* anchor rectangle in root view coordinate */,
1611 base::string16
/* validation message */,
1612 base::string16
/* supplemental text */)
1614 // Message sent from the renderer to the browser when a HTML form validation
1615 // message should be hidden from view.
1616 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage
)
1618 // Message sent from the renderer to the browser when the suggested co-ordinates
1619 // of the anchor for a HTML form validation message have changed.
1620 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage
,
1621 gfx::Rect
/* anchor rectangle in root view coordinate */)
1623 #if defined(OS_ANDROID)
1624 // Response to ViewMsg_FindMatchRects.
1626 // |version| will contain the current version number of the renderer's find
1627 // match list (incremented whenever they change), which should be passed in the
1628 // next call to ViewMsg_FindMatchRects.
1630 // |rects| will either contain a list of the enclosing rects of all matches
1631 // found by the most recent Find operation, or will be empty if |version| is not
1632 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1633 // your locally cached rects should still be valid). The rect coords will be
1634 // custom normalized fractions of the document size. The rects will be sorted by
1635 // frame traversal order starting in the main frame, then by dom order.
1637 // |active_rect| will contain the bounding box of the active find-in-page match
1638 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1639 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
1641 std::vector
<gfx::RectF
> /* rects */,
1642 gfx::RectF
/* active_rect */)
1644 // Start an android intent with the given URI.
1645 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
1646 GURL
/* content_url */)
1648 // Message sent when the renderer changed the background color for the view.
1649 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor
,
1650 uint32
/* bg_color */)
1652 // This message runs the MediaCodec for decoding audio for webaudio.
1653 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec
,
1654 base::SharedMemoryHandle
/* encoded_data_handle */,
1655 base::FileDescriptor
/* pcm_output */,
1656 uint32_t /* data_size*/)
1658 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1659 // display events. If |enabled| is true, the BeginFrame message will continue
1660 // to be be delivered until the notification is disabled.
1661 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame
,
1664 // Reply to the ViewMsg_ExtractSmartClipData message.
1665 // TODO(juhui24.lee@samsung.com): this should be changed to a vector of structs
1666 // instead of encoding the data as a string which is not allowed normally. Since
1667 // ths is only used in Android WebView, it's allowed temporarily.
1668 // http://crbug.com/330872
1669 IPC_MESSAGE_ROUTED1(ViewHostMsg_SmartClipDataExtracted
, base::string16
)
1671 #elif defined(OS_MACOSX)
1672 // Request that the browser load a font into shared memory for us.
1673 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont
,
1674 FontDescriptor
/* font to load */,
1675 uint32
/* buffer size */,
1676 base::SharedMemoryHandle
/* font data */,
1677 uint32
/* font id */)
1679 // Informs the browser that a plugin has gained or lost focus.
1680 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
1682 int /* plugin_id */)
1684 // Instructs the browser to start plugin IME.
1685 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
1687 // Notifies that the scrollbars-visible state of the content changed.
1688 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame
,
1689 bool /* has_horizontal_scrollbar */,
1690 bool /* has_vertical_scrollbar */)
1692 #elif defined(OS_WIN)
1693 // Request that the given font characters be loaded by the browser so it's
1694 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1696 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters
,
1697 LOGFONT
/* font_data */,
1698 base::string16
/* characters */)
1701 #if defined(OS_POSIX)
1702 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1703 // this call exists for the renderer to ask the browser to allocate memory
1704 // on its behalf. We return a file descriptor to the POSIX shared memory.
1705 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1706 // by the browser, and it is the caller's repsonsibility to send a
1707 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1708 // In all cases, the caller is responsible for deleting the resulting
1710 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB
,
1711 uint32_t, /* bytes requested */
1712 bool, /* cache in the browser */
1713 TransportDIB::Handle
/* DIB */)
1715 // Since the browser keeps handles to the allocated transport DIBs, this
1716 // message is sent to tell the browser that it may release them when the
1717 // renderer is finished with them.
1718 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB
,
1719 TransportDIB::Id
/* DIB id */)
1722 #if defined(OS_MACOSX) || defined(USE_AURA)
1723 // On Mac and Aura IME can request composition character bounds
1724 // synchronously (see crbug.com/120597). This IPC message sends the character
1725 // bounds after every composition change to always have correct bound info.
1726 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged
,
1727 gfx::Range
/* composition range */,
1728 std::vector
<gfx::Rect
> /* character bounds */)
1731 // Adding a new message? Stick to the sort order above: first platform
1732 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1733 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.