Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / common / view_messages.h
blob11a02a3ff037d3673f209a56f99b7bf6318b1f56
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/pepper_renderer_instance_data.h"
20 #include "content/common/view_message_enums.h"
21 #include "content/common/webplugin_geometry.h"
22 #include "content/public/common/common_param_traits.h"
23 #include "content/public/common/favicon_url.h"
24 #include "content/public/common/file_chooser_params.h"
25 #include "content/public/common/menu_item.h"
26 #include "content/public/common/page_state.h"
27 #include "content/public/common/page_zoom.h"
28 #include "content/public/common/referrer.h"
29 #include "content/public/common/renderer_preferences.h"
30 #include "content/public/common/stop_find_action.h"
31 #include "content/public/common/three_d_api_types.h"
32 #include "content/public/common/window_container_type.h"
33 #include "ipc/ipc_channel_handle.h"
34 #include "ipc/ipc_message_macros.h"
35 #include "ipc/ipc_platform_file.h"
36 #include "media/audio/audio_parameters.h"
37 #include "media/base/channel_layout.h"
38 #include "media/base/media_log_event.h"
39 #include "net/base/network_change_notifier.h"
40 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
41 #include "third_party/WebKit/public/platform/WebFloatRect.h"
42 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
43 #include "third_party/WebKit/public/web/WebFindOptions.h"
44 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
45 #include "third_party/WebKit/public/web/WebPluginAction.h"
46 #include "third_party/WebKit/public/web/WebPopupType.h"
47 #include "third_party/WebKit/public/web/WebTextDirection.h"
48 #include "third_party/skia/include/core/SkBitmap.h"
49 #include "ui/base/ime/text_input_mode.h"
50 #include "ui/base/ime/text_input_type.h"
51 #include "ui/base/ui_base_types.h"
52 #include "ui/gfx/ipc/gfx_param_traits.h"
53 #include "ui/gfx/point.h"
54 #include "ui/gfx/range/range.h"
55 #include "ui/gfx/rect.h"
56 #include "ui/gfx/rect_f.h"
57 #include "ui/gfx/vector2d.h"
58 #include "ui/gfx/vector2d_f.h"
59 #include "ui/shell_dialogs/selected_file_info.h"
61 #if defined(OS_MACOSX)
62 #include "content/common/mac/font_descriptor.h"
63 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
64 #endif
66 #undef IPC_MESSAGE_EXPORT
67 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
69 #define IPC_MESSAGE_START ViewMsgStart
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(gfx::FontRenderParams::Hinting)
82 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering)
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_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1)
88 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
89 media::MediaLogEvent::TYPE_LAST)
90 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
91 IPC_ENUM_TRAITS(ui::TextInputType)
93 #if defined(OS_MACOSX)
94 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
95 IPC_STRUCT_TRAITS_MEMBER(font_name)
96 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
97 IPC_STRUCT_TRAITS_END()
98 #endif
100 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
101 IPC_STRUCT_TRAITS_MEMBER(forward)
102 IPC_STRUCT_TRAITS_MEMBER(matchCase)
103 IPC_STRUCT_TRAITS_MEMBER(findNext)
104 IPC_STRUCT_TRAITS_END()
106 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
107 IPC_STRUCT_TRAITS_MEMBER(type)
108 IPC_STRUCT_TRAITS_MEMBER(enable)
109 IPC_STRUCT_TRAITS_END()
111 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
112 IPC_STRUCT_TRAITS_MEMBER(type)
113 IPC_STRUCT_TRAITS_MEMBER(enable)
114 IPC_STRUCT_TRAITS_END()
116 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
117 IPC_STRUCT_TRAITS_MEMBER(x)
118 IPC_STRUCT_TRAITS_MEMBER(y)
119 IPC_STRUCT_TRAITS_END()
121 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
122 IPC_STRUCT_TRAITS_MEMBER(x)
123 IPC_STRUCT_TRAITS_MEMBER(y)
124 IPC_STRUCT_TRAITS_MEMBER(width)
125 IPC_STRUCT_TRAITS_MEMBER(height)
126 IPC_STRUCT_TRAITS_END()
128 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
129 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
130 IPC_STRUCT_TRAITS_MEMBER(depth)
131 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
132 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
133 IPC_STRUCT_TRAITS_MEMBER(rect)
134 IPC_STRUCT_TRAITS_MEMBER(availableRect)
135 IPC_STRUCT_TRAITS_MEMBER(orientationType)
136 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
137 IPC_STRUCT_TRAITS_END()
139 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
140 IPC_STRUCT_TRAITS_MEMBER(label)
141 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
142 IPC_STRUCT_TRAITS_MEMBER(type)
143 IPC_STRUCT_TRAITS_MEMBER(action)
144 IPC_STRUCT_TRAITS_MEMBER(rtl)
145 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
146 IPC_STRUCT_TRAITS_MEMBER(enabled)
147 IPC_STRUCT_TRAITS_MEMBER(checked)
148 IPC_STRUCT_TRAITS_MEMBER(submenu)
149 IPC_STRUCT_TRAITS_END()
151 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
152 IPC_STRUCT_TRAITS_MEMBER(value)
153 IPC_STRUCT_TRAITS_MEMBER(localized_value)
154 IPC_STRUCT_TRAITS_MEMBER(label)
155 IPC_STRUCT_TRAITS_END()
157 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
158 IPC_STRUCT_TRAITS_MEMBER(icon_url)
159 IPC_STRUCT_TRAITS_MEMBER(icon_type)
160 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
161 IPC_STRUCT_TRAITS_END()
163 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
164 IPC_STRUCT_TRAITS_MEMBER(mode)
165 IPC_STRUCT_TRAITS_MEMBER(title)
166 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
167 IPC_STRUCT_TRAITS_MEMBER(accept_types)
168 #if defined(OS_ANDROID)
169 IPC_STRUCT_TRAITS_MEMBER(capture)
170 #endif
171 IPC_STRUCT_TRAITS_END()
173 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
174 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
175 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
176 IPC_STRUCT_TRAITS_MEMBER(document_url)
177 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
178 IPC_STRUCT_TRAITS_END()
180 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
181 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
182 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
183 IPC_STRUCT_TRAITS_MEMBER(hinting)
184 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
185 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
186 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
187 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
188 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
189 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
190 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
191 IPC_STRUCT_TRAITS_MEMBER(track_color)
192 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
193 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
194 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
195 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
196 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
197 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
198 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
199 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
200 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
201 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
202 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
203 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
204 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
205 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
206 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile)
207 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile)
208 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
209 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
210 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
211 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
212 IPC_STRUCT_TRAITS_END()
214 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
215 IPC_STRUCT_TRAITS_MEMBER(name)
216 IPC_STRUCT_TRAITS_MEMBER(value)
217 IPC_STRUCT_TRAITS_MEMBER(domain)
218 IPC_STRUCT_TRAITS_MEMBER(path)
219 IPC_STRUCT_TRAITS_MEMBER(expires)
220 IPC_STRUCT_TRAITS_MEMBER(http_only)
221 IPC_STRUCT_TRAITS_MEMBER(secure)
222 IPC_STRUCT_TRAITS_MEMBER(session)
223 IPC_STRUCT_TRAITS_END()
225 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
226 IPC_STRUCT_TRAITS_MEMBER(window)
227 IPC_STRUCT_TRAITS_MEMBER(window_rect)
228 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
229 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
230 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
231 IPC_STRUCT_TRAITS_MEMBER(visible)
232 IPC_STRUCT_TRAITS_END()
234 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
235 IPC_STRUCT_TRAITS_MEMBER(id)
236 IPC_STRUCT_TRAITS_MEMBER(type)
237 IPC_STRUCT_TRAITS_MEMBER(params)
238 IPC_STRUCT_TRAITS_MEMBER(time)
239 IPC_STRUCT_TRAITS_END()
241 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo)
242 IPC_STRUCT_TRAITS_MEMBER(file_path)
243 IPC_STRUCT_TRAITS_MEMBER(local_path)
244 IPC_STRUCT_TRAITS_MEMBER(display_name)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
248 // Routing ID of the view initiating the open.
249 IPC_STRUCT_MEMBER(int, opener_id)
251 // True if this open request came in the context of a user gesture.
252 IPC_STRUCT_MEMBER(bool, user_gesture)
254 // Type of window requested.
255 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
257 // The session storage namespace ID this view should use.
258 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
260 // The name of the resulting frame that should be created (empty if none
261 // has been specified).
262 IPC_STRUCT_MEMBER(base::string16, frame_name)
264 // The routing id of the frame initiating the open.
265 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
267 // The URL of the frame initiating the open.
268 IPC_STRUCT_MEMBER(GURL, opener_url)
270 // The URL of the top frame containing the opener.
271 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
273 // The security origin of the frame initiating the open.
274 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
276 // Whether the opener will be suppressed in the new window, in which case
277 // scripting the new window is not allowed.
278 IPC_STRUCT_MEMBER(bool, opener_suppressed)
280 // Whether the window should be opened in the foreground, background, etc.
281 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
283 // The URL that will be loaded in the new window (empty if none has been
284 // sepcified).
285 IPC_STRUCT_MEMBER(GURL, target_url)
287 // The referrer that will be used to load |target_url| (empty if none has
288 // been specified).
289 IPC_STRUCT_MEMBER(content::Referrer, referrer)
291 // The window features to use for the new view.
292 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
294 // The additional window features to use for the new view. We pass these
295 // separately from |features| above because we cannot serialize WebStrings
296 // over IPC.
297 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
298 IPC_STRUCT_END()
300 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
301 // URL for the worker script.
302 IPC_STRUCT_MEMBER(GURL, url)
304 // Name for a SharedWorker, otherwise empty string.
305 IPC_STRUCT_MEMBER(base::string16, name)
307 // Security policy used in the worker.
308 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
310 // Security policy type used in the worker.
311 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
313 // The ID of the parent document (unique within parent renderer).
314 IPC_STRUCT_MEMBER(unsigned long long, document_id)
316 // RenderFrame routing id used to send messages back to the parent.
317 IPC_STRUCT_MEMBER(int, render_frame_route_id)
318 IPC_STRUCT_END()
320 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
321 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
322 IPC_STRUCT_MEMBER(double, dialog_value)
323 IPC_STRUCT_MEMBER(double, minimum)
324 IPC_STRUCT_MEMBER(double, maximum)
325 IPC_STRUCT_MEMBER(double, step)
326 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
327 IPC_STRUCT_END()
329 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
330 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
331 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
332 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
333 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
334 IPC_STRUCT_MEMBER(bool, is_anchor_first)
335 IPC_STRUCT_END()
337 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
338 // The type of input field
339 IPC_STRUCT_MEMBER(ui::TextInputType, type)
341 // The mode of input field
342 IPC_STRUCT_MEMBER(ui::TextInputMode, mode)
344 // The flags of the input field (autocorrect, autocomplete, etc.)
345 IPC_STRUCT_MEMBER(int, flags)
347 // The value of the input field
348 IPC_STRUCT_MEMBER(std::string, value)
350 // The cursor position of the current selection start, or the caret position
351 // if nothing is selected
352 IPC_STRUCT_MEMBER(int, selection_start)
354 // The cursor position of the current selection end, or the caret position
355 // if nothing is selected
356 IPC_STRUCT_MEMBER(int, selection_end)
358 // The start position of the current composition, or -1 if there is none
359 IPC_STRUCT_MEMBER(int, composition_start)
361 // The end position of the current composition, or -1 if there is none
362 IPC_STRUCT_MEMBER(int, composition_end)
364 // Whether or not inline composition can be performed for the current input.
365 IPC_STRUCT_MEMBER(bool, can_compose_inline)
367 // Whether or not the IME should be shown as a result of this update. Even if
368 // true, the IME will only be shown if the type is appropriate (e.g. not
369 // TEXT_INPUT_TYPE_NONE).
370 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
372 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
373 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
374 IPC_STRUCT_END()
376 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
377 // The scroll offset of the render view.
378 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset)
380 // The size of the RenderView when this message was generated. This is
381 // included so the host knows how large the view is from the perspective of
382 // the renderer process. This is necessary in case a resize operation is in
383 // progress. If auto-resize is enabled, this should update the corresponding
384 // view size.
385 IPC_STRUCT_MEMBER(gfx::Size, view_size)
387 // New window locations for plugin child windows.
388 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
389 plugin_window_moves)
391 // The following describes the various bits that may be set in flags:
393 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
394 // Indicates that this is a response to a ViewMsg_Resize message.
396 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
397 // Indicates that this is a response to a ViewMsg_Repaint message.
399 // If flags is zero, then this message corresponds to an unsolicited paint
400 // request by the render view. Any of the above bits may be set in flags,
401 // which would indicate that this paint message is an ACK for multiple
402 // request messages.
403 IPC_STRUCT_MEMBER(int, flags)
405 // All the above coordinates are in DIP. This is the scale factor needed
406 // to convert them to pixels.
407 IPC_STRUCT_MEMBER(float, scale_factor)
408 IPC_STRUCT_END()
410 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
411 // Renderer-wide preferences.
412 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
414 // Preferences for this view.
415 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
417 // The ID of the view to be created.
418 IPC_STRUCT_MEMBER(int32, view_id)
420 // The ID of the main frame hosted in the view.
421 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
423 // The ID of the rendering surface.
424 IPC_STRUCT_MEMBER(int32, surface_id)
426 // The session storage namespace ID this view should use.
427 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
429 // The name of the frame associated with this view (or empty if none).
430 IPC_STRUCT_MEMBER(base::string16, frame_name)
432 // The route ID of the opener RenderView if we need to set one
433 // (MSG_ROUTING_NONE otherwise).
434 IPC_STRUCT_MEMBER(int, opener_route_id)
436 // Whether the RenderView should initially be swapped out.
437 IPC_STRUCT_MEMBER(bool, swapped_out)
439 // The ID of the proxy object for the main frame in this view. It is only
440 // used if |swapped_out| is true.
441 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
443 // Whether the RenderView should initially be hidden.
444 IPC_STRUCT_MEMBER(bool, hidden)
446 // Whether the RenderView will never be visible.
447 IPC_STRUCT_MEMBER(bool, never_visible)
449 // Whether the window associated with this view was created with an opener.
450 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
452 // The initial page ID to use for this view, which must be larger than any
453 // existing navigation that might be loaded in the view. Page IDs are unique
454 // to a view and are only updated by the renderer after this initial value.
455 IPC_STRUCT_MEMBER(int32, next_page_id)
457 // The properties of the screen associated with the view.
458 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
459 IPC_STRUCT_END()
461 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
462 // Whether the data format is supplied as serialized script value, or as
463 // a simple string. If it is a raw string, must be converted from string to a
464 // WebSerializedScriptValue in renderer.
465 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
466 // The serialized script value.
467 IPC_STRUCT_MEMBER(base::string16, data)
468 // When sent to the browser, this is the routing ID of the source frame in
469 // the source process. The browser replaces it with the routing ID of the
470 // equivalent (swapped out) frame in the destination process.
471 IPC_STRUCT_MEMBER(int, source_routing_id)
473 // The origin of the source frame.
474 IPC_STRUCT_MEMBER(base::string16, source_origin)
476 // The origin for the message's target.
477 IPC_STRUCT_MEMBER(base::string16, target_origin)
479 // Information about the MessagePorts this message contains.
480 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
481 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
482 IPC_STRUCT_END()
484 // Messages sent from the browser to the renderer.
486 #if defined(OS_ANDROID)
487 // Tells the renderer to cancel an opened date/time dialog.
488 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
490 // Replaces a date time input field.
491 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
492 double /* dialog_value */)
494 #endif
496 // Get all savable resource links from current webpage, include main
497 // frame and sub-frame.
498 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
499 GURL /* url of page which is needed to save */)
501 // Get html data by serializing all frames of current page with lists
502 // which contain all resource links that have local copy.
503 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
504 std::vector<GURL> /* urls that have local copy */,
505 std::vector<base::FilePath> /* paths of local copy */,
506 base::FilePath /* local directory path */)
508 // Tells the render side that a ViewHostMsg_LockMouse message has been
509 // processed. |succeeded| indicates whether the mouse has been successfully
510 // locked or not.
511 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
512 bool /* succeeded */)
513 // Tells the render side that the mouse has been unlocked.
514 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
516 // Sent by the browser when the parameters for vsync alignment have changed.
517 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
518 base::TimeTicks /* timebase */,
519 base::TimeDelta /* interval */)
521 // Sent to the RenderView when a new tab is swapped into an existing
522 // tab and the histories need to be merged. The existing tab has a history of
523 // |merged_history_length| which precedes the history of the new tab. All
524 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
526 // For example, suppose the history of page_ids in the new tab's RenderView
527 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
528 // all pages in the new tab with page_id >= 7 are to be preserved.
529 // The resulting page history is [-1 -1 -1 7 8].
530 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
531 int, /* merge_history_length */
532 int32 /* minimum_page_id */)
534 // Tells the renderer to create a new view.
535 // This message is slightly different, the view it takes (via
536 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
537 // non-view control message.
538 IPC_MESSAGE_CONTROL1(ViewMsg_New,
539 ViewMsg_New_Params)
541 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
542 // similar to the new command, but used when the renderer created a view
543 // first, and we need to update it.
544 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
546 // Sends updated preferences to the renderer.
547 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
548 content::RendererPreferences)
550 // This passes a set of webkit preferences down to the renderer.
551 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
552 content::WebPreferences)
554 // Informs the renderer that the timezone has changed.
555 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
557 // Tells the render view to close.
558 // Expects a Close_ACK message when finished.
559 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
561 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
562 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
563 IPC_STRUCT_MEMBER(gfx::Size, new_size)
564 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
565 IPC_STRUCT_MEMBER(float, top_controls_layout_height)
566 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
567 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
568 IPC_STRUCT_MEMBER(bool, is_fullscreen)
569 IPC_STRUCT_END()
571 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
572 // is generated in response provided new_size is not empty and not equal to
573 // the view's current size. The generated ViewHostMsg_UpdateRect message will
574 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
575 // we don't have to fetch it every time WebKit asks for it.
576 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
577 ViewMsg_Resize_Params /* params */)
579 // Tells the render view that the resize rect has changed.
580 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
581 gfx::Rect /* resizer_rect */)
583 // Sent to inform the view that it was hidden. This allows it to reduce its
584 // resource utilization.
585 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
587 // Tells the render view that it is no longer hidden (see WasHidden), and the
588 // render view is expected to respond with a full repaint if needs_repainting
589 // is true. If needs_repainting is false, then this message does not trigger a
590 // message in response.
591 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown,
592 bool /* needs_repainting */,
593 ui::LatencyInfo /* latency_info */)
595 // Tells the renderer to focus the first (last if reverse is true) focusable
596 // node.
597 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
598 bool /* reverse */)
600 // Sent to inform the renderer to invoke a context menu.
601 // The parameter specifies the location in the render view's coordinates.
602 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
603 ui::MenuSourceType,
604 gfx::Point /* location where menu should be shown */)
606 IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
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,
622 int /* x */,
623 int /* y */)
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,
628 int /* x */,
629 int /* y */)
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
638 // the given point.
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,
657 GURL /* url */,
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
682 // flag values.
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.
694 // Parameters
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
698 // listed below:
699 // Value Action
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
725 // the renderer.
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
743 // passed in.
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
748 // started.
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,
793 bool /* active */)
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 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
816 // Tells the renderer that the channel to the broker has been created.
817 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
818 base::ProcessId /* broker_pid */,
819 IPC::ChannelHandle /* handle */)
821 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
822 // Tells the renderer whether permission to access to PPAPI broker was granted
823 // or not.
824 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
825 bool /* result */)
827 // Tells the renderer to empty its plugin list cache, optional reloading
828 // pages containing plugins.
829 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
830 bool /* reload_pages */)
832 // Used to instruct the RenderView to go into "view source" mode.
833 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
835 // Instructs the renderer to save the current page to MHTML.
836 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
837 int /* job_id */,
838 IPC::PlatformFileForTransit /* file handle */)
840 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
841 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
842 GURL /* data */)
844 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
845 // process to release the magnified image.
846 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
847 cc::SharedBitmapId /* id */)
849 // Notifies the renderer that a snapshot has been retrieved.
850 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
851 int /* snapshot_id */,
852 gfx::Size /* size */,
853 std::vector<unsigned char> /* png */)
855 // Fetches complete rendered content of a web page as plain text.
856 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
858 #if defined(OS_MACOSX)
859 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
861 // Notification of a change in scrollbar appearance and/or behavior.
862 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
863 float /* initial_button_delay */,
864 float /* autoscroll_button_delay */,
865 bool /* jump_on_track_click */,
866 blink::ScrollerStyle /* preferred_scroller_style */,
867 bool /* redraw */)
868 #endif
870 #if defined(OS_ANDROID)
871 // Tells the renderer to suspend/resume the webkit timers.
872 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
873 bool /* suspend */)
875 // Sent when the browser wants the bounding boxes of the current find matches.
877 // If match rects are already cached on the browser side, |current_version|
878 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
879 // they came in, so the renderer can tell if it needs to send updated rects.
880 // Otherwise just pass -1 to always receive the list of rects.
882 // There must be an active search string (it is probably most useful to call
883 // this immediately after a ViewHostMsg_Find_Reply message arrives with
884 // final_update set to true).
885 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
886 int /* current_version */)
888 // Notifies the renderer whether hiding/showing the top controls is enabled
889 // and whether or not to animate to the proper state.
890 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
891 bool /* enable_hiding */,
892 bool /* enable_showing */,
893 bool /* animate */)
895 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
897 // Sent by the browser when the renderer should generate a new frame.
898 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
899 cc::BeginFrameArgs /* args */)
901 // Sent by the browser when an IME update that requires acknowledgement has been
902 // processed on the browser side.
903 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
905 // Extracts the data at the given rect, returning it through the
906 // ViewHostMsg_SmartClipDataExtracted IPC.
907 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
908 gfx::Rect /* rect */)
910 #elif defined(OS_MACOSX)
911 // Let the RenderView know its window has changed visibility.
912 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
913 bool /* visibile */)
915 // Let the RenderView know its window's frame has changed.
916 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
917 gfx::Rect /* window frame */,
918 gfx::Rect /* content view frame */)
920 // Message sent from the browser to the renderer when the user starts or stops
921 // resizing the view.
922 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
923 bool /* enable */)
925 // Tell the renderer that plugin IME has completed.
926 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
927 base::string16 /* text */,
928 int /* plugin_id */)
929 #endif
931 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
932 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
933 uint32 /* output_surface_id */,
934 cc::CompositorFrameAck /* ack */)
936 // Sent by browser to tell renderer compositor that some resources that were
937 // given to the browser in a swap are not being used anymore.
938 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
939 uint32 /* output_surface_id */,
940 cc::CompositorFrameAck /* ack */)
942 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
944 // Sent by the browser to ask the renderer to redraw.
945 // If |request_id| is not zero, it is added to the forced frame's latency info
946 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
947 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
948 int /* request_id */)
950 // -----------------------------------------------------------------------------
951 // Messages sent from the renderer to the browser.
953 // Sent by the renderer when it is creating a new window. The browser creates
954 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
955 // MSG_ROUTING_NONE, the view couldn't be created.
956 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
957 ViewHostMsg_CreateWindow_Params,
958 int /* route_id */,
959 int /* main_frame_route_id */,
960 int32 /* surface_id */,
961 int64 /* cloned_session_storage_namespace_id */)
963 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
964 // <select> dropdowns. This message is sent to the WebContentsImpl that
965 // contains the widget being created.
966 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
967 int /* opener_id */,
968 blink::WebPopupType /* popup type */,
969 int /* route_id */,
970 int32 /* surface_id */)
972 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
973 // window.
974 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
975 int /* opener_id */,
976 int /* route_id */,
977 int32 /* surface_id */)
979 // Asks the browser for a unique routing ID.
980 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
981 int /* routing_id */)
983 // Asks the browser for the default audio hardware configuration.
984 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
985 media::AudioParameters /* input parameters */,
986 media::AudioParameters /* output parameters */)
988 // Asks the browser for CPU usage of the renderer process in percents.
989 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage,
990 int /* CPU usage in percents */)
992 // Asks the browser for the renderer process memory size stats.
993 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
994 size_t /* private_bytes */,
995 size_t /* shared_bytes */)
997 // These three messages are sent to the parent RenderViewHost to display the
998 // page/widget that was created by
999 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1000 // refers to the id that was returned from the Create message above.
1001 // The initial_position parameter is a rectangle in screen coordinates.
1003 // FUTURE: there will probably be flags here to control if the result is
1004 // in a new window.
1005 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1006 int /* route_id */,
1007 WindowOpenDisposition /* disposition */,
1008 gfx::Rect /* initial_pos */,
1009 bool /* opened_by_user_gesture */)
1011 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1012 int /* route_id */,
1013 gfx::Rect /* initial_pos */)
1015 // Message to show a full screen widget.
1016 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1017 int /* route_id */)
1019 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1020 // to run in a modal fashion until it is closed.
1021 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1022 int /* opener_id */)
1024 // Indicates the renderer is ready in response to a ViewMsg_New or
1025 // a ViewMsg_CreatingNew_ACK.
1026 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1028 // Indicates the renderer process is gone. This actually is sent by the
1029 // browser process to itself, but keeps the interface cleaner.
1030 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1031 int, /* this really is base::TerminationStatus */
1032 int /* exit_code */)
1034 // Sent by the renderer process to request that the browser close the view.
1035 // This corresponds to the window.close() API, and the browser may ignore
1036 // this message. Otherwise, the browser will generates a ViewMsg_Close
1037 // message to close the view.
1038 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1040 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1041 // throttle these messages.
1042 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1044 // Sent by the renderer process to request that the browser move the view.
1045 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1046 // the browser may ignore this message.
1047 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1048 gfx::Rect /* position */)
1050 // Result of string search in the page.
1051 // Response to ViewMsg_Find with the results of the requested find-in-page
1052 // search, the number of matches found and the selection rect (in screen
1053 // coordinates) for the string found. If |final_update| is false, it signals
1054 // that this is not the last Find_Reply message - more will be sent as the
1055 // scoping effort continues.
1056 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1057 int /* request_id */,
1058 int /* number of matches */,
1059 gfx::Rect /* selection_rect */,
1060 int /* active_match_ordinal */,
1061 bool /* final_update */)
1063 // Indicates that the render view has been closed in respose to a
1064 // Close message.
1065 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1066 int /* old_route_id */)
1068 // Indicates that the current page has been closed, after a ClosePage
1069 // message.
1070 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1072 // Notifies the browser that we have session history information.
1073 // page_id: unique ID that allows us to distinguish between history entries.
1074 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1075 int32 /* page_id */,
1076 content::PageState /* state */)
1078 // Notifies the browser that we want to show a destination url for a potential
1079 // action (e.g. when the user is hovering over a link).
1080 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
1081 int32,
1082 GURL)
1084 // Sent when the document element is available for the top-level frame. This
1085 // happens after the page starts loading, but before all resources are
1086 // finished.
1087 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1088 bool /* uses_temporary_zoom_level */)
1090 // Sent when the renderer loads a resource from its memory cache.
1091 // The security info is non empty if the resource was originally loaded over
1092 // a secure connection.
1093 // Note: May only be sent once per URL per frame per committed load.
1094 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1095 GURL /* url */,
1096 std::string /* security info */,
1097 std::string /* http method */,
1098 std::string /* mime type */,
1099 content::ResourceType /* resource type */)
1101 // Sent when the renderer displays insecure content in a secure page.
1102 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1104 // Sent when the renderer runs insecure content in a secure origin.
1105 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1106 std::string /* security_origin */,
1107 GURL /* target URL */)
1109 // Sent to update part of the view. In response to this message, the host
1110 // generates a ViewMsg_UpdateRect_ACK message.
1111 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1112 ViewHostMsg_UpdateRect_Params)
1114 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1115 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1117 // Message sent from renderer to the browser when focus changes inside the
1118 // webpage. The parameter says whether the newly focused element needs
1119 // keyboard input (true for textfields, text areas and content editable divs).
1120 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1121 bool /* is_editable_node */)
1123 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1125 // Used to set a cookie. The cookie is set asynchronously, but will be
1126 // available to a subsequent ViewHostMsg_GetCookies request.
1127 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1128 int /* render_frame_id */,
1129 GURL /* url */,
1130 GURL /* first_party_for_cookies */,
1131 std::string /* cookie */)
1133 // Used to get cookies for the given URL. This may block waiting for a
1134 // previous SetCookie message to be processed.
1135 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1136 int /* render_frame_id */,
1137 GURL /* url */,
1138 GURL /* first_party_for_cookies */,
1139 std::string /* cookies */)
1141 // Used to get raw cookie information for the given URL. This may block
1142 // waiting for a previous SetCookie message to be processed.
1143 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1144 GURL /* url */,
1145 GURL /* first_party_for_cookies */,
1146 std::vector<content::CookieData>
1147 /* raw_cookies */)
1149 // Used to delete cookie for the given URL and name
1150 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1151 GURL /* url */,
1152 std::string /* cookie_name */)
1154 // Used to check if cookies are enabled for the given URL. This may block
1155 // waiting for a previous SetCookie message to be processed.
1156 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1157 int /* render_frame_id */,
1158 GURL /* url */,
1159 GURL /* first_party_for_cookies */,
1160 bool /* cookies_enabled */)
1162 // Used to get the list of plugins
1163 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1164 bool /* refresh*/,
1165 std::vector<content::WebPluginInfo> /* plugins */)
1167 #if defined(OS_WIN)
1168 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1169 gfx::NativeViewId /* dummy_activation_window */)
1171 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1172 gfx::NativeViewId /* dummy_activation_window */)
1174 // Asks the browser for the user's monitor profile.
1175 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1176 std::vector<char> /* profile */)
1177 #endif
1179 // Get the list of proxies to use for |url|, as a semicolon delimited list
1180 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1181 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1182 GURL /* url */,
1183 bool /* result */,
1184 std::string /* proxy list */)
1186 // A renderer sends this to the browser process when it wants to create a
1187 // worker. The browser will create the worker process if necessary, and
1188 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1189 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1190 ViewHostMsg_CreateWorker_Params,
1191 int /* route_id */)
1193 // A renderer sends this to the browser process when a document has been
1194 // detached. The browser will use this to constrain the lifecycle of worker
1195 // processes (SharedWorkers are shut down when their last associated document
1196 // is detached).
1197 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1198 uint64 /* document_id */)
1200 // Wraps an IPC message that's destined to the worker on the renderer->browser
1201 // hop.
1202 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1203 IPC::Message /* message */)
1205 // Tells the browser that a specific Appcache manifest in the current page
1206 // was accessed.
1207 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1208 GURL /* manifest url */,
1209 bool /* blocked by policy */)
1211 // Initiates a download based on user actions like 'ALT+click'.
1212 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl,
1213 int /* render_view_id */,
1214 GURL /* url */,
1215 content::Referrer /* referrer */,
1216 base::string16 /* suggested_name */,
1217 bool /* use prompt for save location */)
1219 // Used to go to the session history entry at the given offset (ie, -1 will
1220 // return the "back" item).
1221 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1222 int /* offset (from current) of history item to get */)
1224 // Sent from an inactive renderer for the browser to route to the active
1225 // renderer, instructing it to close.
1226 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1228 // Sent to the browser from an inactive renderer to post a message to the
1229 // active renderer.
1230 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1231 ViewMsg_PostMessage_Params)
1233 // Notifies that the preferred size of the content changed.
1234 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1235 gfx::Size /* pref_size */)
1237 // Notifies whether there are JavaScript touch event handlers or not.
1238 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1239 bool /* has_handlers */)
1241 // A message from HTML-based UI. When (trusted) Javascript calls
1242 // send(message, args), this message is sent to the browser.
1243 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1244 GURL /* source_url */,
1245 std::string /* message */,
1246 base::ListValue /* args */)
1248 // A renderer sends this to the browser process when it wants to create a ppapi
1249 // plugin. The browser will create the plugin process if necessary, and will
1250 // return a handle to the channel on success.
1252 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1253 // process. This ID is valid only in the context of the browser process and is
1254 // used to identify the proper process when the renderer notifies it that the
1255 // plugin is hung.
1257 // On error an empty string and null handles are returned.
1258 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1259 base::FilePath /* path */,
1260 IPC::ChannelHandle /* handle to channel */,
1261 base::ProcessId /* plugin_pid */,
1262 int /* plugin_child_id */)
1264 // Notification that a plugin has created a new plugin instance. The parameters
1265 // indicate:
1266 // -The plugin process ID that we're creating the instance for.
1267 // -The instance ID of the instance being created.
1268 // -A PepperRendererInstanceData struct which contains properties from the
1269 // renderer which are associated with the plugin instance. This includes the
1270 // routing ID of the associated render view and the URL of plugin.
1271 // -Whether the plugin we're creating an instance for is external or internal.
1273 // This message must be sync even though it returns no parameters to avoid
1274 // a race condition with the plugin process. The plugin process sends messages
1275 // to the browser that assume the browser knows about the instance. We need to
1276 // make sure that the browser actually knows about the instance before we tell
1277 // the plugin to run.
1278 IPC_SYNC_MESSAGE_CONTROL4_0(
1279 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1280 int /* plugin_child_id */,
1281 int32 /* pp_instance */,
1282 content::PepperRendererInstanceData /* creation_data */,
1283 bool /* is_external */)
1285 // Notification that a plugin has destroyed an instance. This is the opposite of
1286 // the "DidCreate" message above.
1287 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1288 int /* plugin_child_id */,
1289 int32 /* pp_instance */,
1290 bool /* is_external */)
1292 // Message from the renderer to the browser indicating the in-process instance
1293 // has been created.
1294 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1295 int32 /* instance */,
1296 content::PepperRendererInstanceData /* instance_data */)
1298 // Message from the renderer to the browser indicating the in-process instance
1299 // has been destroyed.
1300 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1301 int32 /* instance */)
1303 // A renderer sends this to the browser process when it wants to
1304 // create a ppapi broker. The browser will create the broker process
1305 // if necessary, and will return a handle to the channel on success.
1306 // On error an empty string is returned.
1307 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1308 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1309 int /* routing_id */,
1310 base::FilePath /* path */)
1312 // A renderer sends this to the browser process when it wants to access a PPAPI
1313 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1314 // for every connection.
1315 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1316 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1317 int /* routing_id */,
1318 GURL /* document_url */,
1319 base::FilePath /* plugin_path */)
1321 // Send the tooltip text for the current mouse position to the browser.
1322 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1323 base::string16 /* tooltip text string */,
1324 blink::WebTextDirection /* text direction hint */)
1326 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
1327 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
1329 // Notification that the text selection has changed.
1330 // Note: The secound parameter is the character based offset of the
1331 // base::string16
1332 // text in the document.
1333 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1334 base::string16 /* text covers the selection range */,
1335 size_t /* the offset of the text in the document */,
1336 gfx::Range /* selection range in the document */)
1338 // Notification that the selection bounds have changed.
1339 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1340 ViewHostMsg_SelectionBounds_Params)
1342 // Asks the browser to display the file chooser. The result is returned in a
1343 // ViewMsg_RunFileChooserResponse message.
1344 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1345 content::FileChooserParams)
1347 // Asks the browser to enumerate a directory. This is equivalent to running
1348 // the file chooser in directory-enumeration mode and having the user select
1349 // the given directory. The result is returned in a
1350 // ViewMsg_EnumerateDirectoryResponse message.
1351 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1352 int /* request_id */,
1353 base::FilePath /* file_path */)
1355 // Tells the browser to move the focus to the next (previous if reverse is
1356 // true) focusable element.
1357 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1358 bool /* reverse */)
1360 // Required for opening a date/time dialog
1361 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1362 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1364 // Required for updating text input state.
1365 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1366 ViewHostMsg_TextInputState_Params /* input state params */)
1368 // Sent when the renderer changes the zoom level for a particular url, so the
1369 // browser can update its records. If the view is a plugin doc, then url is
1370 // used to update the zoom level for all pages in that site. Otherwise, the
1371 // render view's id is used so that only the menu is updated.
1372 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1373 double /* zoom_level */,
1374 GURL /* url */)
1376 // Updates the minimum/maximum allowed zoom percent for this tab from the
1377 // default values. If |remember| is true, then the zoom setting is applied to
1378 // other pages in the site and is saved, otherwise it only applies to this
1379 // tab.
1380 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1381 int /* minimum_percent */,
1382 int /* maximum_percent */)
1384 // Notify the browser that this render process can or can't be suddenly
1385 // terminated.
1386 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1387 bool /* enabled */)
1389 IPC_MESSAGE_ROUTED3(
1390 ViewHostMsg_SwapCompositorFrame,
1391 uint32 /* output_surface_id */,
1392 cc::CompositorFrame /* frame */,
1393 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1395 // Sent by the compositor when a flinging animation is stopped.
1396 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1398 //---------------------------------------------------------------------------
1399 // Request for cryptographic operation messages:
1400 // These are messages from the renderer to the browser to perform a
1401 // cryptographic operation.
1403 // Asks the browser process to generate a keypair for grabbing a client
1404 // certificate from a CA (<keygen> tag), and returns the signed public
1405 // key and challenge string.
1406 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1407 uint32 /* key size index */,
1408 std::string /* challenge string */,
1409 GURL /* URL of requestor */,
1410 std::string /* signed public key and challenge */)
1412 // Message sent from the renderer to the browser to request that the browser
1413 // cache |data| associated with |url|.
1414 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1415 GURL /* url */,
1416 double /* expected_response_time */,
1417 std::vector<char> /* data */)
1419 // Register a new handler for URL requests with the given scheme.
1420 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1421 std::string /* scheme */,
1422 GURL /* url */,
1423 base::string16 /* title */,
1424 bool /* user_gesture */)
1426 // Unregister the registered handler for URL requests with the given scheme.
1427 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler,
1428 std::string /* scheme */,
1429 GURL /* url */,
1430 bool /* user_gesture */)
1432 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1433 // See the comment in chrome/browser/ui/browser.h for more details.
1434 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1435 bool /* enter_fullscreen */)
1437 // Send back a string to be recorded by UserMetrics.
1438 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1439 std::string /* action */)
1441 // Notifies the browser that the page was or was not saved as MHTML.
1442 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1443 int /* job_id */,
1444 int64 /* size of the MHTML file, -1 if error */)
1446 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1447 std::vector<GURL> /* all savable resource links */,
1448 std::vector<content::Referrer> /* all referrers */,
1449 std::vector<GURL> /* all frame links */)
1451 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1452 GURL /* frame's url */,
1453 std::string /* data buffer */,
1454 int32 /* complete status */)
1456 // Notifies the browser of an event occurring in the media pipeline.
1457 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1458 std::vector<media::MediaLogEvent> /* events */)
1460 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1461 // being sent back.
1462 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1463 // pop up a bubble to ask for user permission or take mouse lock content into
1464 // account.
1465 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1466 bool /* user_gesture */,
1467 bool /* last_unlocked_by_target */,
1468 bool /* privileged */)
1470 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1471 // whenever the mouse is unlocked (which may or may not be caused by
1472 // ViewHostMsg_UnlockMouse).
1473 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1475 // Notifies that multiple touch targets may have been pressed, and to show
1476 // the disambiguation popup.
1477 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1478 gfx::Rect, /* Border of touched targets */
1479 gfx::Size, /* Size of zoomed image */
1480 cc::SharedBitmapId /* id */)
1482 // Sent by the renderer process to check whether client 3D APIs
1483 // (Pepper 3D, WebGL) are explicitly blocked.
1484 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1485 int /* render_view_id */,
1486 GURL /* top_origin_url */,
1487 content::ThreeDAPIType /* requester */,
1488 bool /* blocked */)
1490 // Sent by the renderer process to indicate that a context was lost by
1491 // client 3D content (Pepper 3D, WebGL) running on the page at the
1492 // given URL.
1493 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1494 GURL /* top_origin_url */,
1495 content::ThreeDAPIType /* context_type */,
1496 int /* arb_robustness_status_code */)
1498 // Notifies the browser that document has parsed the body. This is used by the
1499 // ResourceScheduler as an indication that bandwidth contention won't block
1500 // first paint.
1501 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1503 // Notification that the urls for the favicon of a site has been determined.
1504 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1505 std::vector<content::FaviconURL> /* candidates */)
1507 // Sent by the renderer to the browser to start a vibration with the given
1508 // duration.
1509 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1510 int64 /* milliseconds */)
1512 // Sent by the renderer to the browser to cancel the currently running
1513 // vibration, if there is one.
1514 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1516 // Message sent from renderer to the browser when the element that is focused
1517 // has been touched. A bool is passed in this message which indicates if the
1518 // node is editable.
1519 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1520 bool /* editable */)
1522 // Message sent from the renderer to the browser when an HTML form has failed
1523 // validation constraints.
1524 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1525 gfx::Rect /* anchor rectangle in root view coordinate */,
1526 base::string16 /* validation message */,
1527 base::string16 /* supplemental text */)
1529 // Message sent from the renderer to the browser when a HTML form validation
1530 // message should be hidden from view.
1531 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1533 // Message sent from the renderer to the browser when the suggested co-ordinates
1534 // of the anchor for a HTML form validation message have changed.
1535 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1536 gfx::Rect /* anchor rectangle in root view coordinate */)
1538 #if defined(OS_ANDROID)
1539 // Response to ViewMsg_FindMatchRects.
1541 // |version| will contain the current version number of the renderer's find
1542 // match list (incremented whenever they change), which should be passed in the
1543 // next call to ViewMsg_FindMatchRects.
1545 // |rects| will either contain a list of the enclosing rects of all matches
1546 // found by the most recent Find operation, or will be empty if |version| is not
1547 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1548 // your locally cached rects should still be valid). The rect coords will be
1549 // custom normalized fractions of the document size. The rects will be sorted by
1550 // frame traversal order starting in the main frame, then by dom order.
1552 // |active_rect| will contain the bounding box of the active find-in-page match
1553 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1554 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1555 int /* version */,
1556 std::vector<gfx::RectF> /* rects */,
1557 gfx::RectF /* active_rect */)
1559 // Start an android intent with the given URI.
1560 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1561 GURL /* content_url */)
1563 // Message sent when the renderer changed the background color for the view.
1564 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1565 uint32 /* bg_color */)
1567 // This message runs the MediaCodec for decoding audio for webaudio.
1568 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1569 base::SharedMemoryHandle /* encoded_data_handle */,
1570 base::FileDescriptor /* pcm_output */,
1571 uint32_t /* data_size*/)
1573 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1574 // display events. If |enabled| is true, the BeginFrame message will continue
1575 // to be be delivered until the notification is disabled.
1576 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
1577 bool /* enabled */)
1579 // Reply to the ViewMsg_ExtractSmartClipData message.
1580 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1581 base::string16 /* text */,
1582 base::string16 /* html */,
1583 gfx::Rect /* rect */)
1585 #elif defined(OS_MACOSX)
1586 // Request that the browser load a font into shared memory for us.
1587 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1588 FontDescriptor /* font to load */,
1589 uint32 /* buffer size */,
1590 base::SharedMemoryHandle /* font data */,
1591 uint32 /* font id */)
1593 // Informs the browser that a plugin has gained or lost focus.
1594 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1595 bool, /* focused */
1596 int /* plugin_id */)
1598 // Instructs the browser to start plugin IME.
1599 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1601 // Receives content of a web page as plain text.
1602 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1604 #elif defined(OS_WIN)
1605 // Request that the given font characters be loaded by the browser so it's
1606 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1607 // for details.
1608 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1609 LOGFONT /* font_data */,
1610 base::string16 /* characters */)
1611 #endif
1613 #if defined(OS_POSIX)
1614 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1615 // this call exists for the renderer to ask the browser to allocate memory
1616 // on its behalf. We return a file descriptor to the POSIX shared memory.
1617 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1618 // by the browser, and it is the caller's repsonsibility to send a
1619 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1620 // In all cases, the caller is responsible for deleting the resulting
1621 // TransportDIB.
1622 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1623 uint32_t, /* bytes requested */
1624 bool, /* cache in the browser */
1625 TransportDIB::Handle /* DIB */)
1627 // Since the browser keeps handles to the allocated transport DIBs, this
1628 // message is sent to tell the browser that it may release them when the
1629 // renderer is finished with them.
1630 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1631 TransportDIB::Id /* DIB id */)
1632 #endif
1634 // Adding a new message? Stick to the sort order above: first platform
1635 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1636 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.