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 "cc/resources/shared_bitmap.h"
15 #include "content/common/content_export.h"
16 #include "content/common/content_param_traits.h"
17 #include "content/common/date_time_suggestion.h"
18 #include "content/common/frame_replication_state.h"
19 #include "content/common/media/media_param_traits.h"
20 #include "content/common/navigation_gesture.h"
21 #include "content/common/view_message_enums.h"
22 #include "content/common/webplugin_geometry.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_file_info.h"
26 #include "content/public/common/file_chooser_params.h"
27 #include "content/public/common/menu_item.h"
28 #include "content/public/common/message_port_types.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 "ipc/ipc_channel_handle.h"
37 #include "ipc/ipc_message_macros.h"
38 #include "ipc/ipc_platform_file.h"
39 #include "media/audio/audio_parameters.h"
40 #include "media/base/channel_layout.h"
41 #include "media/base/media_log_event.h"
42 #include "net/base/network_change_notifier.h"
43 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
44 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
45 #include "third_party/WebKit/public/platform/WebFloatRect.h"
46 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
47 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationType.h"
48 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
49 #include "third_party/WebKit/public/web/WebFindOptions.h"
50 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
51 #include "third_party/WebKit/public/web/WebPluginAction.h"
52 #include "third_party/WebKit/public/web/WebPopupType.h"
53 #include "third_party/WebKit/public/web/WebTextDirection.h"
54 #include "third_party/skia/include/core/SkBitmap.h"
55 #include "ui/base/ime/text_input_mode.h"
56 #include "ui/base/ime/text_input_type.h"
57 #include "ui/base/ui_base_types.h"
58 #include "ui/gfx/geometry/point.h"
59 #include "ui/gfx/geometry/rect.h"
60 #include "ui/gfx/geometry/rect_f.h"
61 #include "ui/gfx/geometry/vector2d.h"
62 #include "ui/gfx/geometry/vector2d_f.h"
63 #include "ui/gfx/ipc/gfx_param_traits.h"
64 #include "ui/gfx/range/range.h"
66 #if defined(OS_MACOSX)
67 #include "third_party/WebKit/public/platform/mac/MacScrollTypes.h"
68 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
71 #undef IPC_MESSAGE_EXPORT
72 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
74 #define IPC_MESSAGE_START ViewMsgStart
76 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDeviceEmulationParams::ScreenPosition
,
77 blink::WebDeviceEmulationParams::ScreenPositionLast
)
78 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type
,
79 blink::WebMediaPlayerAction::Type::TypeLast
)
80 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type
,
81 blink::WebPluginAction::Type::TypeLast
)
82 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType
,
83 blink::WebPopupType::WebPopupTypeLast
)
84 // TODO(dcheng): Update WebScreenOrientationType to have a "Last" enum member.
85 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationType
,
86 blink::WebScreenOrientationUndefined
,
87 blink::WebScreenOrientationLandscapeSecondary
)
88 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection
,
89 blink::WebTextDirection::WebTextDirectionLast
)
90 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDisplayMode
,
91 blink::WebDisplayMode::WebDisplayModeLast
)
92 IPC_ENUM_TRAITS_MAX_VALUE(WindowContainerType
, WINDOW_CONTAINER_TYPE_MAX_VALUE
)
93 IPC_ENUM_TRAITS(content::FaviconURL::IconType
)
94 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
95 IPC_ENUM_TRAITS(content::MenuItem::Type
)
96 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture
,
97 content::NavigationGestureLast
)
98 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom
,
99 content::PageZoom::PAGE_ZOOM_OUT
,
100 content::PageZoom::PAGE_ZOOM_IN
)
101 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting
,
102 gfx::FontRenderParams::HINTING_MAX
)
103 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering
,
104 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX
)
105 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy
,
106 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX
)
107 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction
,
108 content::STOP_FIND_ACTION_LAST
)
109 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType
,
110 content::THREE_D_API_TYPE_LAST
)
111 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type
,
112 media::MediaLogEvent::TYPE_LAST
)
113 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode
, ui::TEXT_INPUT_MODE_MAX
)
114 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputType
, ui::TEXT_INPUT_TYPE_MAX
)
116 #if defined(OS_MACOSX)
117 IPC_ENUM_TRAITS_MAX_VALUE(
118 blink::ScrollbarButtonsPlacement
,
119 blink::ScrollbarButtonsPlacement::ScrollbarButtonsPlacementLast
)
121 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle
, blink::ScrollerStyleOverlay
)
124 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions
)
125 IPC_STRUCT_TRAITS_MEMBER(forward
)
126 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
127 IPC_STRUCT_TRAITS_MEMBER(findNext
)
128 IPC_STRUCT_TRAITS_END()
130 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction
)
131 IPC_STRUCT_TRAITS_MEMBER(type
)
132 IPC_STRUCT_TRAITS_MEMBER(enable
)
133 IPC_STRUCT_TRAITS_END()
135 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction
)
136 IPC_STRUCT_TRAITS_MEMBER(type
)
137 IPC_STRUCT_TRAITS_MEMBER(enable
)
138 IPC_STRUCT_TRAITS_END()
140 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint
)
141 IPC_STRUCT_TRAITS_MEMBER(x
)
142 IPC_STRUCT_TRAITS_MEMBER(y
)
143 IPC_STRUCT_TRAITS_END()
145 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect
)
146 IPC_STRUCT_TRAITS_MEMBER(x
)
147 IPC_STRUCT_TRAITS_MEMBER(y
)
148 IPC_STRUCT_TRAITS_MEMBER(width
)
149 IPC_STRUCT_TRAITS_MEMBER(height
)
150 IPC_STRUCT_TRAITS_END()
152 IPC_STRUCT_TRAITS_BEGIN(blink::WebSize
)
153 IPC_STRUCT_TRAITS_MEMBER(width
)
154 IPC_STRUCT_TRAITS_MEMBER(height
)
155 IPC_STRUCT_TRAITS_END()
157 IPC_STRUCT_TRAITS_BEGIN(blink::WebDeviceEmulationParams
)
158 IPC_STRUCT_TRAITS_MEMBER(screenPosition
)
159 IPC_STRUCT_TRAITS_MEMBER(screenSize
)
160 IPC_STRUCT_TRAITS_MEMBER(viewPosition
)
161 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
162 IPC_STRUCT_TRAITS_MEMBER(viewSize
)
163 IPC_STRUCT_TRAITS_MEMBER(fitToView
)
164 IPC_STRUCT_TRAITS_MEMBER(offset
)
165 IPC_STRUCT_TRAITS_MEMBER(scale
)
166 IPC_STRUCT_TRAITS_END()
168 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo
)
169 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
170 IPC_STRUCT_TRAITS_MEMBER(depth
)
171 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
172 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
173 IPC_STRUCT_TRAITS_MEMBER(rect
)
174 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
175 IPC_STRUCT_TRAITS_MEMBER(orientationType
)
176 IPC_STRUCT_TRAITS_MEMBER(orientationAngle
)
177 IPC_STRUCT_TRAITS_END()
179 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem
)
180 IPC_STRUCT_TRAITS_MEMBER(label
)
181 IPC_STRUCT_TRAITS_MEMBER(tool_tip
)
182 IPC_STRUCT_TRAITS_MEMBER(type
)
183 IPC_STRUCT_TRAITS_MEMBER(action
)
184 IPC_STRUCT_TRAITS_MEMBER(rtl
)
185 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
186 IPC_STRUCT_TRAITS_MEMBER(enabled
)
187 IPC_STRUCT_TRAITS_MEMBER(checked
)
188 IPC_STRUCT_TRAITS_MEMBER(submenu
)
189 IPC_STRUCT_TRAITS_END()
191 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion
)
192 IPC_STRUCT_TRAITS_MEMBER(value
)
193 IPC_STRUCT_TRAITS_MEMBER(localized_value
)
194 IPC_STRUCT_TRAITS_MEMBER(label
)
195 IPC_STRUCT_TRAITS_END()
197 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL
)
198 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
199 IPC_STRUCT_TRAITS_MEMBER(icon_type
)
200 IPC_STRUCT_TRAITS_MEMBER(icon_sizes
)
201 IPC_STRUCT_TRAITS_END()
203 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo
)
204 IPC_STRUCT_TRAITS_MEMBER(file_path
)
205 IPC_STRUCT_TRAITS_MEMBER(display_name
)
206 IPC_STRUCT_TRAITS_MEMBER(file_system_url
)
207 IPC_STRUCT_TRAITS_MEMBER(modification_time
)
208 IPC_STRUCT_TRAITS_MEMBER(length
)
209 IPC_STRUCT_TRAITS_MEMBER(is_directory
)
210 IPC_STRUCT_TRAITS_END()
212 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
213 IPC_STRUCT_TRAITS_MEMBER(mode
)
214 IPC_STRUCT_TRAITS_MEMBER(title
)
215 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
216 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
217 IPC_STRUCT_TRAITS_MEMBER(need_local_path
)
218 #if defined(OS_ANDROID)
219 IPC_STRUCT_TRAITS_MEMBER(capture
)
221 IPC_STRUCT_TRAITS_END()
223 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
224 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
225 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
226 IPC_STRUCT_TRAITS_MEMBER(hinting
)
227 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
228 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
229 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
230 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
231 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
232 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
233 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
234 IPC_STRUCT_TRAITS_MEMBER(track_color
)
235 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
236 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
237 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
238 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
239 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
240 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
241 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors
)
242 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
243 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
244 IPC_STRUCT_TRAITS_MEMBER(enable_webrtc_multiple_routes
)
245 IPC_STRUCT_TRAITS_MEMBER(enable_webrtc_nonproxied_udp
)
246 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
247 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
248 IPC_STRUCT_TRAITS_MEMBER(accept_languages
)
249 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes
)
250 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy
)
251 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page
)
252 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed
)
253 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video
)
254 IPC_STRUCT_TRAITS_MEMBER(use_view_overlay_for_all_video
)
255 IPC_STRUCT_TRAITS_MEMBER(network_contry_iso
)
257 IPC_STRUCT_TRAITS_MEMBER(caption_font_family_name
)
258 IPC_STRUCT_TRAITS_MEMBER(caption_font_height
)
259 IPC_STRUCT_TRAITS_MEMBER(small_caption_font_family_name
)
260 IPC_STRUCT_TRAITS_MEMBER(small_caption_font_height
)
261 IPC_STRUCT_TRAITS_MEMBER(menu_font_family_name
)
262 IPC_STRUCT_TRAITS_MEMBER(menu_font_height
)
263 IPC_STRUCT_TRAITS_MEMBER(status_font_family_name
)
264 IPC_STRUCT_TRAITS_MEMBER(status_font_height
)
265 IPC_STRUCT_TRAITS_MEMBER(message_font_family_name
)
266 IPC_STRUCT_TRAITS_MEMBER(message_font_height
)
267 IPC_STRUCT_TRAITS_MEMBER(vertical_scroll_bar_width_in_dips
)
268 IPC_STRUCT_TRAITS_MEMBER(horizontal_scroll_bar_height_in_dips
)
269 IPC_STRUCT_TRAITS_MEMBER(arrow_bitmap_height_vertical_scroll_bar_in_dips
)
270 IPC_STRUCT_TRAITS_MEMBER(arrow_bitmap_width_horizontal_scroll_bar_in_dips
)
272 IPC_STRUCT_TRAITS_MEMBER(default_font_size
)
273 IPC_STRUCT_TRAITS_END()
275 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry
)
276 IPC_STRUCT_TRAITS_MEMBER(window
)
277 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
278 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
279 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
280 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
281 IPC_STRUCT_TRAITS_MEMBER(visible
)
282 IPC_STRUCT_TRAITS_END()
284 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
285 IPC_STRUCT_TRAITS_MEMBER(id
)
286 IPC_STRUCT_TRAITS_MEMBER(type
)
287 IPC_STRUCT_TRAITS_MEMBER(params
)
288 IPC_STRUCT_TRAITS_MEMBER(time
)
289 IPC_STRUCT_TRAITS_END()
291 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
292 // Routing ID of the view initiating the open.
293 IPC_STRUCT_MEMBER(int, opener_id
)
295 // True if this open request came in the context of a user gesture.
296 IPC_STRUCT_MEMBER(bool, user_gesture
)
298 // Type of window requested.
299 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
301 // The session storage namespace ID this view should use.
302 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
304 // The name of the resulting frame that should be created (empty if none
305 // has been specified). UTF8 encoded string.
306 IPC_STRUCT_MEMBER(std::string
, frame_name
)
308 // The routing id of the frame initiating the open.
309 IPC_STRUCT_MEMBER(int, opener_render_frame_id
)
311 // The URL of the frame initiating the open.
312 IPC_STRUCT_MEMBER(GURL
, opener_url
)
314 // The URL of the top frame containing the opener.
315 IPC_STRUCT_MEMBER(GURL
, opener_top_level_frame_url
)
317 // The security origin of the frame initiating the open.
318 IPC_STRUCT_MEMBER(GURL
, opener_security_origin
)
320 // Whether the opener will be suppressed in the new window, in which case
321 // scripting the new window is not allowed.
322 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
324 // Whether the window should be opened in the foreground, background, etc.
325 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
327 // The URL that will be loaded in the new window (empty if none has been
329 IPC_STRUCT_MEMBER(GURL
, target_url
)
331 // The referrer that will be used to load |target_url| (empty if none has
333 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
335 // The window features to use for the new view.
336 IPC_STRUCT_MEMBER(blink::WebWindowFeatures
, features
)
338 // The additional window features to use for the new view. We pass these
339 // separately from |features| above because we cannot serialize WebStrings
341 IPC_STRUCT_MEMBER(std::vector
<base::string16
>, additional_features
)
344 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
345 // URL for the worker script.
346 IPC_STRUCT_MEMBER(GURL
, url
)
348 // Name for a SharedWorker, otherwise empty string.
349 IPC_STRUCT_MEMBER(base::string16
, name
)
351 // Security policy used in the worker.
352 IPC_STRUCT_MEMBER(base::string16
, content_security_policy
)
354 // Security policy type used in the worker.
355 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType
, security_policy_type
)
357 // The ID of the parent document (unique within parent renderer).
358 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
360 // RenderFrame routing id used to send messages back to the parent.
361 IPC_STRUCT_MEMBER(int, render_frame_route_id
)
364 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params
)
365 IPC_STRUCT_MEMBER(ui::TextInputType
, dialog_type
)
366 IPC_STRUCT_MEMBER(double, dialog_value
)
367 IPC_STRUCT_MEMBER(double, minimum
)
368 IPC_STRUCT_MEMBER(double, maximum
)
369 IPC_STRUCT_MEMBER(double, step
)
370 IPC_STRUCT_MEMBER(std::vector
<content::DateTimeSuggestion
>, suggestions
)
373 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params
)
374 IPC_STRUCT_MEMBER(gfx::Rect
, anchor_rect
)
375 IPC_STRUCT_MEMBER(blink::WebTextDirection
, anchor_dir
)
376 IPC_STRUCT_MEMBER(gfx::Rect
, focus_rect
)
377 IPC_STRUCT_MEMBER(blink::WebTextDirection
, focus_dir
)
378 IPC_STRUCT_MEMBER(bool, is_anchor_first
)
381 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
382 // The type of input field
383 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
385 // The mode of input field
386 IPC_STRUCT_MEMBER(ui::TextInputMode
, mode
)
388 // The flags of the input field (autocorrect, autocomplete, etc.)
389 IPC_STRUCT_MEMBER(int, flags
)
391 // The value of the input field
392 IPC_STRUCT_MEMBER(std::string
, value
)
394 // The cursor position of the current selection start, or the caret position
395 // if nothing is selected
396 IPC_STRUCT_MEMBER(int, selection_start
)
398 // The cursor position of the current selection end, or the caret position
399 // if nothing is selected
400 IPC_STRUCT_MEMBER(int, selection_end
)
402 // The start position of the current composition, or -1 if there is none
403 IPC_STRUCT_MEMBER(int, composition_start
)
405 // The end position of the current composition, or -1 if there is none
406 IPC_STRUCT_MEMBER(int, composition_end
)
408 // Whether or not inline composition can be performed for the current input.
409 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
411 // Whether or not the IME should be shown as a result of this update. Even if
412 // true, the IME will only be shown if the type is appropriate (e.g. not
413 // TEXT_INPUT_TYPE_NONE).
414 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
416 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
417 IPC_STRUCT_MEMBER(bool, is_non_ime_change
)
420 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
421 // The size of the RenderView when this message was generated. This is
422 // included so the host knows how large the view is from the perspective of
423 // the renderer process. This is necessary in case a resize operation is in
424 // progress. If auto-resize is enabled, this should update the corresponding
426 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
428 // New window locations for plugin child windows.
429 IPC_STRUCT_MEMBER(std::vector
<content::WebPluginGeometry
>,
432 // The following describes the various bits that may be set in flags:
434 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
435 // Indicates that this is a response to a ViewMsg_Resize message.
437 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
438 // Indicates that this is a response to a ViewMsg_Repaint message.
440 // If flags is zero, then this message corresponds to an unsolicited paint
441 // request by the render view. Any of the above bits may be set in flags,
442 // which would indicate that this paint message is an ACK for multiple
444 IPC_STRUCT_MEMBER(int, flags
)
447 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params
)
448 // Information about the screen (dpi, depth, etc..).
449 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
450 // The size of the renderer.
451 IPC_STRUCT_MEMBER(gfx::Size
, new_size
)
452 // The size of the view's backing surface in non-DPI-adjusted pixels.
453 IPC_STRUCT_MEMBER(gfx::Size
, physical_backing_size
)
454 // Whether or not Blink's viewport size should be shrunk by the height of the
455 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
456 IPC_STRUCT_MEMBER(bool, top_controls_shrink_blink_size
)
457 // The height of the top controls (always 0 on platforms where URL-bar hiding
459 IPC_STRUCT_MEMBER(float, top_controls_height
)
460 // The size of the visible viewport, which may be smaller than the view if the
461 // view is partially occluded (e.g. by a virtual keyboard). The size is in
462 // DPI-adjusted pixels.
463 IPC_STRUCT_MEMBER(gfx::Size
, visible_viewport_size
)
465 IPC_STRUCT_MEMBER(gfx::Rect
, resizer_rect
)
466 // Indicates whether tab-initiated fullscreen was granted.
467 IPC_STRUCT_MEMBER(bool, is_fullscreen_granted
)
469 IPC_STRUCT_MEMBER(blink::WebDisplayMode
, display_mode
)
470 // If set, requests the renderer to reply with a ViewHostMsg_UpdateRect
471 // with the ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK bit set in flags.
472 IPC_STRUCT_MEMBER(bool, needs_resize_ack
)
475 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
476 // Renderer-wide preferences.
477 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
479 // Preferences for this view.
480 IPC_STRUCT_MEMBER(content::WebPreferences
, web_preferences
)
482 // The ID of the view to be created.
483 IPC_STRUCT_MEMBER(int32
, view_id
)
485 // The ID of the main frame hosted in the view.
486 IPC_STRUCT_MEMBER(int32
, main_frame_routing_id
)
488 // The ID of the rendering surface.
489 IPC_STRUCT_MEMBER(int32
, surface_id
)
491 // The session storage namespace ID this view should use.
492 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
494 // The route ID of the opener RenderFrame or RenderFrameProxy, if we need to
495 // set one (MSG_ROUTING_NONE otherwise).
496 IPC_STRUCT_MEMBER(int, opener_frame_route_id
)
498 // Whether the RenderView should initially be swapped out.
499 IPC_STRUCT_MEMBER(bool, swapped_out
)
501 // Carries replicated information, such as frame name and sandbox flags, for
502 // this view's main frame, which will be a proxy in |swapped_out|
503 // views when in --site-per-process mode, or a RenderFrame in all other
505 IPC_STRUCT_MEMBER(content::FrameReplicationState
, replicated_frame_state
)
507 // The ID of the proxy object for the main frame in this view. It is only
508 // used if |swapped_out| is true.
509 IPC_STRUCT_MEMBER(int32
, proxy_routing_id
)
511 // Whether the RenderView should initially be hidden.
512 IPC_STRUCT_MEMBER(bool, hidden
)
514 // Whether the RenderView will never be visible.
515 IPC_STRUCT_MEMBER(bool, never_visible
)
517 // Whether the window associated with this view was created with an opener.
518 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener
)
520 // The initial page ID to use for this view, which must be larger than any
521 // existing navigation that might be loaded in the view. Page IDs are unique
522 // to a view and are only updated by the renderer after this initial value.
523 IPC_STRUCT_MEMBER(int32
, next_page_id
)
525 // The initial renderer size.
526 IPC_STRUCT_MEMBER(ViewMsg_Resize_Params
, initial_size
)
528 // Whether to enable auto-resize.
529 IPC_STRUCT_MEMBER(bool, enable_auto_resize
)
531 // The minimum size to layout the page if auto-resize is enabled.
532 IPC_STRUCT_MEMBER(gfx::Size
, min_size
)
534 // The maximum size to layout the page if auto-resize is enabled.
535 IPC_STRUCT_MEMBER(gfx::Size
, max_size
)
538 #if defined(OS_MACOSX)
539 IPC_STRUCT_BEGIN(ViewMsg_UpdateScrollbarTheme_Params
)
540 IPC_STRUCT_MEMBER(float, initial_button_delay
)
541 IPC_STRUCT_MEMBER(float, autoscroll_button_delay
)
542 IPC_STRUCT_MEMBER(bool, jump_on_track_click
)
543 IPC_STRUCT_MEMBER(blink::ScrollerStyle
, preferred_scroller_style
)
544 IPC_STRUCT_MEMBER(bool, redraw
)
545 IPC_STRUCT_MEMBER(bool, scroll_animation_enabled
)
546 IPC_STRUCT_MEMBER(blink::ScrollbarButtonsPlacement
, button_placement
)
550 // Messages sent from the browser to the renderer.
552 #if defined(OS_ANDROID)
553 // Tells the renderer to cancel an opened date/time dialog.
554 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
556 // Replaces a date time input field.
557 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
,
558 double /* dialog_value */)
562 // Get html data by serializing all frames of current page with lists
563 // which contain all resource links that have local copy.
564 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
565 std::vector
<GURL
> /* urls that have local copy */,
566 std::vector
<base::FilePath
> /* paths of local copy */,
567 base::FilePath
/* local directory path */)
569 // Tells the render side that a ViewHostMsg_LockMouse message has been
570 // processed. |succeeded| indicates whether the mouse has been successfully
572 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
573 bool /* succeeded */)
574 // Tells the render side that the mouse has been unlocked.
575 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
577 // Sent by the browser when the parameters for vsync alignment have changed.
578 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
579 base::TimeTicks
/* timebase */,
580 base::TimeDelta
/* interval */)
582 // Sent when the history is altered outside of navigation. The history list was
583 // reset to |history_length| length, and the offset was reset to be
585 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryOffsetAndLength
,
586 int /* history_offset */,
587 int /* history_length */)
589 // Tells the renderer to create a new view.
590 // This message is slightly different, the view it takes (via
591 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
592 // non-view control message.
593 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
596 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
597 // similar to the new command, but used when the renderer created a view
598 // first, and we need to update it.
599 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
601 // Sends updated preferences to the renderer.
602 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
603 content::RendererPreferences
)
605 // This passes a set of webkit preferences down to the renderer.
606 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
607 content::WebPreferences
)
609 // Informs the renderer that the timezone has changed along with a new
611 IPC_MESSAGE_CONTROL1(ViewMsg_TimezoneChange
, std::string
)
613 // Tells the render view to close.
614 // Expects a Close_ACK message when finished.
615 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
617 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
618 // is generated in response provided new_size is not empty and not equal to
619 // the view's current size. The generated ViewHostMsg_UpdateRect message will
620 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
621 // we don't have to fetch it every time WebKit asks for it.
622 IPC_MESSAGE_ROUTED1(ViewMsg_Resize
,
623 ViewMsg_Resize_Params
/* params */)
625 // Enables device emulation. See WebDeviceEmulationParams for description.
626 IPC_MESSAGE_ROUTED1(ViewMsg_EnableDeviceEmulation
,
627 blink::WebDeviceEmulationParams
/* params */)
629 // Disables device emulation, enabled previously by EnableDeviceEmulation.
630 IPC_MESSAGE_ROUTED0(ViewMsg_DisableDeviceEmulation
)
632 // Sent to inform the renderer of its screen device color profile. An empty
633 // profile tells the renderer use the default sRGB color profile.
634 IPC_MESSAGE_ROUTED1(ViewMsg_ColorProfile
,
635 std::vector
<char> /* color profile */)
637 // Tells the render view that the resize rect has changed.
638 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
639 gfx::Rect
/* resizer_rect */)
641 // Sent to inform the view that it was hidden. This allows it to reduce its
642 // resource utilization.
643 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
645 // Tells the render view that it is no longer hidden (see WasHidden), and the
646 // render view is expected to respond with a full repaint if needs_repainting
647 // is true. If needs_repainting is false, then this message does not trigger a
648 // message in response.
649 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown
,
650 bool /* needs_repainting */,
651 ui::LatencyInfo
/* latency_info */)
653 // Tells the renderer to focus the first (last if reverse is true) focusable
655 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
658 // Sent to inform the renderer to invoke a context menu.
659 // The parameter specifies the location in the render view's coordinates.
660 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu
,
662 gfx::Point
/* location where menu should be shown */)
664 // Sent when the user wants to search for a word on the page (find in page).
665 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
666 int /* request_id */,
667 base::string16
/* search_text */,
668 blink::WebFindOptions
)
670 // This message notifies the renderer that the user has closed the FindInPage
671 // window (and what action to take regarding the selection).
672 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
673 content::StopFindAction
/* action */)
675 // Copies the image at location x, y to the clipboard (if there indeed is an
676 // image at that location).
677 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
681 // Saves the image at location x, y to the disk (if there indeed is an
682 // image at that location).
683 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt
,
687 // Tells the renderer to perform the given action on the media player
688 // located at the given point.
689 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
690 gfx::Point
, /* location */
691 blink::WebMediaPlayerAction
)
693 // Tells the renderer to perform the given action on the plugin located at
695 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
696 gfx::Point
, /* location */
697 blink::WebPluginAction
)
699 // Resets the page scale for the current main frame to the default page scale.
700 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageScale
)
702 // Change the zoom level for the current main frame. If the level actually
703 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
704 // telling it what url got zoomed and what its current zoom level is.
705 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
706 content::PageZoom
/* function */)
708 // Set the zoom level for a particular url that the renderer is in the
709 // process of loading. This will be stored, to be used if the load commits
710 // and ignored otherwise.
711 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
713 double /* zoom_level */)
715 // Set the zoom level for a particular url, so all render views
716 // displaying this url can update their zoom levels to match.
717 // If scheme is empty, then only host is used for matching.
718 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL
,
719 std::string
/* scheme */,
720 std::string
/* host */,
721 double /* zoom_level */)
723 // Set the zoom level for a particular render view.
724 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView
,
725 bool /* uses_temporary_zoom_level */,
726 double /* zoom_level */)
728 // Change encoding of page in the renderer.
729 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
730 std::string
/*new encoding name*/)
732 // Reset encoding of page in the renderer back to default.
733 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
735 // Used to tell a render view whether it should expose various bindings
736 // that allow JS content extended privileges. See BindingsPolicy for valid
738 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
739 int /* enabled_bindings_flags */)
741 // Tell the renderer to add a property to the WebUI binding object. This
742 // only works if we allowed WebUI bindings.
743 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
744 std::string
/* property_name */,
745 std::string
/* property_value_json */)
747 // Used to notify the render-view that we have received a target URL. Used
748 // to prevent target URLs spamming the browser.
749 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
751 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
752 std::vector
<content::FileChooserFileInfo
>)
754 // Provides the results of directory enumeration.
755 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
756 int /* request_id */,
757 std::vector
<base::FilePath
> /* files_in_directory */)
759 // Tells the renderer to suppress any further modal dialogs until it receives a
760 // corresponding ViewMsg_SwapOut message. This ensures that no
761 // PageGroupLoadDeferrer is on the stack for SwapOut.
762 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut
)
764 // Instructs the renderer to close the current page, including running the
765 // onunload event handler.
767 // Expects a ClosePage_ACK message when finished.
768 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
770 // Notifies the renderer about ui theme changes
771 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
773 // Notifies the renderer that a paint is to be generated for the rectangle
775 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
776 gfx::Size
/* The view size to be repainted */)
778 // Notification that a move or resize renderer's containing window has
780 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
782 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
783 gfx::Rect
/* view_screen_rect */,
784 gfx::Rect
/* window_screen_rect */)
786 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
787 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
788 // processed the move. The browser may have ignored the move, but it finished
789 // processing. This is used because the renderer keeps a temporary cache of
790 // the widget position while these asynchronous operations are in progress.
791 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
793 // Used to instruct the RenderView to send back updates to the preferred size.
794 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
796 // Used to instruct the RenderView to automatically resize and send back
797 // updates for the new size.
798 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
799 gfx::Size
/* min_size */,
800 gfx::Size
/* max_size */)
802 // Used to instruct the RenderView to disalbe automatically resize.
803 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
804 gfx::Size
/* new_size */)
806 // Changes the text direction of the currently selected input field (if any).
807 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
808 blink::WebTextDirection
/* direction */)
810 // Tells the renderer to clear the focused element (if any).
811 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement
)
813 // Make the RenderView background transparent or opaque.
814 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque
, bool /* opaque */)
816 // Used to tell the renderer not to add scrollbars with height and
817 // width below a threshold.
818 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
819 gfx::Size
/* disable_scrollbar_size_limit */)
821 // Activate/deactivate the RenderView (i.e., set its controls' tint
822 // accordingly, etc.).
823 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
826 // Response message to ViewHostMsg_CreateWorker.
827 // Sent when the worker has started.
828 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
830 // Sent when the worker failed to load the worker script.
831 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
832 // But if the shared worker of the same URL already exists and it has failed
833 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
834 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
835 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed
)
837 // Sent when the worker has connected.
838 // This message is sent only if the worker successfully loaded the script.
839 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected
)
841 // Tells the renderer that the network type has changed so that navigator.onLine
842 // and navigator.connection can be updated.
843 IPC_MESSAGE_CONTROL2(ViewMsg_NetworkConnectionChanged
,
844 net::NetworkChangeNotifier::ConnectionType
/* type */,
845 double /* max bandwidth mbps */)
847 #if defined(ENABLE_PLUGINS)
848 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
849 // Tells the renderer that the channel to the broker has been created.
850 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated
,
851 base::ProcessId
/* broker_pid */,
852 IPC::ChannelHandle
/* handle */)
854 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
855 // Tells the renderer whether permission to access to PPAPI broker was granted
857 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult
,
860 // Tells the renderer to empty its plugin list cache, optional reloading
861 // pages containing plugins.
862 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
863 bool /* reload_pages */)
866 // Used to instruct the RenderView to go into "view source" mode.
867 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
869 // Instructs the renderer to save the current page to MHTML.
870 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
872 IPC::PlatformFileForTransit
/* file handle */)
874 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
875 // process to release the magnified image.
876 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap
,
877 cc::SharedBitmapId
/* id */)
879 // Fetches complete rendered content of a web page as plain text.
880 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText
)
882 #if defined(OS_MACOSX)
883 // Notification of a change in scrollbar appearance and/or behavior.
884 IPC_MESSAGE_CONTROL1(ViewMsg_UpdateScrollbarTheme
,
885 ViewMsg_UpdateScrollbarTheme_Params
/* params */)
888 #if defined(OS_ANDROID)
889 // Tells the renderer to suspend/resume the webkit timers.
890 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended
,
893 // Sent when the browser wants the bounding boxes of the current find matches.
895 // If match rects are already cached on the browser side, |current_version|
896 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
897 // they came in, so the renderer can tell if it needs to send updated rects.
898 // Otherwise just pass -1 to always receive the list of rects.
900 // There must be an active search string (it is probably most useful to call
901 // this immediately after a ViewHostMsg_Find_Reply message arrives with
902 // final_update set to true).
903 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
904 int /* current_version */)
906 // Notifies the renderer whether hiding/showing the top controls is enabled
907 // and whether or not to animate to the proper state.
908 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState
,
909 bool /* enable_hiding */,
910 bool /* enable_showing */,
913 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded
)
915 // Extracts the data at the given rect, returning it through the
916 // ViewHostMsg_SmartClipDataExtracted IPC.
917 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData
,
918 gfx::Rect
/* rect */)
920 #elif defined(OS_MACOSX)
921 // Let the RenderView know its window has changed visibility.
922 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
925 // Let the RenderView know its window's frame has changed.
926 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
927 gfx::Rect
/* window frame */,
928 gfx::Rect
/* content view frame */)
930 // Message sent from the browser to the renderer when the user starts or stops
931 // resizing the view.
932 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
935 // Tell the renderer that plugin IME has completed.
936 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
937 base::string16
/* text */,
941 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
942 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck
,
943 uint32
/* output_surface_id */,
944 cc::CompositorFrameAck
/* ack */)
946 // Sent by browser to tell renderer compositor that some resources that were
947 // given to the browser in a swap are not being used anymore.
948 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources
,
949 uint32
/* output_surface_id */,
950 cc::CompositorFrameAck
/* ack */)
952 // Sent by browser to give renderer compositor a new namespace ID for any
953 // SurfaceSequences it has to create.
954 IPC_MESSAGE_ROUTED1(ViewMsg_SetSurfaceIdNamespace
,
955 uint32_t /* surface_id_namespace */)
957 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret
)
959 // Sent by the browser to ask the renderer to redraw.
960 // If |request_id| is not zero, it is added to the forced frame's latency info
961 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
962 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw
,
963 int /* request_id */)
965 // Sent by the browser when the renderer should generate a new frame.
966 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame
,
967 cc::BeginFrameArgs
/* args */)
969 // -----------------------------------------------------------------------------
970 // Messages sent from the renderer to the browser.
972 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
973 // display events. If |enabled| is true, the BeginFrame message will continue
974 // to be be delivered until the notification is disabled.
975 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrames
,
978 // Sent by the renderer when it is creating a new window. The browser creates
979 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
980 // MSG_ROUTING_NONE, the view couldn't be created.
981 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow
,
982 ViewHostMsg_CreateWindow_Params
,
984 int /* main_frame_route_id */,
985 int32
/* surface_id */,
986 int64
/* cloned_session_storage_namespace_id */)
988 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
989 // <select> dropdowns. This message is sent to the WebContentsImpl that
990 // contains the widget being created.
991 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
993 blink::WebPopupType
/* popup type */,
995 int32
/* surface_id */)
997 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
999 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1000 int /* opener_id */,
1002 int32
/* surface_id */)
1004 // Asks the browser for a unique routing ID.
1005 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
1006 int /* routing_id */)
1008 // Asks the browser for the default audio hardware configuration.
1009 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig
,
1010 media::AudioParameters
/* input parameters */,
1011 media::AudioParameters
/* output parameters */)
1013 // These three messages are sent to the parent RenderViewHost to display the
1014 // page/widget that was created by
1015 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1016 // refers to the id that was returned from the Create message above.
1017 // The initial_rect parameter is in screen coordinates.
1019 // FUTURE: there will probably be flags here to control if the result is
1021 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1023 WindowOpenDisposition
/* disposition */,
1024 gfx::Rect
/* initial_rect */,
1025 bool /* opened_by_user_gesture */)
1027 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1029 gfx::Rect
/* initial_rect */)
1031 // Message to show a full screen widget.
1032 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1035 // Indicates the renderer is ready in response to a ViewMsg_New or
1036 // a ViewMsg_CreatingNew_ACK.
1037 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1039 // Sent by the renderer process to request that the browser close the view.
1040 // This corresponds to the window.close() API, and the browser may ignore
1041 // this message. Otherwise, the browser will generates a ViewMsg_Close
1042 // message to close the view.
1043 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1045 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1046 // throttle these messages.
1047 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1049 // Sent by the renderer process to request that the browser move the view.
1050 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1051 // the browser may ignore this message.
1052 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1053 gfx::Rect
/* position */)
1055 // Result of string search in the page.
1056 // Response to ViewMsg_Find with the results of the requested find-in-page
1057 // search, the number of matches found and the selection rect (in screen
1058 // coordinates) for the string found. If |final_update| is false, it signals
1059 // that this is not the last Find_Reply message - more will be sent as the
1060 // scoping effort continues.
1061 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1062 int /* request_id */,
1063 int /* number of matches */,
1064 gfx::Rect
/* selection_rect */,
1065 int /* active_match_ordinal */,
1066 bool /* final_update */)
1068 // Indicates that the render view has been closed in respose to a
1070 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK
,
1071 int /* old_route_id */)
1073 // Indicates that the current page has been closed, after a ClosePage
1075 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1077 // Notifies the browser that we have session history information.
1078 // page_id: unique ID that allows us to distinguish between history entries.
1079 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1080 int32
/* page_id */,
1081 content::PageState
/* state */)
1083 // Notifies the browser that we want to show a destination url for a potential
1084 // action (e.g. when the user is hovering over a link).
1085 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL
,
1088 // Sent when the document element is available for the top-level frame. This
1089 // happens after the page starts loading, but before all resources are
1091 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame
,
1092 bool /* uses_temporary_zoom_level */)
1094 // Sent to update part of the view. In response to this message, the host
1095 // generates a ViewMsg_UpdateRect_ACK message.
1096 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1097 ViewHostMsg_UpdateRect_Params
)
1099 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1100 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1102 // Message sent from renderer to the browser when focus changes inside the
1103 // webpage. The first parameter says whether the newly focused element needs
1104 // keyboard input (true for textfields, text areas and content editable divs).
1105 // The second parameter is the node bounds relative to RenderWidgetHostView.
1106 IPC_MESSAGE_ROUTED2(ViewHostMsg_FocusedNodeChanged
,
1107 bool /* is_editable_node */,
1108 gfx::Rect
/* node_bounds */)
1110 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
, content::WebCursor
)
1113 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1114 gfx::NativeViewId
/* dummy_activation_window */)
1116 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1117 gfx::NativeViewId
/* dummy_activation_window */)
1120 // Get the list of proxies to use for |url|, as a semicolon delimited list
1121 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1122 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1125 std::string
/* proxy list */)
1127 // A renderer sends this to the browser process when it wants to create a
1128 // worker. The browser will create the worker process if necessary, and
1129 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1130 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1131 ViewHostMsg_CreateWorker_Params
,
1134 // A renderer sends this to the browser process when a document has been
1135 // detached. The browser will use this to constrain the lifecycle of worker
1136 // processes (SharedWorkers are shut down when their last associated document
1138 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1139 uint64
/* document_id */)
1141 // Wraps an IPC message that's destined to the worker on the renderer->browser
1143 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1144 IPC::Message
/* message */)
1146 // Tells the browser that a specific Appcache manifest in the current page
1148 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1149 GURL
/* manifest url */,
1150 bool /* blocked by policy */)
1152 // Initiates a download based on user actions like 'ALT+click'.
1153 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl
,
1154 int /* render_view_id */,
1155 int /* render_frame_id */,
1157 content::Referrer
/* referrer */,
1158 base::string16
/* suggested_name */)
1160 // Used to go to the session history entry at the given offset (ie, -1 will
1161 // return the "back" item).
1162 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1163 int /* offset (from current) of history item to get */)
1165 // Sent from an inactive renderer for the browser to route to the active
1166 // renderer, instructing it to close.
1167 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1169 // Notifies that the preferred size of the content changed.
1170 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1171 gfx::Size
/* pref_size */)
1173 // Notifies whether there are JavaScript touch event handlers or not.
1174 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers
,
1175 bool /* has_handlers */)
1177 // A message from HTML-based UI. When (trusted) Javascript calls
1178 // send(message, args), this message is sent to the browser.
1179 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend
,
1180 GURL
/* source_url */,
1181 std::string
/* message */,
1182 base::ListValue
/* args */)
1184 #if defined(ENABLE_PLUGINS)
1185 // A renderer sends this to the browser process when it wants to access a PPAPI
1186 // broker. In contrast to FrameHostMsg_OpenChannelToPpapiBroker, this is called
1187 // for every connection.
1188 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1189 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission
,
1190 int /* routing_id */,
1191 GURL
/* document_url */,
1192 base::FilePath
/* plugin_path */)
1193 #endif // defined(ENABLE_PLUGINS)
1195 // Send the tooltip text for the current mouse position to the browser.
1196 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText
,
1197 base::string16
/* tooltip text string */,
1198 blink::WebTextDirection
/* text direction hint */)
1200 // Notification that the text selection has changed.
1201 // Note: The secound parameter is the character based offset of the
1203 // text in the document.
1204 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged
,
1205 base::string16
/* text covers the selection range */,
1206 size_t /* the offset of the text in the document */,
1207 gfx::Range
/* selection range in the document */)
1209 // Notification that the selection bounds have changed.
1210 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged
,
1211 ViewHostMsg_SelectionBounds_Params
)
1213 // Asks the browser to display the file chooser. The result is returned in a
1214 // ViewMsg_RunFileChooserResponse message.
1215 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
1216 content::FileChooserParams
)
1218 // Asks the browser to enumerate a directory. This is equivalent to running
1219 // the file chooser in directory-enumeration mode and having the user select
1220 // the given directory. The result is returned in a
1221 // ViewMsg_EnumerateDirectoryResponse message.
1222 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
1223 int /* request_id */,
1224 base::FilePath
/* file_path */)
1226 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1227 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1228 // a string only to work around size limitations for GURLs in IPC messages.
1229 IPC_MESSAGE_CONTROL3(ViewHostMsg_SaveImageFromDataURL
,
1230 int /* render_view_id */,
1231 int /* render_frame_id */,
1232 std::string
/* data_url */)
1234 // Tells the browser to move the focus to the next (previous if reverse is
1235 // true) focusable element.
1236 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
1239 // Required for opening a date/time dialog
1240 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog
,
1241 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
1243 // Required for updating text input state.
1244 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
1245 ViewHostMsg_TextInputState_Params
/* input state params */)
1247 // Sent when the renderer changes the zoom level for a particular url, so the
1248 // browser can update its records. If the view is a plugin doc, then url is
1249 // used to update the zoom level for all pages in that site. Otherwise, the
1250 // render view's id is used so that only the menu is updated.
1251 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL
,
1252 double /* zoom_level */,
1255 // Sent when the renderer changes its page scale factor and whether or not the
1256 // page scale factor is one changes.
1257 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageScaleFactorIsOneChanged
, bool /* is_one */)
1259 // Updates the minimum/maximum allowed zoom percent for this tab from the
1260 // default values. If |remember| is true, then the zoom setting is applied to
1261 // other pages in the site and is saved, otherwise it only applies to this
1263 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits
,
1264 int /* minimum_percent */,
1265 int /* maximum_percent */)
1267 IPC_MESSAGE_ROUTED3(
1268 ViewHostMsg_SwapCompositorFrame
,
1269 uint32
/* output_surface_id */,
1270 cc::CompositorFrame
/* frame */,
1271 std::vector
<IPC::Message
> /* messages_to_deliver_with_frame */)
1273 // Send back a string to be recorded by UserMetrics.
1274 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
1275 std::string
/* action */)
1277 // Notifies the browser that the page was or was not saved as MHTML.
1278 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
1280 int64
/* size of the MHTML file, -1 if error */)
1282 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
1283 GURL
/* frame's url */,
1284 std::string
/* data buffer */,
1285 int32
/* complete status */)
1287 // Notifies the browser of an event occurring in the media pipeline.
1288 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents
,
1289 std::vector
<media::MediaLogEvent
> /* events */)
1291 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1293 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1294 // pop up a bubble to ask for user permission or take mouse lock content into
1296 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
1297 bool /* user_gesture */,
1298 bool /* last_unlocked_by_target */,
1299 bool /* privileged */)
1301 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1302 // whenever the mouse is unlocked (which may or may not be caused by
1303 // ViewHostMsg_UnlockMouse).
1304 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
1306 // Notifies that multiple touch targets may have been pressed, and to show
1307 // the disambiguation popup.
1308 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
1309 gfx::Rect
, /* Border of touched targets */
1310 gfx::Size
, /* Size of zoomed image */
1311 cc::SharedBitmapId
/* id */)
1313 // Notifies the browser that document has parsed the body. This is used by the
1314 // ResourceScheduler as an indication that bandwidth contention won't block
1316 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody
)
1318 // Notification that the urls for the favicon of a site has been determined.
1319 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL
,
1320 std::vector
<content::FaviconURL
> /* candidates */)
1322 // Message sent from renderer to the browser when the element that is focused
1323 // has been touched. A bool is passed in this message which indicates if the
1324 // node is editable.
1325 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched
,
1326 bool /* editable */)
1328 // Message sent from the renderer to the browser when an HTML form has failed
1329 // validation constraints.
1330 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage
,
1331 gfx::Rect
/* anchor rectangle in root view coordinate */,
1332 base::string16
/* validation message */,
1333 base::string16
/* supplemental text */)
1335 // Message sent from the renderer to the browser when a HTML form validation
1336 // message should be hidden from view.
1337 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage
)
1339 // Message sent from the renderer to the browser when the suggested co-ordinates
1340 // of the anchor for a HTML form validation message have changed.
1341 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage
,
1342 gfx::Rect
/* anchor rectangle in root view coordinate */)
1344 // Sent once a paint happens after the first non empty layout. In other words,
1345 // after the frame widget has painted something.
1346 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint
)
1348 #if defined(OS_ANDROID)
1349 // Response to ViewMsg_FindMatchRects.
1351 // |version| will contain the current version number of the renderer's find
1352 // match list (incremented whenever they change), which should be passed in the
1353 // next call to ViewMsg_FindMatchRects.
1355 // |rects| will either contain a list of the enclosing rects of all matches
1356 // found by the most recent Find operation, or will be empty if |version| is not
1357 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1358 // your locally cached rects should still be valid). The rect coords will be
1359 // custom normalized fractions of the document size. The rects will be sorted by
1360 // frame traversal order starting in the main frame, then by dom order.
1362 // |active_rect| will contain the bounding box of the active find-in-page match
1363 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1364 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
1366 std::vector
<gfx::RectF
> /* rects */,
1367 gfx::RectF
/* active_rect */)
1369 // Start an android intent with the given URI.
1370 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
1371 GURL
/* content_url */)
1373 // This message runs the MediaCodec for decoding audio for webaudio.
1374 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec
,
1375 base::SharedMemoryHandle
/* encoded_data_handle */,
1376 base::FileDescriptor
/* pcm_output */,
1377 uint32_t /* data_size*/)
1379 // Reply to the ViewMsg_ExtractSmartClipData message.
1380 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted
,
1381 base::string16
/* text */,
1382 base::string16
/* html */,
1383 gfx::Rect
/* rect */)
1385 // Notifies that an unhandled tap has occurred at the specified x,y position
1386 // and that the UI may need to be triggered.
1387 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowUnhandledTapUIIfNeeded
,
1391 #elif defined(OS_MACOSX)
1392 // Informs the browser that a plugin has gained or lost focus.
1393 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
1395 int /* plugin_id */)
1397 // Instructs the browser to start plugin IME.
1398 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
1400 // Receives content of a web page as plain text.
1401 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted
, std::string
);
1404 // Adding a new message? Stick to the sort order above: first platform
1405 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1406 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.