[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / common / view_messages.h
blobf4a765adc57bb957ab5f723ac6e627be46e87101
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(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::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 // This message is used for supporting popup menus on Mac OS X using native
338 // Cocoa controls. The renderer sends us this message which we use to populate
339 // the popup menu.
340 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params)
341 // Position on the screen.
342 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
344 // The height of each item in the menu.
345 IPC_STRUCT_MEMBER(int, item_height)
347 // The size of the font to use for those items.
348 IPC_STRUCT_MEMBER(double, item_font_size)
350 // The currently selected (displayed) item in the menu.
351 IPC_STRUCT_MEMBER(int, selected_item)
353 // The entire list of items in the popup menu.
354 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
356 // Whether items should be right-aligned.
357 IPC_STRUCT_MEMBER(bool, right_aligned)
359 // Whether this is a multi-select popup.
360 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
361 IPC_STRUCT_END()
363 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
364 // The type of input field
365 IPC_STRUCT_MEMBER(ui::TextInputType, type)
367 // The mode of input field
368 IPC_STRUCT_MEMBER(ui::TextInputMode, mode)
370 // The value of the input field
371 IPC_STRUCT_MEMBER(std::string, value)
373 // The cursor position of the current selection start, or the caret position
374 // if nothing is selected
375 IPC_STRUCT_MEMBER(int, selection_start)
377 // The cursor position of the current selection end, or the caret position
378 // if nothing is selected
379 IPC_STRUCT_MEMBER(int, selection_end)
381 // The start position of the current composition, or -1 if there is none
382 IPC_STRUCT_MEMBER(int, composition_start)
384 // The end position of the current composition, or -1 if there is none
385 IPC_STRUCT_MEMBER(int, composition_end)
387 // Whether or not inline composition can be performed for the current input.
388 IPC_STRUCT_MEMBER(bool, can_compose_inline)
390 // Whether or not the IME should be shown as a result of this update. Even if
391 // true, the IME will only be shown if the type is appropriate (e.g. not
392 // TEXT_INPUT_TYPE_NONE).
393 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
395 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
396 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
397 IPC_STRUCT_END()
399 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
400 // The scroll offset of the render view.
401 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset)
403 // The size of the RenderView when this message was generated. This is
404 // included so the host knows how large the view is from the perspective of
405 // the renderer process. This is necessary in case a resize operation is in
406 // progress. If auto-resize is enabled, this should update the corresponding
407 // view size.
408 IPC_STRUCT_MEMBER(gfx::Size, view_size)
410 // New window locations for plugin child windows.
411 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
412 plugin_window_moves)
414 // The following describes the various bits that may be set in flags:
416 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
417 // Indicates that this is a response to a ViewMsg_Resize message.
419 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
420 // Indicates that this is a response to a ViewMsg_Repaint message.
422 // If flags is zero, then this message corresponds to an unsolicited paint
423 // request by the render view. Any of the above bits may be set in flags,
424 // which would indicate that this paint message is an ACK for multiple
425 // request messages.
426 IPC_STRUCT_MEMBER(int, flags)
428 // All the above coordinates are in DIP. This is the scale factor needed
429 // to convert them to pixels.
430 IPC_STRUCT_MEMBER(float, scale_factor)
431 IPC_STRUCT_END()
433 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
434 // Renderer-wide preferences.
435 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
437 // Preferences for this view.
438 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
440 // The ID of the view to be created.
441 IPC_STRUCT_MEMBER(int32, view_id)
443 // The ID of the main frame hosted in the view.
444 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
446 // The ID of the rendering surface.
447 IPC_STRUCT_MEMBER(int32, surface_id)
449 // The session storage namespace ID this view should use.
450 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
452 // The name of the frame associated with this view (or empty if none).
453 IPC_STRUCT_MEMBER(base::string16, frame_name)
455 // The route ID of the opener RenderView if we need to set one
456 // (MSG_ROUTING_NONE otherwise).
457 IPC_STRUCT_MEMBER(int, opener_route_id)
459 // Whether the RenderView should initially be swapped out.
460 IPC_STRUCT_MEMBER(bool, swapped_out)
462 // The ID of the proxy object for the main frame in this view. It is only
463 // used if |swapped_out| is true.
464 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
466 // Whether the RenderView should initially be hidden.
467 IPC_STRUCT_MEMBER(bool, hidden)
469 // Whether the RenderView will never be visible.
470 IPC_STRUCT_MEMBER(bool, never_visible)
472 // Whether the window associated with this view was created with an opener.
473 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
475 // The initial page ID to use for this view, which must be larger than any
476 // existing navigation that might be loaded in the view. Page IDs are unique
477 // to a view and are only updated by the renderer after this initial value.
478 IPC_STRUCT_MEMBER(int32, next_page_id)
480 // The properties of the screen associated with the view.
481 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
483 // The accessibility mode of the renderer.
484 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
485 IPC_STRUCT_END()
487 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
488 // The serialized script value.
489 IPC_STRUCT_MEMBER(base::string16, data)
491 // When sent to the browser, this is the routing ID of the source frame in
492 // the source process. The browser replaces it with the routing ID of the
493 // equivalent (swapped out) frame in the destination process.
494 IPC_STRUCT_MEMBER(int, source_routing_id)
496 // The origin of the source frame.
497 IPC_STRUCT_MEMBER(base::string16, source_origin)
499 // The origin for the message's target.
500 IPC_STRUCT_MEMBER(base::string16, target_origin)
502 // Information about the MessagePorts this message contains.
503 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
504 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
505 IPC_STRUCT_END()
507 // Messages sent from the browser to the renderer.
509 #if defined(OS_ANDROID)
510 // Tells the renderer to cancel an opened date/time dialog.
511 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
513 // Replaces a date time input field.
514 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
515 double /* dialog_value */)
517 #endif
519 // Get all savable resource links from current webpage, include main
520 // frame and sub-frame.
521 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
522 GURL /* url of page which is needed to save */)
524 // Get html data by serializing all frames of current page with lists
525 // which contain all resource links that have local copy.
526 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
527 std::vector<GURL> /* urls that have local copy */,
528 std::vector<base::FilePath> /* paths of local copy */,
529 base::FilePath /* local directory path */)
531 // Tells the render side that a ViewHostMsg_LockMouse message has been
532 // processed. |succeeded| indicates whether the mouse has been successfully
533 // locked or not.
534 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
535 bool /* succeeded */)
536 // Tells the render side that the mouse has been unlocked.
537 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
539 // Sent by the browser when the parameters for vsync alignment have changed.
540 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
541 base::TimeTicks /* timebase */,
542 base::TimeDelta /* interval */)
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 content::WebPreferences)
577 // Informs the renderer that the timezone has changed.
578 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
580 // Tells the render view to close.
581 // Expects a Close_ACK message when finished.
582 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
584 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
585 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
586 IPC_STRUCT_MEMBER(gfx::Size, new_size)
587 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
588 IPC_STRUCT_MEMBER(float, overdraw_bottom_height)
589 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
590 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
591 IPC_STRUCT_MEMBER(bool, is_fullscreen)
592 IPC_STRUCT_END()
594 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
595 // is generated in response provided new_size is not empty and not equal to
596 // the view's current size. The generated ViewHostMsg_UpdateRect message will
597 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
598 // we don't have to fetch it every time WebKit asks for it.
599 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
600 ViewMsg_Resize_Params /* params */)
602 // Tells the render view that the resize rect has changed.
603 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
604 gfx::Rect /* resizer_rect */)
606 // Sent to inform the view that it was hidden. This allows it to reduce its
607 // resource utilization.
608 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
610 // Tells the render view that it is no longer hidden (see WasHidden), and the
611 // render view is expected to respond with a full repaint if needs_repainting
612 // is true. If needs_repainting is false, then this message does not trigger a
613 // message in response.
614 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown,
615 bool /* needs_repainting */)
617 // Sent to inform the view that it was swapped out. This allows the process to
618 // exit if no other views are using it.
619 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut)
621 // Tells the renderer to focus the first (last if reverse is true) focusable
622 // node.
623 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
624 bool /* reverse */)
626 // Sent to inform the renderer to invoke a context menu.
627 // The parameter specifies the location in the render view's coordinates.
628 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu,
629 gfx::Point /* location where menu should be shown */)
631 IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
633 // Sent when the user wants to search for a word on the page (find in page).
634 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
635 int /* request_id */,
636 base::string16 /* search_text */,
637 blink::WebFindOptions)
639 // This message notifies the renderer that the user has closed the FindInPage
640 // window (and what action to take regarding the selection).
641 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
642 content::StopFindAction /* action */)
644 // Copies the image at location x, y to the clipboard (if there indeed is an
645 // image at that location).
646 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
647 int /* x */,
648 int /* y */)
650 // Saves the image at location x, y to the disk (if there indeed is an
651 // image at that location).
652 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
653 int /* x */,
654 int /* y */)
656 // Tells the renderer to perform the given action on the media player
657 // located at the given point.
658 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
659 gfx::Point, /* location */
660 blink::WebMediaPlayerAction)
662 // Tells the renderer to perform the given action on the plugin located at
663 // the given point.
664 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
665 gfx::Point, /* location */
666 blink::WebPluginAction)
668 // Posts a message from a frame in another process to the current renderer.
669 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
670 ViewMsg_PostMessage_Params)
672 // Requests that the RenderView's main frame sets its opener to null.
673 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener)
675 // Change the zoom level for the current main frame. If the level actually
676 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
677 // telling it what url got zoomed and what its current zoom level is.
678 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
679 content::PageZoom /* function */)
681 // Set the zoom level for a particular url that the renderer is in the
682 // process of loading. This will be stored, to be used if the load commits
683 // and ignored otherwise.
684 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
685 GURL /* url */,
686 double /* zoom_level */)
688 // Set the zoom level for a particular url, so all render views
689 // displaying this url can update their zoom levels to match.
690 // If scheme is empty, then only host is used for matching.
691 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
692 std::string /* scheme */,
693 std::string /* host */,
694 double /* zoom_level */)
696 // Set the zoom level for a particular render view.
697 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
698 bool /* uses_temporary_zoom_level */,
699 double /* zoom_level */)
701 // Change encoding of page in the renderer.
702 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
703 std::string /*new encoding name*/)
705 // Reset encoding of page in the renderer back to default.
706 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
708 // Used to tell a render view whether it should expose various bindings
709 // that allow JS content extended privileges. See BindingsPolicy for valid
710 // flag values.
711 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
712 int /* enabled_bindings_flags */)
714 // Tell the renderer to add a property to the WebUI binding object. This
715 // only works if we allowed WebUI bindings.
716 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
717 std::string /* property_name */,
718 std::string /* property_value_json */)
720 // This message starts/stop monitoring the input method status of the focused
721 // edit control of a renderer process.
722 // Parameters
723 // * is_active (bool)
724 // Indicates if an input method is active in the browser process.
725 // The possible actions when a renderer process receives this message are
726 // listed below:
727 // Value Action
728 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
729 // to notify the input method status of the focused edit control.
730 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
731 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
732 bool /* is_active */)
734 // IME API oncandidatewindow* events for InputMethodContext.
735 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
736 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
737 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
739 // Used to notify the render-view that we have received a target URL. Used
740 // to prevent target URLs spamming the browser.
741 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
743 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
744 std::vector<ui::SelectedFileInfo>)
746 // Provides the results of directory enumeration.
747 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
748 int /* request_id */,
749 std::vector<base::FilePath> /* files_in_directory */)
751 // When a renderer sends a ViewHostMsg_Focus to the browser process,
752 // the browser has the option of sending a ViewMsg_CantFocus back to
753 // the renderer.
754 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
756 // Tells the renderer to suppress any further modal dialogs until it receives a
757 // corresponding ViewMsg_SwapOut message. This ensures that no
758 // PageGroupLoadDeferrer is on the stack for SwapOut.
759 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
761 // Instructs the renderer to close the current page, including running the
762 // onunload event handler.
764 // Expects a ClosePage_ACK message when finished.
765 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
767 // Notifies the renderer about ui theme changes
768 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
770 // Notifies the renderer that a paint is to be generated for the rectangle
771 // passed in.
772 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
773 gfx::Size /* The view size to be repainted */)
775 // Notification that a move or resize renderer's containing window has
776 // started.
777 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
779 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
780 gfx::Rect /* view_screen_rect */,
781 gfx::Rect /* window_screen_rect */)
783 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
784 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
785 // processed the move. The browser may have ignored the move, but it finished
786 // processing. This is used because the renderer keeps a temporary cache of
787 // the widget position while these asynchronous operations are in progress.
788 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
790 // Used to instruct the RenderView to send back updates to the preferred size.
791 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
793 // Used to instruct the RenderView to automatically resize and send back
794 // updates for the new size.
795 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
796 gfx::Size /* min_size */,
797 gfx::Size /* max_size */)
799 // Used to instruct the RenderView to disalbe automatically resize.
800 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
801 gfx::Size /* new_size */)
803 // Changes the text direction of the currently selected input field (if any).
804 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
805 blink::WebTextDirection /* direction */)
807 // Tells the renderer to clear the focused element (if any).
808 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
810 // Make the RenderView background transparent or opaque.
811 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
813 // Used to tell the renderer not to add scrollbars with height and
814 // width below a threshold.
815 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
816 gfx::Size /* disable_scrollbar_size_limit */)
818 // Activate/deactivate the RenderView (i.e., set its controls' tint
819 // accordingly, etc.).
820 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
821 bool /* active */)
823 // Response message to ViewHostMsg_CreateWorker.
824 // Sent when the worker has started.
825 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
827 // Sent when the worker failed to load the worker script.
828 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
829 // But if the shared worker of the same URL already exists and it has failed
830 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
831 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
832 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
834 // Sent when the worker has connected.
835 // This message is sent only if the worker successfully loaded the script.
836 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
838 // Tells the renderer that the network type has changed so that navigator.onLine
839 // and navigator.connection can be updated.
840 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
841 net::NetworkChangeNotifier::ConnectionType /* type */)
843 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
844 // Tells the renderer that the channel to the broker has been created.
845 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
846 base::ProcessId /* broker_pid */,
847 IPC::ChannelHandle /* handle */)
849 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
850 // Tells the renderer whether permission to access to PPAPI broker was granted
851 // or not.
852 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
853 bool /* result */)
855 // Tells the renderer to empty its plugin list cache, optional reloading
856 // pages containing plugins.
857 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
858 bool /* reload_pages */)
860 // Used to instruct the RenderView to go into "view source" mode.
861 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
863 // Instructs the renderer to save the current page to MHTML.
864 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
865 int /* job_id */,
866 IPC::PlatformFileForTransit /* file handle */)
868 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
869 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
870 GURL /* data */)
872 // Change the accessibility mode in the renderer process.
873 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode,
874 AccessibilityMode)
876 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
877 // process to release the magnified image.
878 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
879 cc::SharedBitmapId /* id */)
881 // Notifies the renderer that a snapshot has been retrieved.
882 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
883 int /* snapshot_id */,
884 gfx::Size /* size */,
885 std::vector<unsigned char> /* png */)
887 #if defined(OS_MACOSX)
888 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
890 // Notification of a change in scrollbar appearance and/or behavior.
891 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
892 float /* initial_button_delay */,
893 float /* autoscroll_button_delay */,
894 bool /* jump_on_track_click */,
895 blink::ScrollerStyle /* preferred_scroller_style */,
896 bool /* redraw */)
897 #endif
899 #if defined(OS_ANDROID)
900 // Tells the renderer to suspend/resume the webkit timers.
901 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
902 bool /* suspend */)
904 // Sent when the browser wants the bounding boxes of the current find matches.
906 // If match rects are already cached on the browser side, |current_version|
907 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
908 // they came in, so the renderer can tell if it needs to send updated rects.
909 // Otherwise just pass -1 to always receive the list of rects.
911 // There must be an active search string (it is probably most useful to call
912 // this immediately after a ViewHostMsg_Find_Reply message arrives with
913 // final_update set to true).
914 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
915 int /* current_version */)
917 // External popup menus.
918 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems,
919 bool /* user canceled the popup */,
920 std::vector<int> /* selected indices */)
922 // Notifies the renderer whether hiding/showing the top controls is enabled
923 // and whether or not to animate to the proper state.
924 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
925 bool /* enable_hiding */,
926 bool /* enable_showing */,
927 bool /* animate */)
929 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
931 // Sent by the browser when the renderer should generate a new frame.
932 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
933 cc::BeginFrameArgs /* args */)
935 // Sent by the browser when an IME update that requires acknowledgement has been
936 // processed on the browser side.
937 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
939 // Extracts the data at the given rect, returning it through the
940 // ViewHostMsg_SmartClipDataExtracted IPC.
941 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
942 gfx::Rect /* rect */)
944 #elif defined(OS_MACOSX)
945 // Let the RenderView know its window has changed visibility.
946 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
947 bool /* visibile */)
949 // Let the RenderView know its window's frame has changed.
950 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
951 gfx::Rect /* window frame */,
952 gfx::Rect /* content view frame */)
954 // Message sent from the browser to the renderer when the user starts or stops
955 // resizing the view.
956 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
957 bool /* enable */)
959 // Tell the renderer that plugin IME has completed.
960 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
961 base::string16 /* text */,
962 int /* plugin_id */)
964 // External popup menus.
965 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
966 int /* selected index, -1 means no selection */)
967 #endif
969 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
970 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
971 uint32 /* output_surface_id */,
972 cc::CompositorFrameAck /* ack */)
974 // Sent by browser to tell renderer compositor that some resources that were
975 // given to the browser in a swap are not being used anymore.
976 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
977 uint32 /* output_surface_id */,
978 cc::CompositorFrameAck /* ack */)
980 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
982 // Sent by the browser to ask the renderer to redraw.
983 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
984 int /* request_id */)
986 // -----------------------------------------------------------------------------
987 // Messages sent from the renderer to the browser.
989 // Sent by the renderer when it is creating a new window. The browser creates
990 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
991 // MSG_ROUTING_NONE, the view couldn't be created.
992 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
993 ViewHostMsg_CreateWindow_Params,
994 int /* route_id */,
995 int /* main_frame_route_id */,
996 int32 /* surface_id */,
997 int64 /* cloned_session_storage_namespace_id */)
999 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1000 // <select> dropdowns. This message is sent to the WebContentsImpl that
1001 // contains the widget being created.
1002 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1003 int /* opener_id */,
1004 blink::WebPopupType /* popup type */,
1005 int /* route_id */,
1006 int32 /* surface_id */)
1008 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1009 // window.
1010 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1011 int /* opener_id */,
1012 int /* route_id */,
1013 int32 /* surface_id */)
1015 // Asks the browser for a unique routing ID.
1016 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1017 int /* routing_id */)
1019 // Asks the browser for the default audio hardware configuration.
1020 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1021 media::AudioParameters /* input parameters */,
1022 media::AudioParameters /* output parameters */)
1024 // Asks the browser for CPU usage of the renderer process in percents.
1025 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage,
1026 int /* CPU usage in percents */)
1028 // Asks the browser for the renderer process memory size stats.
1029 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1030 size_t /* private_bytes */,
1031 size_t /* shared_bytes */)
1033 // These three messages are sent to the parent RenderViewHost to display the
1034 // page/widget that was created by
1035 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1036 // refers to the id that was returned from the Create message above.
1037 // The initial_position parameter is a rectangle in screen coordinates.
1039 // FUTURE: there will probably be flags here to control if the result is
1040 // in a new window.
1041 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1042 int /* route_id */,
1043 WindowOpenDisposition /* disposition */,
1044 gfx::Rect /* initial_pos */,
1045 bool /* opened_by_user_gesture */)
1047 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1048 int /* route_id */,
1049 gfx::Rect /* initial_pos */)
1051 // Message to show a full screen widget.
1052 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1053 int /* route_id */)
1055 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1056 // to run in a modal fashion until it is closed.
1057 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1058 int /* opener_id */)
1060 // Indicates the renderer is ready in response to a ViewMsg_New or
1061 // a ViewMsg_CreatingNew_ACK.
1062 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1064 // Indicates the renderer process is gone. This actually is sent by the
1065 // browser process to itself, but keeps the interface cleaner.
1066 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1067 int, /* this really is base::TerminationStatus */
1068 int /* exit_code */)
1070 // Sent by the renderer process to request that the browser close the view.
1071 // This corresponds to the window.close() API, and the browser may ignore
1072 // this message. Otherwise, the browser will generates a ViewMsg_Close
1073 // message to close the view.
1074 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1076 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1077 // throttle these messages.
1078 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1080 // Sent by the renderer process to request that the browser move the view.
1081 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1082 // the browser may ignore this message.
1083 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1084 gfx::Rect /* position */)
1086 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1087 // Message to show/hide a popup menu using native controls.
1088 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1089 ViewHostMsg_ShowPopup_Params)
1090 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup)
1091 #endif
1093 // Result of string search in the page.
1094 // Response to ViewMsg_Find with the results of the requested find-in-page
1095 // search, the number of matches found and the selection rect (in screen
1096 // coordinates) for the string found. If |final_update| is false, it signals
1097 // that this is not the last Find_Reply message - more will be sent as the
1098 // scoping effort continues.
1099 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1100 int /* request_id */,
1101 int /* number of matches */,
1102 gfx::Rect /* selection_rect */,
1103 int /* active_match_ordinal */,
1104 bool /* final_update */)
1106 // Indicates that the render view has been closed in respose to a
1107 // Close message.
1108 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1109 int /* old_route_id */)
1111 // Indicates that the current page has been closed, after a ClosePage
1112 // message.
1113 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1115 // Notifies the browser that we have session history information.
1116 // page_id: unique ID that allows us to distinguish between history entries.
1117 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1118 int32 /* page_id */,
1119 content::PageState /* state */)
1121 // Notifies the browser that we want to show a destination url for a potential
1122 // action (e.g. when the user is hovering over a link).
1123 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
1124 int32,
1125 GURL)
1127 // Sent when the document element is available for the top-level frame. This
1128 // happens after the page starts loading, but before all resources are
1129 // finished.
1130 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1131 bool /* uses_temporary_zoom_level */)
1133 // Sent when the renderer loads a resource from its memory cache.
1134 // The security info is non empty if the resource was originally loaded over
1135 // a secure connection.
1136 // Note: May only be sent once per URL per frame per committed load.
1137 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1138 GURL /* url */,
1139 std::string /* security info */,
1140 std::string /* http method */,
1141 std::string /* mime type */,
1142 content::ResourceType::Type /* resource type */)
1144 // Sent when the renderer displays insecure content in a secure page.
1145 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1147 // Sent when the renderer runs insecure content in a secure origin.
1148 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1149 std::string /* security_origin */,
1150 GURL /* target URL */)
1152 // Sent to update part of the view. In response to this message, the host
1153 // generates a ViewMsg_UpdateRect_ACK message.
1154 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1155 ViewHostMsg_UpdateRect_Params)
1157 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1158 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1160 // Message sent from renderer to the browser when focus changes inside the
1161 // webpage. The parameter says whether the newly focused element needs
1162 // keyboard input (true for textfields, text areas and content editable divs).
1163 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1164 bool /* is_editable_node */)
1166 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1168 // Message sent from renderer requesting touch emulation using mouse.
1169 // Shift-scrolling should be converted to pinch, if |allow_pinch| is true.
1170 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchEventEmulationEnabled,
1171 bool /* enabled */,
1172 bool /* allow_pinch */)
1174 // Used to set a cookie. The cookie is set asynchronously, but will be
1175 // available to a subsequent ViewHostMsg_GetCookies request.
1176 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1177 int /* render_frame_id */,
1178 GURL /* url */,
1179 GURL /* first_party_for_cookies */,
1180 std::string /* cookie */)
1182 // Used to get cookies for the given URL. This may block waiting for a
1183 // previous SetCookie message to be processed.
1184 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1185 int /* render_frame_id */,
1186 GURL /* url */,
1187 GURL /* first_party_for_cookies */,
1188 std::string /* cookies */)
1190 // Used to get raw cookie information for the given URL. This may block
1191 // waiting for a previous SetCookie message to be processed.
1192 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1193 GURL /* url */,
1194 GURL /* first_party_for_cookies */,
1195 std::vector<content::CookieData>
1196 /* raw_cookies */)
1198 // Used to delete cookie for the given URL and name
1199 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1200 GURL /* url */,
1201 std::string /* cookie_name */)
1203 // Used to check if cookies are enabled for the given URL. This may block
1204 // waiting for a previous SetCookie message to be processed.
1205 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1206 int /* render_frame_id */,
1207 GURL /* url */,
1208 GURL /* first_party_for_cookies */,
1209 bool /* cookies_enabled */)
1211 // Used to get the list of plugins
1212 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1213 bool /* refresh*/,
1214 std::vector<content::WebPluginInfo> /* plugins */)
1216 #if defined(OS_WIN)
1217 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1218 gfx::NativeViewId /* dummy_activation_window */)
1220 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1221 gfx::NativeViewId /* dummy_activation_window */)
1223 // Asks the browser for the user's monitor profile.
1224 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1225 std::vector<char> /* profile */)
1226 #endif
1228 // Get the list of proxies to use for |url|, as a semicolon delimited list
1229 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1230 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1231 GURL /* url */,
1232 bool /* result */,
1233 std::string /* proxy list */)
1235 // A renderer sends this to the browser process when it wants to create a
1236 // worker. The browser will create the worker process if necessary, and
1237 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1238 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1239 ViewHostMsg_CreateWorker_Params,
1240 int /* route_id */)
1242 // A renderer sends this to the browser process when a document has been
1243 // detached. The browser will use this to constrain the lifecycle of worker
1244 // processes (SharedWorkers are shut down when their last associated document
1245 // is detached).
1246 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1247 uint64 /* document_id */)
1249 // Wraps an IPC message that's destined to the worker on the renderer->browser
1250 // hop.
1251 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1252 IPC::Message /* message */)
1254 // Tells the browser that a specific Appcache manifest in the current page
1255 // was accessed.
1256 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1257 GURL /* manifest url */,
1258 bool /* blocked by policy */)
1260 // Initiates a download based on user actions like 'ALT+click'.
1261 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl,
1262 int /* render_view_id */,
1263 GURL /* url */,
1264 content::Referrer /* referrer */,
1265 base::string16 /* suggested_name */,
1266 bool /* use prompt for save location */)
1268 // Used to go to the session history entry at the given offset (ie, -1 will
1269 // return the "back" item).
1270 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1271 int /* offset (from current) of history item to get */)
1273 // Sent from an inactive renderer for the browser to route to the active
1274 // renderer, instructing it to close.
1275 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1277 // Sent to the browser from an inactive renderer to post a message to the
1278 // active renderer.
1279 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1280 ViewMsg_PostMessage_Params)
1282 // Notifies that the preferred size of the content changed.
1283 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1284 gfx::Size /* pref_size */)
1286 // Notifies that the scroll offset changed.
1287 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1288 // is not sent at all when threaded compositing is enabled while
1289 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1290 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset)
1292 // Notifies whether there are JavaScript touch event handlers or not.
1293 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1294 bool /* has_handlers */)
1296 // A message from HTML-based UI. When (trusted) Javascript calls
1297 // send(message, args), this message is sent to the browser.
1298 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1299 GURL /* source_url */,
1300 std::string /* message */,
1301 base::ListValue /* args */)
1303 // A renderer sends this to the browser process when it wants to create a ppapi
1304 // plugin. The browser will create the plugin process if necessary, and will
1305 // return a handle to the channel on success.
1307 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1308 // process. This ID is valid only in the context of the browser process and is
1309 // used to identify the proper process when the renderer notifies it that the
1310 // plugin is hung.
1312 // On error an empty string and null handles are returned.
1313 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1314 base::FilePath /* path */,
1315 IPC::ChannelHandle /* handle to channel */,
1316 base::ProcessId /* plugin_pid */,
1317 int /* plugin_child_id */)
1319 // Notification that a plugin has created a new plugin instance. The parameters
1320 // indicate:
1321 // -The plugin process ID that we're creating the instance for.
1322 // -The instance ID of the instance being created.
1323 // -A PepperRendererInstanceData struct which contains properties from the
1324 // renderer which are associated with the plugin instance. This includes the
1325 // routing ID of the associated render view and the URL of plugin.
1326 // -Whether the plugin we're creating an instance for is external or internal.
1328 // This message must be sync even though it returns no parameters to avoid
1329 // a race condition with the plugin process. The plugin process sends messages
1330 // to the browser that assume the browser knows about the instance. We need to
1331 // make sure that the browser actually knows about the instance before we tell
1332 // the plugin to run.
1333 IPC_SYNC_MESSAGE_CONTROL4_0(
1334 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1335 int /* plugin_child_id */,
1336 int32 /* pp_instance */,
1337 content::PepperRendererInstanceData /* creation_data */,
1338 bool /* is_external */)
1340 // Notification that a plugin has destroyed an instance. This is the opposite of
1341 // the "DidCreate" message above.
1342 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1343 int /* plugin_child_id */,
1344 int32 /* pp_instance */,
1345 bool /* is_external */)
1347 // Message from the renderer to the browser indicating the in-process instance
1348 // has been created.
1349 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1350 int32 /* instance */,
1351 content::PepperRendererInstanceData /* instance_data */)
1353 // Message from the renderer to the browser indicating the in-process instance
1354 // has been destroyed.
1355 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1356 int32 /* instance */)
1358 // A renderer sends this to the browser process when it wants to
1359 // create a ppapi broker. The browser will create the broker process
1360 // if necessary, and will return a handle to the channel on success.
1361 // On error an empty string is returned.
1362 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1363 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1364 int /* routing_id */,
1365 base::FilePath /* path */)
1367 // A renderer sends this to the browser process when it wants to access a PPAPI
1368 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1369 // for every connection.
1370 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1371 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1372 int /* routing_id */,
1373 GURL /* document_url */,
1374 base::FilePath /* plugin_path */)
1376 // Send the tooltip text for the current mouse position to the browser.
1377 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1378 base::string16 /* tooltip text string */,
1379 blink::WebTextDirection /* text direction hint */)
1381 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
1382 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
1384 // Notification that the text selection has changed.
1385 // Note: The secound parameter is the character based offset of the
1386 // base::string16
1387 // text in the document.
1388 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1389 base::string16 /* text covers the selection range */,
1390 size_t /* the offset of the text in the document */,
1391 gfx::Range /* selection range in the document */)
1393 // Notification that the selection bounds have changed.
1394 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1395 ViewHostMsg_SelectionBounds_Params)
1397 // Asks the browser to display the file chooser. The result is returned in a
1398 // ViewMsg_RunFileChooserResponse message.
1399 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1400 content::FileChooserParams)
1402 // Asks the browser to enumerate a directory. This is equivalent to running
1403 // the file chooser in directory-enumeration mode and having the user select
1404 // the given directory. The result is returned in a
1405 // ViewMsg_EnumerateDirectoryResponse message.
1406 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1407 int /* request_id */,
1408 base::FilePath /* file_path */)
1410 // Tells the browser to move the focus to the next (previous if reverse is
1411 // true) focusable element.
1412 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1413 bool /* reverse */)
1415 // Required for opening a date/time dialog
1416 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1417 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1419 // Required for updating text input state.
1420 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1421 ViewHostMsg_TextInputState_Params /* input state params */)
1423 // Sent when the renderer changes the zoom level for a particular url, so the
1424 // browser can update its records. If the view is a plugin doc, then url is
1425 // used to update the zoom level for all pages in that site. Otherwise, the
1426 // render view's id is used so that only the menu is updated.
1427 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1428 double /* zoom_level */,
1429 GURL /* url */)
1431 // Updates the minimum/maximum allowed zoom percent for this tab from the
1432 // default values. If |remember| is true, then the zoom setting is applied to
1433 // other pages in the site and is saved, otherwise it only applies to this
1434 // tab.
1435 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1436 int /* minimum_percent */,
1437 int /* maximum_percent */)
1439 // Notify the browser that this render process can or can't be suddenly
1440 // terminated.
1441 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1442 bool /* enabled */)
1444 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame,
1445 uint32 /* output_surface_id */,
1446 cc::CompositorFrame /* frame */)
1448 // Sent by the compositor when a flinging animation is stopped.
1449 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1451 //---------------------------------------------------------------------------
1452 // Request for cryptographic operation messages:
1453 // These are messages from the renderer to the browser to perform a
1454 // cryptographic operation.
1456 // Asks the browser process to generate a keypair for grabbing a client
1457 // certificate from a CA (<keygen> tag), and returns the signed public
1458 // key and challenge string.
1459 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1460 uint32 /* key size index */,
1461 std::string /* challenge string */,
1462 GURL /* URL of requestor */,
1463 std::string /* signed public key and challenge */)
1465 // Message sent from the renderer to the browser to request that the browser
1466 // cache |data| associated with |url|.
1467 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1468 GURL /* url */,
1469 double /* expected_response_time */,
1470 std::vector<char> /* data */)
1472 // Register a new handler for URL requests with the given scheme.
1473 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1474 std::string /* scheme */,
1475 GURL /* url */,
1476 base::string16 /* title */,
1477 bool /* user_gesture */)
1479 // Unregister the registered handler for URL requests with the given scheme.
1480 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler,
1481 std::string /* scheme */,
1482 GURL /* url */,
1483 bool /* user_gesture */)
1485 // Stores new inspector setting in the profile.
1486 // TODO(jam): this should be in the chrome module
1487 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
1488 std::string, /* key */
1489 std::string /* value */)
1491 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1492 // See the comment in chrome/browser/ui/browser.h for more details.
1493 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1494 bool /* enter_fullscreen */)
1496 // Send back a string to be recorded by UserMetrics.
1497 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1498 std::string /* action */)
1500 // Notifies the browser that the page was or was not saved as MHTML.
1501 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1502 int /* job_id */,
1503 int64 /* size of the MHTML file, -1 if error */)
1505 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1506 std::vector<GURL> /* all savable resource links */,
1507 std::vector<content::Referrer> /* all referrers */,
1508 std::vector<GURL> /* all frame links */)
1510 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1511 GURL /* frame's url */,
1512 std::string /* data buffer */,
1513 int32 /* complete status */)
1515 // Notifies the browser of an event occurring in the media pipeline.
1516 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1517 std::vector<media::MediaLogEvent> /* events */)
1519 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1520 // being sent back.
1521 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1522 // pop up a bubble to ask for user permission or take mouse lock content into
1523 // account.
1524 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1525 bool /* user_gesture */,
1526 bool /* last_unlocked_by_target */,
1527 bool /* privileged */)
1529 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1530 // whenever the mouse is unlocked (which may or may not be caused by
1531 // ViewHostMsg_UnlockMouse).
1532 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1534 // Notifies that multiple touch targets may have been pressed, and to show
1535 // the disambiguation popup.
1536 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1537 gfx::Rect, /* Border of touched targets */
1538 gfx::Size, /* Size of zoomed image */
1539 cc::SharedBitmapId /* id */)
1541 // Sent by the renderer process to check whether client 3D APIs
1542 // (Pepper 3D, WebGL) are explicitly blocked.
1543 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1544 int /* render_view_id */,
1545 GURL /* top_origin_url */,
1546 content::ThreeDAPIType /* requester */,
1547 bool /* blocked */)
1549 // Sent by the renderer process to indicate that a context was lost by
1550 // client 3D content (Pepper 3D, WebGL) running on the page at the
1551 // given URL.
1552 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1553 GURL /* top_origin_url */,
1554 content::ThreeDAPIType /* context_type */,
1555 int /* arb_robustness_status_code */)
1557 // Notifies the browser that document has parsed the body. This is used by the
1558 // ResourceScheduler as an indication that bandwidth contention won't block
1559 // first paint.
1560 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1562 // Notification that the urls for the favicon of a site has been determined.
1563 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1564 std::vector<content::FaviconURL> /* candidates */)
1566 // Sent once a paint happens after the first non empty layout. In other words
1567 // after the page has painted something.
1568 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint)
1570 // Sent by the renderer to the browser to start a vibration with the given
1571 // duration.
1572 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1573 int64 /* milliseconds */)
1575 // Sent by the renderer to the browser to cancel the currently running
1576 // vibration, if there is one.
1577 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1579 // Message sent from renderer to the browser when the element that is focused
1580 // has been touched. A bool is passed in this message which indicates if the
1581 // node is editable.
1582 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1583 bool /* editable */)
1585 // Message sent from the renderer to the browser when an HTML form has failed
1586 // validation constraints.
1587 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1588 gfx::Rect /* anchor rectangle in root view coordinate */,
1589 base::string16 /* validation message */,
1590 base::string16 /* supplemental text */)
1592 // Message sent from the renderer to the browser when a HTML form validation
1593 // message should be hidden from view.
1594 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1596 // Message sent from the renderer to the browser when the suggested co-ordinates
1597 // of the anchor for a HTML form validation message have changed.
1598 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1599 gfx::Rect /* anchor rectangle in root view coordinate */)
1601 #if defined(OS_ANDROID)
1602 // Response to ViewMsg_FindMatchRects.
1604 // |version| will contain the current version number of the renderer's find
1605 // match list (incremented whenever they change), which should be passed in the
1606 // next call to ViewMsg_FindMatchRects.
1608 // |rects| will either contain a list of the enclosing rects of all matches
1609 // found by the most recent Find operation, or will be empty if |version| is not
1610 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1611 // your locally cached rects should still be valid). The rect coords will be
1612 // custom normalized fractions of the document size. The rects will be sorted by
1613 // frame traversal order starting in the main frame, then by dom order.
1615 // |active_rect| will contain the bounding box of the active find-in-page match
1616 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1617 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1618 int /* version */,
1619 std::vector<gfx::RectF> /* rects */,
1620 gfx::RectF /* active_rect */)
1622 // Start an android intent with the given URI.
1623 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1624 GURL /* content_url */)
1626 // Message sent when the renderer changed the background color for the view.
1627 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1628 uint32 /* bg_color */)
1630 // This message runs the MediaCodec for decoding audio for webaudio.
1631 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1632 base::SharedMemoryHandle /* encoded_data_handle */,
1633 base::FileDescriptor /* pcm_output */,
1634 uint32_t /* data_size*/)
1636 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1637 // display events. If |enabled| is true, the BeginFrame message will continue
1638 // to be be delivered until the notification is disabled.
1639 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
1640 bool /* enabled */)
1642 // Reply to the ViewMsg_ExtractSmartClipData message.
1643 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1644 base::string16 /* text */,
1645 base::string16 /* html */,
1646 gfx::Rect /* rect */)
1648 #elif defined(OS_MACOSX)
1649 // Request that the browser load a font into shared memory for us.
1650 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1651 FontDescriptor /* font to load */,
1652 uint32 /* buffer size */,
1653 base::SharedMemoryHandle /* font data */,
1654 uint32 /* font id */)
1656 // Informs the browser that a plugin has gained or lost focus.
1657 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1658 bool, /* focused */
1659 int /* plugin_id */)
1661 // Instructs the browser to start plugin IME.
1662 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1664 #elif defined(OS_WIN)
1665 // Request that the given font characters be loaded by the browser so it's
1666 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1667 // for details.
1668 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1669 LOGFONT /* font_data */,
1670 base::string16 /* characters */)
1671 #endif
1673 #if defined(OS_POSIX)
1674 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1675 // this call exists for the renderer to ask the browser to allocate memory
1676 // on its behalf. We return a file descriptor to the POSIX shared memory.
1677 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1678 // by the browser, and it is the caller's repsonsibility to send a
1679 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1680 // In all cases, the caller is responsible for deleting the resulting
1681 // TransportDIB.
1682 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1683 uint32_t, /* bytes requested */
1684 bool, /* cache in the browser */
1685 TransportDIB::Handle /* DIB */)
1687 // Since the browser keeps handles to the allocated transport DIBs, this
1688 // message is sent to tell the browser that it may release them when the
1689 // renderer is finished with them.
1690 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1691 TransportDIB::Id /* DIB id */)
1692 #endif
1694 // Adding a new message? Stick to the sort order above: first platform
1695 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1696 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.