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_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 "ipc/ipc_channel_handle.h"
33 #include "ipc/ipc_message_macros.h"
34 #include "ipc/ipc_platform_file.h"
35 #include "media/audio/audio_parameters.h"
36 #include "media/base/channel_layout.h"
37 #include "media/base/media_log_event.h"
38 #include "net/base/network_change_notifier.h"
39 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
40 #include "third_party/WebKit/public/platform/WebFloatRect.h"
41 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
42 #include "third_party/WebKit/public/web/WebFindOptions.h"
43 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
44 #include "third_party/WebKit/public/web/WebPluginAction.h"
45 #include "third_party/WebKit/public/web/WebPopupType.h"
46 #include "third_party/WebKit/public/web/WebTextDirection.h"
47 #include "third_party/skia/include/core/SkBitmap.h"
48 #include "ui/base/ime/text_input_mode.h"
49 #include "ui/base/ime/text_input_type.h"
50 #include "ui/base/ui_base_types.h"
51 #include "ui/gfx/ipc/gfx_param_traits.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 #if defined(ENABLE_PLUGINS)
66 #include "content/common/pepper_renderer_instance_data.h"
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(content::NavigationGesture)
87 IPC_ENUM_TRAITS(content::PageZoom)
88 IPC_ENUM_TRAITS(gfx::FontRenderParams::Hinting)
89 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering)
90 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
91 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
92 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
93 content::STOP_FIND_ACTION_LAST)
94 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
95 content::THREE_D_API_TYPE_LAST)
96 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1)
97 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
98 media::MediaLogEvent::TYPE_LAST)
99 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
100 IPC_ENUM_TRAITS(ui::TextInputType)
102 #if defined(OS_MACOSX)
103 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
104 IPC_STRUCT_TRAITS_MEMBER(font_name)
105 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
106 IPC_STRUCT_TRAITS_END()
109 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
110 IPC_STRUCT_TRAITS_MEMBER(forward)
111 IPC_STRUCT_TRAITS_MEMBER(matchCase)
112 IPC_STRUCT_TRAITS_MEMBER(findNext)
113 IPC_STRUCT_TRAITS_END()
115 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
116 IPC_STRUCT_TRAITS_MEMBER(type)
117 IPC_STRUCT_TRAITS_MEMBER(enable)
118 IPC_STRUCT_TRAITS_END()
120 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
121 IPC_STRUCT_TRAITS_MEMBER(type)
122 IPC_STRUCT_TRAITS_MEMBER(enable)
123 IPC_STRUCT_TRAITS_END()
125 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
126 IPC_STRUCT_TRAITS_MEMBER(x)
127 IPC_STRUCT_TRAITS_MEMBER(y)
128 IPC_STRUCT_TRAITS_END()
130 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
131 IPC_STRUCT_TRAITS_MEMBER(x)
132 IPC_STRUCT_TRAITS_MEMBER(y)
133 IPC_STRUCT_TRAITS_MEMBER(width)
134 IPC_STRUCT_TRAITS_MEMBER(height)
135 IPC_STRUCT_TRAITS_END()
137 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
138 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
139 IPC_STRUCT_TRAITS_MEMBER(depth)
140 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
141 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
142 IPC_STRUCT_TRAITS_MEMBER(rect)
143 IPC_STRUCT_TRAITS_MEMBER(availableRect)
144 IPC_STRUCT_TRAITS_MEMBER(orientationType)
145 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
146 IPC_STRUCT_TRAITS_END()
148 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
149 IPC_STRUCT_TRAITS_MEMBER(label)
150 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
151 IPC_STRUCT_TRAITS_MEMBER(type)
152 IPC_STRUCT_TRAITS_MEMBER(action)
153 IPC_STRUCT_TRAITS_MEMBER(rtl)
154 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
155 IPC_STRUCT_TRAITS_MEMBER(enabled)
156 IPC_STRUCT_TRAITS_MEMBER(checked)
157 IPC_STRUCT_TRAITS_MEMBER(submenu)
158 IPC_STRUCT_TRAITS_END()
160 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
161 IPC_STRUCT_TRAITS_MEMBER(value)
162 IPC_STRUCT_TRAITS_MEMBER(localized_value)
163 IPC_STRUCT_TRAITS_MEMBER(label)
164 IPC_STRUCT_TRAITS_END()
166 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
167 IPC_STRUCT_TRAITS_MEMBER(icon_url)
168 IPC_STRUCT_TRAITS_MEMBER(icon_type)
169 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
170 IPC_STRUCT_TRAITS_END()
172 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
173 IPC_STRUCT_TRAITS_MEMBER(mode)
174 IPC_STRUCT_TRAITS_MEMBER(title)
175 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
176 IPC_STRUCT_TRAITS_MEMBER(accept_types)
177 #if defined(OS_ANDROID)
178 IPC_STRUCT_TRAITS_MEMBER(capture)
180 IPC_STRUCT_TRAITS_END()
182 #if defined(ENABLE_PLUGINS)
183 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
184 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
185 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
186 IPC_STRUCT_TRAITS_MEMBER(document_url)
187 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
188 IPC_STRUCT_TRAITS_END()
191 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
192 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
193 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
194 IPC_STRUCT_TRAITS_MEMBER(hinting)
195 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
196 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
197 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
198 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
199 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
200 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
201 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
202 IPC_STRUCT_TRAITS_MEMBER(track_color)
203 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
204 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
205 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
206 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
207 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
208 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
209 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
210 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
211 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
212 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
213 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
214 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
215 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
216 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
217 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
218 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
219 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
220 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
221 IPC_STRUCT_TRAITS_END()
223 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
224 IPC_STRUCT_TRAITS_MEMBER(name)
225 IPC_STRUCT_TRAITS_MEMBER(value)
226 IPC_STRUCT_TRAITS_MEMBER(domain)
227 IPC_STRUCT_TRAITS_MEMBER(path)
228 IPC_STRUCT_TRAITS_MEMBER(expires)
229 IPC_STRUCT_TRAITS_MEMBER(http_only)
230 IPC_STRUCT_TRAITS_MEMBER(secure)
231 IPC_STRUCT_TRAITS_MEMBER(session)
232 IPC_STRUCT_TRAITS_END()
234 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
235 IPC_STRUCT_TRAITS_MEMBER(window)
236 IPC_STRUCT_TRAITS_MEMBER(window_rect)
237 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
238 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
239 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
240 IPC_STRUCT_TRAITS_MEMBER(visible)
241 IPC_STRUCT_TRAITS_END()
243 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
244 IPC_STRUCT_TRAITS_MEMBER(id)
245 IPC_STRUCT_TRAITS_MEMBER(type)
246 IPC_STRUCT_TRAITS_MEMBER(params)
247 IPC_STRUCT_TRAITS_MEMBER(time)
248 IPC_STRUCT_TRAITS_END()
250 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo)
251 IPC_STRUCT_TRAITS_MEMBER(file_path)
252 IPC_STRUCT_TRAITS_MEMBER(local_path)
253 IPC_STRUCT_TRAITS_MEMBER(display_name)
254 IPC_STRUCT_TRAITS_END()
256 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
257 // Routing ID of the view initiating the open.
258 IPC_STRUCT_MEMBER(int, opener_id)
260 // True if this open request came in the context of a user gesture.
261 IPC_STRUCT_MEMBER(bool, user_gesture)
263 // Type of window requested.
264 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
266 // The session storage namespace ID this view should use.
267 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
269 // The name of the resulting frame that should be created (empty if none
270 // has been specified).
271 IPC_STRUCT_MEMBER(base::string16, frame_name)
273 // The routing id of the frame initiating the open.
274 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
276 // The URL of the frame initiating the open.
277 IPC_STRUCT_MEMBER(GURL, opener_url)
279 // The URL of the top frame containing the opener.
280 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
282 // The security origin of the frame initiating the open.
283 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
285 // Whether the opener will be suppressed in the new window, in which case
286 // scripting the new window is not allowed.
287 IPC_STRUCT_MEMBER(bool, opener_suppressed)
289 // Whether the window should be opened in the foreground, background, etc.
290 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
292 // The URL that will be loaded in the new window (empty if none has been
294 IPC_STRUCT_MEMBER(GURL, target_url)
296 // The referrer that will be used to load |target_url| (empty if none has
298 IPC_STRUCT_MEMBER(content::Referrer, referrer)
300 // The window features to use for the new view.
301 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
303 // The additional window features to use for the new view. We pass these
304 // separately from |features| above because we cannot serialize WebStrings
306 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
309 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
310 // URL for the worker script.
311 IPC_STRUCT_MEMBER(GURL, url)
313 // Name for a SharedWorker, otherwise empty string.
314 IPC_STRUCT_MEMBER(base::string16, name)
316 // Security policy used in the worker.
317 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
319 // Security policy type used in the worker.
320 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
322 // The ID of the parent document (unique within parent renderer).
323 IPC_STRUCT_MEMBER(unsigned long long, document_id)
325 // RenderFrame routing id used to send messages back to the parent.
326 IPC_STRUCT_MEMBER(int, render_frame_route_id)
329 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
330 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
331 IPC_STRUCT_MEMBER(double, dialog_value)
332 IPC_STRUCT_MEMBER(double, minimum)
333 IPC_STRUCT_MEMBER(double, maximum)
334 IPC_STRUCT_MEMBER(double, step)
335 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
338 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
339 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
340 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
341 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
342 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
343 IPC_STRUCT_MEMBER(bool, is_anchor_first)
346 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
347 // The type of input field
348 IPC_STRUCT_MEMBER(ui::TextInputType, type)
350 // The mode of input field
351 IPC_STRUCT_MEMBER(ui::TextInputMode, mode)
353 // The flags of the input field (autocorrect, autocomplete, etc.)
354 IPC_STRUCT_MEMBER(int, flags)
356 // The value of the input field
357 IPC_STRUCT_MEMBER(std::string, value)
359 // The cursor position of the current selection start, or the caret position
360 // if nothing is selected
361 IPC_STRUCT_MEMBER(int, selection_start)
363 // The cursor position of the current selection end, or the caret position
364 // if nothing is selected
365 IPC_STRUCT_MEMBER(int, selection_end)
367 // The start position of the current composition, or -1 if there is none
368 IPC_STRUCT_MEMBER(int, composition_start)
370 // The end position of the current composition, or -1 if there is none
371 IPC_STRUCT_MEMBER(int, composition_end)
373 // Whether or not inline composition can be performed for the current input.
374 IPC_STRUCT_MEMBER(bool, can_compose_inline)
376 // Whether or not the IME should be shown as a result of this update. Even if
377 // true, the IME will only be shown if the type is appropriate (e.g. not
378 // TEXT_INPUT_TYPE_NONE).
379 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
381 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
382 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
385 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
386 // The size of the RenderView when this message was generated. This is
387 // included so the host knows how large the view is from the perspective of
388 // the renderer process. This is necessary in case a resize operation is in
389 // progress. If auto-resize is enabled, this should update the corresponding
391 IPC_STRUCT_MEMBER(gfx::Size, view_size)
393 // New window locations for plugin child windows.
394 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
397 // The following describes the various bits that may be set in flags:
399 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
400 // Indicates that this is a response to a ViewMsg_Resize message.
402 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
403 // Indicates that this is a response to a ViewMsg_Repaint message.
405 // If flags is zero, then this message corresponds to an unsolicited paint
406 // request by the render view. Any of the above bits may be set in flags,
407 // which would indicate that this paint message is an ACK for multiple
409 IPC_STRUCT_MEMBER(int, flags)
412 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
413 // Renderer-wide preferences.
414 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
416 // Preferences for this view.
417 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
419 // The ID of the view to be created.
420 IPC_STRUCT_MEMBER(int32, view_id)
422 // The ID of the main frame hosted in the view.
423 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
425 // The ID of the rendering surface.
426 IPC_STRUCT_MEMBER(int32, surface_id)
428 // The session storage namespace ID this view should use.
429 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
431 // The name of the frame associated with this view (or empty if none).
432 IPC_STRUCT_MEMBER(base::string16, frame_name)
434 // The route ID of the opener RenderView if we need to set one
435 // (MSG_ROUTING_NONE otherwise).
436 IPC_STRUCT_MEMBER(int, opener_route_id)
438 // Whether the RenderView should initially be swapped out.
439 IPC_STRUCT_MEMBER(bool, swapped_out)
441 // The ID of the proxy object for the main frame in this view. It is only
442 // used if |swapped_out| is true.
443 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
445 // Whether the RenderView should initially be hidden.
446 IPC_STRUCT_MEMBER(bool, hidden)
448 // Whether the RenderView will never be visible.
449 IPC_STRUCT_MEMBER(bool, never_visible)
451 // Whether the window associated with this view was created with an opener.
452 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
454 // The initial page ID to use for this view, which must be larger than any
455 // existing navigation that might be loaded in the view. Page IDs are unique
456 // to a view and are only updated by the renderer after this initial value.
457 IPC_STRUCT_MEMBER(int32, next_page_id)
459 // The properties of the screen associated with the view.
460 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
463 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
464 // Whether the data format is supplied as serialized script value, or as
465 // a simple string. If it is a raw string, must be converted from string to a
466 // WebSerializedScriptValue in renderer.
467 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
468 // The serialized script value.
469 IPC_STRUCT_MEMBER(base::string16, data)
470 // When sent to the browser, this is the routing ID of the source frame in
471 // the source process. The browser replaces it with the routing ID of the
472 // equivalent (swapped out) frame in the destination process.
473 IPC_STRUCT_MEMBER(int, source_routing_id)
475 // The origin of the source frame.
476 IPC_STRUCT_MEMBER(base::string16, source_origin)
478 // The origin for the message's target.
479 IPC_STRUCT_MEMBER(base::string16, target_origin)
481 // Information about the MessagePorts this message contains.
482 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
483 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
486 // Messages sent from the browser to the renderer.
488 #if defined(OS_ANDROID)
489 // Tells the renderer to cancel an opened date/time dialog.
490 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
492 // Replaces a date time input field.
493 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
494 double /* dialog_value */)
498 // Get all savable resource links from current webpage, include main
499 // frame and sub-frame.
500 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
501 GURL /* url of page which is needed to save */)
503 // Get html data by serializing all frames of current page with lists
504 // which contain all resource links that have local copy.
505 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
506 std::vector<GURL> /* urls that have local copy */,
507 std::vector<base::FilePath> /* paths of local copy */,
508 base::FilePath /* local directory path */)
510 // Tells the render side that a ViewHostMsg_LockMouse message has been
511 // processed. |succeeded| indicates whether the mouse has been successfully
513 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
514 bool /* succeeded */)
515 // Tells the render side that the mouse has been unlocked.
516 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
518 // Sent by the browser when the parameters for vsync alignment have changed.
519 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
520 base::TimeTicks /* timebase */,
521 base::TimeDelta /* interval */)
523 // Sent to the RenderView when a new tab is swapped into an existing
524 // tab and the histories need to be merged. The existing tab has a history of
525 // |merged_history_length| which precedes the history of the new tab. All
526 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
528 // For example, suppose the history of page_ids in the new tab's RenderView
529 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
530 // all pages in the new tab with page_id >= 7 are to be preserved.
531 // The resulting page history is [-1 -1 -1 7 8].
532 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
533 int, /* merge_history_length */
534 int32 /* minimum_page_id */)
536 // Tells the renderer to create a new view.
537 // This message is slightly different, the view it takes (via
538 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
539 // non-view control message.
540 IPC_MESSAGE_CONTROL1(ViewMsg_New,
543 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
544 // similar to the new command, but used when the renderer created a view
545 // first, and we need to update it.
546 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
548 // Sends updated preferences to the renderer.
549 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
550 content::RendererPreferences)
552 // This passes a set of webkit preferences down to the renderer.
553 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
554 content::WebPreferences)
556 // Informs the renderer that the timezone has changed.
557 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
559 // Tells the render view to close.
560 // Expects a Close_ACK message when finished.
561 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
563 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
564 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
565 IPC_STRUCT_MEMBER(gfx::Size, new_size)
566 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
567 IPC_STRUCT_MEMBER(float, top_controls_layout_height)
568 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
569 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
570 IPC_STRUCT_MEMBER(bool, is_fullscreen)
573 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
574 // is generated in response provided new_size is not empty and not equal to
575 // the view's current size. The generated ViewHostMsg_UpdateRect message will
576 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
577 // we don't have to fetch it every time WebKit asks for it.
578 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
579 ViewMsg_Resize_Params /* params */)
581 // Tells the render view that the resize rect has changed.
582 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
583 gfx::Rect /* resizer_rect */)
585 // Sent to inform the view that it was hidden. This allows it to reduce its
586 // resource utilization.
587 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
589 // Tells the render view that it is no longer hidden (see WasHidden), and the
590 // render view is expected to respond with a full repaint if needs_repainting
591 // is true. If needs_repainting is false, then this message does not trigger a
592 // message in response.
593 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown,
594 bool /* needs_repainting */,
595 ui::LatencyInfo /* latency_info */)
597 // Tells the renderer to focus the first (last if reverse is true) focusable
599 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
602 // Sent to inform the renderer to invoke a context menu.
603 // The parameter specifies the location in the render view's coordinates.
604 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
606 gfx::Point /* location where menu should be shown */)
608 // Sent when the user wants to search for a word on the page (find in page).
609 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
610 int /* request_id */,
611 base::string16 /* search_text */,
612 blink::WebFindOptions)
614 // This message notifies the renderer that the user has closed the FindInPage
615 // window (and what action to take regarding the selection).
616 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
617 content::StopFindAction /* action */)
619 // Copies the image at location x, y to the clipboard (if there indeed is an
620 // image at that location).
621 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
625 // Saves the image at location x, y to the disk (if there indeed is an
626 // image at that location).
627 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
631 // Tells the renderer to perform the given action on the media player
632 // located at the given point.
633 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
634 gfx::Point, /* location */
635 blink::WebMediaPlayerAction)
637 // Tells the renderer to perform the given action on the plugin located at
639 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
640 gfx::Point, /* location */
641 blink::WebPluginAction)
643 // Posts a message from a frame in another process to the current renderer.
644 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
645 ViewMsg_PostMessage_Params)
647 // Change the zoom level for the current main frame. If the level actually
648 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
649 // telling it what url got zoomed and what its current zoom level is.
650 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
651 content::PageZoom /* function */)
653 // Set the zoom level for a particular url that the renderer is in the
654 // process of loading. This will be stored, to be used if the load commits
655 // and ignored otherwise.
656 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
658 double /* zoom_level */)
660 // Set the zoom level for a particular url, so all render views
661 // displaying this url can update their zoom levels to match.
662 // If scheme is empty, then only host is used for matching.
663 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
664 std::string /* scheme */,
665 std::string /* host */,
666 double /* zoom_level */)
668 // Set the zoom level for a particular render view.
669 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
670 bool /* uses_temporary_zoom_level */,
671 double /* zoom_level */)
673 // Change encoding of page in the renderer.
674 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
675 std::string /*new encoding name*/)
677 // Reset encoding of page in the renderer back to default.
678 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
680 // Used to tell a render view whether it should expose various bindings
681 // that allow JS content extended privileges. See BindingsPolicy for valid
683 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
684 int /* enabled_bindings_flags */)
686 // Tell the renderer to add a property to the WebUI binding object. This
687 // only works if we allowed WebUI bindings.
688 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
689 std::string /* property_name */,
690 std::string /* property_value_json */)
692 // This message starts/stop monitoring the input method status of the focused
693 // edit control of a renderer process.
695 // * is_active (bool)
696 // Indicates if an input method is active in the browser process.
697 // The possible actions when a renderer process receives this message are
700 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
701 // to notify the input method status of the focused edit control.
702 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
703 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
704 bool /* is_active */)
706 // IME API oncandidatewindow* events for InputMethodContext.
707 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
708 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
709 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
711 // Used to notify the render-view that we have received a target URL. Used
712 // to prevent target URLs spamming the browser.
713 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
715 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
716 std::vector<ui::SelectedFileInfo>)
718 // Provides the results of directory enumeration.
719 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
720 int /* request_id */,
721 std::vector<base::FilePath> /* files_in_directory */)
723 // When a renderer sends a ViewHostMsg_Focus to the browser process,
724 // the browser has the option of sending a ViewMsg_CantFocus back to
726 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
728 // Tells the renderer to suppress any further modal dialogs until it receives a
729 // corresponding ViewMsg_SwapOut message. This ensures that no
730 // PageGroupLoadDeferrer is on the stack for SwapOut.
731 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
733 // Instructs the renderer to close the current page, including running the
734 // onunload event handler.
736 // Expects a ClosePage_ACK message when finished.
737 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
739 // Notifies the renderer about ui theme changes
740 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
742 // Notifies the renderer that a paint is to be generated for the rectangle
744 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
745 gfx::Size /* The view size to be repainted */)
747 // Notification that a move or resize renderer's containing window has
749 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
751 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
752 gfx::Rect /* view_screen_rect */,
753 gfx::Rect /* window_screen_rect */)
755 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
756 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
757 // processed the move. The browser may have ignored the move, but it finished
758 // processing. This is used because the renderer keeps a temporary cache of
759 // the widget position while these asynchronous operations are in progress.
760 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
762 // Used to instruct the RenderView to send back updates to the preferred size.
763 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
765 // Used to instruct the RenderView to automatically resize and send back
766 // updates for the new size.
767 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
768 gfx::Size /* min_size */,
769 gfx::Size /* max_size */)
771 // Used to instruct the RenderView to disalbe automatically resize.
772 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
773 gfx::Size /* new_size */)
775 // Changes the text direction of the currently selected input field (if any).
776 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
777 blink::WebTextDirection /* direction */)
779 // Tells the renderer to clear the focused element (if any).
780 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
782 // Make the RenderView background transparent or opaque.
783 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
785 // Used to tell the renderer not to add scrollbars with height and
786 // width below a threshold.
787 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
788 gfx::Size /* disable_scrollbar_size_limit */)
790 // Activate/deactivate the RenderView (i.e., set its controls' tint
791 // accordingly, etc.).
792 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
795 // Response message to ViewHostMsg_CreateWorker.
796 // Sent when the worker has started.
797 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
799 // Sent when the worker failed to load the worker script.
800 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
801 // But if the shared worker of the same URL already exists and it has failed
802 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
803 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
804 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
806 // Sent when the worker has connected.
807 // This message is sent only if the worker successfully loaded the script.
808 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
810 // Tells the renderer that the network type has changed so that navigator.onLine
811 // and navigator.connection can be updated.
812 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
813 net::NetworkChangeNotifier::ConnectionType /* type */)
815 #if defined(ENABLE_PLUGINS)
816 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
817 // Tells the renderer that the channel to the broker has been created.
818 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
819 base::ProcessId /* broker_pid */,
820 IPC::ChannelHandle /* handle */)
822 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
823 // Tells the renderer whether permission to access to PPAPI broker was granted
825 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
828 // Tells the renderer to empty its plugin list cache, optional reloading
829 // pages containing plugins.
830 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
831 bool /* reload_pages */)
834 // Used to instruct the RenderView to go into "view source" mode.
835 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
837 // Instructs the renderer to save the current page to MHTML.
838 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
840 IPC::PlatformFileForTransit /* file handle */)
842 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
843 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
846 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
847 // process to release the magnified image.
848 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
849 cc::SharedBitmapId /* id */)
851 // Notifies the renderer that a snapshot has been retrieved.
852 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
853 int /* snapshot_id */,
854 gfx::Size /* size */,
855 std::vector<unsigned char> /* png */)
857 // Fetches complete rendered content of a web page as plain text.
858 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
860 #if defined(OS_MACOSX)
861 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
863 // Notification of a change in scrollbar appearance and/or behavior.
864 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
865 float /* initial_button_delay */,
866 float /* autoscroll_button_delay */,
867 bool /* jump_on_track_click */,
868 blink::ScrollerStyle /* preferred_scroller_style */,
872 #if defined(OS_ANDROID)
873 // Tells the renderer to suspend/resume the webkit timers.
874 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
877 // Sent when the browser wants the bounding boxes of the current find matches.
879 // If match rects are already cached on the browser side, |current_version|
880 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
881 // they came in, so the renderer can tell if it needs to send updated rects.
882 // Otherwise just pass -1 to always receive the list of rects.
884 // There must be an active search string (it is probably most useful to call
885 // this immediately after a ViewHostMsg_Find_Reply message arrives with
886 // final_update set to true).
887 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
888 int /* current_version */)
890 // Notifies the renderer whether hiding/showing the top controls is enabled
891 // and whether or not to animate to the proper state.
892 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
893 bool /* enable_hiding */,
894 bool /* enable_showing */,
897 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
899 // Sent by the browser when the renderer should generate a new frame.
900 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
901 cc::BeginFrameArgs /* args */)
903 // Sent by the browser when an IME update that requires acknowledgement has been
904 // processed on the browser side.
905 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
907 // Extracts the data at the given rect, returning it through the
908 // ViewHostMsg_SmartClipDataExtracted IPC.
909 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
910 gfx::Rect /* rect */)
912 #elif defined(OS_MACOSX)
913 // Let the RenderView know its window has changed visibility.
914 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
917 // Let the RenderView know its window's frame has changed.
918 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
919 gfx::Rect /* window frame */,
920 gfx::Rect /* content view frame */)
922 // Message sent from the browser to the renderer when the user starts or stops
923 // resizing the view.
924 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
927 // Tell the renderer that plugin IME has completed.
928 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
929 base::string16 /* text */,
933 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
934 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
935 uint32 /* output_surface_id */,
936 cc::CompositorFrameAck /* ack */)
938 // Sent by browser to tell renderer compositor that some resources that were
939 // given to the browser in a swap are not being used anymore.
940 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
941 uint32 /* output_surface_id */,
942 cc::CompositorFrameAck /* ack */)
944 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
946 // Sent by the browser to ask the renderer to redraw.
947 // If |request_id| is not zero, it is added to the forced frame's latency info
948 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
949 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
950 int /* request_id */)
952 // -----------------------------------------------------------------------------
953 // Messages sent from the renderer to the browser.
955 // Sent by the renderer when it is creating a new window. The browser creates
956 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
957 // MSG_ROUTING_NONE, the view couldn't be created.
958 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
959 ViewHostMsg_CreateWindow_Params,
961 int /* main_frame_route_id */,
962 int32 /* surface_id */,
963 int64 /* cloned_session_storage_namespace_id */)
965 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
966 // <select> dropdowns. This message is sent to the WebContentsImpl that
967 // contains the widget being created.
968 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
970 blink::WebPopupType /* popup type */,
972 int32 /* surface_id */)
974 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
976 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
979 int32 /* surface_id */)
981 // Asks the browser for a unique routing ID.
982 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
983 int /* routing_id */)
985 // Asks the browser for the default audio hardware configuration.
986 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
987 media::AudioParameters /* input parameters */,
988 media::AudioParameters /* output parameters */)
990 // Asks the browser for the renderer process memory size stats.
991 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
992 size_t /* private_bytes */,
993 size_t /* shared_bytes */)
995 // These three messages are sent to the parent RenderViewHost to display the
996 // page/widget that was created by
997 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
998 // refers to the id that was returned from the Create message above.
999 // The initial_position parameter is a rectangle in screen coordinates.
1001 // FUTURE: there will probably be flags here to control if the result is
1003 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1005 WindowOpenDisposition /* disposition */,
1006 gfx::Rect /* initial_pos */,
1007 bool /* opened_by_user_gesture */)
1009 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1011 gfx::Rect /* initial_pos */)
1013 // Message to show a full screen widget.
1014 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1017 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1018 // to run in a modal fashion until it is closed.
1019 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1020 int /* opener_id */)
1022 // Indicates the renderer is ready in response to a ViewMsg_New or
1023 // a ViewMsg_CreatingNew_ACK.
1024 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1026 // Indicates the renderer process is gone. This actually is sent by the
1027 // browser process to itself, but keeps the interface cleaner.
1028 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1029 int, /* this really is base::TerminationStatus */
1030 int /* exit_code */)
1032 // Sent by the renderer process to request that the browser close the view.
1033 // This corresponds to the window.close() API, and the browser may ignore
1034 // this message. Otherwise, the browser will generates a ViewMsg_Close
1035 // message to close the view.
1036 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1038 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1039 // throttle these messages.
1040 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1042 // Sent by the renderer process to request that the browser move the view.
1043 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1044 // the browser may ignore this message.
1045 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1046 gfx::Rect /* position */)
1048 // Result of string search in the page.
1049 // Response to ViewMsg_Find with the results of the requested find-in-page
1050 // search, the number of matches found and the selection rect (in screen
1051 // coordinates) for the string found. If |final_update| is false, it signals
1052 // that this is not the last Find_Reply message - more will be sent as the
1053 // scoping effort continues.
1054 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1055 int /* request_id */,
1056 int /* number of matches */,
1057 gfx::Rect /* selection_rect */,
1058 int /* active_match_ordinal */,
1059 bool /* final_update */)
1061 // Indicates that the render view has been closed in respose to a
1063 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1064 int /* old_route_id */)
1066 // Indicates that the current page has been closed, after a ClosePage
1068 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1070 // Notifies the browser that we have session history information.
1071 // page_id: unique ID that allows us to distinguish between history entries.
1072 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1073 int32 /* page_id */,
1074 content::PageState /* state */)
1076 // Notifies the browser that we want to show a destination url for a potential
1077 // action (e.g. when the user is hovering over a link).
1078 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL,
1081 // Sent when the document element is available for the top-level frame. This
1082 // happens after the page starts loading, but before all resources are
1084 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1085 bool /* uses_temporary_zoom_level */)
1087 // Sent when the renderer loads a resource from its memory cache.
1088 // The security info is non empty if the resource was originally loaded over
1089 // a secure connection.
1090 // Note: May only be sent once per URL per frame per committed load.
1091 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1093 std::string /* security info */,
1094 std::string /* http method */,
1095 std::string /* mime type */,
1096 content::ResourceType /* resource type */)
1098 // Sent when the renderer displays insecure content in a secure page.
1099 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1101 // Sent when the renderer runs insecure content in a secure origin.
1102 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1103 std::string /* security_origin */,
1104 GURL /* target URL */)
1106 // Sent to update part of the view. In response to this message, the host
1107 // generates a ViewMsg_UpdateRect_ACK message.
1108 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1109 ViewHostMsg_UpdateRect_Params)
1111 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1112 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1114 // Message sent from renderer to the browser when focus changes inside the
1115 // webpage. The parameter says whether the newly focused element needs
1116 // keyboard input (true for textfields, text areas and content editable divs).
1117 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1118 bool /* is_editable_node */)
1120 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1122 // Used to set a cookie. The cookie is set asynchronously, but will be
1123 // available to a subsequent ViewHostMsg_GetCookies request.
1124 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1125 int /* render_frame_id */,
1127 GURL /* first_party_for_cookies */,
1128 std::string /* cookie */)
1130 // Used to get cookies for the given URL. This may block waiting for a
1131 // previous SetCookie message to be processed.
1132 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1133 int /* render_frame_id */,
1135 GURL /* first_party_for_cookies */,
1136 std::string /* cookies */)
1138 // Used to get raw cookie information for the given URL. This may block
1139 // waiting for a previous SetCookie message to be processed.
1140 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1142 GURL /* first_party_for_cookies */,
1143 std::vector<content::CookieData>
1146 // Used to delete cookie for the given URL and name
1147 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1149 std::string /* cookie_name */)
1151 // Used to check if cookies are enabled for the given URL. This may block
1152 // waiting for a previous SetCookie message to be processed.
1153 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1154 int /* render_frame_id */,
1156 GURL /* first_party_for_cookies */,
1157 bool /* cookies_enabled */)
1159 // Used to get the list of plugins
1160 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1162 std::vector<content::WebPluginInfo> /* plugins */)
1165 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1166 gfx::NativeViewId /* dummy_activation_window */)
1168 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1169 gfx::NativeViewId /* dummy_activation_window */)
1171 // Asks the browser for the user's monitor profile.
1172 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1173 std::vector<char> /* profile */)
1176 // Get the list of proxies to use for |url|, as a semicolon delimited list
1177 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1178 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1181 std::string /* proxy list */)
1183 // A renderer sends this to the browser process when it wants to create a
1184 // worker. The browser will create the worker process if necessary, and
1185 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1186 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1187 ViewHostMsg_CreateWorker_Params,
1190 // A renderer sends this to the browser process when a document has been
1191 // detached. The browser will use this to constrain the lifecycle of worker
1192 // processes (SharedWorkers are shut down when their last associated document
1194 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1195 uint64 /* document_id */)
1197 // Wraps an IPC message that's destined to the worker on the renderer->browser
1199 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1200 IPC::Message /* message */)
1202 // Tells the browser that a specific Appcache manifest in the current page
1204 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1205 GURL /* manifest url */,
1206 bool /* blocked by policy */)
1208 // Initiates a download based on user actions like 'ALT+click'.
1209 IPC_MESSAGE_CONTROL4(ViewHostMsg_DownloadUrl,
1210 int /* render_view_id */,
1212 content::Referrer /* referrer */,
1213 base::string16 /* suggested_name */)
1215 // Used to go to the session history entry at the given offset (ie, -1 will
1216 // return the "back" item).
1217 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1218 int /* offset (from current) of history item to get */)
1220 // Sent from an inactive renderer for the browser to route to the active
1221 // renderer, instructing it to close.
1222 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1224 // Sent to the browser from an inactive renderer to post a message to the
1226 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1227 ViewMsg_PostMessage_Params)
1229 // Notifies that the preferred size of the content changed.
1230 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1231 gfx::Size /* pref_size */)
1233 // Notifies whether there are JavaScript touch event handlers or not.
1234 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1235 bool /* has_handlers */)
1237 // A message from HTML-based UI. When (trusted) Javascript calls
1238 // send(message, args), this message is sent to the browser.
1239 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1240 GURL /* source_url */,
1241 std::string /* message */,
1242 base::ListValue /* args */)
1244 #if defined(ENABLE_PLUGINS)
1245 // A renderer sends this to the browser process when it wants to create a ppapi
1246 // plugin. The browser will create the plugin process if necessary, and will
1247 // return a handle to the channel on success.
1249 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1250 // process. This ID is valid only in the context of the browser process and is
1251 // used to identify the proper process when the renderer notifies it that the
1254 // On error an empty string and null handles are returned.
1255 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1256 base::FilePath /* path */,
1257 IPC::ChannelHandle /* handle to channel */,
1258 base::ProcessId /* plugin_pid */,
1259 int /* plugin_child_id */)
1261 // Notification that a plugin has created a new plugin instance. The parameters
1263 // -The plugin process ID that we're creating the instance for.
1264 // -The instance ID of the instance being created.
1265 // -A PepperRendererInstanceData struct which contains properties from the
1266 // renderer which are associated with the plugin instance. This includes the
1267 // routing ID of the associated render view and the URL of plugin.
1268 // -Whether the plugin we're creating an instance for is external or internal.
1270 // This message must be sync even though it returns no parameters to avoid
1271 // a race condition with the plugin process. The plugin process sends messages
1272 // to the browser that assume the browser knows about the instance. We need to
1273 // make sure that the browser actually knows about the instance before we tell
1274 // the plugin to run.
1275 IPC_SYNC_MESSAGE_CONTROL4_0(
1276 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1277 int /* plugin_child_id */,
1278 int32 /* pp_instance */,
1279 content::PepperRendererInstanceData /* creation_data */,
1280 bool /* is_external */)
1282 // Notification that a plugin has destroyed an instance. This is the opposite of
1283 // the "DidCreate" message above.
1284 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1285 int /* plugin_child_id */,
1286 int32 /* pp_instance */,
1287 bool /* is_external */)
1289 // Message from the renderer to the browser indicating the in-process instance
1290 // has been created.
1291 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1292 int32 /* instance */,
1293 content::PepperRendererInstanceData /* instance_data */)
1295 // Message from the renderer to the browser indicating the in-process instance
1296 // has been destroyed.
1297 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1298 int32 /* instance */)
1300 // A renderer sends this to the browser process when it wants to
1301 // create a ppapi broker. The browser will create the broker process
1302 // if necessary, and will return a handle to the channel on success.
1303 // On error an empty string is returned.
1304 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1305 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1306 int /* routing_id */,
1307 base::FilePath /* path */)
1309 // A renderer sends this to the browser process when it wants to access a PPAPI
1310 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1311 // for every connection.
1312 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1313 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1314 int /* routing_id */,
1315 GURL /* document_url */,
1316 base::FilePath /* plugin_path */)
1317 #endif // defined(ENABLE_PLUGINS)
1319 // Send the tooltip text for the current mouse position to the browser.
1320 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1321 base::string16 /* tooltip text string */,
1322 blink::WebTextDirection /* text direction hint */)
1324 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
1325 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
1327 // Notification that the text selection has changed.
1328 // Note: The secound parameter is the character based offset of the
1330 // text in the document.
1331 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1332 base::string16 /* text covers the selection range */,
1333 size_t /* the offset of the text in the document */,
1334 gfx::Range /* selection range in the document */)
1336 // Notification that the selection bounds have changed.
1337 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1338 ViewHostMsg_SelectionBounds_Params)
1340 // Asks the browser to display the file chooser. The result is returned in a
1341 // ViewMsg_RunFileChooserResponse message.
1342 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1343 content::FileChooserParams)
1345 // Asks the browser to enumerate a directory. This is equivalent to running
1346 // the file chooser in directory-enumeration mode and having the user select
1347 // the given directory. The result is returned in a
1348 // ViewMsg_EnumerateDirectoryResponse message.
1349 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1350 int /* request_id */,
1351 base::FilePath /* file_path */)
1353 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1354 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1355 // a string only to work around size limitations for GURLs in IPC messages.
1356 IPC_MESSAGE_CONTROL2(ViewHostMsg_SaveImageFromDataURL,
1357 int /* render_view_id */,
1358 std::string /* data_url */)
1360 // Tells the browser to move the focus to the next (previous if reverse is
1361 // true) focusable element.
1362 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1365 // Required for opening a date/time dialog
1366 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1367 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1369 // Required for updating text input state.
1370 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1371 ViewHostMsg_TextInputState_Params /* input state params */)
1373 // Sent when the renderer changes the zoom level for a particular url, so the
1374 // browser can update its records. If the view is a plugin doc, then url is
1375 // used to update the zoom level for all pages in that site. Otherwise, the
1376 // render view's id is used so that only the menu is updated.
1377 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1378 double /* zoom_level */,
1381 // Updates the minimum/maximum allowed zoom percent for this tab from the
1382 // default values. If |remember| is true, then the zoom setting is applied to
1383 // other pages in the site and is saved, otherwise it only applies to this
1385 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1386 int /* minimum_percent */,
1387 int /* maximum_percent */)
1389 // Notify the browser that this render process can or can't be suddenly
1391 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1394 IPC_MESSAGE_ROUTED3(
1395 ViewHostMsg_SwapCompositorFrame,
1396 uint32 /* output_surface_id */,
1397 cc::CompositorFrame /* frame */,
1398 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1400 // Sent by the compositor when a flinging animation is stopped.
1401 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1403 //---------------------------------------------------------------------------
1404 // Request for cryptographic operation messages:
1405 // These are messages from the renderer to the browser to perform a
1406 // cryptographic operation.
1408 // Asks the browser process to generate a keypair for grabbing a client
1409 // certificate from a CA (<keygen> tag), and returns the signed public
1410 // key and challenge string.
1411 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1412 uint32 /* key size index */,
1413 std::string /* challenge string */,
1414 GURL /* URL of requestor */,
1415 std::string /* signed public key and challenge */)
1417 // Message sent from the renderer to the browser to request that the browser
1418 // cache |data| associated with |url|.
1419 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1421 double /* expected_response_time */,
1422 std::vector<char> /* data */)
1424 // Register a new handler for URL requests with the given scheme.
1425 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1426 std::string /* scheme */,
1428 base::string16 /* title */,
1429 bool /* user_gesture */)
1431 // Unregister the registered handler for URL requests with the given scheme.
1432 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler,
1433 std::string /* scheme */,
1435 bool /* user_gesture */)
1437 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1438 // See the comment in chrome/browser/ui/browser.h for more details.
1439 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1440 bool /* enter_fullscreen */)
1442 // Send back a string to be recorded by UserMetrics.
1443 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1444 std::string /* action */)
1446 // Notifies the browser that the page was or was not saved as MHTML.
1447 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1449 int64 /* size of the MHTML file, -1 if error */)
1451 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1452 std::vector<GURL> /* all savable resource links */,
1453 std::vector<content::Referrer> /* all referrers */,
1454 std::vector<GURL> /* all frame links */)
1456 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1457 GURL /* frame's url */,
1458 std::string /* data buffer */,
1459 int32 /* complete status */)
1461 // Notifies the browser of an event occurring in the media pipeline.
1462 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1463 std::vector<media::MediaLogEvent> /* events */)
1465 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1467 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1468 // pop up a bubble to ask for user permission or take mouse lock content into
1470 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1471 bool /* user_gesture */,
1472 bool /* last_unlocked_by_target */,
1473 bool /* privileged */)
1475 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1476 // whenever the mouse is unlocked (which may or may not be caused by
1477 // ViewHostMsg_UnlockMouse).
1478 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1480 // Notifies that multiple touch targets may have been pressed, and to show
1481 // the disambiguation popup.
1482 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1483 gfx::Rect, /* Border of touched targets */
1484 gfx::Size, /* Size of zoomed image */
1485 cc::SharedBitmapId /* id */)
1487 // Sent by the renderer process to check whether client 3D APIs
1488 // (Pepper 3D, WebGL) are explicitly blocked.
1489 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1490 int /* render_view_id */,
1491 GURL /* top_origin_url */,
1492 content::ThreeDAPIType /* requester */,
1495 // Sent by the renderer process to indicate that a context was lost by
1496 // client 3D content (Pepper 3D, WebGL) running on the page at the
1498 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1499 GURL /* top_origin_url */,
1500 content::ThreeDAPIType /* context_type */,
1501 int /* arb_robustness_status_code */)
1503 // Notifies the browser that document has parsed the body. This is used by the
1504 // ResourceScheduler as an indication that bandwidth contention won't block
1506 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1508 // Notification that the urls for the favicon of a site has been determined.
1509 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1510 std::vector<content::FaviconURL> /* candidates */)
1512 // Sent by the renderer to the browser to start a vibration with the given
1514 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1515 int64 /* milliseconds */)
1517 // Sent by the renderer to the browser to cancel the currently running
1518 // vibration, if there is one.
1519 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1521 // Message sent from renderer to the browser when the element that is focused
1522 // has been touched. A bool is passed in this message which indicates if the
1523 // node is editable.
1524 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1525 bool /* editable */)
1527 // Message sent from the renderer to the browser when an HTML form has failed
1528 // validation constraints.
1529 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1530 gfx::Rect /* anchor rectangle in root view coordinate */,
1531 base::string16 /* validation message */,
1532 base::string16 /* supplemental text */)
1534 // Message sent from the renderer to the browser when a HTML form validation
1535 // message should be hidden from view.
1536 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1538 // Message sent from the renderer to the browser when the suggested co-ordinates
1539 // of the anchor for a HTML form validation message have changed.
1540 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1541 gfx::Rect /* anchor rectangle in root view coordinate */)
1543 #if defined(OS_ANDROID)
1544 // Response to ViewMsg_FindMatchRects.
1546 // |version| will contain the current version number of the renderer's find
1547 // match list (incremented whenever they change), which should be passed in the
1548 // next call to ViewMsg_FindMatchRects.
1550 // |rects| will either contain a list of the enclosing rects of all matches
1551 // found by the most recent Find operation, or will be empty if |version| is not
1552 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1553 // your locally cached rects should still be valid). The rect coords will be
1554 // custom normalized fractions of the document size. The rects will be sorted by
1555 // frame traversal order starting in the main frame, then by dom order.
1557 // |active_rect| will contain the bounding box of the active find-in-page match
1558 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1559 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1561 std::vector<gfx::RectF> /* rects */,
1562 gfx::RectF /* active_rect */)
1564 // Start an android intent with the given URI.
1565 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1566 GURL /* content_url */)
1568 // Message sent when the renderer changed the background color for the view.
1569 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1570 uint32 /* bg_color */)
1572 // This message runs the MediaCodec for decoding audio for webaudio.
1573 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1574 base::SharedMemoryHandle /* encoded_data_handle */,
1575 base::FileDescriptor /* pcm_output */,
1576 uint32_t /* data_size*/)
1578 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1579 // display events. If |enabled| is true, the BeginFrame message will continue
1580 // to be be delivered until the notification is disabled.
1581 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
1584 // Reply to the ViewMsg_ExtractSmartClipData message.
1585 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1586 base::string16 /* text */,
1587 base::string16 /* html */,
1588 gfx::Rect /* rect */)
1590 #elif defined(OS_MACOSX)
1591 // Request that the browser load a font into shared memory for us.
1592 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1593 FontDescriptor /* font to load */,
1594 uint32 /* buffer size */,
1595 base::SharedMemoryHandle /* font data */,
1596 uint32 /* font id */)
1598 // Informs the browser that a plugin has gained or lost focus.
1599 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1601 int /* plugin_id */)
1603 // Instructs the browser to start plugin IME.
1604 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1606 // Receives content of a web page as plain text.
1607 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1609 #elif defined(OS_WIN)
1610 // Request that the given font characters be loaded by the browser so it's
1611 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1613 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1614 LOGFONT /* font_data */,
1615 base::string16 /* characters */)
1618 #if defined(OS_POSIX)
1619 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1620 // this call exists for the renderer to ask the browser to allocate memory
1621 // on its behalf. We return a file descriptor to the POSIX shared memory.
1622 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1623 // by the browser, and it is the caller's repsonsibility to send a
1624 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1625 // In all cases, the caller is responsible for deleting the resulting
1627 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1628 uint32_t, /* bytes requested */
1629 bool, /* cache in the browser */
1630 TransportDIB::Handle /* DIB */)
1632 // Since the browser keeps handles to the allocated transport DIBs, this
1633 // message is sent to tell the browser that it may release them when the
1634 // renderer is finished with them.
1635 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1636 TransportDIB::Id /* DIB id */)
1639 // Adding a new message? Stick to the sort order above: first platform
1640 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1641 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.