Move origin url validation check to PermissionContextBase class.
[chromium-blink-merge.git] / content / common / view_messages.h
blobe0914db07493b73c556c5f12c852390c75f88704
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/frame_replication_state.h"
19 #include "content/common/navigation_gesture.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_file_info.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 "ipc/ipc_channel_handle.h"
35 #include "ipc/ipc_message_macros.h"
36 #include "ipc/ipc_platform_file.h"
37 #include "media/audio/audio_parameters.h"
38 #include "media/base/channel_layout.h"
39 #include "media/base/media_log_event.h"
40 #include "net/base/network_change_notifier.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/geometry/point.h"
54 #include "ui/gfx/geometry/rect.h"
55 #include "ui/gfx/geometry/rect_f.h"
56 #include "ui/gfx/geometry/vector2d.h"
57 #include "ui/gfx/geometry/vector2d_f.h"
58 #include "ui/gfx/ipc/gfx_param_traits.h"
59 #include "ui/gfx/range/range.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 #if defined(ENABLE_PLUGINS)
67 #include "content/common/pepper_renderer_instance_data.h"
68 #endif
70 #undef IPC_MESSAGE_EXPORT
71 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
73 #define IPC_MESSAGE_START ViewMsgStart
75 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type,
76 blink::WebMediaPlayerAction::Type::TypeLast)
77 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type,
78 blink::WebPluginAction::Type::TypeLast)
79 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType,
80 blink::WebPopupType::WebPopupTypeLast)
81 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection,
82 blink::WebTextDirection::WebTextDirectionLast)
83 IPC_ENUM_TRAITS(WindowContainerType)
84 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
85 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
86 IPC_ENUM_TRAITS(content::MenuItem::Type)
87 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture,
88 content::NavigationGestureLast)
89 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom,
90 content::PageZoom::PAGE_ZOOM_OUT,
91 content::PageZoom::PAGE_ZOOM_IN)
92 IPC_ENUM_TRAITS(gfx::FontRenderParams::Hinting)
93 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering)
94 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
95 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
96 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
97 content::STOP_FIND_ACTION_LAST)
98 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
99 content::THREE_D_API_TYPE_LAST)
100 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1)
101 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
102 media::MediaLogEvent::TYPE_LAST)
103 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
104 IPC_ENUM_TRAITS(ui::TextInputType)
106 #if defined(OS_MACOSX)
107 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
108 IPC_STRUCT_TRAITS_MEMBER(font_name)
109 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
110 IPC_STRUCT_TRAITS_END()
111 #endif
113 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
114 IPC_STRUCT_TRAITS_MEMBER(forward)
115 IPC_STRUCT_TRAITS_MEMBER(matchCase)
116 IPC_STRUCT_TRAITS_MEMBER(findNext)
117 IPC_STRUCT_TRAITS_END()
119 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
120 IPC_STRUCT_TRAITS_MEMBER(type)
121 IPC_STRUCT_TRAITS_MEMBER(enable)
122 IPC_STRUCT_TRAITS_END()
124 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
125 IPC_STRUCT_TRAITS_MEMBER(type)
126 IPC_STRUCT_TRAITS_MEMBER(enable)
127 IPC_STRUCT_TRAITS_END()
129 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
130 IPC_STRUCT_TRAITS_MEMBER(x)
131 IPC_STRUCT_TRAITS_MEMBER(y)
132 IPC_STRUCT_TRAITS_END()
134 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
135 IPC_STRUCT_TRAITS_MEMBER(x)
136 IPC_STRUCT_TRAITS_MEMBER(y)
137 IPC_STRUCT_TRAITS_MEMBER(width)
138 IPC_STRUCT_TRAITS_MEMBER(height)
139 IPC_STRUCT_TRAITS_END()
141 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
142 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
143 IPC_STRUCT_TRAITS_MEMBER(depth)
144 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
145 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
146 IPC_STRUCT_TRAITS_MEMBER(rect)
147 IPC_STRUCT_TRAITS_MEMBER(availableRect)
148 IPC_STRUCT_TRAITS_MEMBER(orientationType)
149 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
150 IPC_STRUCT_TRAITS_END()
152 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
153 IPC_STRUCT_TRAITS_MEMBER(label)
154 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
155 IPC_STRUCT_TRAITS_MEMBER(type)
156 IPC_STRUCT_TRAITS_MEMBER(action)
157 IPC_STRUCT_TRAITS_MEMBER(rtl)
158 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
159 IPC_STRUCT_TRAITS_MEMBER(enabled)
160 IPC_STRUCT_TRAITS_MEMBER(checked)
161 IPC_STRUCT_TRAITS_MEMBER(submenu)
162 IPC_STRUCT_TRAITS_END()
164 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
165 IPC_STRUCT_TRAITS_MEMBER(value)
166 IPC_STRUCT_TRAITS_MEMBER(localized_value)
167 IPC_STRUCT_TRAITS_MEMBER(label)
168 IPC_STRUCT_TRAITS_END()
170 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
171 IPC_STRUCT_TRAITS_MEMBER(icon_url)
172 IPC_STRUCT_TRAITS_MEMBER(icon_type)
173 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
174 IPC_STRUCT_TRAITS_END()
176 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
177 IPC_STRUCT_TRAITS_MEMBER(file_path)
178 IPC_STRUCT_TRAITS_MEMBER(display_name)
179 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
180 IPC_STRUCT_TRAITS_MEMBER(modification_time)
181 IPC_STRUCT_TRAITS_MEMBER(length)
182 IPC_STRUCT_TRAITS_MEMBER(is_directory)
183 IPC_STRUCT_TRAITS_END()
185 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
186 IPC_STRUCT_TRAITS_MEMBER(mode)
187 IPC_STRUCT_TRAITS_MEMBER(title)
188 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
189 IPC_STRUCT_TRAITS_MEMBER(accept_types)
190 IPC_STRUCT_TRAITS_MEMBER(need_local_path)
191 #if defined(OS_ANDROID)
192 IPC_STRUCT_TRAITS_MEMBER(capture)
193 #endif
194 IPC_STRUCT_TRAITS_END()
196 #if defined(ENABLE_PLUGINS)
197 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
198 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
199 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
200 IPC_STRUCT_TRAITS_MEMBER(document_url)
201 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
202 IPC_STRUCT_TRAITS_END()
203 #endif
205 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
206 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
207 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
208 IPC_STRUCT_TRAITS_MEMBER(hinting)
209 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
210 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
211 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
212 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
213 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
214 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
215 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
216 IPC_STRUCT_TRAITS_MEMBER(track_color)
217 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
218 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
219 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
220 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
221 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
222 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
223 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
224 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
225 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
226 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
227 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
228 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
229 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
230 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
231 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
232 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
233 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
234 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
235 IPC_STRUCT_TRAITS_MEMBER(caption_font_family_name)
236 IPC_STRUCT_TRAITS_MEMBER(caption_font_height)
237 IPC_STRUCT_TRAITS_MEMBER(small_caption_font_family_name)
238 IPC_STRUCT_TRAITS_MEMBER(small_caption_font_height)
239 IPC_STRUCT_TRAITS_MEMBER(menu_font_family_name)
240 IPC_STRUCT_TRAITS_MEMBER(menu_font_height)
241 IPC_STRUCT_TRAITS_MEMBER(status_font_family_name)
242 IPC_STRUCT_TRAITS_MEMBER(status_font_height)
243 IPC_STRUCT_TRAITS_MEMBER(message_font_family_name)
244 IPC_STRUCT_TRAITS_MEMBER(message_font_height)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
248 IPC_STRUCT_TRAITS_MEMBER(name)
249 IPC_STRUCT_TRAITS_MEMBER(value)
250 IPC_STRUCT_TRAITS_MEMBER(domain)
251 IPC_STRUCT_TRAITS_MEMBER(path)
252 IPC_STRUCT_TRAITS_MEMBER(expires)
253 IPC_STRUCT_TRAITS_MEMBER(http_only)
254 IPC_STRUCT_TRAITS_MEMBER(secure)
255 IPC_STRUCT_TRAITS_MEMBER(session)
256 IPC_STRUCT_TRAITS_END()
258 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
259 IPC_STRUCT_TRAITS_MEMBER(window)
260 IPC_STRUCT_TRAITS_MEMBER(window_rect)
261 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
262 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
263 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
264 IPC_STRUCT_TRAITS_MEMBER(visible)
265 IPC_STRUCT_TRAITS_END()
267 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
268 IPC_STRUCT_TRAITS_MEMBER(id)
269 IPC_STRUCT_TRAITS_MEMBER(type)
270 IPC_STRUCT_TRAITS_MEMBER(params)
271 IPC_STRUCT_TRAITS_MEMBER(time)
272 IPC_STRUCT_TRAITS_END()
274 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
275 // Routing ID of the view initiating the open.
276 IPC_STRUCT_MEMBER(int, opener_id)
278 // True if this open request came in the context of a user gesture.
279 IPC_STRUCT_MEMBER(bool, user_gesture)
281 // Type of window requested.
282 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
284 // The session storage namespace ID this view should use.
285 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
287 // The name of the resulting frame that should be created (empty if none
288 // has been specified).
289 IPC_STRUCT_MEMBER(base::string16, frame_name)
291 // The routing id of the frame initiating the open.
292 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
294 // The URL of the frame initiating the open.
295 IPC_STRUCT_MEMBER(GURL, opener_url)
297 // The URL of the top frame containing the opener.
298 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
300 // The security origin of the frame initiating the open.
301 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
303 // Whether the opener will be suppressed in the new window, in which case
304 // scripting the new window is not allowed.
305 IPC_STRUCT_MEMBER(bool, opener_suppressed)
307 // Whether the window should be opened in the foreground, background, etc.
308 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
310 // The URL that will be loaded in the new window (empty if none has been
311 // sepcified).
312 IPC_STRUCT_MEMBER(GURL, target_url)
314 // The referrer that will be used to load |target_url| (empty if none has
315 // been specified).
316 IPC_STRUCT_MEMBER(content::Referrer, referrer)
318 // The window features to use for the new view.
319 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
321 // The additional window features to use for the new view. We pass these
322 // separately from |features| above because we cannot serialize WebStrings
323 // over IPC.
324 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
325 IPC_STRUCT_END()
327 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
328 // URL for the worker script.
329 IPC_STRUCT_MEMBER(GURL, url)
331 // Name for a SharedWorker, otherwise empty string.
332 IPC_STRUCT_MEMBER(base::string16, name)
334 // Security policy used in the worker.
335 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
337 // Security policy type used in the worker.
338 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
340 // The ID of the parent document (unique within parent renderer).
341 IPC_STRUCT_MEMBER(unsigned long long, document_id)
343 // RenderFrame routing id used to send messages back to the parent.
344 IPC_STRUCT_MEMBER(int, render_frame_route_id)
345 IPC_STRUCT_END()
347 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
348 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
349 IPC_STRUCT_MEMBER(double, dialog_value)
350 IPC_STRUCT_MEMBER(double, minimum)
351 IPC_STRUCT_MEMBER(double, maximum)
352 IPC_STRUCT_MEMBER(double, step)
353 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
354 IPC_STRUCT_END()
356 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
357 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
358 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
359 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
360 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
361 IPC_STRUCT_MEMBER(bool, is_anchor_first)
362 IPC_STRUCT_END()
364 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
365 // The type of input field
366 IPC_STRUCT_MEMBER(ui::TextInputType, type)
368 // The flags of the input field (autocorrect, autocomplete, etc.)
369 IPC_STRUCT_MEMBER(int, flags)
371 // The value of the input field
372 IPC_STRUCT_MEMBER(std::string, value)
374 // The cursor position of the current selection start, or the caret position
375 // if nothing is selected
376 IPC_STRUCT_MEMBER(int, selection_start)
378 // The cursor position of the current selection end, or the caret position
379 // if nothing is selected
380 IPC_STRUCT_MEMBER(int, selection_end)
382 // The start position of the current composition, or -1 if there is none
383 IPC_STRUCT_MEMBER(int, composition_start)
385 // The end position of the current composition, or -1 if there is none
386 IPC_STRUCT_MEMBER(int, composition_end)
388 // Whether or not inline composition can be performed for the current input.
389 IPC_STRUCT_MEMBER(bool, can_compose_inline)
391 // Whether or not the IME should be shown as a result of this update. Even if
392 // true, the IME will only be shown if the type is appropriate (e.g. not
393 // TEXT_INPUT_TYPE_NONE).
394 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
396 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
397 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
398 IPC_STRUCT_END()
400 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
401 // The size of the RenderView when this message was generated. This is
402 // included so the host knows how large the view is from the perspective of
403 // the renderer process. This is necessary in case a resize operation is in
404 // progress. If auto-resize is enabled, this should update the corresponding
405 // view size.
406 IPC_STRUCT_MEMBER(gfx::Size, view_size)
408 // New window locations for plugin child windows.
409 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
410 plugin_window_moves)
412 // The following describes the various bits that may be set in flags:
414 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
415 // Indicates that this is a response to a ViewMsg_Resize message.
417 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
418 // Indicates that this is a response to a ViewMsg_Repaint message.
420 // If flags is zero, then this message corresponds to an unsolicited paint
421 // request by the render view. Any of the above bits may be set in flags,
422 // which would indicate that this paint message is an ACK for multiple
423 // request messages.
424 IPC_STRUCT_MEMBER(int, flags)
425 IPC_STRUCT_END()
427 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
428 // Information about the screen (dpi, depth, etc..).
429 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
430 // The size of the renderer.
431 IPC_STRUCT_MEMBER(gfx::Size, new_size)
432 // The size of the view's backing surface in non-DPI-adjusted pixels.
433 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
434 // Whether or not Blink's viewport size should be shrunk by the height of the
435 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
436 IPC_STRUCT_MEMBER(bool, top_controls_shrink_blink_size)
437 // The height of the top controls (always 0 on platforms where URL-bar hiding
438 // isn't supported).
439 IPC_STRUCT_MEMBER(float, top_controls_height)
440 // The size of the visible viewport, which may be smaller than the view if the
441 // view is partially occluded (e.g. by a virtual keyboard). The size is in
442 // DPI-adjusted pixels.
443 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
444 // The resizer rect.
445 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
446 // Indicates whether a page is fullscreen or not.
447 IPC_STRUCT_MEMBER(bool, is_fullscreen)
448 IPC_STRUCT_END()
450 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
451 // Renderer-wide preferences.
452 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
454 // Preferences for this view.
455 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
457 // The ID of the view to be created.
458 IPC_STRUCT_MEMBER(int32, view_id)
460 // The ID of the main frame hosted in the view.
461 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
463 // The ID of the rendering surface.
464 IPC_STRUCT_MEMBER(int32, surface_id)
466 // The session storage namespace ID this view should use.
467 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
469 // The name of the frame associated with this view (or empty if none).
470 IPC_STRUCT_MEMBER(base::string16, frame_name)
472 // The route ID of the opener RenderView if we need to set one
473 // (MSG_ROUTING_NONE otherwise).
474 IPC_STRUCT_MEMBER(int, opener_route_id)
476 // Whether the RenderView should initially be swapped out.
477 IPC_STRUCT_MEMBER(bool, swapped_out)
479 // In --site-per-process mode, if this view is |swapped_out|, its main frame
480 // will become a RenderFrameProxy. |replicated_frame_state| is used to
481 // replicate information such as security origin to that RenderFrameProxy.
482 IPC_STRUCT_MEMBER(content::FrameReplicationState, replicated_frame_state)
484 // The ID of the proxy object for the main frame in this view. It is only
485 // used if |swapped_out| is true.
486 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
488 // Whether the RenderView should initially be hidden.
489 IPC_STRUCT_MEMBER(bool, hidden)
491 // Whether the RenderView will never be visible.
492 IPC_STRUCT_MEMBER(bool, never_visible)
494 // Whether the window associated with this view was created with an opener.
495 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
497 // The initial page ID to use for this view, which must be larger than any
498 // existing navigation that might be loaded in the view. Page IDs are unique
499 // to a view and are only updated by the renderer after this initial value.
500 IPC_STRUCT_MEMBER(int32, next_page_id)
502 // The initial renderer size.
503 IPC_STRUCT_MEMBER(ViewMsg_Resize_Params, initial_size)
505 // Whether to enable auto-resize.
506 IPC_STRUCT_MEMBER(bool, enable_auto_resize)
508 // The minimum size to layout the page if auto-resize is enabled.
509 IPC_STRUCT_MEMBER(gfx::Size, min_size)
511 // The maximum size to layout the page if auto-resize is enabled.
512 IPC_STRUCT_MEMBER(gfx::Size, max_size)
513 IPC_STRUCT_END()
515 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
516 // Whether the data format is supplied as serialized script value, or as
517 // a simple string. If it is a raw string, must be converted from string to a
518 // WebSerializedScriptValue in renderer.
519 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
520 // The serialized script value.
521 IPC_STRUCT_MEMBER(base::string16, data)
522 // When sent to the browser, this is the routing ID of the source frame in
523 // the source process. The browser replaces it with the routing ID of the
524 // equivalent (swapped out) frame in the destination process.
525 IPC_STRUCT_MEMBER(int, source_routing_id)
527 // The origin of the source frame.
528 IPC_STRUCT_MEMBER(base::string16, source_origin)
530 // The origin for the message's target.
531 IPC_STRUCT_MEMBER(base::string16, target_origin)
533 // Information about the MessagePorts this message contains.
534 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
535 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
536 IPC_STRUCT_END()
538 // Messages sent from the browser to the renderer.
540 #if defined(OS_ANDROID)
541 // Tells the renderer to cancel an opened date/time dialog.
542 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
544 // Replaces a date time input field.
545 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
546 double /* dialog_value */)
548 #endif
550 // Get all savable resource links from current webpage, include main
551 // frame and sub-frame.
552 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
553 GURL /* url of page which is needed to save */)
555 // Get html data by serializing all frames of current page with lists
556 // which contain all resource links that have local copy.
557 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
558 std::vector<GURL> /* urls that have local copy */,
559 std::vector<base::FilePath> /* paths of local copy */,
560 base::FilePath /* local directory path */)
562 // Tells the render side that a ViewHostMsg_LockMouse message has been
563 // processed. |succeeded| indicates whether the mouse has been successfully
564 // locked or not.
565 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
566 bool /* succeeded */)
567 // Tells the render side that the mouse has been unlocked.
568 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
570 // Sent by the browser when the parameters for vsync alignment have changed.
571 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
572 base::TimeTicks /* timebase */,
573 base::TimeDelta /* interval */)
575 // Sent when the history is altered outside of navigation. The history list was
576 // reset to |history_length| length, and the offset was reset to be
577 // |history_offset|.
578 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryOffsetAndLength,
579 int /* history_offset */,
580 int /* history_length */)
582 // Tells the renderer to create a new view.
583 // This message is slightly different, the view it takes (via
584 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
585 // non-view control message.
586 IPC_MESSAGE_CONTROL1(ViewMsg_New,
587 ViewMsg_New_Params)
589 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
590 // similar to the new command, but used when the renderer created a view
591 // first, and we need to update it.
592 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
594 // Sends updated preferences to the renderer.
595 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
596 content::RendererPreferences)
598 // This passes a set of webkit preferences down to the renderer.
599 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
600 content::WebPreferences)
602 // Informs the renderer that the timezone has changed.
603 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
605 // Tells the render view to close.
606 // Expects a Close_ACK message when finished.
607 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
609 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
610 // is generated in response provided new_size is not empty and not equal to
611 // the view's current size. The generated ViewHostMsg_UpdateRect message will
612 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
613 // we don't have to fetch it every time WebKit asks for it.
614 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
615 ViewMsg_Resize_Params /* params */)
617 // Sent to inform the renderer of its screen device color profile. An empty
618 // profile tells the renderer use the default sRGB color profile.
619 IPC_MESSAGE_ROUTED1(ViewMsg_ColorProfile,
620 std::vector<char> /* color profile */)
622 // Tells the render view that the resize rect has changed.
623 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
624 gfx::Rect /* resizer_rect */)
626 // Sent to inform the view that it was hidden. This allows it to reduce its
627 // resource utilization.
628 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
630 // Tells the render view that it is no longer hidden (see WasHidden), and the
631 // render view is expected to respond with a full repaint if needs_repainting
632 // is true. If needs_repainting is false, then this message does not trigger a
633 // message in response.
634 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown,
635 bool /* needs_repainting */,
636 ui::LatencyInfo /* latency_info */)
638 // Tells the renderer to focus the first (last if reverse is true) focusable
639 // node.
640 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
641 bool /* reverse */)
643 // Sent to inform the renderer to invoke a context menu.
644 // The parameter specifies the location in the render view's coordinates.
645 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
646 ui::MenuSourceType,
647 gfx::Point /* location where menu should be shown */)
649 // Sent when the user wants to search for a word on the page (find in page).
650 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
651 int /* request_id */,
652 base::string16 /* search_text */,
653 blink::WebFindOptions)
655 // This message notifies the renderer that the user has closed the FindInPage
656 // window (and what action to take regarding the selection).
657 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
658 content::StopFindAction /* action */)
660 // Copies the image at location x, y to the clipboard (if there indeed is an
661 // image at that location).
662 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
663 int /* x */,
664 int /* y */)
666 // Saves the image at location x, y to the disk (if there indeed is an
667 // image at that location).
668 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
669 int /* x */,
670 int /* y */)
672 // Tells the renderer to perform the given action on the media player
673 // located at the given point.
674 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
675 gfx::Point, /* location */
676 blink::WebMediaPlayerAction)
678 // Tells the renderer to perform the given action on the plugin located at
679 // the given point.
680 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
681 gfx::Point, /* location */
682 blink::WebPluginAction)
684 // Posts a message from a frame in another process to the current renderer.
685 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
686 ViewMsg_PostMessage_Params)
688 // Change the zoom level for the current main frame. If the level actually
689 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
690 // telling it what url got zoomed and what its current zoom level is.
691 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
692 content::PageZoom /* function */)
694 // Set the zoom level for a particular url that the renderer is in the
695 // process of loading. This will be stored, to be used if the load commits
696 // and ignored otherwise.
697 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
698 GURL /* url */,
699 double /* zoom_level */)
701 // Set the zoom level for a particular url, so all render views
702 // displaying this url can update their zoom levels to match.
703 // If scheme is empty, then only host is used for matching.
704 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
705 std::string /* scheme */,
706 std::string /* host */,
707 double /* zoom_level */)
709 // Set the zoom level for a particular render view.
710 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
711 bool /* uses_temporary_zoom_level */,
712 double /* zoom_level */)
714 // Change encoding of page in the renderer.
715 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
716 std::string /*new encoding name*/)
718 // Reset encoding of page in the renderer back to default.
719 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
721 // Used to tell a render view whether it should expose various bindings
722 // that allow JS content extended privileges. See BindingsPolicy for valid
723 // flag values.
724 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
725 int /* enabled_bindings_flags */)
727 // Tell the renderer to add a property to the WebUI binding object. This
728 // only works if we allowed WebUI bindings.
729 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
730 std::string /* property_name */,
731 std::string /* property_value_json */)
733 // This message starts/stop monitoring the input method status of the focused
734 // edit control of a renderer process.
735 // Parameters
736 // * is_active (bool)
737 // Indicates if an input method is active in the browser process.
738 // The possible actions when a renderer process receives this message are
739 // listed below:
740 // Value Action
741 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
742 // to notify the input method status of the focused edit control.
743 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
744 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
745 bool /* is_active */)
747 // IME API oncandidatewindow* events for InputMethodContext.
748 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
749 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
750 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
752 // Used to notify the render-view that we have received a target URL. Used
753 // to prevent target URLs spamming the browser.
754 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
756 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
757 std::vector<content::FileChooserFileInfo>)
759 // Provides the results of directory enumeration.
760 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
761 int /* request_id */,
762 std::vector<base::FilePath> /* files_in_directory */)
764 // When a renderer sends a ViewHostMsg_Focus to the browser process,
765 // the browser has the option of sending a ViewMsg_CantFocus back to
766 // the renderer.
767 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
769 // Tells the renderer to suppress any further modal dialogs until it receives a
770 // corresponding ViewMsg_SwapOut message. This ensures that no
771 // PageGroupLoadDeferrer is on the stack for SwapOut.
772 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
774 // Instructs the renderer to close the current page, including running the
775 // onunload event handler.
777 // Expects a ClosePage_ACK message when finished.
778 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
780 // Notifies the renderer about ui theme changes
781 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
783 // Notifies the renderer that a paint is to be generated for the rectangle
784 // passed in.
785 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
786 gfx::Size /* The view size to be repainted */)
788 // Notification that a move or resize renderer's containing window has
789 // started.
790 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
792 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
793 gfx::Rect /* view_screen_rect */,
794 gfx::Rect /* window_screen_rect */)
796 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
797 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
798 // processed the move. The browser may have ignored the move, but it finished
799 // processing. This is used because the renderer keeps a temporary cache of
800 // the widget position while these asynchronous operations are in progress.
801 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
803 // Used to instruct the RenderView to send back updates to the preferred size.
804 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
806 // Used to instruct the RenderView to automatically resize and send back
807 // updates for the new size.
808 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
809 gfx::Size /* min_size */,
810 gfx::Size /* max_size */)
812 // Used to instruct the RenderView to disalbe automatically resize.
813 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
814 gfx::Size /* new_size */)
816 // Changes the text direction of the currently selected input field (if any).
817 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
818 blink::WebTextDirection /* direction */)
820 // Tells the renderer to clear the focused element (if any).
821 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
823 // Make the RenderView background transparent or opaque.
824 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
826 // Used to tell the renderer not to add scrollbars with height and
827 // width below a threshold.
828 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
829 gfx::Size /* disable_scrollbar_size_limit */)
831 // Activate/deactivate the RenderView (i.e., set its controls' tint
832 // accordingly, etc.).
833 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
834 bool /* active */)
836 // Response message to ViewHostMsg_CreateWorker.
837 // Sent when the worker has started.
838 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
840 // Sent when the worker failed to load the worker script.
841 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
842 // But if the shared worker of the same URL already exists and it has failed
843 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
844 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
845 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
847 // Sent when the worker has connected.
848 // This message is sent only if the worker successfully loaded the script.
849 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
851 // Tells the renderer that the network type has changed so that navigator.onLine
852 // and navigator.connection can be updated.
853 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
854 net::NetworkChangeNotifier::ConnectionType /* type */)
856 #if defined(ENABLE_PLUGINS)
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 */)
873 #endif
875 // Used to instruct the RenderView to go into "view source" mode.
876 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
878 // Instructs the renderer to save the current page to MHTML.
879 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
880 int /* job_id */,
881 IPC::PlatformFileForTransit /* file handle */)
883 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
884 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
885 GURL /* data */)
887 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
888 // process to release the magnified image.
889 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
890 cc::SharedBitmapId /* id */)
892 // Notifies the renderer that a snapshot has been retrieved.
893 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
894 int /* snapshot_id */,
895 gfx::Size /* size */,
896 std::vector<unsigned char> /* png */)
898 // Fetches complete rendered content of a web page as plain text.
899 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
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 // Notifies the renderer whether hiding/showing the top controls is enabled
932 // and whether or not to animate to the proper state.
933 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
934 bool /* enable_hiding */,
935 bool /* enable_showing */,
936 bool /* animate */)
938 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
940 // Sent by the browser when an IME update that requires acknowledgement has been
941 // processed on the browser side.
942 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
944 // Extracts the data at the given rect, returning it through the
945 // ViewHostMsg_SmartClipDataExtracted IPC.
946 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
947 gfx::Rect /* rect */)
949 #elif defined(OS_MACOSX)
950 // Let the RenderView know its window has changed visibility.
951 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
952 bool /* visibile */)
954 // Let the RenderView know its window's frame has changed.
955 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
956 gfx::Rect /* window frame */,
957 gfx::Rect /* content view frame */)
959 // Message sent from the browser to the renderer when the user starts or stops
960 // resizing the view.
961 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
962 bool /* enable */)
964 // Tell the renderer that plugin IME has completed.
965 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
966 base::string16 /* text */,
967 int /* plugin_id */)
968 #endif
970 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
971 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
972 uint32 /* output_surface_id */,
973 cc::CompositorFrameAck /* ack */)
975 // Sent by browser to tell renderer compositor that some resources that were
976 // given to the browser in a swap are not being used anymore.
977 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
978 uint32 /* output_surface_id */,
979 cc::CompositorFrameAck /* ack */)
981 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
983 // Sent by the browser to ask the renderer to redraw.
984 // If |request_id| is not zero, it is added to the forced frame's latency info
985 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
986 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
987 int /* request_id */)
989 // Sent by the browser when the renderer should generate a new frame.
990 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
991 cc::BeginFrameArgs /* args */)
993 // -----------------------------------------------------------------------------
994 // Messages sent from the renderer to the browser.
996 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
997 // display events. If |enabled| is true, the BeginFrame message will continue
998 // to be be delivered until the notification is disabled.
999 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrames,
1000 bool /* enabled */)
1002 // Sent by the renderer when it is creating a new window. The browser creates
1003 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1004 // MSG_ROUTING_NONE, the view couldn't be created.
1005 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
1006 ViewHostMsg_CreateWindow_Params,
1007 int /* route_id */,
1008 int /* main_frame_route_id */,
1009 int32 /* surface_id */,
1010 int64 /* cloned_session_storage_namespace_id */)
1012 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1013 // <select> dropdowns. This message is sent to the WebContentsImpl that
1014 // contains the widget being created.
1015 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1016 int /* opener_id */,
1017 blink::WebPopupType /* popup type */,
1018 int /* route_id */,
1019 int32 /* surface_id */)
1021 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1022 // window.
1023 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1024 int /* opener_id */,
1025 int /* route_id */,
1026 int32 /* surface_id */)
1028 // Asks the browser for a unique routing ID.
1029 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1030 int /* routing_id */)
1032 // Asks the browser for the default audio hardware configuration.
1033 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1034 media::AudioParameters /* input parameters */,
1035 media::AudioParameters /* output parameters */)
1037 // Asks the browser for the renderer process memory size stats.
1038 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1039 size_t /* private_bytes */,
1040 size_t /* shared_bytes */)
1042 // These three messages are sent to the parent RenderViewHost to display the
1043 // page/widget that was created by
1044 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1045 // refers to the id that was returned from the Create message above.
1046 // The initial_position parameter is a rectangle in screen coordinates.
1048 // FUTURE: there will probably be flags here to control if the result is
1049 // in a new window.
1050 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1051 int /* route_id */,
1052 WindowOpenDisposition /* disposition */,
1053 gfx::Rect /* initial_pos */,
1054 bool /* opened_by_user_gesture */)
1056 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1057 int /* route_id */,
1058 gfx::Rect /* initial_pos */)
1060 // Message to show a full screen widget.
1061 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1062 int /* route_id */)
1064 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1065 // to run in a modal fashion until it is closed.
1066 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1067 int /* opener_id */)
1069 // Indicates the renderer is ready in response to a ViewMsg_New or
1070 // a ViewMsg_CreatingNew_ACK.
1071 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1073 // Indicates the renderer process is gone. This actually is sent by the
1074 // browser process to itself, but keeps the interface cleaner.
1075 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1076 int, /* this really is base::TerminationStatus */
1077 int /* exit_code */)
1079 // Sent by the renderer process to request that the browser close the view.
1080 // This corresponds to the window.close() API, and the browser may ignore
1081 // this message. Otherwise, the browser will generates a ViewMsg_Close
1082 // message to close the view.
1083 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1085 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1086 // throttle these messages.
1087 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1089 // Sent by the renderer process to request that the browser move the view.
1090 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1091 // the browser may ignore this message.
1092 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1093 gfx::Rect /* position */)
1095 // Result of string search in the page.
1096 // Response to ViewMsg_Find with the results of the requested find-in-page
1097 // search, the number of matches found and the selection rect (in screen
1098 // coordinates) for the string found. If |final_update| is false, it signals
1099 // that this is not the last Find_Reply message - more will be sent as the
1100 // scoping effort continues.
1101 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1102 int /* request_id */,
1103 int /* number of matches */,
1104 gfx::Rect /* selection_rect */,
1105 int /* active_match_ordinal */,
1106 bool /* final_update */)
1108 // Indicates that the render view has been closed in respose to a
1109 // Close message.
1110 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1111 int /* old_route_id */)
1113 // Indicates that the current page has been closed, after a ClosePage
1114 // message.
1115 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1117 // Notifies the browser that we have session history information.
1118 // page_id: unique ID that allows us to distinguish between history entries.
1119 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1120 int32 /* page_id */,
1121 content::PageState /* state */)
1123 // Notifies the browser that we want to show a destination url for a potential
1124 // action (e.g. when the user is hovering over a link).
1125 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL,
1126 GURL)
1128 // Sent when the document element is available for the top-level frame. This
1129 // happens after the page starts loading, but before all resources are
1130 // finished.
1131 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1132 bool /* uses_temporary_zoom_level */)
1134 // Sent when the renderer loads a resource from its memory cache.
1135 // The security info is non empty if the resource was originally loaded over
1136 // a secure connection.
1137 // Note: May only be sent once per URL per frame per committed load.
1138 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1139 GURL /* url */,
1140 std::string /* security info */,
1141 std::string /* http method */,
1142 std::string /* mime type */,
1143 content::ResourceType /* resource type */)
1145 // Sent when the renderer displays insecure content in a secure page.
1146 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1148 // Sent when the renderer runs insecure content in a secure origin.
1149 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1150 std::string /* security_origin */,
1151 GURL /* target URL */)
1153 // Sent to update part of the view. In response to this message, the host
1154 // generates a ViewMsg_UpdateRect_ACK message.
1155 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1156 ViewHostMsg_UpdateRect_Params)
1158 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1159 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1161 // Message sent from renderer to the browser when focus changes inside the
1162 // webpage. The first parameter says whether the newly focused element needs
1163 // keyboard input (true for textfields, text areas and content editable divs).
1164 // The second parameter is the node bounds relative to RenderWidgetHostView.
1165 IPC_MESSAGE_ROUTED2(ViewHostMsg_FocusedNodeChanged,
1166 bool /* is_editable_node */,
1167 gfx::Rect /* node_bounds */)
1169 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1171 // Used to set a cookie. The cookie is set asynchronously, but will be
1172 // available to a subsequent ViewHostMsg_GetCookies request.
1173 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1174 int /* render_frame_id */,
1175 GURL /* url */,
1176 GURL /* first_party_for_cookies */,
1177 std::string /* cookie */)
1179 // Used to get cookies for the given URL. This may block waiting for a
1180 // previous SetCookie message to be processed.
1181 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1182 int /* render_frame_id */,
1183 GURL /* url */,
1184 GURL /* first_party_for_cookies */,
1185 std::string /* cookies */)
1187 // Used to get raw cookie information for the given URL. This may block
1188 // waiting for a previous SetCookie message to be processed.
1189 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1190 GURL /* url */,
1191 GURL /* first_party_for_cookies */,
1192 std::vector<content::CookieData>
1193 /* raw_cookies */)
1195 // Used to delete cookie for the given URL and name
1196 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1197 GURL /* url */,
1198 std::string /* cookie_name */)
1200 // Used to check if cookies are enabled for the given URL. This may block
1201 // waiting for a previous SetCookie message to be processed.
1202 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1203 int /* render_frame_id */,
1204 GURL /* url */,
1205 GURL /* first_party_for_cookies */,
1206 bool /* cookies_enabled */)
1208 // Used to get the list of plugins
1209 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1210 bool /* refresh*/,
1211 std::vector<content::WebPluginInfo> /* plugins */)
1213 #if defined(OS_WIN)
1214 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1215 gfx::NativeViewId /* dummy_activation_window */)
1217 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1218 gfx::NativeViewId /* dummy_activation_window */)
1220 // Asks the browser for the user's monitor profile.
1221 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1222 std::vector<char> /* profile */)
1223 #endif
1225 // Get the list of proxies to use for |url|, as a semicolon delimited list
1226 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1227 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1228 GURL /* url */,
1229 bool /* result */,
1230 std::string /* proxy list */)
1232 // A renderer sends this to the browser process when it wants to create a
1233 // worker. The browser will create the worker process if necessary, and
1234 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1235 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1236 ViewHostMsg_CreateWorker_Params,
1237 int /* route_id */)
1239 // A renderer sends this to the browser process when a document has been
1240 // detached. The browser will use this to constrain the lifecycle of worker
1241 // processes (SharedWorkers are shut down when their last associated document
1242 // is detached).
1243 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1244 uint64 /* document_id */)
1246 // Wraps an IPC message that's destined to the worker on the renderer->browser
1247 // hop.
1248 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1249 IPC::Message /* message */)
1251 // Tells the browser that a specific Appcache manifest in the current page
1252 // was accessed.
1253 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1254 GURL /* manifest url */,
1255 bool /* blocked by policy */)
1257 // Initiates a download based on user actions like 'ALT+click'.
1258 IPC_MESSAGE_CONTROL4(ViewHostMsg_DownloadUrl,
1259 int /* render_view_id */,
1260 GURL /* url */,
1261 content::Referrer /* referrer */,
1262 base::string16 /* suggested_name */)
1264 // Used to go to the session history entry at the given offset (ie, -1 will
1265 // return the "back" item).
1266 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1267 int /* offset (from current) of history item to get */)
1269 // Sent from an inactive renderer for the browser to route to the active
1270 // renderer, instructing it to close.
1271 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1273 // Sent to the browser from an inactive renderer to post a message to the
1274 // active renderer.
1275 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1276 ViewMsg_PostMessage_Params)
1278 // Notifies that the preferred size of the content changed.
1279 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1280 gfx::Size /* pref_size */)
1282 // Notifies whether there are JavaScript touch event handlers or not.
1283 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1284 bool /* has_handlers */)
1286 // A message from HTML-based UI. When (trusted) Javascript calls
1287 // send(message, args), this message is sent to the browser.
1288 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1289 GURL /* source_url */,
1290 std::string /* message */,
1291 base::ListValue /* args */)
1293 #if defined(ENABLE_PLUGINS)
1294 // A renderer sends this to the browser process when it wants to create a ppapi
1295 // plugin. The browser will create the plugin process if necessary, and will
1296 // return a handle to the channel on success.
1298 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1299 // process. This ID is valid only in the context of the browser process and is
1300 // used to identify the proper process when the renderer notifies it that the
1301 // plugin is hung.
1303 // On error an empty string and null handles are returned.
1304 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1305 base::FilePath /* path */,
1306 IPC::ChannelHandle /* handle to channel */,
1307 base::ProcessId /* plugin_pid */,
1308 int /* plugin_child_id */)
1310 // Notification that a plugin has created a new plugin instance. The parameters
1311 // indicate:
1312 // -The plugin process ID that we're creating the instance for.
1313 // -The instance ID of the instance being created.
1314 // -A PepperRendererInstanceData struct which contains properties from the
1315 // renderer which are associated with the plugin instance. This includes the
1316 // routing ID of the associated render view and the URL of plugin.
1317 // -Whether the plugin we're creating an instance for is external or internal.
1319 // This message must be sync even though it returns no parameters to avoid
1320 // a race condition with the plugin process. The plugin process sends messages
1321 // to the browser that assume the browser knows about the instance. We need to
1322 // make sure that the browser actually knows about the instance before we tell
1323 // the plugin to run.
1324 IPC_SYNC_MESSAGE_CONTROL4_0(
1325 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1326 int /* plugin_child_id */,
1327 int32 /* pp_instance */,
1328 content::PepperRendererInstanceData /* creation_data */,
1329 bool /* is_external */)
1331 // Notification that a plugin has destroyed an instance. This is the opposite of
1332 // the "DidCreate" message above.
1333 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1334 int /* plugin_child_id */,
1335 int32 /* pp_instance */,
1336 bool /* is_external */)
1338 // Message from the renderer to the browser indicating the in-process instance
1339 // has been created.
1340 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1341 int32 /* instance */,
1342 content::PepperRendererInstanceData /* instance_data */)
1344 // Message from the renderer to the browser indicating the in-process instance
1345 // has been destroyed.
1346 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1347 int32 /* instance */)
1349 // A renderer sends this to the browser process when it wants to
1350 // create a ppapi broker. The browser will create the broker process
1351 // if necessary, and will return a handle to the channel on success.
1352 // On error an empty string is returned.
1353 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1354 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1355 int /* routing_id */,
1356 base::FilePath /* path */)
1358 // A renderer sends this to the browser process when it wants to access a PPAPI
1359 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1360 // for every connection.
1361 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1362 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1363 int /* routing_id */,
1364 GURL /* document_url */,
1365 base::FilePath /* plugin_path */)
1366 #endif // defined(ENABLE_PLUGINS)
1368 // Send the tooltip text for the current mouse position to the browser.
1369 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1370 base::string16 /* tooltip text string */,
1371 blink::WebTextDirection /* text direction hint */)
1373 // Notification that the text selection has changed.
1374 // Note: The secound parameter is the character based offset of the
1375 // base::string16
1376 // text in the document.
1377 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1378 base::string16 /* text covers the selection range */,
1379 size_t /* the offset of the text in the document */,
1380 gfx::Range /* selection range in the document */)
1382 // Notification that the selection bounds have changed.
1383 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1384 ViewHostMsg_SelectionBounds_Params)
1386 // Asks the browser to display the file chooser. The result is returned in a
1387 // ViewMsg_RunFileChooserResponse message.
1388 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1389 content::FileChooserParams)
1391 // Asks the browser to enumerate a directory. This is equivalent to running
1392 // the file chooser in directory-enumeration mode and having the user select
1393 // the given directory. The result is returned in a
1394 // ViewMsg_EnumerateDirectoryResponse message.
1395 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1396 int /* request_id */,
1397 base::FilePath /* file_path */)
1399 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1400 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1401 // a string only to work around size limitations for GURLs in IPC messages.
1402 IPC_MESSAGE_CONTROL2(ViewHostMsg_SaveImageFromDataURL,
1403 int /* render_view_id */,
1404 std::string /* data_url */)
1406 // Tells the browser to move the focus to the next (previous if reverse is
1407 // true) focusable element.
1408 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1409 bool /* reverse */)
1411 // Required for opening a date/time dialog
1412 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1413 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1415 IPC_MESSAGE_ROUTED4(ViewHostMsg_TextInputTypeChanged,
1416 ui::TextInputType /* TextInputType of the focused node */,
1417 ui::TextInputMode /* TextInputMode of the focused node */,
1418 bool /* can_compose_inline in the focused node */,
1419 int /* flags in the focused node */)
1421 // Required for updating text input state.
1422 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1423 ViewHostMsg_TextInputState_Params /* input state params */)
1425 // Sent when the renderer changes the zoom level for a particular url, so the
1426 // browser can update its records. If the view is a plugin doc, then url is
1427 // used to update the zoom level for all pages in that site. Otherwise, the
1428 // render view's id is used so that only the menu is updated.
1429 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1430 double /* zoom_level */,
1431 GURL /* url */)
1433 // Updates the minimum/maximum allowed zoom percent for this tab from the
1434 // default values. If |remember| is true, then the zoom setting is applied to
1435 // other pages in the site and is saved, otherwise it only applies to this
1436 // tab.
1437 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1438 int /* minimum_percent */,
1439 int /* maximum_percent */)
1441 // Notify the browser that this render process can or can't be suddenly
1442 // terminated.
1443 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1444 bool /* enabled */)
1446 IPC_MESSAGE_ROUTED3(
1447 ViewHostMsg_SwapCompositorFrame,
1448 uint32 /* output_surface_id */,
1449 cc::CompositorFrame /* frame */,
1450 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1452 // Sent by the compositor when a flinging animation is stopped.
1453 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1455 //---------------------------------------------------------------------------
1456 // Request for cryptographic operation messages:
1457 // These are messages from the renderer to the browser to perform a
1458 // cryptographic operation.
1460 // Asks the browser process to generate a keypair for grabbing a client
1461 // certificate from a CA (<keygen> tag), and returns the signed public
1462 // key and challenge string.
1463 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1464 uint32 /* key size index */,
1465 std::string /* challenge string */,
1466 GURL /* URL of requestor */,
1467 std::string /* signed public key and challenge */)
1469 // Message sent from the renderer to the browser to request that the browser
1470 // cache |data| associated with |url|.
1471 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1472 GURL /* url */,
1473 double /* expected_response_time */,
1474 std::vector<char> /* data */)
1476 // Register a new handler for URL requests with the given scheme.
1477 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1478 std::string /* scheme */,
1479 GURL /* url */,
1480 base::string16 /* title */,
1481 bool /* user_gesture */)
1483 // Unregister the registered handler for URL requests with the given scheme.
1484 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler,
1485 std::string /* scheme */,
1486 GURL /* url */,
1487 bool /* user_gesture */)
1489 // Send back a string to be recorded by UserMetrics.
1490 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1491 std::string /* action */)
1493 // Notifies the browser that the page was or was not saved as MHTML.
1494 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1495 int /* job_id */,
1496 int64 /* size of the MHTML file, -1 if error */)
1498 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1499 std::vector<GURL> /* all savable resource links */,
1500 std::vector<content::Referrer> /* all referrers */,
1501 std::vector<GURL> /* all frame links */)
1503 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1504 GURL /* frame's url */,
1505 std::string /* data buffer */,
1506 int32 /* complete status */)
1508 // Notifies the browser of an event occurring in the media pipeline.
1509 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1510 std::vector<media::MediaLogEvent> /* events */)
1512 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1513 // being sent back.
1514 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1515 // pop up a bubble to ask for user permission or take mouse lock content into
1516 // account.
1517 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1518 bool /* user_gesture */,
1519 bool /* last_unlocked_by_target */,
1520 bool /* privileged */)
1522 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1523 // whenever the mouse is unlocked (which may or may not be caused by
1524 // ViewHostMsg_UnlockMouse).
1525 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1527 // Notifies that multiple touch targets may have been pressed, and to show
1528 // the disambiguation popup.
1529 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1530 gfx::Rect, /* Border of touched targets */
1531 gfx::Size, /* Size of zoomed image */
1532 cc::SharedBitmapId /* id */)
1534 // Sent by the renderer process to check whether client 3D APIs
1535 // (Pepper 3D, WebGL) are explicitly blocked.
1536 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1537 int /* render_view_id */,
1538 GURL /* top_origin_url */,
1539 content::ThreeDAPIType /* requester */,
1540 bool /* blocked */)
1542 // Sent by the renderer process to indicate that a context was lost by
1543 // client 3D content (Pepper 3D, WebGL) running on the page at the
1544 // given URL.
1545 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1546 GURL /* top_origin_url */,
1547 content::ThreeDAPIType /* context_type */,
1548 int /* arb_robustness_status_code */)
1550 // Notifies the browser that document has parsed the body. This is used by the
1551 // ResourceScheduler as an indication that bandwidth contention won't block
1552 // first paint.
1553 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1555 // Notification that the urls for the favicon of a site has been determined.
1556 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1557 std::vector<content::FaviconURL> /* candidates */)
1559 // Message sent from renderer to the browser when the element that is focused
1560 // has been touched. A bool is passed in this message which indicates if the
1561 // node is editable.
1562 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1563 bool /* editable */)
1565 // Message sent from the renderer to the browser when an HTML form has failed
1566 // validation constraints.
1567 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1568 gfx::Rect /* anchor rectangle in root view coordinate */,
1569 base::string16 /* validation message */,
1570 base::string16 /* supplemental text */)
1572 // Message sent from the renderer to the browser when a HTML form validation
1573 // message should be hidden from view.
1574 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1576 // Message sent from the renderer to the browser when the suggested co-ordinates
1577 // of the anchor for a HTML form validation message have changed.
1578 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1579 gfx::Rect /* anchor rectangle in root view coordinate */)
1581 #if defined(OS_ANDROID)
1582 // Response to ViewMsg_FindMatchRects.
1584 // |version| will contain the current version number of the renderer's find
1585 // match list (incremented whenever they change), which should be passed in the
1586 // next call to ViewMsg_FindMatchRects.
1588 // |rects| will either contain a list of the enclosing rects of all matches
1589 // found by the most recent Find operation, or will be empty if |version| is not
1590 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1591 // your locally cached rects should still be valid). The rect coords will be
1592 // custom normalized fractions of the document size. The rects will be sorted by
1593 // frame traversal order starting in the main frame, then by dom order.
1595 // |active_rect| will contain the bounding box of the active find-in-page match
1596 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1597 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1598 int /* version */,
1599 std::vector<gfx::RectF> /* rects */,
1600 gfx::RectF /* active_rect */)
1602 // Start an android intent with the given URI.
1603 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1604 GURL /* content_url */)
1606 // Message sent when the renderer changed the background color for the view.
1607 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1608 uint32 /* bg_color */)
1610 // This message runs the MediaCodec for decoding audio for webaudio.
1611 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1612 base::SharedMemoryHandle /* encoded_data_handle */,
1613 base::FileDescriptor /* pcm_output */,
1614 uint32_t /* data_size*/)
1616 // Reply to the ViewMsg_ExtractSmartClipData message.
1617 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1618 base::string16 /* text */,
1619 base::string16 /* html */,
1620 gfx::Rect /* rect */)
1622 // Notifies that an unhandled tap has occurred at the specified x,y position
1623 // and that the UI may need to be triggered.
1624 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowUnhandledTapUIIfNeeded,
1625 int /* x */,
1626 int /* y */)
1628 #elif defined(OS_MACOSX)
1629 // Request that the browser load a font into shared memory for us.
1630 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1631 FontDescriptor /* font to load */,
1632 uint32 /* buffer size */,
1633 base::SharedMemoryHandle /* font data */,
1634 uint32 /* font id */)
1636 // Informs the browser that a plugin has gained or lost focus.
1637 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1638 bool, /* focused */
1639 int /* plugin_id */)
1641 // Instructs the browser to start plugin IME.
1642 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1644 // Receives content of a web page as plain text.
1645 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1647 #elif defined(OS_WIN)
1648 // Request that the given font characters be loaded by the browser so it's
1649 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1650 // for details.
1651 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1652 LOGFONT /* font_data */,
1653 base::string16 /* characters */)
1654 #endif
1656 // Adding a new message? Stick to the sort order above: first platform
1657 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1658 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.