Roll src/third_party/WebKit a3b4a2e:7441784 (svn 202551:202552)
[chromium-blink-merge.git] / content / common / view_messages.h
blob48b62c6c15fc5dfe70588924a147a51658759f47
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"
69 #endif
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)
122 #endif
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)
220 #endif
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)
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_CONTROL2(ViewMsg_NetworkConnectionChanged,
849 net::NetworkChangeNotifier::ConnectionType /* type */,
850 double /* max bandwidth mbps */)
852 #if defined(ENABLE_PLUGINS)
853 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
854 // Tells the renderer that the channel to the broker has been created.
855 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
856 base::ProcessId /* broker_pid */,
857 IPC::ChannelHandle /* handle */)
859 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
860 // Tells the renderer whether permission to access to PPAPI broker was granted
861 // or not.
862 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
863 bool /* result */)
865 // Tells the renderer to empty its plugin list cache, optional reloading
866 // pages containing plugins.
867 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
868 bool /* reload_pages */)
869 #endif
871 // Used to instruct the RenderView to go into "view source" mode.
872 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
874 // Instructs the renderer to save the current page to MHTML.
875 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
876 int /* job_id */,
877 IPC::PlatformFileForTransit /* file handle */)
879 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
880 // process to release the magnified image.
881 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
882 cc::SharedBitmapId /* id */)
884 // Fetches complete rendered content of a web page as plain text.
885 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
887 #if defined(OS_MACOSX)
888 // Notification of a change in scrollbar appearance and/or behavior.
889 IPC_MESSAGE_CONTROL1(ViewMsg_UpdateScrollbarTheme,
890 ViewMsg_UpdateScrollbarTheme_Params /* params */)
891 #endif
893 #if defined(OS_ANDROID)
894 // Tells the renderer to suspend/resume the webkit timers.
895 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
896 bool /* suspend */)
898 // Sent when the browser wants the bounding boxes of the current find matches.
900 // If match rects are already cached on the browser side, |current_version|
901 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
902 // they came in, so the renderer can tell if it needs to send updated rects.
903 // Otherwise just pass -1 to always receive the list of rects.
905 // There must be an active search string (it is probably most useful to call
906 // this immediately after a ViewHostMsg_Find_Reply message arrives with
907 // final_update set to true).
908 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
909 int /* current_version */)
911 // Notifies the renderer whether hiding/showing the top controls is enabled
912 // and whether or not to animate to the proper state.
913 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
914 bool /* enable_hiding */,
915 bool /* enable_showing */,
916 bool /* animate */)
918 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
920 // Extracts the data at the given rect, returning it through the
921 // ViewHostMsg_SmartClipDataExtracted IPC.
922 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
923 gfx::Rect /* rect */)
925 #elif defined(OS_MACOSX)
926 // Let the RenderView know its window has changed visibility.
927 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
928 bool /* visibile */)
930 // Let the RenderView know its window's frame has changed.
931 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
932 gfx::Rect /* window frame */,
933 gfx::Rect /* content view frame */)
935 // Message sent from the browser to the renderer when the user starts or stops
936 // resizing the view.
937 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
938 bool /* enable */)
940 // Tell the renderer that plugin IME has completed.
941 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
942 base::string16 /* text */,
943 int /* plugin_id */)
944 #endif
946 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
947 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
948 uint32 /* output_surface_id */,
949 cc::CompositorFrameAck /* ack */)
951 // Sent by browser to tell renderer compositor that some resources that were
952 // given to the browser in a swap are not being used anymore.
953 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
954 uint32 /* output_surface_id */,
955 cc::CompositorFrameAck /* ack */)
957 // Sent by browser to give renderer compositor a new namespace ID for any
958 // SurfaceSequences it has to create.
959 IPC_MESSAGE_ROUTED1(ViewMsg_SetSurfaceIdNamespace,
960 uint32_t /* surface_id_namespace */)
962 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
964 // Sent by the browser to ask the renderer to redraw.
965 // If |request_id| is not zero, it is added to the forced frame's latency info
966 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
967 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
968 int /* request_id */)
970 // Sent by the browser when the renderer should generate a new frame.
971 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
972 cc::BeginFrameArgs /* args */)
974 // -----------------------------------------------------------------------------
975 // Messages sent from the renderer to the browser.
977 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
978 // display events. If |enabled| is true, the BeginFrame message will continue
979 // to be be delivered until the notification is disabled.
980 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrames,
981 bool /* enabled */)
983 // Sent by the renderer when it is creating a new window. The browser creates
984 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
985 // MSG_ROUTING_NONE, the view couldn't be created.
986 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
987 ViewHostMsg_CreateWindow_Params,
988 int /* route_id */,
989 int /* main_frame_route_id */,
990 int32 /* surface_id */,
991 int64 /* cloned_session_storage_namespace_id */)
993 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
994 // <select> dropdowns. This message is sent to the WebContentsImpl that
995 // contains the widget being created.
996 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
997 int /* opener_id */,
998 blink::WebPopupType /* popup type */,
999 int /* route_id */,
1000 int32 /* surface_id */)
1002 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1003 // window.
1004 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1005 int /* opener_id */,
1006 int /* route_id */,
1007 int32 /* surface_id */)
1009 // Asks the browser for a unique routing ID.
1010 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1011 int /* routing_id */)
1013 // Asks the browser for the default audio hardware configuration.
1014 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1015 media::AudioParameters /* input parameters */,
1016 media::AudioParameters /* output parameters */)
1018 // These three messages are sent to the parent RenderViewHost to display the
1019 // page/widget that was created by
1020 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1021 // refers to the id that was returned from the Create message above.
1022 // The initial_rect parameter is in screen coordinates.
1024 // FUTURE: there will probably be flags here to control if the result is
1025 // in a new window.
1026 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1027 int /* route_id */,
1028 WindowOpenDisposition /* disposition */,
1029 gfx::Rect /* initial_rect */,
1030 bool /* opened_by_user_gesture */)
1032 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1033 int /* route_id */,
1034 gfx::Rect /* initial_rect */)
1036 // Message to show a full screen widget.
1037 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1038 int /* route_id */)
1040 // Indicates the renderer is ready in response to a ViewMsg_New or
1041 // a ViewMsg_CreatingNew_ACK.
1042 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1044 // Sent by the renderer process to request that the browser close the view.
1045 // This corresponds to the window.close() API, and the browser may ignore
1046 // this message. Otherwise, the browser will generates a ViewMsg_Close
1047 // message to close the view.
1048 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1050 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1051 // throttle these messages.
1052 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1054 // Sent by the renderer process to request that the browser move the view.
1055 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1056 // the browser may ignore this message.
1057 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1058 gfx::Rect /* position */)
1060 // Result of string search in the page.
1061 // Response to ViewMsg_Find with the results of the requested find-in-page
1062 // search, the number of matches found and the selection rect (in screen
1063 // coordinates) for the string found. If |final_update| is false, it signals
1064 // that this is not the last Find_Reply message - more will be sent as the
1065 // scoping effort continues.
1066 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1067 int /* request_id */,
1068 int /* number of matches */,
1069 gfx::Rect /* selection_rect */,
1070 int /* active_match_ordinal */,
1071 bool /* final_update */)
1073 // Indicates that the render view has been closed in respose to a
1074 // Close message.
1075 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1076 int /* old_route_id */)
1078 // Indicates that the current page has been closed, after a ClosePage
1079 // message.
1080 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1082 // Notifies the browser that we have session history information.
1083 // page_id: unique ID that allows us to distinguish between history entries.
1084 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1085 int32 /* page_id */,
1086 content::PageState /* state */)
1088 // Notifies the browser that we want to show a destination url for a potential
1089 // action (e.g. when the user is hovering over a link).
1090 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL,
1091 GURL)
1093 // Sent when the document element is available for the top-level frame. This
1094 // happens after the page starts loading, but before all resources are
1095 // finished.
1096 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1097 bool /* uses_temporary_zoom_level */)
1099 // Sent to update part of the view. In response to this message, the host
1100 // generates a ViewMsg_UpdateRect_ACK message.
1101 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1102 ViewHostMsg_UpdateRect_Params)
1104 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1105 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1107 // Message sent from renderer to the browser when focus changes inside the
1108 // webpage. The first parameter says whether the newly focused element needs
1109 // keyboard input (true for textfields, text areas and content editable divs).
1110 // The second parameter is the node bounds relative to RenderWidgetHostView.
1111 IPC_MESSAGE_ROUTED2(ViewHostMsg_FocusedNodeChanged,
1112 bool /* is_editable_node */,
1113 gfx::Rect /* node_bounds */)
1115 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1117 #if defined(OS_WIN)
1118 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1119 gfx::NativeViewId /* dummy_activation_window */)
1121 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1122 gfx::NativeViewId /* dummy_activation_window */)
1123 #endif
1125 // Get the list of proxies to use for |url|, as a semicolon delimited list
1126 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1127 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1128 GURL /* url */,
1129 bool /* result */,
1130 std::string /* proxy list */)
1132 // A renderer sends this to the browser process when it wants to create a
1133 // worker. The browser will create the worker process if necessary, and
1134 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1135 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1136 ViewHostMsg_CreateWorker_Params,
1137 int /* route_id */)
1139 // A renderer sends this to the browser process when a document has been
1140 // detached. The browser will use this to constrain the lifecycle of worker
1141 // processes (SharedWorkers are shut down when their last associated document
1142 // is detached).
1143 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1144 uint64 /* document_id */)
1146 // Wraps an IPC message that's destined to the worker on the renderer->browser
1147 // hop.
1148 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1149 IPC::Message /* message */)
1151 // Tells the browser that a specific Appcache manifest in the current page
1152 // was accessed.
1153 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1154 GURL /* manifest url */,
1155 bool /* blocked by policy */)
1157 // Initiates a download based on user actions like 'ALT+click'.
1158 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl,
1159 int /* render_view_id */,
1160 int /* render_frame_id */,
1161 GURL /* url */,
1162 content::Referrer /* referrer */,
1163 base::string16 /* suggested_name */)
1165 // Used to go to the session history entry at the given offset (ie, -1 will
1166 // return the "back" item).
1167 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1168 int /* offset (from current) of history item to get */)
1170 // Sent from an inactive renderer for the browser to route to the active
1171 // renderer, instructing it to close.
1172 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1174 // Notifies that the preferred size of the content changed.
1175 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1176 gfx::Size /* pref_size */)
1178 // Notifies whether there are JavaScript touch event handlers or not.
1179 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1180 bool /* has_handlers */)
1182 // A message from HTML-based UI. When (trusted) Javascript calls
1183 // send(message, args), this message is sent to the browser.
1184 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1185 GURL /* source_url */,
1186 std::string /* message */,
1187 base::ListValue /* args */)
1189 #if defined(ENABLE_PLUGINS)
1190 // A renderer sends this to the browser process when it wants to access a PPAPI
1191 // broker. In contrast to FrameHostMsg_OpenChannelToPpapiBroker, this is called
1192 // for every connection.
1193 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1194 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1195 int /* routing_id */,
1196 GURL /* document_url */,
1197 base::FilePath /* plugin_path */)
1198 #endif // defined(ENABLE_PLUGINS)
1200 // Send the tooltip text for the current mouse position to the browser.
1201 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1202 base::string16 /* tooltip text string */,
1203 blink::WebTextDirection /* text direction hint */)
1205 // Notification that the text selection has changed.
1206 // Note: The secound parameter is the character based offset of the
1207 // base::string16
1208 // text in the document.
1209 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1210 base::string16 /* text covers the selection range */,
1211 size_t /* the offset of the text in the document */,
1212 gfx::Range /* selection range in the document */)
1214 // Notification that the selection bounds have changed.
1215 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1216 ViewHostMsg_SelectionBounds_Params)
1218 // Asks the browser to display the file chooser. The result is returned in a
1219 // ViewMsg_RunFileChooserResponse message.
1220 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1221 content::FileChooserParams)
1223 // Asks the browser to enumerate a directory. This is equivalent to running
1224 // the file chooser in directory-enumeration mode and having the user select
1225 // the given directory. The result is returned in a
1226 // ViewMsg_EnumerateDirectoryResponse message.
1227 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1228 int /* request_id */,
1229 base::FilePath /* file_path */)
1231 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1232 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1233 // a string only to work around size limitations for GURLs in IPC messages.
1234 IPC_MESSAGE_CONTROL3(ViewHostMsg_SaveImageFromDataURL,
1235 int /* render_view_id */,
1236 int /* render_frame_id */,
1237 std::string /* data_url */)
1239 // Tells the browser to move the focus to the next (previous if reverse is
1240 // true) focusable element.
1241 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1242 bool /* reverse */)
1244 // Required for opening a date/time dialog
1245 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1246 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1248 // Required for updating text input state.
1249 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1250 ViewHostMsg_TextInputState_Params /* input state params */)
1252 // Sent when the renderer changes the zoom level for a particular url, so the
1253 // browser can update its records. If the view is a plugin doc, then url is
1254 // used to update the zoom level for all pages in that site. Otherwise, the
1255 // render view's id is used so that only the menu is updated.
1256 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1257 double /* zoom_level */,
1258 GURL /* url */)
1260 // Sent when the renderer changes its page scale factor and whether or not the
1261 // page scale factor is one changes.
1262 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageScaleFactorIsOneChanged, bool /* is_one */)
1264 // Updates the minimum/maximum allowed zoom percent for this tab from the
1265 // default values. If |remember| is true, then the zoom setting is applied to
1266 // other pages in the site and is saved, otherwise it only applies to this
1267 // tab.
1268 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1269 int /* minimum_percent */,
1270 int /* maximum_percent */)
1272 IPC_MESSAGE_ROUTED3(
1273 ViewHostMsg_SwapCompositorFrame,
1274 uint32 /* output_surface_id */,
1275 cc::CompositorFrame /* frame */,
1276 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1278 // Send back a string to be recorded by UserMetrics.
1279 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1280 std::string /* action */)
1282 // Notifies the browser that the page was or was not saved as MHTML.
1283 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1284 int /* job_id */,
1285 int64 /* size of the MHTML file, -1 if error */)
1287 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1288 std::vector<GURL> /* all savable resource links */,
1289 std::vector<content::Referrer> /* all referrers */,
1290 std::vector<GURL> /* all frame links */)
1292 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1293 GURL /* frame's url */,
1294 std::string /* data buffer */,
1295 int32 /* complete status */)
1297 // Notifies the browser of an event occurring in the media pipeline.
1298 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1299 std::vector<media::MediaLogEvent> /* events */)
1301 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1302 // being sent back.
1303 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1304 // pop up a bubble to ask for user permission or take mouse lock content into
1305 // account.
1306 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1307 bool /* user_gesture */,
1308 bool /* last_unlocked_by_target */,
1309 bool /* privileged */)
1311 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1312 // whenever the mouse is unlocked (which may or may not be caused by
1313 // ViewHostMsg_UnlockMouse).
1314 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1316 // Notifies that multiple touch targets may have been pressed, and to show
1317 // the disambiguation popup.
1318 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1319 gfx::Rect, /* Border of touched targets */
1320 gfx::Size, /* Size of zoomed image */
1321 cc::SharedBitmapId /* id */)
1323 // Notifies the browser that document has parsed the body. This is used by the
1324 // ResourceScheduler as an indication that bandwidth contention won't block
1325 // first paint.
1326 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1328 // Notification that the urls for the favicon of a site has been determined.
1329 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1330 std::vector<content::FaviconURL> /* candidates */)
1332 // Message sent from renderer to the browser when the element that is focused
1333 // has been touched. A bool is passed in this message which indicates if the
1334 // node is editable.
1335 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1336 bool /* editable */)
1338 // Message sent from the renderer to the browser when an HTML form has failed
1339 // validation constraints.
1340 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1341 gfx::Rect /* anchor rectangle in root view coordinate */,
1342 base::string16 /* validation message */,
1343 base::string16 /* supplemental text */)
1345 // Message sent from the renderer to the browser when a HTML form validation
1346 // message should be hidden from view.
1347 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1349 // Message sent from the renderer to the browser when the suggested co-ordinates
1350 // of the anchor for a HTML form validation message have changed.
1351 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1352 gfx::Rect /* anchor rectangle in root view coordinate */)
1354 // Sent once a paint happens after the first non empty layout. In other words,
1355 // after the frame widget has painted something.
1356 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint)
1358 #if defined(OS_ANDROID)
1359 // Response to ViewMsg_FindMatchRects.
1361 // |version| will contain the current version number of the renderer's find
1362 // match list (incremented whenever they change), which should be passed in the
1363 // next call to ViewMsg_FindMatchRects.
1365 // |rects| will either contain a list of the enclosing rects of all matches
1366 // found by the most recent Find operation, or will be empty if |version| is not
1367 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1368 // your locally cached rects should still be valid). The rect coords will be
1369 // custom normalized fractions of the document size. The rects will be sorted by
1370 // frame traversal order starting in the main frame, then by dom order.
1372 // |active_rect| will contain the bounding box of the active find-in-page match
1373 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1374 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1375 int /* version */,
1376 std::vector<gfx::RectF> /* rects */,
1377 gfx::RectF /* active_rect */)
1379 // Start an android intent with the given URI.
1380 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1381 GURL /* content_url */)
1383 // This message runs the MediaCodec for decoding audio for webaudio.
1384 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1385 base::SharedMemoryHandle /* encoded_data_handle */,
1386 base::FileDescriptor /* pcm_output */,
1387 uint32_t /* data_size*/)
1389 // Reply to the ViewMsg_ExtractSmartClipData message.
1390 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1391 base::string16 /* text */,
1392 base::string16 /* html */,
1393 gfx::Rect /* rect */)
1395 // Notifies that an unhandled tap has occurred at the specified x,y position
1396 // and that the UI may need to be triggered.
1397 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowUnhandledTapUIIfNeeded,
1398 int /* x */,
1399 int /* y */)
1401 #elif defined(OS_MACOSX)
1402 // Informs the browser that a plugin has gained or lost focus.
1403 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1404 bool, /* focused */
1405 int /* plugin_id */)
1407 // Instructs the browser to start plugin IME.
1408 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1410 // Receives content of a web page as plain text.
1411 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1412 #endif
1414 // Adding a new message? Stick to the sort order above: first platform
1415 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1416 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.