cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / content / common / view_messages.h
blob4b6e69c6c34cbeca9d5c844448cd507dad4f9401
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/web/mac/WebScrollbarTheme.h"
68 #endif
70 #undef IPC_MESSAGE_EXPORT
71 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
73 #define IPC_MESSAGE_START ViewMsgStart
75 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDeviceEmulationParams::ScreenPosition,
76 blink::WebDeviceEmulationParams::ScreenPositionLast)
77 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type,
78 blink::WebMediaPlayerAction::Type::TypeLast)
79 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type,
80 blink::WebPluginAction::Type::TypeLast)
81 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType,
82 blink::WebPopupType::WebPopupTypeLast)
83 // TODO(dcheng): Update WebScreenOrientationType to have a "Last" enum member.
84 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationType,
85 blink::WebScreenOrientationUndefined,
86 blink::WebScreenOrientationLandscapeSecondary)
87 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection,
88 blink::WebTextDirection::WebTextDirectionLast)
89 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDisplayMode,
90 blink::WebDisplayMode::WebDisplayModeLast)
91 IPC_ENUM_TRAITS_MAX_VALUE(WindowContainerType, WINDOW_CONTAINER_TYPE_MAX_VALUE)
92 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
93 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
94 IPC_ENUM_TRAITS(content::MenuItem::Type)
95 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture,
96 content::NavigationGestureLast)
97 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom,
98 content::PageZoom::PAGE_ZOOM_OUT,
99 content::PageZoom::PAGE_ZOOM_IN)
100 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting,
101 gfx::FontRenderParams::HINTING_MAX)
102 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering,
103 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX)
104 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
105 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
106 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
107 content::STOP_FIND_ACTION_LAST)
108 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
109 content::THREE_D_API_TYPE_LAST)
110 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
111 media::MediaLogEvent::TYPE_LAST)
112 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
113 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputType, ui::TEXT_INPUT_TYPE_MAX)
115 #if defined(OS_MACOSX)
116 IPC_ENUM_TRAITS_MAX_VALUE(
117 blink::ScrollbarButtonsPlacement,
118 blink::ScrollbarButtonsPlacement::ScrollbarButtonsPlacementLast)
120 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
121 #endif
123 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
124 IPC_STRUCT_TRAITS_MEMBER(forward)
125 IPC_STRUCT_TRAITS_MEMBER(matchCase)
126 IPC_STRUCT_TRAITS_MEMBER(findNext)
127 IPC_STRUCT_TRAITS_END()
129 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
130 IPC_STRUCT_TRAITS_MEMBER(type)
131 IPC_STRUCT_TRAITS_MEMBER(enable)
132 IPC_STRUCT_TRAITS_END()
134 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
135 IPC_STRUCT_TRAITS_MEMBER(type)
136 IPC_STRUCT_TRAITS_MEMBER(enable)
137 IPC_STRUCT_TRAITS_END()
139 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
140 IPC_STRUCT_TRAITS_MEMBER(x)
141 IPC_STRUCT_TRAITS_MEMBER(y)
142 IPC_STRUCT_TRAITS_END()
144 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
145 IPC_STRUCT_TRAITS_MEMBER(x)
146 IPC_STRUCT_TRAITS_MEMBER(y)
147 IPC_STRUCT_TRAITS_MEMBER(width)
148 IPC_STRUCT_TRAITS_MEMBER(height)
149 IPC_STRUCT_TRAITS_END()
151 IPC_STRUCT_TRAITS_BEGIN(blink::WebSize)
152 IPC_STRUCT_TRAITS_MEMBER(width)
153 IPC_STRUCT_TRAITS_MEMBER(height)
154 IPC_STRUCT_TRAITS_END()
156 IPC_STRUCT_TRAITS_BEGIN(blink::WebDeviceEmulationParams)
157 IPC_STRUCT_TRAITS_MEMBER(screenPosition)
158 IPC_STRUCT_TRAITS_MEMBER(screenSize)
159 IPC_STRUCT_TRAITS_MEMBER(viewPosition)
160 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
161 IPC_STRUCT_TRAITS_MEMBER(viewSize)
162 IPC_STRUCT_TRAITS_MEMBER(fitToView)
163 IPC_STRUCT_TRAITS_MEMBER(offset)
164 IPC_STRUCT_TRAITS_MEMBER(scale)
165 IPC_STRUCT_TRAITS_END()
167 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
168 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
169 IPC_STRUCT_TRAITS_MEMBER(depth)
170 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
171 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
172 IPC_STRUCT_TRAITS_MEMBER(rect)
173 IPC_STRUCT_TRAITS_MEMBER(availableRect)
174 IPC_STRUCT_TRAITS_MEMBER(orientationType)
175 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
176 IPC_STRUCT_TRAITS_END()
178 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
179 IPC_STRUCT_TRAITS_MEMBER(label)
180 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
181 IPC_STRUCT_TRAITS_MEMBER(type)
182 IPC_STRUCT_TRAITS_MEMBER(action)
183 IPC_STRUCT_TRAITS_MEMBER(rtl)
184 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
185 IPC_STRUCT_TRAITS_MEMBER(enabled)
186 IPC_STRUCT_TRAITS_MEMBER(checked)
187 IPC_STRUCT_TRAITS_MEMBER(submenu)
188 IPC_STRUCT_TRAITS_END()
190 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
191 IPC_STRUCT_TRAITS_MEMBER(value)
192 IPC_STRUCT_TRAITS_MEMBER(localized_value)
193 IPC_STRUCT_TRAITS_MEMBER(label)
194 IPC_STRUCT_TRAITS_END()
196 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
197 IPC_STRUCT_TRAITS_MEMBER(icon_url)
198 IPC_STRUCT_TRAITS_MEMBER(icon_type)
199 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
200 IPC_STRUCT_TRAITS_END()
202 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
203 IPC_STRUCT_TRAITS_MEMBER(file_path)
204 IPC_STRUCT_TRAITS_MEMBER(display_name)
205 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
206 IPC_STRUCT_TRAITS_MEMBER(modification_time)
207 IPC_STRUCT_TRAITS_MEMBER(length)
208 IPC_STRUCT_TRAITS_MEMBER(is_directory)
209 IPC_STRUCT_TRAITS_END()
211 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
212 IPC_STRUCT_TRAITS_MEMBER(mode)
213 IPC_STRUCT_TRAITS_MEMBER(title)
214 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
215 IPC_STRUCT_TRAITS_MEMBER(accept_types)
216 IPC_STRUCT_TRAITS_MEMBER(need_local_path)
217 #if defined(OS_ANDROID)
218 IPC_STRUCT_TRAITS_MEMBER(capture)
219 #endif
220 IPC_STRUCT_TRAITS_END()
222 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
223 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
224 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
225 IPC_STRUCT_TRAITS_MEMBER(hinting)
226 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
227 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
228 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
229 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
230 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
231 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
232 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
233 IPC_STRUCT_TRAITS_MEMBER(track_color)
234 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
235 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
236 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
237 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
238 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
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)
256 #if defined(OS_WIN)
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)
271 #endif
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
328 // sepcified).
329 IPC_STRUCT_MEMBER(GURL, target_url)
331 // The referrer that will be used to load |target_url| (empty if none has
332 // been specified).
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
340 // over IPC.
341 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
342 IPC_STRUCT_END()
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)
362 IPC_STRUCT_END()
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)
371 IPC_STRUCT_END()
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)
379 IPC_STRUCT_END()
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)
418 IPC_STRUCT_END()
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
425 // view size.
426 IPC_STRUCT_MEMBER(gfx::Size, view_size)
428 // New window locations for plugin child windows.
429 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
430 plugin_window_moves)
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
443 // request messages.
444 IPC_STRUCT_MEMBER(int, flags)
445 IPC_STRUCT_END()
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
458 // isn't supported).
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)
464 // The resizer rect.
465 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
466 // Indicates whether tab-initiated fullscreen was granted.
467 IPC_STRUCT_MEMBER(bool, is_fullscreen_granted)
468 // The display mode.
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)
473 IPC_STRUCT_END()
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
504 // cases.
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)
536 IPC_STRUCT_END()
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)
547 IPC_STRUCT_END()
548 #endif
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 */)
560 #endif
562 // Get all savable resource links from current webpage, include main
563 // frame and sub-frame.
564 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
565 GURL /* url of page which is needed to save */)
567 // Get html data by serializing all frames of current page with lists
568 // which contain all resource links that have local copy.
569 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
570 std::vector<GURL> /* urls that have local copy */,
571 std::vector<base::FilePath> /* paths of local copy */,
572 base::FilePath /* local directory path */)
574 // Tells the render side that a ViewHostMsg_LockMouse message has been
575 // processed. |succeeded| indicates whether the mouse has been successfully
576 // locked or not.
577 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
578 bool /* succeeded */)
579 // Tells the render side that the mouse has been unlocked.
580 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
582 // Sent by the browser when the parameters for vsync alignment have changed.
583 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
584 base::TimeTicks /* timebase */,
585 base::TimeDelta /* interval */)
587 // Sent when the history is altered outside of navigation. The history list was
588 // reset to |history_length| length, and the offset was reset to be
589 // |history_offset|.
590 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryOffsetAndLength,
591 int /* history_offset */,
592 int /* history_length */)
594 // Tells the renderer to create a new view.
595 // This message is slightly different, the view it takes (via
596 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
597 // non-view control message.
598 IPC_MESSAGE_CONTROL1(ViewMsg_New,
599 ViewMsg_New_Params)
601 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
602 // similar to the new command, but used when the renderer created a view
603 // first, and we need to update it.
604 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
606 // Sends updated preferences to the renderer.
607 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
608 content::RendererPreferences)
610 // This passes a set of webkit preferences down to the renderer.
611 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
612 content::WebPreferences)
614 // Informs the renderer that the timezone has changed along with a new
615 // timezone ID.
616 IPC_MESSAGE_CONTROL1(ViewMsg_TimezoneChange, std::string)
618 // Tells the render view to close.
619 // Expects a Close_ACK message when finished.
620 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
622 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
623 // is generated in response provided new_size is not empty and not equal to
624 // the view's current size. The generated ViewHostMsg_UpdateRect message will
625 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
626 // we don't have to fetch it every time WebKit asks for it.
627 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
628 ViewMsg_Resize_Params /* params */)
630 // Enables device emulation. See WebDeviceEmulationParams for description.
631 IPC_MESSAGE_ROUTED1(ViewMsg_EnableDeviceEmulation,
632 blink::WebDeviceEmulationParams /* params */)
634 // Disables device emulation, enabled previously by EnableDeviceEmulation.
635 IPC_MESSAGE_ROUTED0(ViewMsg_DisableDeviceEmulation)
637 // Sent to inform the renderer of its screen device color profile. An empty
638 // profile tells the renderer use the default sRGB color profile.
639 IPC_MESSAGE_ROUTED1(ViewMsg_ColorProfile,
640 std::vector<char> /* color profile */)
642 // Tells the render view that the resize rect has changed.
643 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
644 gfx::Rect /* resizer_rect */)
646 // Sent to inform the view that it was hidden. This allows it to reduce its
647 // resource utilization.
648 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
650 // Tells the render view that it is no longer hidden (see WasHidden), and the
651 // render view is expected to respond with a full repaint if needs_repainting
652 // is true. If needs_repainting is false, then this message does not trigger a
653 // message in response.
654 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown,
655 bool /* needs_repainting */,
656 ui::LatencyInfo /* latency_info */)
658 // Tells the renderer to focus the first (last if reverse is true) focusable
659 // node.
660 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
661 bool /* reverse */)
663 // Sent to inform the renderer to invoke a context menu.
664 // The parameter specifies the location in the render view's coordinates.
665 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
666 ui::MenuSourceType,
667 gfx::Point /* location where menu should be shown */)
669 // Sent when the user wants to search for a word on the page (find in page).
670 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
671 int /* request_id */,
672 base::string16 /* search_text */,
673 blink::WebFindOptions)
675 // This message notifies the renderer that the user has closed the FindInPage
676 // window (and what action to take regarding the selection).
677 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
678 content::StopFindAction /* action */)
680 // Copies the image at location x, y to the clipboard (if there indeed is an
681 // image at that location).
682 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
683 int /* x */,
684 int /* y */)
686 // Saves the image at location x, y to the disk (if there indeed is an
687 // image at that location).
688 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
689 int /* x */,
690 int /* y */)
692 // Tells the renderer to perform the given action on the media player
693 // located at the given point.
694 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
695 gfx::Point, /* location */
696 blink::WebMediaPlayerAction)
698 // Tells the renderer to perform the given action on the plugin located at
699 // the given point.
700 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
701 gfx::Point, /* location */
702 blink::WebPluginAction)
704 // Resets the page scale for the current main frame to the default page scale.
705 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageScale)
707 // Change the zoom level for the current main frame. If the level actually
708 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
709 // telling it what url got zoomed and what its current zoom level is.
710 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
711 content::PageZoom /* function */)
713 // Set the zoom level for a particular url that the renderer is in the
714 // process of loading. This will be stored, to be used if the load commits
715 // and ignored otherwise.
716 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
717 GURL /* url */,
718 double /* zoom_level */)
720 // Set the zoom level for a particular url, so all render views
721 // displaying this url can update their zoom levels to match.
722 // If scheme is empty, then only host is used for matching.
723 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
724 std::string /* scheme */,
725 std::string /* host */,
726 double /* zoom_level */)
728 // Set the zoom level for a particular render view.
729 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
730 bool /* uses_temporary_zoom_level */,
731 double /* zoom_level */)
733 // Change encoding of page in the renderer.
734 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
735 std::string /*new encoding name*/)
737 // Reset encoding of page in the renderer back to default.
738 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
740 // Used to tell a render view whether it should expose various bindings
741 // that allow JS content extended privileges. See BindingsPolicy for valid
742 // flag values.
743 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
744 int /* enabled_bindings_flags */)
746 // Tell the renderer to add a property to the WebUI binding object. This
747 // only works if we allowed WebUI bindings.
748 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
749 std::string /* property_name */,
750 std::string /* property_value_json */)
752 // Used to notify the render-view that we have received a target URL. Used
753 // to prevent target URLs spamming the browser.
754 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
756 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
757 std::vector<content::FileChooserFileInfo>)
759 // Provides the results of directory enumeration.
760 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
761 int /* request_id */,
762 std::vector<base::FilePath> /* files_in_directory */)
764 // Tells the renderer to suppress any further modal dialogs until it receives a
765 // corresponding ViewMsg_SwapOut message. This ensures that no
766 // PageGroupLoadDeferrer is on the stack for SwapOut.
767 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
769 // Instructs the renderer to close the current page, including running the
770 // onunload event handler.
772 // Expects a ClosePage_ACK message when finished.
773 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
775 // Notifies the renderer about ui theme changes
776 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
778 // Notifies the renderer that a paint is to be generated for the rectangle
779 // passed in.
780 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
781 gfx::Size /* The view size to be repainted */)
783 // Notification that a move or resize renderer's containing window has
784 // started.
785 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
787 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
788 gfx::Rect /* view_screen_rect */,
789 gfx::Rect /* window_screen_rect */)
791 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
792 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
793 // processed the move. The browser may have ignored the move, but it finished
794 // processing. This is used because the renderer keeps a temporary cache of
795 // the widget position while these asynchronous operations are in progress.
796 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
798 // Used to instruct the RenderView to send back updates to the preferred size.
799 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
801 // Used to instruct the RenderView to automatically resize and send back
802 // updates for the new size.
803 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
804 gfx::Size /* min_size */,
805 gfx::Size /* max_size */)
807 // Used to instruct the RenderView to disalbe automatically resize.
808 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
809 gfx::Size /* new_size */)
811 // Changes the text direction of the currently selected input field (if any).
812 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
813 blink::WebTextDirection /* direction */)
815 // Tells the renderer to clear the focused element (if any).
816 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
818 // Make the RenderView background transparent or opaque.
819 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
821 // Used to tell the renderer not to add scrollbars with height and
822 // width below a threshold.
823 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
824 gfx::Size /* disable_scrollbar_size_limit */)
826 // Activate/deactivate the RenderView (i.e., set its controls' tint
827 // accordingly, etc.).
828 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
829 bool /* active */)
831 // Response message to ViewHostMsg_CreateWorker.
832 // Sent when the worker has started.
833 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
835 // Sent when the worker failed to load the worker script.
836 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
837 // But if the shared worker of the same URL already exists and it has failed
838 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
839 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
840 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
842 // Sent when the worker has connected.
843 // This message is sent only if the worker successfully loaded the script.
844 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
846 // Tells the renderer that the network type has changed so that navigator.onLine
847 // and navigator.connection can be updated.
848 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
849 net::NetworkChangeNotifier::ConnectionType /* type */)
851 #if defined(ENABLE_PLUGINS)
852 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
853 // Tells the renderer that the channel to the broker has been created.
854 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
855 base::ProcessId /* broker_pid */,
856 IPC::ChannelHandle /* handle */)
858 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
859 // Tells the renderer whether permission to access to PPAPI broker was granted
860 // or not.
861 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
862 bool /* result */)
864 // Tells the renderer to empty its plugin list cache, optional reloading
865 // pages containing plugins.
866 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
867 bool /* reload_pages */)
868 #endif
870 // Used to instruct the RenderView to go into "view source" mode.
871 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
873 // Instructs the renderer to save the current page to MHTML.
874 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
875 int /* job_id */,
876 IPC::PlatformFileForTransit /* file handle */)
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 // Fetches complete rendered content of a web page as plain text.
884 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
886 #if defined(OS_MACOSX)
887 // Notification of a change in scrollbar appearance and/or behavior.
888 IPC_MESSAGE_CONTROL1(ViewMsg_UpdateScrollbarTheme,
889 ViewMsg_UpdateScrollbarTheme_Params /* params */)
890 #endif
892 #if defined(OS_ANDROID)
893 // Tells the renderer to suspend/resume the webkit timers.
894 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
895 bool /* suspend */)
897 // Sent when the browser wants the bounding boxes of the current find matches.
899 // If match rects are already cached on the browser side, |current_version|
900 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
901 // they came in, so the renderer can tell if it needs to send updated rects.
902 // Otherwise just pass -1 to always receive the list of rects.
904 // There must be an active search string (it is probably most useful to call
905 // this immediately after a ViewHostMsg_Find_Reply message arrives with
906 // final_update set to true).
907 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
908 int /* current_version */)
910 // Notifies the renderer whether hiding/showing the top controls is enabled
911 // and whether or not to animate to the proper state.
912 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
913 bool /* enable_hiding */,
914 bool /* enable_showing */,
915 bool /* animate */)
917 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
919 // Extracts the data at the given rect, returning it through the
920 // ViewHostMsg_SmartClipDataExtracted IPC.
921 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
922 gfx::Rect /* rect */)
924 #elif defined(OS_MACOSX)
925 // Let the RenderView know its window has changed visibility.
926 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
927 bool /* visibile */)
929 // Let the RenderView know its window's frame has changed.
930 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
931 gfx::Rect /* window frame */,
932 gfx::Rect /* content view frame */)
934 // Message sent from the browser to the renderer when the user starts or stops
935 // resizing the view.
936 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
937 bool /* enable */)
939 // Tell the renderer that plugin IME has completed.
940 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
941 base::string16 /* text */,
942 int /* plugin_id */)
943 #endif
945 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
946 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
947 uint32 /* output_surface_id */,
948 cc::CompositorFrameAck /* ack */)
950 // Sent by browser to tell renderer compositor that some resources that were
951 // given to the browser in a swap are not being used anymore.
952 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
953 uint32 /* output_surface_id */,
954 cc::CompositorFrameAck /* ack */)
956 // Sent by browser to give renderer compositor a new namespace ID for any
957 // SurfaceSequences it has to create.
958 IPC_MESSAGE_ROUTED1(ViewMsg_SetSurfaceIdNamespace,
959 uint32_t /* surface_id_namespace */)
961 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
963 // Sent by the browser to ask the renderer to redraw.
964 // If |request_id| is not zero, it is added to the forced frame's latency info
965 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
966 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
967 int /* request_id */)
969 // Sent by the browser when the renderer should generate a new frame.
970 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
971 cc::BeginFrameArgs /* args */)
973 // -----------------------------------------------------------------------------
974 // Messages sent from the renderer to the browser.
976 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
977 // display events. If |enabled| is true, the BeginFrame message will continue
978 // to be be delivered until the notification is disabled.
979 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrames,
980 bool /* enabled */)
982 // Sent by the renderer when it is creating a new window. The browser creates
983 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
984 // MSG_ROUTING_NONE, the view couldn't be created.
985 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
986 ViewHostMsg_CreateWindow_Params,
987 int /* route_id */,
988 int /* main_frame_route_id */,
989 int32 /* surface_id */,
990 int64 /* cloned_session_storage_namespace_id */)
992 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
993 // <select> dropdowns. This message is sent to the WebContentsImpl that
994 // contains the widget being created.
995 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
996 int /* opener_id */,
997 blink::WebPopupType /* popup type */,
998 int /* route_id */,
999 int32 /* surface_id */)
1001 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1002 // window.
1003 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1004 int /* opener_id */,
1005 int /* route_id */,
1006 int32 /* surface_id */)
1008 // Asks the browser for a unique routing ID.
1009 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1010 int /* routing_id */)
1012 // Asks the browser for the default audio hardware configuration.
1013 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1014 media::AudioParameters /* input parameters */,
1015 media::AudioParameters /* output parameters */)
1017 // Asks the browser for the renderer process memory size stats.
1018 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1019 size_t /* private_bytes */,
1020 size_t /* shared_bytes */)
1022 // These three messages are sent to the parent RenderViewHost to display the
1023 // page/widget that was created by
1024 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1025 // refers to the id that was returned from the Create message above.
1026 // The initial_rect parameter is in screen coordinates.
1028 // FUTURE: there will probably be flags here to control if the result is
1029 // in a new window.
1030 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1031 int /* route_id */,
1032 WindowOpenDisposition /* disposition */,
1033 gfx::Rect /* initial_rect */,
1034 bool /* opened_by_user_gesture */)
1036 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1037 int /* route_id */,
1038 gfx::Rect /* initial_rect */)
1040 // Message to show a full screen widget.
1041 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1042 int /* route_id */)
1044 // Indicates the renderer is ready in response to a ViewMsg_New or
1045 // a ViewMsg_CreatingNew_ACK.
1046 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1048 // Sent by the renderer process to request that the browser close the view.
1049 // This corresponds to the window.close() API, and the browser may ignore
1050 // this message. Otherwise, the browser will generates a ViewMsg_Close
1051 // message to close the view.
1052 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1054 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1055 // throttle these messages.
1056 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1058 // Sent by the renderer process to request that the browser move the view.
1059 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1060 // the browser may ignore this message.
1061 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1062 gfx::Rect /* position */)
1064 // Result of string search in the page.
1065 // Response to ViewMsg_Find with the results of the requested find-in-page
1066 // search, the number of matches found and the selection rect (in screen
1067 // coordinates) for the string found. If |final_update| is false, it signals
1068 // that this is not the last Find_Reply message - more will be sent as the
1069 // scoping effort continues.
1070 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1071 int /* request_id */,
1072 int /* number of matches */,
1073 gfx::Rect /* selection_rect */,
1074 int /* active_match_ordinal */,
1075 bool /* final_update */)
1077 // Indicates that the render view has been closed in respose to a
1078 // Close message.
1079 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1080 int /* old_route_id */)
1082 // Indicates that the current page has been closed, after a ClosePage
1083 // message.
1084 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1086 // Notifies the browser that we have session history information.
1087 // page_id: unique ID that allows us to distinguish between history entries.
1088 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1089 int32 /* page_id */,
1090 content::PageState /* state */)
1092 // Notifies the browser that we want to show a destination url for a potential
1093 // action (e.g. when the user is hovering over a link).
1094 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL,
1095 GURL)
1097 // Sent when the document element is available for the top-level frame. This
1098 // happens after the page starts loading, but before all resources are
1099 // finished.
1100 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1101 bool /* uses_temporary_zoom_level */)
1103 // Sent to update part of the view. In response to this message, the host
1104 // generates a ViewMsg_UpdateRect_ACK message.
1105 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1106 ViewHostMsg_UpdateRect_Params)
1108 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1109 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1111 // Message sent from renderer to the browser when focus changes inside the
1112 // webpage. The first parameter says whether the newly focused element needs
1113 // keyboard input (true for textfields, text areas and content editable divs).
1114 // The second parameter is the node bounds relative to RenderWidgetHostView.
1115 IPC_MESSAGE_ROUTED2(ViewHostMsg_FocusedNodeChanged,
1116 bool /* is_editable_node */,
1117 gfx::Rect /* node_bounds */)
1119 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1121 #if defined(OS_WIN)
1122 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1123 gfx::NativeViewId /* dummy_activation_window */)
1125 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1126 gfx::NativeViewId /* dummy_activation_window */)
1128 // Asks the browser for the user's monitor profile.
1129 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1130 std::vector<char> /* profile */)
1131 #endif
1133 // Get the list of proxies to use for |url|, as a semicolon delimited list
1134 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1135 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1136 GURL /* url */,
1137 bool /* result */,
1138 std::string /* proxy list */)
1140 // A renderer sends this to the browser process when it wants to create a
1141 // worker. The browser will create the worker process if necessary, and
1142 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1143 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1144 ViewHostMsg_CreateWorker_Params,
1145 int /* route_id */)
1147 // A renderer sends this to the browser process when a document has been
1148 // detached. The browser will use this to constrain the lifecycle of worker
1149 // processes (SharedWorkers are shut down when their last associated document
1150 // is detached).
1151 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1152 uint64 /* document_id */)
1154 // Wraps an IPC message that's destined to the worker on the renderer->browser
1155 // hop.
1156 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1157 IPC::Message /* message */)
1159 // Tells the browser that a specific Appcache manifest in the current page
1160 // was accessed.
1161 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1162 GURL /* manifest url */,
1163 bool /* blocked by policy */)
1165 // Initiates a download based on user actions like 'ALT+click'.
1166 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl,
1167 int /* render_view_id */,
1168 int /* render_frame_id */,
1169 GURL /* url */,
1170 content::Referrer /* referrer */,
1171 base::string16 /* suggested_name */)
1173 // Used to go to the session history entry at the given offset (ie, -1 will
1174 // return the "back" item).
1175 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1176 int /* offset (from current) of history item to get */)
1178 // Sent from an inactive renderer for the browser to route to the active
1179 // renderer, instructing it to close.
1180 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1182 // Notifies that the preferred size of the content changed.
1183 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1184 gfx::Size /* pref_size */)
1186 // Notifies whether there are JavaScript touch event handlers or not.
1187 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1188 bool /* has_handlers */)
1190 // A message from HTML-based UI. When (trusted) Javascript calls
1191 // send(message, args), this message is sent to the browser.
1192 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1193 GURL /* source_url */,
1194 std::string /* message */,
1195 base::ListValue /* args */)
1197 #if defined(ENABLE_PLUGINS)
1198 // A renderer sends this to the browser process when it wants to access a PPAPI
1199 // broker. In contrast to FrameHostMsg_OpenChannelToPpapiBroker, this is called
1200 // for every connection.
1201 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1202 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1203 int /* routing_id */,
1204 GURL /* document_url */,
1205 base::FilePath /* plugin_path */)
1206 #endif // defined(ENABLE_PLUGINS)
1208 // Send the tooltip text for the current mouse position to the browser.
1209 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1210 base::string16 /* tooltip text string */,
1211 blink::WebTextDirection /* text direction hint */)
1213 // Notification that the text selection has changed.
1214 // Note: The secound parameter is the character based offset of the
1215 // base::string16
1216 // text in the document.
1217 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1218 base::string16 /* text covers the selection range */,
1219 size_t /* the offset of the text in the document */,
1220 gfx::Range /* selection range in the document */)
1222 // Notification that the selection bounds have changed.
1223 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1224 ViewHostMsg_SelectionBounds_Params)
1226 // Asks the browser to display the file chooser. The result is returned in a
1227 // ViewMsg_RunFileChooserResponse message.
1228 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1229 content::FileChooserParams)
1231 // Asks the browser to enumerate a directory. This is equivalent to running
1232 // the file chooser in directory-enumeration mode and having the user select
1233 // the given directory. The result is returned in a
1234 // ViewMsg_EnumerateDirectoryResponse message.
1235 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1236 int /* request_id */,
1237 base::FilePath /* file_path */)
1239 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1240 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1241 // a string only to work around size limitations for GURLs in IPC messages.
1242 IPC_MESSAGE_CONTROL3(ViewHostMsg_SaveImageFromDataURL,
1243 int /* render_view_id */,
1244 int /* render_frame_id */,
1245 std::string /* data_url */)
1247 // Tells the browser to move the focus to the next (previous if reverse is
1248 // true) focusable element.
1249 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1250 bool /* reverse */)
1252 // Required for opening a date/time dialog
1253 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1254 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1256 // Required for updating text input state.
1257 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1258 ViewHostMsg_TextInputState_Params /* input state params */)
1260 // Sent when the renderer changes the zoom level for a particular url, so the
1261 // browser can update its records. If the view is a plugin doc, then url is
1262 // used to update the zoom level for all pages in that site. Otherwise, the
1263 // render view's id is used so that only the menu is updated.
1264 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1265 double /* zoom_level */,
1266 GURL /* url */)
1268 // Sent when the renderer changes its page scale factor and whether or not the
1269 // page scale factor is one changes.
1270 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageScaleFactorIsOneChanged, bool /* is_one */)
1272 // Updates the minimum/maximum allowed zoom percent for this tab from the
1273 // default values. If |remember| is true, then the zoom setting is applied to
1274 // other pages in the site and is saved, otherwise it only applies to this
1275 // tab.
1276 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1277 int /* minimum_percent */,
1278 int /* maximum_percent */)
1280 // Notify the browser that this render process can or can't be suddenly
1281 // terminated.
1282 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1283 bool /* enabled */)
1285 IPC_MESSAGE_ROUTED3(
1286 ViewHostMsg_SwapCompositorFrame,
1287 uint32 /* output_surface_id */,
1288 cc::CompositorFrame /* frame */,
1289 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1291 // Message sent from the renderer to the browser to request that the browser
1292 // cache |data| associated with |url| and |expected_response_time|.
1293 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1294 GURL /* url */,
1295 base::Time /* expected_response_time */,
1296 std::vector<char> /* data */)
1298 // Send back a string to be recorded by UserMetrics.
1299 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1300 std::string /* action */)
1302 // Notifies the browser that the page was or was not saved as MHTML.
1303 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1304 int /* job_id */,
1305 int64 /* size of the MHTML file, -1 if error */)
1307 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1308 std::vector<GURL> /* all savable resource links */,
1309 std::vector<content::Referrer> /* all referrers */,
1310 std::vector<GURL> /* all frame links */)
1312 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1313 GURL /* frame's url */,
1314 std::string /* data buffer */,
1315 int32 /* complete status */)
1317 // Notifies the browser of an event occurring in the media pipeline.
1318 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1319 std::vector<media::MediaLogEvent> /* events */)
1321 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1322 // being sent back.
1323 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1324 // pop up a bubble to ask for user permission or take mouse lock content into
1325 // account.
1326 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1327 bool /* user_gesture */,
1328 bool /* last_unlocked_by_target */,
1329 bool /* privileged */)
1331 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1332 // whenever the mouse is unlocked (which may or may not be caused by
1333 // ViewHostMsg_UnlockMouse).
1334 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1336 // Notifies that multiple touch targets may have been pressed, and to show
1337 // the disambiguation popup.
1338 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1339 gfx::Rect, /* Border of touched targets */
1340 gfx::Size, /* Size of zoomed image */
1341 cc::SharedBitmapId /* id */)
1343 // Notifies the browser that document has parsed the body. This is used by the
1344 // ResourceScheduler as an indication that bandwidth contention won't block
1345 // first paint.
1346 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1348 // Notification that the urls for the favicon of a site has been determined.
1349 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1350 std::vector<content::FaviconURL> /* candidates */)
1352 // Message sent from renderer to the browser when the element that is focused
1353 // has been touched. A bool is passed in this message which indicates if the
1354 // node is editable.
1355 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1356 bool /* editable */)
1358 // Message sent from the renderer to the browser when an HTML form has failed
1359 // validation constraints.
1360 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1361 gfx::Rect /* anchor rectangle in root view coordinate */,
1362 base::string16 /* validation message */,
1363 base::string16 /* supplemental text */)
1365 // Message sent from the renderer to the browser when a HTML form validation
1366 // message should be hidden from view.
1367 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1369 // Message sent from the renderer to the browser when the suggested co-ordinates
1370 // of the anchor for a HTML form validation message have changed.
1371 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1372 gfx::Rect /* anchor rectangle in root view coordinate */)
1374 // Sent once a paint happens after the first non empty layout. In other words,
1375 // after the frame widget has painted something.
1376 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint)
1378 #if defined(OS_ANDROID)
1379 // Response to ViewMsg_FindMatchRects.
1381 // |version| will contain the current version number of the renderer's find
1382 // match list (incremented whenever they change), which should be passed in the
1383 // next call to ViewMsg_FindMatchRects.
1385 // |rects| will either contain a list of the enclosing rects of all matches
1386 // found by the most recent Find operation, or will be empty if |version| is not
1387 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1388 // your locally cached rects should still be valid). The rect coords will be
1389 // custom normalized fractions of the document size. The rects will be sorted by
1390 // frame traversal order starting in the main frame, then by dom order.
1392 // |active_rect| will contain the bounding box of the active find-in-page match
1393 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1394 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1395 int /* version */,
1396 std::vector<gfx::RectF> /* rects */,
1397 gfx::RectF /* active_rect */)
1399 // Start an android intent with the given URI.
1400 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1401 GURL /* content_url */)
1403 // Message sent when the renderer changed the background color for the view.
1404 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1405 uint32 /* bg_color */)
1407 // This message runs the MediaCodec for decoding audio for webaudio.
1408 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1409 base::SharedMemoryHandle /* encoded_data_handle */,
1410 base::FileDescriptor /* pcm_output */,
1411 uint32_t /* data_size*/)
1413 // Reply to the ViewMsg_ExtractSmartClipData message.
1414 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1415 base::string16 /* text */,
1416 base::string16 /* html */,
1417 gfx::Rect /* rect */)
1419 // Notifies that an unhandled tap has occurred at the specified x,y position
1420 // and that the UI may need to be triggered.
1421 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowUnhandledTapUIIfNeeded,
1422 int /* x */,
1423 int /* y */)
1425 #elif defined(OS_MACOSX)
1426 // Informs the browser that a plugin has gained or lost focus.
1427 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1428 bool, /* focused */
1429 int /* plugin_id */)
1431 // Instructs the browser to start plugin IME.
1432 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1434 // Receives content of a web page as plain text.
1435 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1436 #endif
1438 // Adding a new message? Stick to the sort order above: first platform
1439 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1440 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.