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