Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / common / view_messages.h
blobfb91f4522132d4bfa27832d1735fa9a0404339dd
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // IPC messages for page rendering.
6 // Multiply-included message file, hence no include guard.
8 #include "base/memory/shared_memory.h"
9 #include "base/process/process.h"
10 #include "base/strings/string16.h"
11 #include "cc/output/begin_frame_args.h"
12 #include "cc/output/compositor_frame.h"
13 #include "cc/output/compositor_frame_ack.h"
14 #include "content/common/content_export.h"
15 #include "content/common/content_param_traits.h"
16 #include "content/common/cookie_data.h"
17 #include "content/common/date_time_suggestion.h"
18 #include "content/common/navigation_gesture.h"
19 #include "content/common/view_message_enums.h"
20 #include "content/common/webplugin_geometry.h"
21 #include "content/public/common/common_param_traits.h"
22 #include "content/public/common/favicon_url.h"
23 #include "content/public/common/file_chooser_file_info.h"
24 #include "content/public/common/file_chooser_params.h"
25 #include "content/public/common/menu_item.h"
26 #include "content/public/common/page_state.h"
27 #include "content/public/common/page_zoom.h"
28 #include "content/public/common/referrer.h"
29 #include "content/public/common/renderer_preferences.h"
30 #include "content/public/common/stop_find_action.h"
31 #include "content/public/common/three_d_api_types.h"
32 #include "content/public/common/window_container_type.h"
33 #include "ipc/ipc_channel_handle.h"
34 #include "ipc/ipc_message_macros.h"
35 #include "ipc/ipc_platform_file.h"
36 #include "media/audio/audio_parameters.h"
37 #include "media/base/channel_layout.h"
38 #include "media/base/media_log_event.h"
39 #include "net/base/network_change_notifier.h"
40 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
41 #include "third_party/WebKit/public/platform/WebFloatRect.h"
42 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
43 #include "third_party/WebKit/public/web/WebFindOptions.h"
44 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
45 #include "third_party/WebKit/public/web/WebPluginAction.h"
46 #include "third_party/WebKit/public/web/WebPopupType.h"
47 #include "third_party/WebKit/public/web/WebTextDirection.h"
48 #include "third_party/skia/include/core/SkBitmap.h"
49 #include "ui/base/ime/text_input_mode.h"
50 #include "ui/base/ime/text_input_type.h"
51 #include "ui/base/ui_base_types.h"
52 #include "ui/gfx/ipc/gfx_param_traits.h"
53 #include "ui/gfx/point.h"
54 #include "ui/gfx/range/range.h"
55 #include "ui/gfx/rect.h"
56 #include "ui/gfx/rect_f.h"
57 #include "ui/gfx/vector2d.h"
58 #include "ui/gfx/vector2d_f.h"
60 #if defined(OS_MACOSX)
61 #include "content/common/mac/font_descriptor.h"
62 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
63 #endif
65 #if defined(ENABLE_PLUGINS)
66 #include "content/common/pepper_renderer_instance_data.h"
67 #endif
69 #undef IPC_MESSAGE_EXPORT
70 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
72 #define IPC_MESSAGE_START ViewMsgStart
74 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type,
75 blink::WebMediaPlayerAction::Type::TypeLast)
76 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type,
77 blink::WebPluginAction::Type::TypeLast)
78 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType,
79 blink::WebPopupType::WebPopupTypeLast)
80 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection,
81 blink::WebTextDirection::WebTextDirectionLast)
82 IPC_ENUM_TRAITS(WindowContainerType)
83 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
84 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
85 IPC_ENUM_TRAITS(content::MenuItem::Type)
86 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture,
87 content::NavigationGestureLast)
88 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom,
89 content::PageZoom::PAGE_ZOOM_OUT,
90 content::PageZoom::PAGE_ZOOM_IN)
91 IPC_ENUM_TRAITS(gfx::FontRenderParams::Hinting)
92 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering)
93 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
94 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
95 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
96 content::STOP_FIND_ACTION_LAST)
97 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
98 content::THREE_D_API_TYPE_LAST)
99 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1)
100 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
101 media::MediaLogEvent::TYPE_LAST)
102 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
103 IPC_ENUM_TRAITS(ui::TextInputType)
105 #if defined(OS_MACOSX)
106 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
107 IPC_STRUCT_TRAITS_MEMBER(font_name)
108 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
109 IPC_STRUCT_TRAITS_END()
110 #endif
112 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
113 IPC_STRUCT_TRAITS_MEMBER(forward)
114 IPC_STRUCT_TRAITS_MEMBER(matchCase)
115 IPC_STRUCT_TRAITS_MEMBER(findNext)
116 IPC_STRUCT_TRAITS_END()
118 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
119 IPC_STRUCT_TRAITS_MEMBER(type)
120 IPC_STRUCT_TRAITS_MEMBER(enable)
121 IPC_STRUCT_TRAITS_END()
123 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
124 IPC_STRUCT_TRAITS_MEMBER(type)
125 IPC_STRUCT_TRAITS_MEMBER(enable)
126 IPC_STRUCT_TRAITS_END()
128 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
129 IPC_STRUCT_TRAITS_MEMBER(x)
130 IPC_STRUCT_TRAITS_MEMBER(y)
131 IPC_STRUCT_TRAITS_END()
133 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
134 IPC_STRUCT_TRAITS_MEMBER(x)
135 IPC_STRUCT_TRAITS_MEMBER(y)
136 IPC_STRUCT_TRAITS_MEMBER(width)
137 IPC_STRUCT_TRAITS_MEMBER(height)
138 IPC_STRUCT_TRAITS_END()
140 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
141 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
142 IPC_STRUCT_TRAITS_MEMBER(depth)
143 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
144 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
145 IPC_STRUCT_TRAITS_MEMBER(rect)
146 IPC_STRUCT_TRAITS_MEMBER(availableRect)
147 IPC_STRUCT_TRAITS_MEMBER(orientationType)
148 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
149 IPC_STRUCT_TRAITS_END()
151 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
152 IPC_STRUCT_TRAITS_MEMBER(label)
153 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
154 IPC_STRUCT_TRAITS_MEMBER(type)
155 IPC_STRUCT_TRAITS_MEMBER(action)
156 IPC_STRUCT_TRAITS_MEMBER(rtl)
157 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
158 IPC_STRUCT_TRAITS_MEMBER(enabled)
159 IPC_STRUCT_TRAITS_MEMBER(checked)
160 IPC_STRUCT_TRAITS_MEMBER(submenu)
161 IPC_STRUCT_TRAITS_END()
163 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
164 IPC_STRUCT_TRAITS_MEMBER(value)
165 IPC_STRUCT_TRAITS_MEMBER(localized_value)
166 IPC_STRUCT_TRAITS_MEMBER(label)
167 IPC_STRUCT_TRAITS_END()
169 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
170 IPC_STRUCT_TRAITS_MEMBER(icon_url)
171 IPC_STRUCT_TRAITS_MEMBER(icon_type)
172 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
173 IPC_STRUCT_TRAITS_END()
175 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
176 IPC_STRUCT_TRAITS_MEMBER(file_path)
177 IPC_STRUCT_TRAITS_MEMBER(display_name)
178 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
179 IPC_STRUCT_TRAITS_MEMBER(modification_time)
180 IPC_STRUCT_TRAITS_MEMBER(length)
181 IPC_STRUCT_TRAITS_MEMBER(is_directory)
182 IPC_STRUCT_TRAITS_END()
184 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
185 IPC_STRUCT_TRAITS_MEMBER(mode)
186 IPC_STRUCT_TRAITS_MEMBER(title)
187 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
188 IPC_STRUCT_TRAITS_MEMBER(accept_types)
189 IPC_STRUCT_TRAITS_MEMBER(need_local_path)
190 #if defined(OS_ANDROID)
191 IPC_STRUCT_TRAITS_MEMBER(capture)
192 #endif
193 IPC_STRUCT_TRAITS_END()
195 #if defined(ENABLE_PLUGINS)
196 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
197 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
198 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
199 IPC_STRUCT_TRAITS_MEMBER(document_url)
200 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
201 IPC_STRUCT_TRAITS_END()
202 #endif
204 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
205 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
206 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
207 IPC_STRUCT_TRAITS_MEMBER(hinting)
208 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
209 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
210 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
211 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
212 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
213 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
214 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
215 IPC_STRUCT_TRAITS_MEMBER(track_color)
216 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
217 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
218 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
219 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
220 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
221 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
222 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
223 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
224 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
225 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
226 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
227 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
228 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
229 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
230 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
231 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
232 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
233 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
234 IPC_STRUCT_TRAITS_END()
236 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
237 IPC_STRUCT_TRAITS_MEMBER(name)
238 IPC_STRUCT_TRAITS_MEMBER(value)
239 IPC_STRUCT_TRAITS_MEMBER(domain)
240 IPC_STRUCT_TRAITS_MEMBER(path)
241 IPC_STRUCT_TRAITS_MEMBER(expires)
242 IPC_STRUCT_TRAITS_MEMBER(http_only)
243 IPC_STRUCT_TRAITS_MEMBER(secure)
244 IPC_STRUCT_TRAITS_MEMBER(session)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
248 IPC_STRUCT_TRAITS_MEMBER(window)
249 IPC_STRUCT_TRAITS_MEMBER(window_rect)
250 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
251 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
252 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
253 IPC_STRUCT_TRAITS_MEMBER(visible)
254 IPC_STRUCT_TRAITS_END()
256 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
257 IPC_STRUCT_TRAITS_MEMBER(id)
258 IPC_STRUCT_TRAITS_MEMBER(type)
259 IPC_STRUCT_TRAITS_MEMBER(params)
260 IPC_STRUCT_TRAITS_MEMBER(time)
261 IPC_STRUCT_TRAITS_END()
263 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
264 // Routing ID of the view initiating the open.
265 IPC_STRUCT_MEMBER(int, opener_id)
267 // True if this open request came in the context of a user gesture.
268 IPC_STRUCT_MEMBER(bool, user_gesture)
270 // Type of window requested.
271 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
273 // The session storage namespace ID this view should use.
274 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
276 // The name of the resulting frame that should be created (empty if none
277 // has been specified).
278 IPC_STRUCT_MEMBER(base::string16, frame_name)
280 // The routing id of the frame initiating the open.
281 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
283 // The URL of the frame initiating the open.
284 IPC_STRUCT_MEMBER(GURL, opener_url)
286 // The URL of the top frame containing the opener.
287 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
289 // The security origin of the frame initiating the open.
290 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
292 // Whether the opener will be suppressed in the new window, in which case
293 // scripting the new window is not allowed.
294 IPC_STRUCT_MEMBER(bool, opener_suppressed)
296 // Whether the window should be opened in the foreground, background, etc.
297 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
299 // The URL that will be loaded in the new window (empty if none has been
300 // sepcified).
301 IPC_STRUCT_MEMBER(GURL, target_url)
303 // The referrer that will be used to load |target_url| (empty if none has
304 // been specified).
305 IPC_STRUCT_MEMBER(content::Referrer, referrer)
307 // The window features to use for the new view.
308 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
310 // The additional window features to use for the new view. We pass these
311 // separately from |features| above because we cannot serialize WebStrings
312 // over IPC.
313 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
314 IPC_STRUCT_END()
316 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
317 // URL for the worker script.
318 IPC_STRUCT_MEMBER(GURL, url)
320 // Name for a SharedWorker, otherwise empty string.
321 IPC_STRUCT_MEMBER(base::string16, name)
323 // Security policy used in the worker.
324 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
326 // Security policy type used in the worker.
327 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
329 // The ID of the parent document (unique within parent renderer).
330 IPC_STRUCT_MEMBER(unsigned long long, document_id)
332 // RenderFrame routing id used to send messages back to the parent.
333 IPC_STRUCT_MEMBER(int, render_frame_route_id)
334 IPC_STRUCT_END()
336 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
337 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
338 IPC_STRUCT_MEMBER(double, dialog_value)
339 IPC_STRUCT_MEMBER(double, minimum)
340 IPC_STRUCT_MEMBER(double, maximum)
341 IPC_STRUCT_MEMBER(double, step)
342 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
343 IPC_STRUCT_END()
345 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
346 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
347 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
348 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
349 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
350 IPC_STRUCT_MEMBER(bool, is_anchor_first)
351 IPC_STRUCT_END()
353 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
354 // The type of input field
355 IPC_STRUCT_MEMBER(ui::TextInputType, type)
357 // The flags of the input field (autocorrect, autocomplete, etc.)
358 IPC_STRUCT_MEMBER(int, flags)
360 // The value of the input field
361 IPC_STRUCT_MEMBER(std::string, value)
363 // The cursor position of the current selection start, or the caret position
364 // if nothing is selected
365 IPC_STRUCT_MEMBER(int, selection_start)
367 // The cursor position of the current selection end, or the caret position
368 // if nothing is selected
369 IPC_STRUCT_MEMBER(int, selection_end)
371 // The start position of the current composition, or -1 if there is none
372 IPC_STRUCT_MEMBER(int, composition_start)
374 // The end position of the current composition, or -1 if there is none
375 IPC_STRUCT_MEMBER(int, composition_end)
377 // Whether or not inline composition can be performed for the current input.
378 IPC_STRUCT_MEMBER(bool, can_compose_inline)
380 // Whether or not the IME should be shown as a result of this update. Even if
381 // true, the IME will only be shown if the type is appropriate (e.g. not
382 // TEXT_INPUT_TYPE_NONE).
383 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
385 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
386 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
387 IPC_STRUCT_END()
389 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
390 // The size of the RenderView when this message was generated. This is
391 // included so the host knows how large the view is from the perspective of
392 // the renderer process. This is necessary in case a resize operation is in
393 // progress. If auto-resize is enabled, this should update the corresponding
394 // view size.
395 IPC_STRUCT_MEMBER(gfx::Size, view_size)
397 // New window locations for plugin child windows.
398 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
399 plugin_window_moves)
401 // The following describes the various bits that may be set in flags:
403 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
404 // Indicates that this is a response to a ViewMsg_Resize message.
406 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
407 // Indicates that this is a response to a ViewMsg_Repaint message.
409 // If flags is zero, then this message corresponds to an unsolicited paint
410 // request by the render view. Any of the above bits may be set in flags,
411 // which would indicate that this paint message is an ACK for multiple
412 // request messages.
413 IPC_STRUCT_MEMBER(int, flags)
414 IPC_STRUCT_END()
416 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
417 // Information about the screen (dpi, depth, etc..).
418 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
419 // The size of the renderer.
420 IPC_STRUCT_MEMBER(gfx::Size, new_size)
421 // The size of the view's backing surface in non-DPI-adjusted pixels.
422 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
423 // The amount that the viewport size given to Blink was shrunk by the URL-bar
424 // (always 0 on platforms where URL-bar hiding isn't supported).
425 IPC_STRUCT_MEMBER(float, top_controls_layout_height)
426 // The size of the visible viewport, which may be smaller than the view if the
427 // view is partially occluded (e.g. by a virtual keyboard). The size is in
428 // DPI-adjusted pixels.
429 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
430 // The resizer rect.
431 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
432 // Indicates whether a page is fullscreen or not.
433 IPC_STRUCT_MEMBER(bool, is_fullscreen)
434 IPC_STRUCT_END()
436 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
437 // Renderer-wide preferences.
438 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
440 // Preferences for this view.
441 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
443 // The ID of the view to be created.
444 IPC_STRUCT_MEMBER(int32, view_id)
446 // The ID of the main frame hosted in the view.
447 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
449 // The ID of the rendering surface.
450 IPC_STRUCT_MEMBER(int32, surface_id)
452 // The session storage namespace ID this view should use.
453 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
455 // The name of the frame associated with this view (or empty if none).
456 IPC_STRUCT_MEMBER(base::string16, frame_name)
458 // The route ID of the opener RenderView if we need to set one
459 // (MSG_ROUTING_NONE otherwise).
460 IPC_STRUCT_MEMBER(int, opener_route_id)
462 // Whether the RenderView should initially be swapped out.
463 IPC_STRUCT_MEMBER(bool, swapped_out)
465 // The ID of the proxy object for the main frame in this view. It is only
466 // used if |swapped_out| is true.
467 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
469 // Whether the RenderView should initially be hidden.
470 IPC_STRUCT_MEMBER(bool, hidden)
472 // Whether the RenderView will never be visible.
473 IPC_STRUCT_MEMBER(bool, never_visible)
475 // Whether the window associated with this view was created with an opener.
476 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
478 // The initial page ID to use for this view, which must be larger than any
479 // existing navigation that might be loaded in the view. Page IDs are unique
480 // to a view and are only updated by the renderer after this initial value.
481 IPC_STRUCT_MEMBER(int32, next_page_id)
483 // The initial renderer size.
484 IPC_STRUCT_MEMBER(ViewMsg_Resize_Params, initial_size)
486 // Whether to enable auto-resize.
487 IPC_STRUCT_MEMBER(bool, enable_auto_resize)
489 // The minimum size to layout the page if auto-resize is enabled.
490 IPC_STRUCT_MEMBER(gfx::Size, min_size)
492 // The maximum size to layout the page if auto-resize is enabled.
493 IPC_STRUCT_MEMBER(gfx::Size, max_size)
494 IPC_STRUCT_END()
496 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
497 // Whether the data format is supplied as serialized script value, or as
498 // a simple string. If it is a raw string, must be converted from string to a
499 // WebSerializedScriptValue in renderer.
500 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
501 // The serialized script value.
502 IPC_STRUCT_MEMBER(base::string16, data)
503 // When sent to the browser, this is the routing ID of the source frame in
504 // the source process. The browser replaces it with the routing ID of the
505 // equivalent (swapped out) frame in the destination process.
506 IPC_STRUCT_MEMBER(int, source_routing_id)
508 // The origin of the source frame.
509 IPC_STRUCT_MEMBER(base::string16, source_origin)
511 // The origin for the message's target.
512 IPC_STRUCT_MEMBER(base::string16, target_origin)
514 // Information about the MessagePorts this message contains.
515 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
516 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
517 IPC_STRUCT_END()
519 // Messages sent from the browser to the renderer.
521 #if defined(OS_ANDROID)
522 // Tells the renderer to cancel an opened date/time dialog.
523 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
525 // Replaces a date time input field.
526 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
527 double /* dialog_value */)
529 #endif
531 // Get all savable resource links from current webpage, include main
532 // frame and sub-frame.
533 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
534 GURL /* url of page which is needed to save */)
536 // Get html data by serializing all frames of current page with lists
537 // which contain all resource links that have local copy.
538 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
539 std::vector<GURL> /* urls that have local copy */,
540 std::vector<base::FilePath> /* paths of local copy */,
541 base::FilePath /* local directory path */)
543 // Tells the render side that a ViewHostMsg_LockMouse message has been
544 // processed. |succeeded| indicates whether the mouse has been successfully
545 // locked or not.
546 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
547 bool /* succeeded */)
548 // Tells the render side that the mouse has been unlocked.
549 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
551 // Sent by the browser when the parameters for vsync alignment have changed.
552 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
553 base::TimeTicks /* timebase */,
554 base::TimeDelta /* interval */)
556 // Sent to the RenderView when a new tab is swapped into an existing
557 // tab and the histories need to be merged. The existing tab has a history of
558 // |merged_history_length| which precedes the history of the new tab. All
559 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
561 // For example, suppose the history of page_ids in the new tab's RenderView
562 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
563 // all pages in the new tab with page_id >= 7 are to be preserved.
564 // The resulting page history is [-1 -1 -1 7 8].
565 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
566 int, /* merge_history_length */
567 int32 /* minimum_page_id */)
569 // Tells the renderer to create a new view.
570 // This message is slightly different, the view it takes (via
571 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
572 // non-view control message.
573 IPC_MESSAGE_CONTROL1(ViewMsg_New,
574 ViewMsg_New_Params)
576 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
577 // similar to the new command, but used when the renderer created a view
578 // first, and we need to update it.
579 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
581 // Sends updated preferences to the renderer.
582 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
583 content::RendererPreferences)
585 // This passes a set of webkit preferences down to the renderer.
586 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
587 content::WebPreferences)
589 // Informs the renderer that the timezone has changed.
590 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
592 // Tells the render view to close.
593 // Expects a Close_ACK message when finished.
594 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
596 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
597 // is generated in response provided new_size is not empty and not equal to
598 // the view's current size. The generated ViewHostMsg_UpdateRect message will
599 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
600 // we don't have to fetch it every time WebKit asks for it.
601 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
602 ViewMsg_Resize_Params /* params */)
604 // Sent to inform the renderer of its screen device color profile. An empty
605 // profile tells the renderer use the default sRGB color profile.
606 IPC_MESSAGE_ROUTED1(ViewMsg_ColorProfile,
607 std::vector<char> /* color profile */)
609 // Tells the render view that the resize rect has changed.
610 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
611 gfx::Rect /* resizer_rect */)
613 // Sent to inform the view that it was hidden. This allows it to reduce its
614 // resource utilization.
615 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
617 // Tells the render view that it is no longer hidden (see WasHidden), and the
618 // render view is expected to respond with a full repaint if needs_repainting
619 // is true. If needs_repainting is false, then this message does not trigger a
620 // message in response.
621 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown,
622 bool /* needs_repainting */,
623 ui::LatencyInfo /* latency_info */)
625 // Tells the renderer to focus the first (last if reverse is true) focusable
626 // node.
627 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
628 bool /* reverse */)
630 // Sent to inform the renderer to invoke a context menu.
631 // The parameter specifies the location in the render view's coordinates.
632 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
633 ui::MenuSourceType,
634 gfx::Point /* location where menu should be shown */)
636 // Sent when the user wants to search for a word on the page (find in page).
637 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
638 int /* request_id */,
639 base::string16 /* search_text */,
640 blink::WebFindOptions)
642 // This message notifies the renderer that the user has closed the FindInPage
643 // window (and what action to take regarding the selection).
644 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
645 content::StopFindAction /* action */)
647 // Copies the image at location x, y to the clipboard (if there indeed is an
648 // image at that location).
649 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
650 int /* x */,
651 int /* y */)
653 // Saves the image at location x, y to the disk (if there indeed is an
654 // image at that location).
655 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
656 int /* x */,
657 int /* y */)
659 // Tells the renderer to perform the given action on the media player
660 // located at the given point.
661 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
662 gfx::Point, /* location */
663 blink::WebMediaPlayerAction)
665 // Tells the renderer to perform the given action on the plugin located at
666 // the given point.
667 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
668 gfx::Point, /* location */
669 blink::WebPluginAction)
671 // Posts a message from a frame in another process to the current renderer.
672 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
673 ViewMsg_PostMessage_Params)
675 // Change the zoom level for the current main frame. If the level actually
676 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
677 // telling it what url got zoomed and what its current zoom level is.
678 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
679 content::PageZoom /* function */)
681 // Set the zoom level for a particular url that the renderer is in the
682 // process of loading. This will be stored, to be used if the load commits
683 // and ignored otherwise.
684 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
685 GURL /* url */,
686 double /* zoom_level */)
688 // Set the zoom level for a particular url, so all render views
689 // displaying this url can update their zoom levels to match.
690 // If scheme is empty, then only host is used for matching.
691 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
692 std::string /* scheme */,
693 std::string /* host */,
694 double /* zoom_level */)
696 // Set the zoom level for a particular render view.
697 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
698 bool /* uses_temporary_zoom_level */,
699 double /* zoom_level */)
701 // Change encoding of page in the renderer.
702 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
703 std::string /*new encoding name*/)
705 // Reset encoding of page in the renderer back to default.
706 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
708 // Used to tell a render view whether it should expose various bindings
709 // that allow JS content extended privileges. See BindingsPolicy for valid
710 // flag values.
711 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
712 int /* enabled_bindings_flags */)
714 // Tell the renderer to add a property to the WebUI binding object. This
715 // only works if we allowed WebUI bindings.
716 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
717 std::string /* property_name */,
718 std::string /* property_value_json */)
720 // This message starts/stop monitoring the input method status of the focused
721 // edit control of a renderer process.
722 // Parameters
723 // * is_active (bool)
724 // Indicates if an input method is active in the browser process.
725 // The possible actions when a renderer process receives this message are
726 // listed below:
727 // Value Action
728 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
729 // to notify the input method status of the focused edit control.
730 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
731 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
732 bool /* is_active */)
734 // IME API oncandidatewindow* events for InputMethodContext.
735 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
736 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
737 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
739 // Used to notify the render-view that we have received a target URL. Used
740 // to prevent target URLs spamming the browser.
741 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
743 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
744 std::vector<content::FileChooserFileInfo>)
746 // Provides the results of directory enumeration.
747 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
748 int /* request_id */,
749 std::vector<base::FilePath> /* files_in_directory */)
751 // When a renderer sends a ViewHostMsg_Focus to the browser process,
752 // the browser has the option of sending a ViewMsg_CantFocus back to
753 // the renderer.
754 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
756 // Tells the renderer to suppress any further modal dialogs until it receives a
757 // corresponding ViewMsg_SwapOut message. This ensures that no
758 // PageGroupLoadDeferrer is on the stack for SwapOut.
759 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
761 // Instructs the renderer to close the current page, including running the
762 // onunload event handler.
764 // Expects a ClosePage_ACK message when finished.
765 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
767 // Notifies the renderer about ui theme changes
768 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
770 // Notifies the renderer that a paint is to be generated for the rectangle
771 // passed in.
772 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
773 gfx::Size /* The view size to be repainted */)
775 // Notification that a move or resize renderer's containing window has
776 // started.
777 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
779 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
780 gfx::Rect /* view_screen_rect */,
781 gfx::Rect /* window_screen_rect */)
783 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
784 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
785 // processed the move. The browser may have ignored the move, but it finished
786 // processing. This is used because the renderer keeps a temporary cache of
787 // the widget position while these asynchronous operations are in progress.
788 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
790 // Used to instruct the RenderView to send back updates to the preferred size.
791 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
793 // Used to instruct the RenderView to automatically resize and send back
794 // updates for the new size.
795 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
796 gfx::Size /* min_size */,
797 gfx::Size /* max_size */)
799 // Used to instruct the RenderView to disalbe automatically resize.
800 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
801 gfx::Size /* new_size */)
803 // Changes the text direction of the currently selected input field (if any).
804 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
805 blink::WebTextDirection /* direction */)
807 // Tells the renderer to clear the focused element (if any).
808 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
810 // Make the RenderView background transparent or opaque.
811 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
813 // Used to tell the renderer not to add scrollbars with height and
814 // width below a threshold.
815 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
816 gfx::Size /* disable_scrollbar_size_limit */)
818 // Activate/deactivate the RenderView (i.e., set its controls' tint
819 // accordingly, etc.).
820 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
821 bool /* active */)
823 // Response message to ViewHostMsg_CreateWorker.
824 // Sent when the worker has started.
825 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
827 // Sent when the worker failed to load the worker script.
828 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
829 // But if the shared worker of the same URL already exists and it has failed
830 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
831 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
832 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
834 // Sent when the worker has connected.
835 // This message is sent only if the worker successfully loaded the script.
836 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
838 // Tells the renderer that the network type has changed so that navigator.onLine
839 // and navigator.connection can be updated.
840 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
841 net::NetworkChangeNotifier::ConnectionType /* type */)
843 #if defined(ENABLE_PLUGINS)
844 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
845 // Tells the renderer that the channel to the broker has been created.
846 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
847 base::ProcessId /* broker_pid */,
848 IPC::ChannelHandle /* handle */)
850 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
851 // Tells the renderer whether permission to access to PPAPI broker was granted
852 // or not.
853 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
854 bool /* result */)
856 // Tells the renderer to empty its plugin list cache, optional reloading
857 // pages containing plugins.
858 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
859 bool /* reload_pages */)
860 #endif
862 // Used to instruct the RenderView to go into "view source" mode.
863 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
865 // Instructs the renderer to save the current page to MHTML.
866 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
867 int /* job_id */,
868 IPC::PlatformFileForTransit /* file handle */)
870 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
871 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
872 GURL /* data */)
874 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
875 // process to release the magnified image.
876 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
877 cc::SharedBitmapId /* id */)
879 // Notifies the renderer that a snapshot has been retrieved.
880 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
881 int /* snapshot_id */,
882 gfx::Size /* size */,
883 std::vector<unsigned char> /* png */)
885 // Fetches complete rendered content of a web page as plain text.
886 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
888 #if defined(OS_MACOSX)
889 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
891 // Notification of a change in scrollbar appearance and/or behavior.
892 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
893 float /* initial_button_delay */,
894 float /* autoscroll_button_delay */,
895 bool /* jump_on_track_click */,
896 blink::ScrollerStyle /* preferred_scroller_style */,
897 bool /* redraw */)
898 #endif
900 #if defined(OS_ANDROID)
901 // Tells the renderer to suspend/resume the webkit timers.
902 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
903 bool /* suspend */)
905 // Sent when the browser wants the bounding boxes of the current find matches.
907 // If match rects are already cached on the browser side, |current_version|
908 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
909 // they came in, so the renderer can tell if it needs to send updated rects.
910 // Otherwise just pass -1 to always receive the list of rects.
912 // There must be an active search string (it is probably most useful to call
913 // this immediately after a ViewHostMsg_Find_Reply message arrives with
914 // final_update set to true).
915 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
916 int /* current_version */)
918 // Notifies the renderer whether hiding/showing the top controls is enabled
919 // and whether or not to animate to the proper state.
920 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
921 bool /* enable_hiding */,
922 bool /* enable_showing */,
923 bool /* animate */)
925 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
927 // Sent by the browser when an IME update that requires acknowledgement has been
928 // processed on the browser side.
929 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
931 // Extracts the data at the given rect, returning it through the
932 // ViewHostMsg_SmartClipDataExtracted IPC.
933 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
934 gfx::Rect /* rect */)
936 #elif defined(OS_MACOSX)
937 // Let the RenderView know its window has changed visibility.
938 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
939 bool /* visibile */)
941 // Let the RenderView know its window's frame has changed.
942 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
943 gfx::Rect /* window frame */,
944 gfx::Rect /* content view frame */)
946 // Message sent from the browser to the renderer when the user starts or stops
947 // resizing the view.
948 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
949 bool /* enable */)
951 // Tell the renderer that plugin IME has completed.
952 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
953 base::string16 /* text */,
954 int /* plugin_id */)
955 #endif
957 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
958 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
959 uint32 /* output_surface_id */,
960 cc::CompositorFrameAck /* ack */)
962 // Sent by browser to tell renderer compositor that some resources that were
963 // given to the browser in a swap are not being used anymore.
964 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
965 uint32 /* output_surface_id */,
966 cc::CompositorFrameAck /* ack */)
968 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
970 // Sent by the browser to ask the renderer to redraw.
971 // If |request_id| is not zero, it is added to the forced frame's latency info
972 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
973 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
974 int /* request_id */)
976 // Sent by the browser when the renderer should generate a new frame.
977 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
978 cc::BeginFrameArgs /* args */)
980 // -----------------------------------------------------------------------------
981 // Messages sent from the renderer to the browser.
983 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
984 // display events. If |enabled| is true, the BeginFrame message will continue
985 // to be be delivered until the notification is disabled.
986 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrames,
987 bool /* enabled */)
989 // Sent by the renderer when it is creating a new window. The browser creates
990 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
991 // MSG_ROUTING_NONE, the view couldn't be created.
992 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
993 ViewHostMsg_CreateWindow_Params,
994 int /* route_id */,
995 int /* main_frame_route_id */,
996 int32 /* surface_id */,
997 int64 /* cloned_session_storage_namespace_id */)
999 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1000 // <select> dropdowns. This message is sent to the WebContentsImpl that
1001 // contains the widget being created.
1002 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1003 int /* opener_id */,
1004 blink::WebPopupType /* popup type */,
1005 int /* route_id */,
1006 int32 /* surface_id */)
1008 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1009 // window.
1010 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1011 int /* opener_id */,
1012 int /* route_id */,
1013 int32 /* surface_id */)
1015 // Asks the browser for a unique routing ID.
1016 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1017 int /* routing_id */)
1019 // Asks the browser for the default audio hardware configuration.
1020 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1021 media::AudioParameters /* input parameters */,
1022 media::AudioParameters /* output parameters */)
1024 // Asks the browser for the renderer process memory size stats.
1025 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1026 size_t /* private_bytes */,
1027 size_t /* shared_bytes */)
1029 // These three messages are sent to the parent RenderViewHost to display the
1030 // page/widget that was created by
1031 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1032 // refers to the id that was returned from the Create message above.
1033 // The initial_position parameter is a rectangle in screen coordinates.
1035 // FUTURE: there will probably be flags here to control if the result is
1036 // in a new window.
1037 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1038 int /* route_id */,
1039 WindowOpenDisposition /* disposition */,
1040 gfx::Rect /* initial_pos */,
1041 bool /* opened_by_user_gesture */)
1043 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1044 int /* route_id */,
1045 gfx::Rect /* initial_pos */)
1047 // Message to show a full screen widget.
1048 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1049 int /* route_id */)
1051 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1052 // to run in a modal fashion until it is closed.
1053 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1054 int /* opener_id */)
1056 // Indicates the renderer is ready in response to a ViewMsg_New or
1057 // a ViewMsg_CreatingNew_ACK.
1058 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1060 // Indicates the renderer process is gone. This actually is sent by the
1061 // browser process to itself, but keeps the interface cleaner.
1062 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1063 int, /* this really is base::TerminationStatus */
1064 int /* exit_code */)
1066 // Sent by the renderer process to request that the browser close the view.
1067 // This corresponds to the window.close() API, and the browser may ignore
1068 // this message. Otherwise, the browser will generates a ViewMsg_Close
1069 // message to close the view.
1070 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1072 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1073 // throttle these messages.
1074 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1076 // Sent by the renderer process to request that the browser move the view.
1077 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1078 // the browser may ignore this message.
1079 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1080 gfx::Rect /* position */)
1082 // Result of string search in the page.
1083 // Response to ViewMsg_Find with the results of the requested find-in-page
1084 // search, the number of matches found and the selection rect (in screen
1085 // coordinates) for the string found. If |final_update| is false, it signals
1086 // that this is not the last Find_Reply message - more will be sent as the
1087 // scoping effort continues.
1088 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1089 int /* request_id */,
1090 int /* number of matches */,
1091 gfx::Rect /* selection_rect */,
1092 int /* active_match_ordinal */,
1093 bool /* final_update */)
1095 // Indicates that the render view has been closed in respose to a
1096 // Close message.
1097 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1098 int /* old_route_id */)
1100 // Indicates that the current page has been closed, after a ClosePage
1101 // message.
1102 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1104 // Notifies the browser that we have session history information.
1105 // page_id: unique ID that allows us to distinguish between history entries.
1106 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1107 int32 /* page_id */,
1108 content::PageState /* state */)
1110 // Notifies the browser that we want to show a destination url for a potential
1111 // action (e.g. when the user is hovering over a link).
1112 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL,
1113 GURL)
1115 // Sent when the document element is available for the top-level frame. This
1116 // happens after the page starts loading, but before all resources are
1117 // finished.
1118 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1119 bool /* uses_temporary_zoom_level */)
1121 // Sent when the renderer loads a resource from its memory cache.
1122 // The security info is non empty if the resource was originally loaded over
1123 // a secure connection.
1124 // Note: May only be sent once per URL per frame per committed load.
1125 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1126 GURL /* url */,
1127 std::string /* security info */,
1128 std::string /* http method */,
1129 std::string /* mime type */,
1130 content::ResourceType /* resource type */)
1132 // Sent when the renderer displays insecure content in a secure page.
1133 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1135 // Sent when the renderer runs insecure content in a secure origin.
1136 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1137 std::string /* security_origin */,
1138 GURL /* target URL */)
1140 // Sent to update part of the view. In response to this message, the host
1141 // generates a ViewMsg_UpdateRect_ACK message.
1142 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1143 ViewHostMsg_UpdateRect_Params)
1145 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1146 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1148 // Message sent from renderer to the browser when focus changes inside the
1149 // webpage. The parameter says whether the newly focused element needs
1150 // keyboard input (true for textfields, text areas and content editable divs).
1151 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1152 bool /* is_editable_node */)
1154 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1156 // Used to set a cookie. The cookie is set asynchronously, but will be
1157 // available to a subsequent ViewHostMsg_GetCookies request.
1158 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1159 int /* render_frame_id */,
1160 GURL /* url */,
1161 GURL /* first_party_for_cookies */,
1162 std::string /* cookie */)
1164 // Used to get cookies for the given URL. This may block waiting for a
1165 // previous SetCookie message to be processed.
1166 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1167 int /* render_frame_id */,
1168 GURL /* url */,
1169 GURL /* first_party_for_cookies */,
1170 std::string /* cookies */)
1172 // Used to get raw cookie information for the given URL. This may block
1173 // waiting for a previous SetCookie message to be processed.
1174 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1175 GURL /* url */,
1176 GURL /* first_party_for_cookies */,
1177 std::vector<content::CookieData>
1178 /* raw_cookies */)
1180 // Used to delete cookie for the given URL and name
1181 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1182 GURL /* url */,
1183 std::string /* cookie_name */)
1185 // Used to check if cookies are enabled for the given URL. This may block
1186 // waiting for a previous SetCookie message to be processed.
1187 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1188 int /* render_frame_id */,
1189 GURL /* url */,
1190 GURL /* first_party_for_cookies */,
1191 bool /* cookies_enabled */)
1193 // Used to get the list of plugins
1194 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1195 bool /* refresh*/,
1196 std::vector<content::WebPluginInfo> /* plugins */)
1198 #if defined(OS_WIN)
1199 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1200 gfx::NativeViewId /* dummy_activation_window */)
1202 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1203 gfx::NativeViewId /* dummy_activation_window */)
1205 // Asks the browser for the user's monitor profile.
1206 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1207 std::vector<char> /* profile */)
1208 #endif
1210 // Get the list of proxies to use for |url|, as a semicolon delimited list
1211 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1212 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1213 GURL /* url */,
1214 bool /* result */,
1215 std::string /* proxy list */)
1217 // A renderer sends this to the browser process when it wants to create a
1218 // worker. The browser will create the worker process if necessary, and
1219 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1220 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1221 ViewHostMsg_CreateWorker_Params,
1222 int /* route_id */)
1224 // A renderer sends this to the browser process when a document has been
1225 // detached. The browser will use this to constrain the lifecycle of worker
1226 // processes (SharedWorkers are shut down when their last associated document
1227 // is detached).
1228 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1229 uint64 /* document_id */)
1231 // Wraps an IPC message that's destined to the worker on the renderer->browser
1232 // hop.
1233 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1234 IPC::Message /* message */)
1236 // Tells the browser that a specific Appcache manifest in the current page
1237 // was accessed.
1238 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1239 GURL /* manifest url */,
1240 bool /* blocked by policy */)
1242 // Initiates a download based on user actions like 'ALT+click'.
1243 IPC_MESSAGE_CONTROL4(ViewHostMsg_DownloadUrl,
1244 int /* render_view_id */,
1245 GURL /* url */,
1246 content::Referrer /* referrer */,
1247 base::string16 /* suggested_name */)
1249 // Used to go to the session history entry at the given offset (ie, -1 will
1250 // return the "back" item).
1251 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1252 int /* offset (from current) of history item to get */)
1254 // Sent from an inactive renderer for the browser to route to the active
1255 // renderer, instructing it to close.
1256 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1258 // Sent to the browser from an inactive renderer to post a message to the
1259 // active renderer.
1260 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1261 ViewMsg_PostMessage_Params)
1263 // Notifies that the preferred size of the content changed.
1264 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1265 gfx::Size /* pref_size */)
1267 // Notifies whether there are JavaScript touch event handlers or not.
1268 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1269 bool /* has_handlers */)
1271 // A message from HTML-based UI. When (trusted) Javascript calls
1272 // send(message, args), this message is sent to the browser.
1273 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1274 GURL /* source_url */,
1275 std::string /* message */,
1276 base::ListValue /* args */)
1278 #if defined(ENABLE_PLUGINS)
1279 // A renderer sends this to the browser process when it wants to create a ppapi
1280 // plugin. The browser will create the plugin process if necessary, and will
1281 // return a handle to the channel on success.
1283 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1284 // process. This ID is valid only in the context of the browser process and is
1285 // used to identify the proper process when the renderer notifies it that the
1286 // plugin is hung.
1288 // On error an empty string and null handles are returned.
1289 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1290 base::FilePath /* path */,
1291 IPC::ChannelHandle /* handle to channel */,
1292 base::ProcessId /* plugin_pid */,
1293 int /* plugin_child_id */)
1295 // Notification that a plugin has created a new plugin instance. The parameters
1296 // indicate:
1297 // -The plugin process ID that we're creating the instance for.
1298 // -The instance ID of the instance being created.
1299 // -A PepperRendererInstanceData struct which contains properties from the
1300 // renderer which are associated with the plugin instance. This includes the
1301 // routing ID of the associated render view and the URL of plugin.
1302 // -Whether the plugin we're creating an instance for is external or internal.
1304 // This message must be sync even though it returns no parameters to avoid
1305 // a race condition with the plugin process. The plugin process sends messages
1306 // to the browser that assume the browser knows about the instance. We need to
1307 // make sure that the browser actually knows about the instance before we tell
1308 // the plugin to run.
1309 IPC_SYNC_MESSAGE_CONTROL4_0(
1310 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1311 int /* plugin_child_id */,
1312 int32 /* pp_instance */,
1313 content::PepperRendererInstanceData /* creation_data */,
1314 bool /* is_external */)
1316 // Notification that a plugin has destroyed an instance. This is the opposite of
1317 // the "DidCreate" message above.
1318 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1319 int /* plugin_child_id */,
1320 int32 /* pp_instance */,
1321 bool /* is_external */)
1323 // Message from the renderer to the browser indicating the in-process instance
1324 // has been created.
1325 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1326 int32 /* instance */,
1327 content::PepperRendererInstanceData /* instance_data */)
1329 // Message from the renderer to the browser indicating the in-process instance
1330 // has been destroyed.
1331 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1332 int32 /* instance */)
1334 // A renderer sends this to the browser process when it wants to
1335 // create a ppapi broker. The browser will create the broker process
1336 // if necessary, and will return a handle to the channel on success.
1337 // On error an empty string is returned.
1338 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1339 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1340 int /* routing_id */,
1341 base::FilePath /* path */)
1343 // A renderer sends this to the browser process when it wants to access a PPAPI
1344 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1345 // for every connection.
1346 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1347 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1348 int /* routing_id */,
1349 GURL /* document_url */,
1350 base::FilePath /* plugin_path */)
1351 #endif // defined(ENABLE_PLUGINS)
1353 // Send the tooltip text for the current mouse position to the browser.
1354 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1355 base::string16 /* tooltip text string */,
1356 blink::WebTextDirection /* text direction hint */)
1358 // Notification that the text selection has changed.
1359 // Note: The secound parameter is the character based offset of the
1360 // base::string16
1361 // text in the document.
1362 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1363 base::string16 /* text covers the selection range */,
1364 size_t /* the offset of the text in the document */,
1365 gfx::Range /* selection range in the document */)
1367 // Notification that the selection bounds have changed.
1368 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1369 ViewHostMsg_SelectionBounds_Params)
1371 // Asks the browser to display the file chooser. The result is returned in a
1372 // ViewMsg_RunFileChooserResponse message.
1373 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1374 content::FileChooserParams)
1376 // Asks the browser to enumerate a directory. This is equivalent to running
1377 // the file chooser in directory-enumeration mode and having the user select
1378 // the given directory. The result is returned in a
1379 // ViewMsg_EnumerateDirectoryResponse message.
1380 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1381 int /* request_id */,
1382 base::FilePath /* file_path */)
1384 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1385 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1386 // a string only to work around size limitations for GURLs in IPC messages.
1387 IPC_MESSAGE_CONTROL2(ViewHostMsg_SaveImageFromDataURL,
1388 int /* render_view_id */,
1389 std::string /* data_url */)
1391 // Tells the browser to move the focus to the next (previous if reverse is
1392 // true) focusable element.
1393 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1394 bool /* reverse */)
1396 // Required for opening a date/time dialog
1397 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1398 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1400 IPC_MESSAGE_ROUTED4(ViewHostMsg_TextInputTypeChanged,
1401 ui::TextInputType /* TextInputType of the focused node */,
1402 ui::TextInputMode /* TextInputMode of the focused node */,
1403 bool /* can_compose_inline in the focused node */,
1404 int /* flags in the focused node */)
1406 // Required for updating text input state.
1407 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1408 ViewHostMsg_TextInputState_Params /* input state params */)
1410 // Sent when the renderer changes the zoom level for a particular url, so the
1411 // browser can update its records. If the view is a plugin doc, then url is
1412 // used to update the zoom level for all pages in that site. Otherwise, the
1413 // render view's id is used so that only the menu is updated.
1414 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1415 double /* zoom_level */,
1416 GURL /* url */)
1418 // Updates the minimum/maximum allowed zoom percent for this tab from the
1419 // default values. If |remember| is true, then the zoom setting is applied to
1420 // other pages in the site and is saved, otherwise it only applies to this
1421 // tab.
1422 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1423 int /* minimum_percent */,
1424 int /* maximum_percent */)
1426 // Notify the browser that this render process can or can't be suddenly
1427 // terminated.
1428 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1429 bool /* enabled */)
1431 IPC_MESSAGE_ROUTED3(
1432 ViewHostMsg_SwapCompositorFrame,
1433 uint32 /* output_surface_id */,
1434 cc::CompositorFrame /* frame */,
1435 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1437 // Sent by the compositor when a flinging animation is stopped.
1438 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1440 //---------------------------------------------------------------------------
1441 // Request for cryptographic operation messages:
1442 // These are messages from the renderer to the browser to perform a
1443 // cryptographic operation.
1445 // Asks the browser process to generate a keypair for grabbing a client
1446 // certificate from a CA (<keygen> tag), and returns the signed public
1447 // key and challenge string.
1448 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1449 uint32 /* key size index */,
1450 std::string /* challenge string */,
1451 GURL /* URL of requestor */,
1452 std::string /* signed public key and challenge */)
1454 // Message sent from the renderer to the browser to request that the browser
1455 // cache |data| associated with |url|.
1456 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1457 GURL /* url */,
1458 double /* expected_response_time */,
1459 std::vector<char> /* data */)
1461 // Register a new handler for URL requests with the given scheme.
1462 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1463 std::string /* scheme */,
1464 GURL /* url */,
1465 base::string16 /* title */,
1466 bool /* user_gesture */)
1468 // Unregister the registered handler for URL requests with the given scheme.
1469 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler,
1470 std::string /* scheme */,
1471 GURL /* url */,
1472 bool /* user_gesture */)
1474 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1475 // See the comment in chrome/browser/ui/browser.h for more details.
1476 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1477 bool /* enter_fullscreen */)
1479 // Send back a string to be recorded by UserMetrics.
1480 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1481 std::string /* action */)
1483 // Notifies the browser that the page was or was not saved as MHTML.
1484 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1485 int /* job_id */,
1486 int64 /* size of the MHTML file, -1 if error */)
1488 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1489 std::vector<GURL> /* all savable resource links */,
1490 std::vector<content::Referrer> /* all referrers */,
1491 std::vector<GURL> /* all frame links */)
1493 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1494 GURL /* frame's url */,
1495 std::string /* data buffer */,
1496 int32 /* complete status */)
1498 // Notifies the browser of an event occurring in the media pipeline.
1499 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1500 std::vector<media::MediaLogEvent> /* events */)
1502 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1503 // being sent back.
1504 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1505 // pop up a bubble to ask for user permission or take mouse lock content into
1506 // account.
1507 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1508 bool /* user_gesture */,
1509 bool /* last_unlocked_by_target */,
1510 bool /* privileged */)
1512 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1513 // whenever the mouse is unlocked (which may or may not be caused by
1514 // ViewHostMsg_UnlockMouse).
1515 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1517 // Notifies that multiple touch targets may have been pressed, and to show
1518 // the disambiguation popup.
1519 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1520 gfx::Rect, /* Border of touched targets */
1521 gfx::Size, /* Size of zoomed image */
1522 cc::SharedBitmapId /* id */)
1524 // Sent by the renderer process to check whether client 3D APIs
1525 // (Pepper 3D, WebGL) are explicitly blocked.
1526 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1527 int /* render_view_id */,
1528 GURL /* top_origin_url */,
1529 content::ThreeDAPIType /* requester */,
1530 bool /* blocked */)
1532 // Sent by the renderer process to indicate that a context was lost by
1533 // client 3D content (Pepper 3D, WebGL) running on the page at the
1534 // given URL.
1535 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1536 GURL /* top_origin_url */,
1537 content::ThreeDAPIType /* context_type */,
1538 int /* arb_robustness_status_code */)
1540 // Notifies the browser that document has parsed the body. This is used by the
1541 // ResourceScheduler as an indication that bandwidth contention won't block
1542 // first paint.
1543 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1545 // Notification that the urls for the favicon of a site has been determined.
1546 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1547 std::vector<content::FaviconURL> /* candidates */)
1549 // Sent by the renderer to the browser to start a vibration with the given
1550 // duration.
1551 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1552 int64 /* milliseconds */)
1554 // Sent by the renderer to the browser to cancel the currently running
1555 // vibration, if there is one.
1556 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1558 // Message sent from renderer to the browser when the element that is focused
1559 // has been touched. A bool is passed in this message which indicates if the
1560 // node is editable.
1561 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1562 bool /* editable */)
1564 // Message sent from the renderer to the browser when an HTML form has failed
1565 // validation constraints.
1566 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1567 gfx::Rect /* anchor rectangle in root view coordinate */,
1568 base::string16 /* validation message */,
1569 base::string16 /* supplemental text */)
1571 // Message sent from the renderer to the browser when a HTML form validation
1572 // message should be hidden from view.
1573 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1575 // Message sent from the renderer to the browser when the suggested co-ordinates
1576 // of the anchor for a HTML form validation message have changed.
1577 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1578 gfx::Rect /* anchor rectangle in root view coordinate */)
1580 #if defined(OS_ANDROID)
1581 // Response to ViewMsg_FindMatchRects.
1583 // |version| will contain the current version number of the renderer's find
1584 // match list (incremented whenever they change), which should be passed in the
1585 // next call to ViewMsg_FindMatchRects.
1587 // |rects| will either contain a list of the enclosing rects of all matches
1588 // found by the most recent Find operation, or will be empty if |version| is not
1589 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1590 // your locally cached rects should still be valid). The rect coords will be
1591 // custom normalized fractions of the document size. The rects will be sorted by
1592 // frame traversal order starting in the main frame, then by dom order.
1594 // |active_rect| will contain the bounding box of the active find-in-page match
1595 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1596 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1597 int /* version */,
1598 std::vector<gfx::RectF> /* rects */,
1599 gfx::RectF /* active_rect */)
1601 // Start an android intent with the given URI.
1602 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1603 GURL /* content_url */)
1605 // Message sent when the renderer changed the background color for the view.
1606 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1607 uint32 /* bg_color */)
1609 // This message runs the MediaCodec for decoding audio for webaudio.
1610 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1611 base::SharedMemoryHandle /* encoded_data_handle */,
1612 base::FileDescriptor /* pcm_output */,
1613 uint32_t /* data_size*/)
1615 // Reply to the ViewMsg_ExtractSmartClipData message.
1616 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1617 base::string16 /* text */,
1618 base::string16 /* html */,
1619 gfx::Rect /* rect */)
1621 #elif defined(OS_MACOSX)
1622 // Request that the browser load a font into shared memory for us.
1623 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1624 FontDescriptor /* font to load */,
1625 uint32 /* buffer size */,
1626 base::SharedMemoryHandle /* font data */,
1627 uint32 /* font id */)
1629 // Informs the browser that a plugin has gained or lost focus.
1630 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1631 bool, /* focused */
1632 int /* plugin_id */)
1634 // Instructs the browser to start plugin IME.
1635 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1637 // Receives content of a web page as plain text.
1638 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1640 #elif defined(OS_WIN)
1641 // Request that the given font characters be loaded by the browser so it's
1642 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1643 // for details.
1644 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1645 LOGFONT /* font_data */,
1646 base::string16 /* characters */)
1647 #endif
1649 #if defined(OS_POSIX)
1650 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1651 // this call exists for the renderer to ask the browser to allocate memory
1652 // on its behalf. We return a file descriptor to the POSIX shared memory.
1653 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1654 // by the browser, and it is the caller's repsonsibility to send a
1655 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1656 // In all cases, the caller is responsible for deleting the resulting
1657 // TransportDIB.
1658 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1659 uint32_t, /* bytes requested */
1660 bool, /* cache in the browser */
1661 TransportDIB::Handle /* DIB */)
1663 // Since the browser keeps handles to the allocated transport DIBs, this
1664 // message is sent to tell the browser that it may release them when the
1665 // renderer is finished with them.
1666 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1667 TransportDIB::Id /* DIB id */)
1668 #endif
1670 // Adding a new message? Stick to the sort order above: first platform
1671 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1672 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.