Revert 268405 "Make sure that ScratchBuffer::Allocate() always r..."
[chromium-blink-merge.git] / content / common / view_messages.h
blob1bb0789068ba4ba0a014f4b752aa3a70c1900295
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/input/did_overscroll_params.h"
18 #include "content/common/input/input_event_ack_state.h"
19 #include "content/common/navigation_gesture.h"
20 #include "content/common/pepper_renderer_instance_data.h"
21 #include "content/common/view_message_enums.h"
22 #include "content/common/webplugin_geometry.h"
23 #include "content/public/common/common_param_traits.h"
24 #include "content/public/common/favicon_url.h"
25 #include "content/public/common/file_chooser_params.h"
26 #include "content/public/common/menu_item.h"
27 #include "content/public/common/page_state.h"
28 #include "content/public/common/page_zoom.h"
29 #include "content/public/common/referrer.h"
30 #include "content/public/common/renderer_preferences.h"
31 #include "content/public/common/stop_find_action.h"
32 #include "content/public/common/three_d_api_types.h"
33 #include "content/public/common/window_container_type.h"
34 #include "content/common/date_time_suggestion.h"
35 #include "ipc/ipc_channel_handle.h"
36 #include "ipc/ipc_message_macros.h"
37 #include "ipc/ipc_platform_file.h"
38 #include "media/audio/audio_parameters.h"
39 #include "media/base/channel_layout.h"
40 #include "media/base/media_log_event.h"
41 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
42 #include "third_party/WebKit/public/platform/WebFloatRect.h"
43 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
44 #include "third_party/WebKit/public/web/WebFindOptions.h"
45 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
46 #include "third_party/WebKit/public/web/WebPluginAction.h"
47 #include "third_party/WebKit/public/web/WebPopupType.h"
48 #include "third_party/WebKit/public/web/WebTextDirection.h"
49 #include "third_party/skia/include/core/SkBitmap.h"
50 #include "ui/base/ime/text_input_mode.h"
51 #include "ui/base/ime/text_input_type.h"
52 #include "ui/base/ui_base_types.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(AccessibilityMode)
72 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type)
73 IPC_ENUM_TRAITS(blink::WebPluginAction::Type)
74 IPC_ENUM_TRAITS(blink::WebPopupType)
75 IPC_ENUM_TRAITS(blink::WebTextDirection)
76 IPC_ENUM_TRAITS(WindowContainerType)
77 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
78 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
79 IPC_ENUM_TRAITS(content::MenuItem::Type)
80 IPC_ENUM_TRAITS(content::NavigationGesture)
81 IPC_ENUM_TRAITS(content::PageZoom)
82 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum)
83 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum)
84 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
85 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
86 IPC_ENUM_TRAITS(content::StopFindAction)
87 IPC_ENUM_TRAITS(content::ThreeDAPIType)
88 IPC_ENUM_TRAITS(media::ChannelLayout)
89 IPC_ENUM_TRAITS(media::MediaLogEvent::Type)
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::DidOverscrollParams)
158 IPC_STRUCT_TRAITS_MEMBER(accumulated_overscroll)
159 IPC_STRUCT_TRAITS_MEMBER(latest_overscroll_delta)
160 IPC_STRUCT_TRAITS_MEMBER(current_fling_velocity)
161 IPC_STRUCT_TRAITS_END()
163 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
164 IPC_STRUCT_TRAITS_MEMBER(icon_url)
165 IPC_STRUCT_TRAITS_MEMBER(icon_type)
166 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
167 IPC_STRUCT_TRAITS_END()
169 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
170 IPC_STRUCT_TRAITS_MEMBER(mode)
171 IPC_STRUCT_TRAITS_MEMBER(title)
172 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
173 IPC_STRUCT_TRAITS_MEMBER(accept_types)
174 #if defined(OS_ANDROID)
175 IPC_STRUCT_TRAITS_MEMBER(capture)
176 #endif
177 IPC_STRUCT_TRAITS_END()
179 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
180 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
181 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
182 IPC_STRUCT_TRAITS_MEMBER(document_url)
183 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
184 IPC_STRUCT_TRAITS_END()
186 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
187 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
188 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
189 IPC_STRUCT_TRAITS_MEMBER(hinting)
190 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
191 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
192 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
193 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
194 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
195 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
196 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
197 IPC_STRUCT_TRAITS_MEMBER(track_color)
198 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
199 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
200 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
201 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
202 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
203 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
204 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
205 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
206 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
207 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
208 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
209 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
210 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
211 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
212 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile)
213 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile)
214 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
215 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
216 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
217 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
218 IPC_STRUCT_TRAITS_END()
220 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
221 IPC_STRUCT_TRAITS_MEMBER(name)
222 IPC_STRUCT_TRAITS_MEMBER(value)
223 IPC_STRUCT_TRAITS_MEMBER(domain)
224 IPC_STRUCT_TRAITS_MEMBER(path)
225 IPC_STRUCT_TRAITS_MEMBER(expires)
226 IPC_STRUCT_TRAITS_MEMBER(http_only)
227 IPC_STRUCT_TRAITS_MEMBER(secure)
228 IPC_STRUCT_TRAITS_MEMBER(session)
229 IPC_STRUCT_TRAITS_END()
231 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
232 IPC_STRUCT_TRAITS_MEMBER(window)
233 IPC_STRUCT_TRAITS_MEMBER(window_rect)
234 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
235 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
236 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
237 IPC_STRUCT_TRAITS_MEMBER(visible)
238 IPC_STRUCT_TRAITS_END()
240 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
241 IPC_STRUCT_TRAITS_MEMBER(id)
242 IPC_STRUCT_TRAITS_MEMBER(type)
243 IPC_STRUCT_TRAITS_MEMBER(params)
244 IPC_STRUCT_TRAITS_MEMBER(time)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo)
248 IPC_STRUCT_TRAITS_MEMBER(file_path)
249 IPC_STRUCT_TRAITS_MEMBER(local_path)
250 IPC_STRUCT_TRAITS_MEMBER(display_name)
251 IPC_STRUCT_TRAITS_END()
253 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
254 // Routing ID of the view initiating the open.
255 IPC_STRUCT_MEMBER(int, opener_id)
257 // True if this open request came in the context of a user gesture.
258 IPC_STRUCT_MEMBER(bool, user_gesture)
260 // Type of window requested.
261 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
263 // The session storage namespace ID this view should use.
264 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
266 // The name of the resulting frame that should be created (empty if none
267 // has been specified).
268 IPC_STRUCT_MEMBER(base::string16, frame_name)
270 // The routing id of the frame initiating the open.
271 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
273 // The URL of the frame initiating the open.
274 IPC_STRUCT_MEMBER(GURL, opener_url)
276 // The URL of the top frame containing the opener.
277 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
279 // The security origin of the frame initiating the open.
280 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
282 // Whether the opener will be suppressed in the new window, in which case
283 // scripting the new window is not allowed.
284 IPC_STRUCT_MEMBER(bool, opener_suppressed)
286 // Whether the window should be opened in the foreground, background, etc.
287 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
289 // The URL that will be loaded in the new window (empty if none has been
290 // sepcified).
291 IPC_STRUCT_MEMBER(GURL, target_url)
293 // The referrer that will be used to load |target_url| (empty if none has
294 // been specified).
295 IPC_STRUCT_MEMBER(content::Referrer, referrer)
297 // The window features to use for the new view.
298 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
300 // The additional window features to use for the new view. We pass these
301 // separately from |features| above because we cannot serialize WebStrings
302 // over IPC.
303 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
304 IPC_STRUCT_END()
306 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
307 // URL for the worker script.
308 IPC_STRUCT_MEMBER(GURL, url)
310 // Name for a SharedWorker, otherwise empty string.
311 IPC_STRUCT_MEMBER(base::string16, name)
313 // Security policy used in the worker.
314 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
316 // Security policy type used in the worker.
317 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
319 // The ID of the parent document (unique within parent renderer).
320 IPC_STRUCT_MEMBER(unsigned long long, document_id)
322 // RenderFrame routing id used to send messages back to the parent.
323 IPC_STRUCT_MEMBER(int, render_frame_route_id)
324 IPC_STRUCT_END()
326 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
327 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
328 IPC_STRUCT_MEMBER(double, dialog_value)
329 IPC_STRUCT_MEMBER(double, minimum)
330 IPC_STRUCT_MEMBER(double, maximum)
331 IPC_STRUCT_MEMBER(double, step)
332 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
333 IPC_STRUCT_END()
335 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
336 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
337 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
338 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
339 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
340 IPC_STRUCT_MEMBER(bool, is_anchor_first)
341 IPC_STRUCT_END()
343 // This message is used for supporting popup menus on Mac OS X using native
344 // Cocoa controls. The renderer sends us this message which we use to populate
345 // the popup menu.
346 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params)
347 // Position on the screen.
348 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
350 // The height of each item in the menu.
351 IPC_STRUCT_MEMBER(int, item_height)
353 // The size of the font to use for those items.
354 IPC_STRUCT_MEMBER(double, item_font_size)
356 // The currently selected (displayed) item in the menu.
357 IPC_STRUCT_MEMBER(int, selected_item)
359 // The entire list of items in the popup menu.
360 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
362 // Whether items should be right-aligned.
363 IPC_STRUCT_MEMBER(bool, right_aligned)
365 // Whether this is a multi-select popup.
366 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
367 IPC_STRUCT_END()
369 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
370 // The type of input field
371 IPC_STRUCT_MEMBER(ui::TextInputType, type)
373 // The value of the input field
374 IPC_STRUCT_MEMBER(std::string, value)
376 // The cursor position of the current selection start, or the caret position
377 // if nothing is selected
378 IPC_STRUCT_MEMBER(int, selection_start)
380 // The cursor position of the current selection end, or the caret position
381 // if nothing is selected
382 IPC_STRUCT_MEMBER(int, selection_end)
384 // The start position of the current composition, or -1 if there is none
385 IPC_STRUCT_MEMBER(int, composition_start)
387 // The end position of the current composition, or -1 if there is none
388 IPC_STRUCT_MEMBER(int, composition_end)
390 // Whether or not inline composition can be performed for the current input.
391 IPC_STRUCT_MEMBER(bool, can_compose_inline)
393 // Whether or not the IME should be shown as a result of this update. Even if
394 // true, the IME will only be shown if the type is appropriate (e.g. not
395 // TEXT_INPUT_TYPE_NONE).
396 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
398 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
399 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
400 IPC_STRUCT_END()
402 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
403 // The scroll offset of the render view.
404 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset)
406 // The size of the RenderView when this message was generated. This is
407 // included so the host knows how large the view is from the perspective of
408 // the renderer process. This is necessary in case a resize operation is in
409 // progress. If auto-resize is enabled, this should update the corresponding
410 // view size.
411 IPC_STRUCT_MEMBER(gfx::Size, view_size)
413 // New window locations for plugin child windows.
414 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
415 plugin_window_moves)
417 // The following describes the various bits that may be set in flags:
419 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
420 // Indicates that this is a response to a ViewMsg_Resize message.
422 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
423 // Indicates that this is a response to a ViewMsg_Repaint message.
425 // If flags is zero, then this message corresponds to an unsolicited paint
426 // request by the render view. Any of the above bits may be set in flags,
427 // which would indicate that this paint message is an ACK for multiple
428 // request messages.
429 IPC_STRUCT_MEMBER(int, flags)
431 // All the above coordinates are in DIP. This is the scale factor needed
432 // to convert them to pixels.
433 IPC_STRUCT_MEMBER(float, scale_factor)
434 IPC_STRUCT_END()
436 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
437 // Renderer-wide preferences.
438 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
440 // Preferences for this view.
441 IPC_STRUCT_MEMBER(WebPreferences, web_preferences)
443 // The ID of the view to be created.
444 IPC_STRUCT_MEMBER(int32, view_id)
446 // The ID of the main frame hosted in the view.
447 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
449 // The ID of the rendering surface.
450 IPC_STRUCT_MEMBER(int32, surface_id)
452 // The session storage namespace ID this view should use.
453 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
455 // The name of the frame associated with this view (or empty if none).
456 IPC_STRUCT_MEMBER(base::string16, frame_name)
458 // The route ID of the opener RenderView if we need to set one
459 // (MSG_ROUTING_NONE otherwise).
460 IPC_STRUCT_MEMBER(int, opener_route_id)
462 // Whether the RenderView should initially be swapped out.
463 IPC_STRUCT_MEMBER(bool, swapped_out)
465 // Whether the RenderView should initially be hidden.
466 IPC_STRUCT_MEMBER(bool, hidden)
468 // Whether the RenderView will never be visible.
469 IPC_STRUCT_MEMBER(bool, never_visible)
471 // Whether the window associated with this view was created with an opener.
472 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
474 // The initial page ID to use for this view, which must be larger than any
475 // existing navigation that might be loaded in the view. Page IDs are unique
476 // to a view and are only updated by the renderer after this initial value.
477 IPC_STRUCT_MEMBER(int32, next_page_id)
479 // The properties of the screen associated with the view.
480 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
482 // The accessibility mode of the renderer.
483 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
484 IPC_STRUCT_END()
486 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
487 // The serialized script value.
488 IPC_STRUCT_MEMBER(base::string16, data)
490 // When sent to the browser, this is the routing ID of the source frame in
491 // the source process. The browser replaces it with the routing ID of the
492 // equivalent (swapped out) frame in the destination process.
493 IPC_STRUCT_MEMBER(int, source_routing_id)
495 // The origin of the source frame.
496 IPC_STRUCT_MEMBER(base::string16, source_origin)
498 // The origin for the message's target.
499 IPC_STRUCT_MEMBER(base::string16, target_origin)
501 // Information about the MessagePorts this message contains.
502 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
503 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
504 IPC_STRUCT_END()
506 // Messages sent from the browser to the renderer.
508 // Tells the renderer to cancel an opened date/time dialog.
509 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
511 // Get all savable resource links from current webpage, include main
512 // frame and sub-frame.
513 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
514 GURL /* url of page which is needed to save */)
516 // Get html data by serializing all frames of current page with lists
517 // which contain all resource links that have local copy.
518 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
519 std::vector<GURL> /* urls that have local copy */,
520 std::vector<base::FilePath> /* paths of local copy */,
521 base::FilePath /* local directory path */)
523 // Tells the render side that a ViewHostMsg_LockMouse message has been
524 // processed. |succeeded| indicates whether the mouse has been successfully
525 // locked or not.
526 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
527 bool /* succeeded */)
528 // Tells the render side that the mouse has been unlocked.
529 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
531 // Screen was rotated. Dispatched to the onorientationchange javascript API.
532 IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent,
533 int /* orientation */)
535 // Sent by the browser when the parameters for vsync alignment have changed.
536 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
537 base::TimeTicks /* timebase */,
538 base::TimeDelta /* interval */)
540 // Set the top-level frame to the provided name.
541 IPC_MESSAGE_ROUTED1(ViewMsg_SetName,
542 std::string /* frame_name */)
544 // Sent to the RenderView when a new tab is swapped into an existing
545 // tab and the histories need to be merged. The existing tab has a history of
546 // |merged_history_length| which precedes the history of the new tab. All
547 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
549 // For example, suppose the history of page_ids in the new tab's RenderView
550 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
551 // all pages in the new tab with page_id >= 7 are to be preserved.
552 // The resulting page history is [-1 -1 -1 7 8].
553 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
554 int, /* merge_history_length */
555 int32 /* minimum_page_id */)
557 // Tells the renderer to create a new view.
558 // This message is slightly different, the view it takes (via
559 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
560 // non-view control message.
561 IPC_MESSAGE_CONTROL1(ViewMsg_New,
562 ViewMsg_New_Params)
564 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
565 // similar to the new command, but used when the renderer created a view
566 // first, and we need to update it.
567 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
569 // Sends updated preferences to the renderer.
570 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
571 content::RendererPreferences)
573 // This passes a set of webkit preferences down to the renderer.
574 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
575 WebPreferences)
577 // Informs the renderer that the timezone has changed.
578 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
580 // Tells the render view to close.
581 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
583 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
584 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
585 IPC_STRUCT_MEMBER(gfx::Size, new_size)
586 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
587 IPC_STRUCT_MEMBER(float, overdraw_bottom_height)
588 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
589 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
590 IPC_STRUCT_MEMBER(bool, is_fullscreen)
591 IPC_STRUCT_END()
593 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
594 // is generated in response provided new_size is not empty and not equal to
595 // the view's current size. The generated ViewHostMsg_UpdateRect message will
596 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
597 // we don't have to fetch it every time WebKit asks for it.
598 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
599 ViewMsg_Resize_Params /* params */)
601 // Tells the render view that the resize rect has changed.
602 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
603 gfx::Rect /* resizer_rect */)
605 // Sent to inform the view that it was hidden. This allows it to reduce its
606 // resource utilization.
607 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
609 // Tells the render view that it is no longer hidden (see WasHidden), and the
610 // render view is expected to respond with a full repaint if needs_repainting
611 // is true. If needs_repainting is false, then this message does not trigger a
612 // message in response.
613 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown,
614 bool /* needs_repainting */)
616 // Sent to inform the view that it was swapped out. This allows the process to
617 // exit if no other views are using it.
618 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut)
620 // Tells the renderer to focus the first (last if reverse is true) focusable
621 // node.
622 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
623 bool /* reverse */)
625 // Sent to inform the renderer to invoke a context menu.
626 // The parameter specifies the location in the render view's coordinates.
627 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu,
628 gfx::Point /* location where menu should be shown */)
630 IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
632 // Sent when the user wants to search for a word on the page (find in page).
633 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
634 int /* request_id */,
635 base::string16 /* search_text */,
636 blink::WebFindOptions)
638 // This message notifies the renderer that the user has closed the FindInPage
639 // window (and what action to take regarding the selection).
640 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
641 content::StopFindAction /* action */)
643 // Replaces a date time input field.
644 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
645 double /* dialog_value */)
647 // Copies the image at location x, y to the clipboard (if there indeed is an
648 // image at that location).
649 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
650 int /* x */,
651 int /* y */)
653 // Tells the renderer to perform the given action on the media player
654 // located at the given point.
655 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
656 gfx::Point, /* location */
657 blink::WebMediaPlayerAction)
659 // Tells the renderer to perform the given action on the plugin located at
660 // the given point.
661 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
662 gfx::Point, /* location */
663 blink::WebPluginAction)
665 // Posts a message from a frame in another process to the current renderer.
666 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
667 ViewMsg_PostMessage_Params)
669 // Requests that the RenderView's main frame sets its opener to null.
670 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener)
672 // Change the zoom level for the current main frame. If the level actually
673 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
674 // telling it what url got zoomed and what its current zoom level is.
675 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
676 content::PageZoom /* function */)
678 // Set the zoom level for the current main frame. If the level actually
679 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
680 // telling it what url got zoomed and what its current zoom level is.
681 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel,
682 double /* zoom_level */)
684 // Set the zoom level for a particular url that the renderer is in the
685 // process of loading. This will be stored, to be used if the load commits
686 // and ignored otherwise.
687 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
688 GURL /* url */,
689 double /* zoom_level */)
691 // Set the zoom level for a particular url, so all render views
692 // displaying this url can update their zoom levels to match.
693 // If scheme is empty, then only host is used for matching.
694 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
695 std::string /* scheme */,
696 std::string /* host */,
697 double /* zoom_level */)
699 // Change encoding of page in the renderer.
700 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
701 std::string /*new encoding name*/)
703 // Reset encoding of page in the renderer back to default.
704 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
706 // Used to tell a render view whether it should expose various bindings
707 // that allow JS content extended privileges. See BindingsPolicy for valid
708 // flag values.
709 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
710 int /* enabled_bindings_flags */)
712 // Tell the renderer to add a property to the WebUI binding object. This
713 // only works if we allowed WebUI bindings.
714 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
715 std::string /* property_name */,
716 std::string /* property_value_json */)
718 // This message starts/stop monitoring the input method status of the focused
719 // edit control of a renderer process.
720 // Parameters
721 // * is_active (bool)
722 // Indicates if an input method is active in the browser process.
723 // The possible actions when a renderer process receives this message are
724 // listed below:
725 // Value Action
726 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
727 // to notify the input method status of the focused edit control.
728 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
729 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
730 bool /* is_active */)
732 // IME API oncandidatewindow* events for InputMethodContext.
733 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
734 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
735 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
737 // This message sends a string being composed with an input method.
738 IPC_MESSAGE_ROUTED4(
739 ViewMsg_ImeSetComposition,
740 base::string16, /* text */
741 std::vector<blink::WebCompositionUnderline>, /* underlines */
742 int, /* selectiont_start */
743 int /* selection_end */)
745 // This message confirms an ongoing composition.
746 IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition,
747 base::string16 /* text */,
748 gfx::Range /* replacement_range */,
749 bool /* keep_selection */)
751 // Used to notify the render-view that we have received a target URL. Used
752 // to prevent target URLs spamming the browser.
753 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
755 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
756 std::vector<ui::SelectedFileInfo>)
758 // Provides the results of directory enumeration.
759 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
760 int /* request_id */,
761 std::vector<base::FilePath> /* files_in_directory */)
763 // When a renderer sends a ViewHostMsg_Focus to the browser process,
764 // the browser has the option of sending a ViewMsg_CantFocus back to
765 // the renderer.
766 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
768 // Tells the renderer to suppress any further modal dialogs until it receives a
769 // corresponding ViewMsg_SwapOut message. This ensures that no
770 // PageGroupLoadDeferrer is on the stack for SwapOut.
771 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
773 // Instructs the renderer to close the current page, including running the
774 // onunload event handler.
776 // Expects a ClosePage_ACK message when finished.
777 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
779 // Notifies the renderer about ui theme changes
780 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
782 // Notifies the renderer that a paint is to be generated for the rectangle
783 // passed in.
784 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
785 gfx::Size /* The view size to be repainted */)
787 // Notification that a move or resize renderer's containing window has
788 // started.
789 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
791 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
792 gfx::Rect /* view_screen_rect */,
793 gfx::Rect /* window_screen_rect */)
795 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
796 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
797 // processed the move. The browser may have ignored the move, but it finished
798 // processing. This is used because the renderer keeps a temporary cache of
799 // the widget position while these asynchronous operations are in progress.
800 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
802 // Used to instruct the RenderView to send back updates to the preferred size.
803 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
805 // Used to instruct the RenderView to automatically resize and send back
806 // updates for the new size.
807 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
808 gfx::Size /* min_size */,
809 gfx::Size /* max_size */)
811 // Used to instruct the RenderView to disalbe automatically resize.
812 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
813 gfx::Size /* new_size */)
815 // Changes the text direction of the currently selected input field (if any).
816 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
817 blink::WebTextDirection /* direction */)
819 // Tells the renderer to clear the focused element (if any).
820 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
822 // Make the RenderView transparent and render it onto a custom background. The
823 // background will be tiled in both directions if it is not large enough.
824 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground,
825 SkBitmap /* background */)
827 // Used to tell the renderer not to add scrollbars with height and
828 // width below a threshold.
829 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
830 gfx::Size /* disable_scrollbar_size_limit */)
832 // Activate/deactivate the RenderView (i.e., set its controls' tint
833 // accordingly, etc.).
834 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
835 bool /* active */)
837 // Response message to ViewHostMsg_CreateWorker.
838 // Sent when the worker has started.
839 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
841 // Sent when the worker failed to load the worker script.
842 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
843 // But if the shared worker of the same URL already exists and it has failed
844 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
845 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
846 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
848 // Sent when the worker has connected.
849 // This message is sent only if the worker successfully loaded the script.
850 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
852 // Tells the renderer that the network state has changed and that
853 // window.navigator.onLine should be updated for all WebViews.
854 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged,
855 bool /* online */)
857 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
858 // Tells the renderer that the channel to the broker has been created.
859 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
860 base::ProcessId /* broker_pid */,
861 IPC::ChannelHandle /* handle */)
863 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
864 // Tells the renderer whether permission to access to PPAPI broker was granted
865 // or not.
866 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
867 bool /* result */)
869 // Tells the renderer to empty its plugin list cache, optional reloading
870 // pages containing plugins.
871 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
872 bool /* reload_pages */)
874 // Used to instruct the RenderView to go into "view source" mode.
875 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
877 // Instructs the renderer to save the current page to MHTML.
878 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
879 int /* job_id */,
880 IPC::PlatformFileForTransit /* file handle */)
882 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
883 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
884 GURL /* data */)
886 // Change the accessibility mode in the renderer process.
887 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode,
888 AccessibilityMode)
890 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
891 // process to release the magnified image.
892 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
893 cc::SharedBitmapId /* id */)
895 // Notifies the renderer that a snapshot has been retrieved.
896 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
897 int /* snapshot_id */,
898 gfx::Size /* size */,
899 std::vector<unsigned char> /* png */)
901 #if defined(OS_MACOSX)
902 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay);
904 // Notification of a change in scrollbar appearance and/or behavior.
905 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
906 float /* initial_button_delay */,
907 float /* autoscroll_button_delay */,
908 bool /* jump_on_track_click */,
909 blink::ScrollerStyle /* preferred_scroller_style */,
910 bool /* redraw */)
911 #endif
913 #if defined(OS_ANDROID)
914 // Tells the renderer to suspend/resume the webkit timers.
915 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
916 bool /* suspend */)
918 // Sent when the browser wants the bounding boxes of the current find matches.
920 // If match rects are already cached on the browser side, |current_version|
921 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
922 // they came in, so the renderer can tell if it needs to send updated rects.
923 // Otherwise just pass -1 to always receive the list of rects.
925 // There must be an active search string (it is probably most useful to call
926 // this immediately after a ViewHostMsg_Find_Reply message arrives with
927 // final_update set to true).
928 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
929 int /* current_version */)
931 // External popup menus.
932 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems,
933 bool /* user canceled the popup */,
934 std::vector<int> /* selected indices */)
936 // Notifies the renderer whether hiding/showing the top controls is enabled
937 // and whether or not to animate to the proper state.
938 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
939 bool /* enable_hiding */,
940 bool /* enable_showing */,
941 bool /* animate */)
943 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
945 // Sent by the browser when the renderer should generate a new frame.
946 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
947 cc::BeginFrameArgs /* args */)
949 // Sent by the browser when an IME update that requires acknowledgement has been
950 // processed on the browser side.
951 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
953 // Sent by the browser when we should pause video playback.
954 IPC_MESSAGE_ROUTED0(ViewMsg_PauseVideo);
956 // Extracts the data at the given rect, returning it through the
957 // ViewHostMsg_SmartClipDataExtracted IPC.
958 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
959 gfx::Rect /* rect */)
961 #elif defined(OS_MACOSX)
962 // Let the RenderView know its window has changed visibility.
963 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
964 bool /* visibile */)
966 // Let the RenderView know its window's frame has changed.
967 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
968 gfx::Rect /* window frame */,
969 gfx::Rect /* content view frame */)
971 // Message sent from the browser to the renderer when the user starts or stops
972 // resizing the view.
973 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
974 bool /* enable */)
976 // Tell the renderer that plugin IME has completed.
977 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
978 base::string16 /* text */,
979 int /* plugin_id */)
981 // External popup menus.
982 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
983 int /* selected index, -1 means no selection */)
984 #endif
986 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
987 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
988 uint32 /* output_surface_id */,
989 cc::CompositorFrameAck /* ack */)
991 // Sent by browser to tell renderer compositor that some resources that were
992 // given to the browser in a swap are not being used anymore.
993 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
994 uint32 /* output_surface_id */,
995 cc::CompositorFrameAck /* ack */)
997 // -----------------------------------------------------------------------------
998 // Messages sent from the renderer to the browser.
1000 // Sent by the renderer when it is creating a new window. The browser creates
1001 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1002 // MSG_ROUTING_NONE, the view couldn't be created.
1003 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
1004 ViewHostMsg_CreateWindow_Params,
1005 int /* route_id */,
1006 int /* main_frame_route_id */,
1007 int32 /* surface_id */,
1008 int64 /* cloned_session_storage_namespace_id */)
1010 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1011 // <select> dropdowns. This message is sent to the WebContentsImpl that
1012 // contains the widget being created.
1013 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1014 int /* opener_id */,
1015 blink::WebPopupType /* popup type */,
1016 int /* route_id */,
1017 int32 /* surface_id */)
1019 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1020 // window.
1021 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1022 int /* opener_id */,
1023 int /* route_id */,
1024 int32 /* surface_id */)
1026 // Asks the browser for a unique routing ID.
1027 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1028 int /* routing_id */)
1030 // Asks the browser for the default audio hardware configuration.
1031 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1032 media::AudioParameters /* input parameters */,
1033 media::AudioParameters /* output parameters */)
1035 // Asks the browser for CPU usage of the renderer process in percents.
1036 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage,
1037 int /* CPU usage in percents */)
1039 // Asks the browser for the renderer process memory size stats.
1040 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1041 size_t /* private_bytes */,
1042 size_t /* shared_bytes */)
1044 // These three messages are sent to the parent RenderViewHost to display the
1045 // page/widget that was created by
1046 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1047 // refers to the id that was returned from the Create message above.
1048 // The initial_position parameter is a rectangle in screen coordinates.
1050 // FUTURE: there will probably be flags here to control if the result is
1051 // in a new window.
1052 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1053 int /* route_id */,
1054 WindowOpenDisposition /* disposition */,
1055 gfx::Rect /* initial_pos */,
1056 bool /* opened_by_user_gesture */)
1058 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1059 int /* route_id */,
1060 gfx::Rect /* initial_pos */)
1062 // Message to show a full screen widget.
1063 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1064 int /* route_id */)
1066 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1067 // to run in a modal fashion until it is closed.
1068 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1069 int /* opener_id */)
1071 // Indicates the renderer is ready in response to a ViewMsg_New or
1072 // a ViewMsg_CreatingNew_ACK.
1073 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1075 // Indicates the renderer process is gone. This actually is sent by the
1076 // browser process to itself, but keeps the interface cleaner.
1077 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1078 int, /* this really is base::TerminationStatus */
1079 int /* exit_code */)
1081 // Sent by the renderer process to request that the browser close the view.
1082 // This corresponds to the window.close() API, and the browser may ignore
1083 // this message. Otherwise, the browser will generates a ViewMsg_Close
1084 // message to close the view.
1085 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1087 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1088 // throttle these messages.
1089 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1091 // Sent by the renderer process to request that the browser move the view.
1092 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1093 // the browser may ignore this message.
1094 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1095 gfx::Rect /* position */)
1097 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1098 // Message to show/hide a popup menu using native controls.
1099 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1100 ViewHostMsg_ShowPopup_Params)
1101 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup)
1102 #endif
1104 // Result of string search in the page.
1105 // Response to ViewMsg_Find with the results of the requested find-in-page
1106 // search, the number of matches found and the selection rect (in screen
1107 // coordinates) for the string found. If |final_update| is false, it signals
1108 // that this is not the last Find_Reply message - more will be sent as the
1109 // scoping effort continues.
1110 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1111 int /* request_id */,
1112 int /* number of matches */,
1113 gfx::Rect /* selection_rect */,
1114 int /* active_match_ordinal */,
1115 bool /* final_update */)
1117 // Indicates that the current page has been closed, after a ClosePage
1118 // message.
1119 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1121 // Notifies the browser that we have session history information.
1122 // page_id: unique ID that allows us to distinguish between history entries.
1123 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1124 int32 /* page_id */,
1125 content::PageState /* state */)
1127 // Changes the title for the page in the UI when the page is navigated or the
1128 // title changes.
1129 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle,
1130 int32 /* page_id */,
1131 base::string16 /* title */,
1132 blink::WebTextDirection /* title direction */)
1134 // Change the encoding name of the page in UI when the page has detected
1135 // proper encoding name.
1136 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
1137 std::string /* new encoding name */)
1139 // Notifies the browser that we want to show a destination url for a potential
1140 // action (e.g. when the user is hovering over a link).
1141 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
1142 int32,
1143 GURL)
1145 // Sent when the renderer main frame has made progress loading.
1146 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
1147 double /* load_progress */)
1149 // Sent when the document element is available for the top-level frame. This
1150 // happens after the page starts loading, but before all resources are
1151 // finished.
1152 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
1154 // Sent when the renderer loads a resource from its memory cache.
1155 // The security info is non empty if the resource was originally loaded over
1156 // a secure connection.
1157 // Note: May only be sent once per URL per frame per committed load.
1158 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1159 GURL /* url */,
1160 std::string /* security info */,
1161 std::string /* http method */,
1162 std::string /* mime type */,
1163 ResourceType::Type /* resource type */)
1165 // Sent when the renderer displays insecure content in a secure page.
1166 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1168 // Sent when the renderer runs insecure content in a secure origin.
1169 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1170 std::string /* security_origin */,
1171 GURL /* target URL */)
1173 // Sent to update part of the view. In response to this message, the host
1174 // generates a ViewMsg_UpdateRect_ACK message.
1175 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1176 ViewHostMsg_UpdateRect_Params)
1178 // Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
1179 // which may get delayed until the browser's UI unblocks.
1180 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed)
1182 // Sent by the renderer when accelerated compositing is enabled or disabled to
1183 // notify the browser whether or not is should do painting.
1184 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
1185 bool /* true if the accelerated compositor is actve */)
1187 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1188 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1190 // Message sent from renderer to the browser when focus changes inside the
1191 // webpage. The parameter says whether the newly focused element needs
1192 // keyboard input (true for textfields, text areas and content editable divs).
1193 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1194 bool /* is_editable_node */)
1196 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1198 // Message sent from renderer requesting touch emulation using mouse.
1199 // Shift-scrolling should be converted to pinch, if |allow_pinch| is true.
1200 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchEventEmulationEnabled,
1201 bool /* enabled */,
1202 bool /* allow_pinch */)
1204 // Used to set a cookie. The cookie is set asynchronously, but will be
1205 // available to a subsequent ViewHostMsg_GetCookies request.
1206 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1207 int /* render_frame_id */,
1208 GURL /* url */,
1209 GURL /* first_party_for_cookies */,
1210 std::string /* cookie */)
1212 // Used to get cookies for the given URL. This may block waiting for a
1213 // previous SetCookie message to be processed.
1214 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1215 int /* render_frame_id */,
1216 GURL /* url */,
1217 GURL /* first_party_for_cookies */,
1218 std::string /* cookies */)
1220 // Used to get raw cookie information for the given URL. This may block
1221 // waiting for a previous SetCookie message to be processed.
1222 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1223 GURL /* url */,
1224 GURL /* first_party_for_cookies */,
1225 std::vector<content::CookieData>
1226 /* raw_cookies */)
1228 // Used to delete cookie for the given URL and name
1229 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1230 GURL /* url */,
1231 std::string /* cookie_name */)
1233 // Used to check if cookies are enabled for the given URL. This may block
1234 // waiting for a previous SetCookie message to be processed.
1235 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled,
1236 GURL /* url */,
1237 GURL /* first_party_for_cookies */,
1238 bool /* cookies_enabled */)
1240 // Used to get the list of plugins
1241 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1242 bool /* refresh*/,
1243 std::vector<content::WebPluginInfo> /* plugins */)
1245 #if defined(OS_WIN)
1246 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1247 gfx::NativeViewId /* dummy_activation_window */)
1249 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1250 gfx::NativeViewId /* dummy_activation_window */)
1252 // Asks the browser for the user's monitor profile.
1253 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1254 std::vector<char> /* profile */)
1255 #endif
1257 // Get the list of proxies to use for |url|, as a semicolon delimited list
1258 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1259 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1260 GURL /* url */,
1261 bool /* result */,
1262 std::string /* proxy list */)
1264 // A renderer sends this to the browser process when it wants to create a
1265 // worker. The browser will create the worker process if necessary, and
1266 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1267 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1268 ViewHostMsg_CreateWorker_Params,
1269 int /* route_id */)
1271 // A renderer sends this to the browser process when a document has been
1272 // detached. The browser will use this to constrain the lifecycle of worker
1273 // processes (SharedWorkers are shut down when their last associated document
1274 // is detached).
1275 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1276 uint64 /* document_id */)
1278 // Wraps an IPC message that's destined to the worker on the renderer->browser
1279 // hop.
1280 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1281 IPC::Message /* message */)
1283 // Tells the browser that a specific Appcache manifest in the current page
1284 // was accessed.
1285 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1286 GURL /* manifest url */,
1287 bool /* blocked by policy */)
1289 // Initiates a download based on user actions like 'ALT+click'.
1290 IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl,
1291 GURL /* url */,
1292 content::Referrer /* referrer */,
1293 base::string16 /* suggested_name */)
1295 // Used to go to the session history entry at the given offset (ie, -1 will
1296 // return the "back" item).
1297 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1298 int /* offset (from current) of history item to get */)
1300 // Sent from an inactive renderer for the browser to route to the active
1301 // renderer, instructing it to close.
1302 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1304 // Sent to the browser from an inactive renderer to post a message to the
1305 // active renderer.
1306 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1307 ViewMsg_PostMessage_Params)
1309 // Notifies that the preferred size of the content changed.
1310 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1311 gfx::Size /* pref_size */)
1313 // Notifies that the scroll offset changed.
1314 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1315 // is not sent at all when threaded compositing is enabled while
1316 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1317 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset)
1319 // Notifies that the pinned-to-side state of the content changed.
1320 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
1321 bool /* pinned_to_left */,
1322 bool /* pinned_to_right */)
1324 // Notifies that the number of JavaScript scroll handlers changed.
1325 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents,
1326 int /* count */)
1328 // Notifies whether there are JavaScript touch event handlers or not.
1329 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1330 bool /* has_handlers */)
1332 // A message from HTML-based UI. When (trusted) Javascript calls
1333 // send(message, args), this message is sent to the browser.
1334 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1335 GURL /* source_url */,
1336 std::string /* message */,
1337 base::ListValue /* args */)
1339 // A renderer sends this to the browser process when it wants to create a ppapi
1340 // plugin. The browser will create the plugin process if necessary, and will
1341 // return a handle to the channel on success.
1343 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1344 // process. This ID is valid only in the context of the browser process and is
1345 // used to identify the proper process when the renderer notifies it that the
1346 // plugin is hung.
1348 // On error an empty string and null handles are returned.
1349 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1350 base::FilePath /* path */,
1351 IPC::ChannelHandle /* handle to channel */,
1352 base::ProcessId /* plugin_pid */,
1353 int /* plugin_child_id */)
1355 // Notification that a plugin has created a new plugin instance. The parameters
1356 // indicate:
1357 // -The plugin process ID that we're creating the instance for.
1358 // -The instance ID of the instance being created.
1359 // -A PepperRendererInstanceData struct which contains properties from the
1360 // renderer which are associated with the plugin instance. This includes the
1361 // routing ID of the associated render view and the URL of plugin.
1362 // -Whether the plugin we're creating an instance for is external or internal.
1364 // This message must be sync even though it returns no parameters to avoid
1365 // a race condition with the plugin process. The plugin process sends messages
1366 // to the browser that assume the browser knows about the instance. We need to
1367 // make sure that the browser actually knows about the instance before we tell
1368 // the plugin to run.
1369 IPC_SYNC_MESSAGE_CONTROL4_0(
1370 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1371 int /* plugin_child_id */,
1372 int32 /* pp_instance */,
1373 content::PepperRendererInstanceData /* creation_data */,
1374 bool /* is_external */)
1376 // Notification that a plugin has destroyed an instance. This is the opposite of
1377 // the "DidCreate" message above.
1378 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1379 int /* plugin_child_id */,
1380 int32 /* pp_instance */,
1381 bool /* is_external */)
1383 // Message from the renderer to the browser indicating the in-process instance
1384 // has been created.
1385 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1386 int32 /* instance */,
1387 content::PepperRendererInstanceData /* instance_data */)
1389 // Message from the renderer to the browser indicating the in-process instance
1390 // has been destroyed.
1391 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1392 int32 /* instance */)
1394 // A renderer sends this to the browser process when it wants to
1395 // create a ppapi broker. The browser will create the broker process
1396 // if necessary, and will return a handle to the channel on success.
1397 // On error an empty string is returned.
1398 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1399 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1400 int /* routing_id */,
1401 base::FilePath /* path */)
1403 // A renderer sends this to the browser process when it wants to access a PPAPI
1404 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1405 // for every connection.
1406 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1407 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1408 int /* routing_id */,
1409 GURL /* document_url */,
1410 base::FilePath /* plugin_path */)
1412 // Send the tooltip text for the current mouse position to the browser.
1413 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1414 base::string16 /* tooltip text string */,
1415 blink::WebTextDirection /* text direction hint */)
1417 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
1418 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
1420 // Notification that the text selection has changed.
1421 // Note: The secound parameter is the character based offset of the
1422 // base::string16
1423 // text in the document.
1424 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1425 base::string16 /* text covers the selection range */,
1426 size_t /* the offset of the text in the document */,
1427 gfx::Range /* selection range in the document */)
1429 // Notification that the selection bounds have changed.
1430 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1431 ViewHostMsg_SelectionBounds_Params)
1433 #if defined(OS_ANDROID)
1434 // Notification that the selection root bounds have changed.
1435 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionRootBoundsChanged,
1436 gfx::Rect /* bounds of the selection root */)
1437 #endif
1439 // Asks the browser to display the file chooser. The result is returned in a
1440 // ViewMsg_RunFileChooserResponse message.
1441 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1442 content::FileChooserParams)
1444 // Asks the browser to enumerate a directory. This is equivalent to running
1445 // the file chooser in directory-enumeration mode and having the user select
1446 // the given directory. The result is returned in a
1447 // ViewMsg_EnumerateDirectoryResponse message.
1448 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1449 int /* request_id */,
1450 base::FilePath /* file_path */)
1452 // Tells the browser to move the focus to the next (previous if reverse is
1453 // true) focusable element.
1454 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1455 bool /* reverse */)
1457 // Required for opening a date/time dialog
1458 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1459 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1461 IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged,
1462 ui::TextInputType /* TextInputType of the focused node */,
1463 ui::TextInputMode /* TextInputMode of the focused node */,
1464 bool /* can_compose_inline in the focused node */)
1466 // Required for updating text input state.
1467 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1468 ViewHostMsg_TextInputState_Params /* input state params */)
1470 // Required for cancelling an ongoing input method composition.
1471 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition)
1473 // Sent when the renderer changes the zoom level for a particular url, so the
1474 // browser can update its records. If remember is true, then url is used to
1475 // update the zoom level for all pages in that site. Otherwise, the render
1476 // view's id is used so that only the menu is updated.
1477 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL,
1478 double /* zoom_level */,
1479 bool /* remember */,
1480 GURL /* url */)
1482 // Updates the minimum/maximum allowed zoom percent for this tab from the
1483 // default values. If |remember| is true, then the zoom setting is applied to
1484 // other pages in the site and is saved, otherwise it only applies to this
1485 // tab.
1486 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits,
1487 int /* minimum_percent */,
1488 int /* maximum_percent */,
1489 bool /* remember */)
1491 // Notify the browser that this render process can or can't be suddenly
1492 // terminated.
1493 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1494 bool /* enabled */)
1496 // Informs the browser of updated frame names.
1497 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateFrameName,
1498 int /* frame_id */,
1499 bool /* is_top_level */,
1500 std::string /* name */)
1503 IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params)
1504 IPC_STRUCT_MEMBER(int32, surface_id)
1505 IPC_STRUCT_MEMBER(uint64, surface_handle)
1506 IPC_STRUCT_MEMBER(int32, route_id)
1507 IPC_STRUCT_MEMBER(gfx::Size, size)
1508 IPC_STRUCT_MEMBER(float, scale_factor)
1509 IPC_STRUCT_MEMBER(int32, gpu_process_host_id)
1510 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
1511 IPC_STRUCT_END()
1513 // This message is synthesized by GpuProcessHost to pass through a swap message
1514 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
1515 // software or GPU frame.
1516 IPC_MESSAGE_ROUTED1(
1517 ViewHostMsg_CompositorSurfaceBuffersSwapped,
1518 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params /* params */)
1520 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame,
1521 uint32 /* output_surface_id */,
1522 cc::CompositorFrame /* frame */)
1524 // Sent by the compositor when input scroll events are dropped due to bounds
1525 // restricions on the root scroll offset.
1526 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidOverscroll,
1527 content::DidOverscrollParams /* params */)
1529 // Sent by the compositor when a flinging animation is stopped.
1530 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1532 //---------------------------------------------------------------------------
1533 // Request for cryptographic operation messages:
1534 // These are messages from the renderer to the browser to perform a
1535 // cryptographic operation.
1537 // Asks the browser process to generate a keypair for grabbing a client
1538 // certificate from a CA (<keygen> tag), and returns the signed public
1539 // key and challenge string.
1540 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1541 uint32 /* key size index */,
1542 std::string /* challenge string */,
1543 GURL /* URL of requestor */,
1544 std::string /* signed public key and challenge */)
1546 // Message sent from the renderer to the browser to request that the browser
1547 // cache |data| associated with |url|.
1548 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1549 GURL /* url */,
1550 double /* expected_response_time */,
1551 std::vector<char> /* data */)
1553 // Register a new handler for URL requests with the given scheme.
1554 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1555 std::string /* scheme */,
1556 GURL /* url */,
1557 base::string16 /* title */,
1558 bool /* user_gesture */)
1560 // Stores new inspector setting in the profile.
1561 // TODO(jam): this should be in the chrome module
1562 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
1563 std::string, /* key */
1564 std::string /* value */)
1566 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1567 // See the comment in chrome/browser/ui/browser.h for more details.
1568 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1569 bool /* enter_fullscreen */)
1571 // Send back a string to be recorded by UserMetrics.
1572 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1573 std::string /* action */)
1575 // Notifies the browser that the page was or was not saved as MHTML.
1576 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1577 int /* job_id */,
1578 int64 /* size of the MHTML file, -1 if error */)
1580 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1581 std::vector<GURL> /* all savable resource links */,
1582 std::vector<content::Referrer> /* all referrers */,
1583 std::vector<GURL> /* all frame links */)
1585 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1586 GURL /* frame's url */,
1587 std::string /* data buffer */,
1588 int32 /* complete status */)
1590 // Notifies the browser of an event occurring in the media pipeline.
1591 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1592 std::vector<media::MediaLogEvent> /* events */)
1594 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1595 // being sent back.
1596 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1597 // pop up a bubble to ask for user permission or take mouse lock content into
1598 // account.
1599 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1600 bool /* user_gesture */,
1601 bool /* last_unlocked_by_target */,
1602 bool /* privileged */)
1604 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1605 // whenever the mouse is unlocked (which may or may not be caused by
1606 // ViewHostMsg_UnlockMouse).
1607 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1609 // Notifies that multiple touch targets may have been pressed, and to show
1610 // the disambiguation popup.
1611 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1612 gfx::Rect, /* Border of touched targets */
1613 gfx::Size, /* Size of zoomed image */
1614 cc::SharedBitmapId /* id */)
1616 // Sent by the renderer process to check whether client 3D APIs
1617 // (Pepper 3D, WebGL) are explicitly blocked.
1618 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1619 int /* render_view_id */,
1620 GURL /* top_origin_url */,
1621 content::ThreeDAPIType /* requester */,
1622 bool /* blocked */)
1624 // Sent by the renderer process to indicate that a context was lost by
1625 // client 3D content (Pepper 3D, WebGL) running on the page at the
1626 // given URL.
1627 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1628 GURL /* top_origin_url */,
1629 content::ThreeDAPIType /* context_type */,
1630 int /* arb_robustness_status_code */)
1632 // Notifies the browser that document has parsed the body. This is used by the
1633 // ResourceScheduler as an indication that bandwidth contention won't block
1634 // first paint.
1635 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1637 // Notification that the urls for the favicon of a site has been determined.
1638 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1639 std::vector<content::FaviconURL> /* candidates */)
1641 // Sent once a paint happens after the first non empty layout. In other words
1642 // after the page has painted something.
1643 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint)
1645 // Sent by the renderer to the browser to start a vibration with the given
1646 // duration.
1647 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1648 int64 /* milliseconds */)
1650 // Sent by the renderer to the browser to cancel the currently running
1651 // vibration, if there is one.
1652 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1654 // Message sent from renderer to the browser when the element that is focused
1655 // has been touched. A bool is passed in this message which indicates if the
1656 // node is editable.
1657 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1658 bool /* editable */)
1660 // Message sent from the renderer to the browser when an HTML form has failed
1661 // validation constraints.
1662 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1663 gfx::Rect /* anchor rectangle in root view coordinate */,
1664 base::string16 /* validation message */,
1665 base::string16 /* supplemental text */)
1667 // Message sent from the renderer to the browser when a HTML form validation
1668 // message should be hidden from view.
1669 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1671 // Message sent from the renderer to the browser when the suggested co-ordinates
1672 // of the anchor for a HTML form validation message have changed.
1673 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1674 gfx::Rect /* anchor rectangle in root view coordinate */)
1676 #if defined(OS_ANDROID)
1677 // Response to ViewMsg_FindMatchRects.
1679 // |version| will contain the current version number of the renderer's find
1680 // match list (incremented whenever they change), which should be passed in the
1681 // next call to ViewMsg_FindMatchRects.
1683 // |rects| will either contain a list of the enclosing rects of all matches
1684 // found by the most recent Find operation, or will be empty if |version| is not
1685 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1686 // your locally cached rects should still be valid). The rect coords will be
1687 // custom normalized fractions of the document size. The rects will be sorted by
1688 // frame traversal order starting in the main frame, then by dom order.
1690 // |active_rect| will contain the bounding box of the active find-in-page match
1691 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1692 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1693 int /* version */,
1694 std::vector<gfx::RectF> /* rects */,
1695 gfx::RectF /* active_rect */)
1697 // Start an android intent with the given URI.
1698 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1699 GURL /* content_url */)
1701 // Message sent when the renderer changed the background color for the view.
1702 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1703 uint32 /* bg_color */)
1705 // This message runs the MediaCodec for decoding audio for webaudio.
1706 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1707 base::SharedMemoryHandle /* encoded_data_handle */,
1708 base::FileDescriptor /* pcm_output */,
1709 uint32_t /* data_size*/)
1711 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1712 // display events. If |enabled| is true, the BeginFrame message will continue
1713 // to be be delivered until the notification is disabled.
1714 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
1715 bool /* enabled */)
1717 // Reply to the ViewMsg_ExtractSmartClipData message.
1718 // TODO(juhui24.lee@samsung.com): this should be changed to a vector of structs
1719 // instead of encoding the data as a string which is not allowed normally. Since
1720 // ths is only used in Android WebView, it's allowed temporarily.
1721 // http://crbug.com/330872
1722 IPC_MESSAGE_ROUTED1(ViewHostMsg_SmartClipDataExtracted, base::string16)
1724 #elif defined(OS_MACOSX)
1725 // Request that the browser load a font into shared memory for us.
1726 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1727 FontDescriptor /* font to load */,
1728 uint32 /* buffer size */,
1729 base::SharedMemoryHandle /* font data */,
1730 uint32 /* font id */)
1732 // Informs the browser that a plugin has gained or lost focus.
1733 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1734 bool, /* focused */
1735 int /* plugin_id */)
1737 // Instructs the browser to start plugin IME.
1738 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1740 // Notifies that the scrollbars-visible state of the content changed.
1741 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame,
1742 bool /* has_horizontal_scrollbar */,
1743 bool /* has_vertical_scrollbar */)
1745 #elif defined(OS_WIN)
1746 // Request that the given font characters be loaded by the browser so it's
1747 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1748 // for details.
1749 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1750 LOGFONT /* font_data */,
1751 base::string16 /* characters */)
1752 #endif
1754 #if defined(OS_POSIX)
1755 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1756 // this call exists for the renderer to ask the browser to allocate memory
1757 // on its behalf. We return a file descriptor to the POSIX shared memory.
1758 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1759 // by the browser, and it is the caller's repsonsibility to send a
1760 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1761 // In all cases, the caller is responsible for deleting the resulting
1762 // TransportDIB.
1763 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1764 uint32_t, /* bytes requested */
1765 bool, /* cache in the browser */
1766 TransportDIB::Handle /* DIB */)
1768 // Since the browser keeps handles to the allocated transport DIBs, this
1769 // message is sent to tell the browser that it may release them when the
1770 // renderer is finished with them.
1771 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1772 TransportDIB::Id /* DIB id */)
1773 #endif
1775 #if defined(OS_MACOSX) || defined(USE_AURA)
1776 // On Mac and Aura IME can request composition character bounds
1777 // synchronously (see crbug.com/120597). This IPC message sends the character
1778 // bounds after every composition change to always have correct bound info.
1779 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged,
1780 gfx::Range /* composition range */,
1781 std::vector<gfx::Rect> /* character bounds */)
1782 #endif
1784 // Adding a new message? Stick to the sort order above: first platform
1785 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1786 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.