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/message_port_types.h"
28 #include "content/public/common/page_state.h"
29 #include "content/public/common/page_zoom.h"
30 #include "content/public/common/referrer.h"
31 #include "content/public/common/renderer_preferences.h"
32 #include "content/public/common/stop_find_action.h"
33 #include "content/public/common/three_d_api_types.h"
34 #include "content/public/common/window_container_type.h"
35 #include "ipc/ipc_channel_handle.h"
36 #include "ipc/ipc_message_macros.h"
37 #include "ipc/ipc_platform_file.h"
38 #include "media/audio/audio_parameters.h"
39 #include "media/base/channel_layout.h"
40 #include "media/base/media_log_event.h"
41 #include "net/base/network_change_notifier.h"
42 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
43 #include "third_party/WebKit/public/platform/WebFloatRect.h"
44 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
45 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
46 #include "third_party/WebKit/public/web/WebFindOptions.h"
47 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
48 #include "third_party/WebKit/public/web/WebPluginAction.h"
49 #include "third_party/WebKit/public/web/WebPopupType.h"
50 #include "third_party/WebKit/public/web/WebTextDirection.h"
51 #include "third_party/skia/include/core/SkBitmap.h"
52 #include "ui/base/ime/text_input_mode.h"
53 #include "ui/base/ime/text_input_type.h"
54 #include "ui/base/ui_base_types.h"
55 #include "ui/gfx/geometry/point.h"
56 #include "ui/gfx/geometry/rect.h"
57 #include "ui/gfx/geometry/rect_f.h"
58 #include "ui/gfx/geometry/vector2d.h"
59 #include "ui/gfx/geometry/vector2d_f.h"
60 #include "ui/gfx/ipc/gfx_param_traits.h"
61 #include "ui/gfx/range/range.h"
63 #if defined(OS_MACOSX)
64 #include "content/common/mac/font_descriptor.h"
65 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
68 #if defined(ENABLE_PLUGINS)
69 #include "content/common/pepper_renderer_instance_data.h"
72 #undef IPC_MESSAGE_EXPORT
73 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
75 #define IPC_MESSAGE_START ViewMsgStart
77 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDeviceEmulationParams::ScreenPosition
,
78 blink::WebDeviceEmulationParams::ScreenPositionLast
)
79 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type
,
80 blink::WebMediaPlayerAction::Type::TypeLast
)
81 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type
,
82 blink::WebPluginAction::Type::TypeLast
)
83 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType
,
84 blink::WebPopupType::WebPopupTypeLast
)
85 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection
,
86 blink::WebTextDirection::WebTextDirectionLast
)
87 IPC_ENUM_TRAITS(WindowContainerType
)
88 IPC_ENUM_TRAITS(content::FaviconURL::IconType
)
89 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
90 IPC_ENUM_TRAITS(content::MenuItem::Type
)
91 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture
,
92 content::NavigationGestureLast
)
93 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom
,
94 content::PageZoom::PAGE_ZOOM_OUT
,
95 content::PageZoom::PAGE_ZOOM_IN
)
96 IPC_ENUM_TRAITS(gfx::FontRenderParams::Hinting
)
97 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering
)
98 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy
,
99 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX
)
100 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction
,
101 content::STOP_FIND_ACTION_LAST
)
102 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType
,
103 content::THREE_D_API_TYPE_LAST
)
104 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout
, media::CHANNEL_LAYOUT_MAX
- 1)
105 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type
,
106 media::MediaLogEvent::TYPE_LAST
)
107 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode
, ui::TEXT_INPUT_MODE_MAX
)
108 IPC_ENUM_TRAITS(ui::TextInputType
)
110 #if defined(OS_MACOSX)
111 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
112 IPC_STRUCT_TRAITS_MEMBER(font_name
)
113 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
114 IPC_STRUCT_TRAITS_END()
117 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions
)
118 IPC_STRUCT_TRAITS_MEMBER(forward
)
119 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
120 IPC_STRUCT_TRAITS_MEMBER(findNext
)
121 IPC_STRUCT_TRAITS_END()
123 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction
)
124 IPC_STRUCT_TRAITS_MEMBER(type
)
125 IPC_STRUCT_TRAITS_MEMBER(enable
)
126 IPC_STRUCT_TRAITS_END()
128 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction
)
129 IPC_STRUCT_TRAITS_MEMBER(type
)
130 IPC_STRUCT_TRAITS_MEMBER(enable
)
131 IPC_STRUCT_TRAITS_END()
133 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint
)
134 IPC_STRUCT_TRAITS_MEMBER(x
)
135 IPC_STRUCT_TRAITS_MEMBER(y
)
136 IPC_STRUCT_TRAITS_END()
138 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect
)
139 IPC_STRUCT_TRAITS_MEMBER(x
)
140 IPC_STRUCT_TRAITS_MEMBER(y
)
141 IPC_STRUCT_TRAITS_MEMBER(width
)
142 IPC_STRUCT_TRAITS_MEMBER(height
)
143 IPC_STRUCT_TRAITS_END()
145 IPC_STRUCT_TRAITS_BEGIN(blink::WebSize
)
146 IPC_STRUCT_TRAITS_MEMBER(width
)
147 IPC_STRUCT_TRAITS_MEMBER(height
)
148 IPC_STRUCT_TRAITS_END()
150 IPC_STRUCT_TRAITS_BEGIN(blink::WebDeviceEmulationParams
)
151 IPC_STRUCT_TRAITS_MEMBER(screenPosition
)
152 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
153 IPC_STRUCT_TRAITS_MEMBER(viewSize
)
154 IPC_STRUCT_TRAITS_MEMBER(fitToView
)
155 IPC_STRUCT_TRAITS_MEMBER(offset
)
156 IPC_STRUCT_TRAITS_MEMBER(scale
)
157 IPC_STRUCT_TRAITS_END()
159 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo
)
160 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
161 IPC_STRUCT_TRAITS_MEMBER(depth
)
162 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
163 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
164 IPC_STRUCT_TRAITS_MEMBER(rect
)
165 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
166 IPC_STRUCT_TRAITS_MEMBER(orientationType
)
167 IPC_STRUCT_TRAITS_MEMBER(orientationAngle
)
168 IPC_STRUCT_TRAITS_END()
170 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem
)
171 IPC_STRUCT_TRAITS_MEMBER(label
)
172 IPC_STRUCT_TRAITS_MEMBER(tool_tip
)
173 IPC_STRUCT_TRAITS_MEMBER(type
)
174 IPC_STRUCT_TRAITS_MEMBER(action
)
175 IPC_STRUCT_TRAITS_MEMBER(rtl
)
176 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
177 IPC_STRUCT_TRAITS_MEMBER(enabled
)
178 IPC_STRUCT_TRAITS_MEMBER(checked
)
179 IPC_STRUCT_TRAITS_MEMBER(submenu
)
180 IPC_STRUCT_TRAITS_END()
182 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion
)
183 IPC_STRUCT_TRAITS_MEMBER(value
)
184 IPC_STRUCT_TRAITS_MEMBER(localized_value
)
185 IPC_STRUCT_TRAITS_MEMBER(label
)
186 IPC_STRUCT_TRAITS_END()
188 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL
)
189 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
190 IPC_STRUCT_TRAITS_MEMBER(icon_type
)
191 IPC_STRUCT_TRAITS_MEMBER(icon_sizes
)
192 IPC_STRUCT_TRAITS_END()
194 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo
)
195 IPC_STRUCT_TRAITS_MEMBER(file_path
)
196 IPC_STRUCT_TRAITS_MEMBER(display_name
)
197 IPC_STRUCT_TRAITS_MEMBER(file_system_url
)
198 IPC_STRUCT_TRAITS_MEMBER(modification_time
)
199 IPC_STRUCT_TRAITS_MEMBER(length
)
200 IPC_STRUCT_TRAITS_MEMBER(is_directory
)
201 IPC_STRUCT_TRAITS_END()
203 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
204 IPC_STRUCT_TRAITS_MEMBER(mode
)
205 IPC_STRUCT_TRAITS_MEMBER(title
)
206 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
207 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
208 IPC_STRUCT_TRAITS_MEMBER(need_local_path
)
209 #if defined(OS_ANDROID)
210 IPC_STRUCT_TRAITS_MEMBER(capture
)
212 IPC_STRUCT_TRAITS_END()
214 #if defined(ENABLE_PLUGINS)
215 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
216 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
217 IPC_STRUCT_TRAITS_MEMBER(render_frame_id
)
218 IPC_STRUCT_TRAITS_MEMBER(document_url
)
219 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
220 IPC_STRUCT_TRAITS_END()
223 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
224 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
225 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
226 IPC_STRUCT_TRAITS_MEMBER(hinting
)
227 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
228 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
229 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
230 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
231 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
232 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
233 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
234 IPC_STRUCT_TRAITS_MEMBER(track_color
)
235 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
236 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
237 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
238 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
239 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests
)
240 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
241 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
242 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors
)
243 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
244 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
245 IPC_STRUCT_TRAITS_MEMBER(enable_webrtc_multiple_routes
)
246 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
247 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
248 IPC_STRUCT_TRAITS_MEMBER(accept_languages
)
249 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes
)
250 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy
)
251 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page
)
252 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed
)
253 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video
)
254 IPC_STRUCT_TRAITS_MEMBER(use_view_overlay_for_all_video
)
255 IPC_STRUCT_TRAITS_MEMBER(network_contry_iso
)
257 IPC_STRUCT_TRAITS_MEMBER(caption_font_family_name
)
258 IPC_STRUCT_TRAITS_MEMBER(caption_font_height
)
259 IPC_STRUCT_TRAITS_MEMBER(small_caption_font_family_name
)
260 IPC_STRUCT_TRAITS_MEMBER(small_caption_font_height
)
261 IPC_STRUCT_TRAITS_MEMBER(menu_font_family_name
)
262 IPC_STRUCT_TRAITS_MEMBER(menu_font_height
)
263 IPC_STRUCT_TRAITS_MEMBER(status_font_family_name
)
264 IPC_STRUCT_TRAITS_MEMBER(status_font_height
)
265 IPC_STRUCT_TRAITS_MEMBER(message_font_family_name
)
266 IPC_STRUCT_TRAITS_MEMBER(message_font_height
)
267 IPC_STRUCT_TRAITS_MEMBER(vertical_scroll_bar_width_in_dips
)
268 IPC_STRUCT_TRAITS_MEMBER(horizontal_scroll_bar_height_in_dips
)
269 IPC_STRUCT_TRAITS_MEMBER(arrow_bitmap_height_vertical_scroll_bar_in_dips
)
270 IPC_STRUCT_TRAITS_MEMBER(arrow_bitmap_width_horizontal_scroll_bar_in_dips
)
272 IPC_STRUCT_TRAITS_END()
274 IPC_STRUCT_TRAITS_BEGIN(content::CookieData
)
275 IPC_STRUCT_TRAITS_MEMBER(name
)
276 IPC_STRUCT_TRAITS_MEMBER(value
)
277 IPC_STRUCT_TRAITS_MEMBER(domain
)
278 IPC_STRUCT_TRAITS_MEMBER(path
)
279 IPC_STRUCT_TRAITS_MEMBER(expires
)
280 IPC_STRUCT_TRAITS_MEMBER(http_only
)
281 IPC_STRUCT_TRAITS_MEMBER(secure
)
282 IPC_STRUCT_TRAITS_MEMBER(session
)
283 IPC_STRUCT_TRAITS_END()
285 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry
)
286 IPC_STRUCT_TRAITS_MEMBER(window
)
287 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
288 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
289 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
290 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
291 IPC_STRUCT_TRAITS_MEMBER(visible
)
292 IPC_STRUCT_TRAITS_END()
294 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
295 IPC_STRUCT_TRAITS_MEMBER(id
)
296 IPC_STRUCT_TRAITS_MEMBER(type
)
297 IPC_STRUCT_TRAITS_MEMBER(params
)
298 IPC_STRUCT_TRAITS_MEMBER(time
)
299 IPC_STRUCT_TRAITS_END()
301 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
302 // Routing ID of the view initiating the open.
303 IPC_STRUCT_MEMBER(int, opener_id
)
305 // True if this open request came in the context of a user gesture.
306 IPC_STRUCT_MEMBER(bool, user_gesture
)
308 // Type of window requested.
309 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
311 // The session storage namespace ID this view should use.
312 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
314 // The name of the resulting frame that should be created (empty if none
315 // has been specified).
316 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
318 // The routing id of the frame initiating the open.
319 IPC_STRUCT_MEMBER(int, opener_render_frame_id
)
321 // The URL of the frame initiating the open.
322 IPC_STRUCT_MEMBER(GURL
, opener_url
)
324 // The URL of the top frame containing the opener.
325 IPC_STRUCT_MEMBER(GURL
, opener_top_level_frame_url
)
327 // The security origin of the frame initiating the open.
328 IPC_STRUCT_MEMBER(GURL
, opener_security_origin
)
330 // Whether the opener will be suppressed in the new window, in which case
331 // scripting the new window is not allowed.
332 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
334 // Whether the window should be opened in the foreground, background, etc.
335 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
337 // The URL that will be loaded in the new window (empty if none has been
339 IPC_STRUCT_MEMBER(GURL
, target_url
)
341 // The referrer that will be used to load |target_url| (empty if none has
343 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
345 // The window features to use for the new view.
346 IPC_STRUCT_MEMBER(blink::WebWindowFeatures
, features
)
348 // The additional window features to use for the new view. We pass these
349 // separately from |features| above because we cannot serialize WebStrings
351 IPC_STRUCT_MEMBER(std::vector
<base::string16
>, additional_features
)
354 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
355 // URL for the worker script.
356 IPC_STRUCT_MEMBER(GURL
, url
)
358 // Name for a SharedWorker, otherwise empty string.
359 IPC_STRUCT_MEMBER(base::string16
, name
)
361 // Security policy used in the worker.
362 IPC_STRUCT_MEMBER(base::string16
, content_security_policy
)
364 // Security policy type used in the worker.
365 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType
, security_policy_type
)
367 // The ID of the parent document (unique within parent renderer).
368 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
370 // RenderFrame routing id used to send messages back to the parent.
371 IPC_STRUCT_MEMBER(int, render_frame_route_id
)
374 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params
)
375 IPC_STRUCT_MEMBER(ui::TextInputType
, dialog_type
)
376 IPC_STRUCT_MEMBER(double, dialog_value
)
377 IPC_STRUCT_MEMBER(double, minimum
)
378 IPC_STRUCT_MEMBER(double, maximum
)
379 IPC_STRUCT_MEMBER(double, step
)
380 IPC_STRUCT_MEMBER(std::vector
<content::DateTimeSuggestion
>, suggestions
)
383 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params
)
384 IPC_STRUCT_MEMBER(gfx::Rect
, anchor_rect
)
385 IPC_STRUCT_MEMBER(blink::WebTextDirection
, anchor_dir
)
386 IPC_STRUCT_MEMBER(gfx::Rect
, focus_rect
)
387 IPC_STRUCT_MEMBER(blink::WebTextDirection
, focus_dir
)
388 IPC_STRUCT_MEMBER(bool, is_anchor_first
)
391 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
392 // The type of input field
393 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
395 // The flags of the input field (autocorrect, autocomplete, etc.)
396 IPC_STRUCT_MEMBER(int, flags
)
398 // The value of the input field
399 IPC_STRUCT_MEMBER(std::string
, value
)
401 // The cursor position of the current selection start, or the caret position
402 // if nothing is selected
403 IPC_STRUCT_MEMBER(int, selection_start
)
405 // The cursor position of the current selection end, or the caret position
406 // if nothing is selected
407 IPC_STRUCT_MEMBER(int, selection_end
)
409 // The start position of the current composition, or -1 if there is none
410 IPC_STRUCT_MEMBER(int, composition_start
)
412 // The end position of the current composition, or -1 if there is none
413 IPC_STRUCT_MEMBER(int, composition_end
)
415 // Whether or not inline composition can be performed for the current input.
416 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
418 // Whether or not the IME should be shown as a result of this update. Even if
419 // true, the IME will only be shown if the type is appropriate (e.g. not
420 // TEXT_INPUT_TYPE_NONE).
421 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
423 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
424 IPC_STRUCT_MEMBER(bool, is_non_ime_change
)
427 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
428 // The size of the RenderView when this message was generated. This is
429 // included so the host knows how large the view is from the perspective of
430 // the renderer process. This is necessary in case a resize operation is in
431 // progress. If auto-resize is enabled, this should update the corresponding
433 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
435 // New window locations for plugin child windows.
436 IPC_STRUCT_MEMBER(std::vector
<content::WebPluginGeometry
>,
439 // The following describes the various bits that may be set in flags:
441 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
442 // Indicates that this is a response to a ViewMsg_Resize message.
444 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
445 // Indicates that this is a response to a ViewMsg_Repaint message.
447 // If flags is zero, then this message corresponds to an unsolicited paint
448 // request by the render view. Any of the above bits may be set in flags,
449 // which would indicate that this paint message is an ACK for multiple
451 IPC_STRUCT_MEMBER(int, flags
)
454 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params
)
455 // Information about the screen (dpi, depth, etc..).
456 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
457 // The size of the renderer.
458 IPC_STRUCT_MEMBER(gfx::Size
, new_size
)
459 // The size of the view's backing surface in non-DPI-adjusted pixels.
460 IPC_STRUCT_MEMBER(gfx::Size
, physical_backing_size
)
461 // Whether or not Blink's viewport size should be shrunk by the height of the
462 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
463 IPC_STRUCT_MEMBER(bool, top_controls_shrink_blink_size
)
464 // The height of the top controls (always 0 on platforms where URL-bar hiding
466 IPC_STRUCT_MEMBER(float, top_controls_height
)
467 // The size of the visible viewport, which may be smaller than the view if the
468 // view is partially occluded (e.g. by a virtual keyboard). The size is in
469 // DPI-adjusted pixels.
470 IPC_STRUCT_MEMBER(gfx::Size
, visible_viewport_size
)
472 IPC_STRUCT_MEMBER(gfx::Rect
, resizer_rect
)
473 // Indicates whether a page is fullscreen or not.
474 IPC_STRUCT_MEMBER(bool, is_fullscreen
)
475 // If set, requests the renderer to reply with a ViewHostMsg_UpdateRect
476 // with the ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK bit set in flags.
477 IPC_STRUCT_MEMBER(bool, needs_resize_ack
)
480 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
481 // Renderer-wide preferences.
482 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
484 // Preferences for this view.
485 IPC_STRUCT_MEMBER(content::WebPreferences
, web_preferences
)
487 // The ID of the view to be created.
488 IPC_STRUCT_MEMBER(int32
, view_id
)
490 // The ID of the main frame hosted in the view.
491 IPC_STRUCT_MEMBER(int32
, main_frame_routing_id
)
493 // The ID of the rendering surface.
494 IPC_STRUCT_MEMBER(int32
, surface_id
)
496 // The session storage namespace ID this view should use.
497 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
499 // The name of the frame associated with this view (or empty if none).
500 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
502 // The route ID of the opener RenderView if we need to set one
503 // (MSG_ROUTING_NONE otherwise).
504 IPC_STRUCT_MEMBER(int, opener_route_id
)
506 // Whether the RenderView should initially be swapped out.
507 IPC_STRUCT_MEMBER(bool, swapped_out
)
509 // In --site-per-process mode, if this view is |swapped_out|, its main frame
510 // will become a RenderFrameProxy. |replicated_frame_state| is used to
511 // replicate information such as security origin to that RenderFrameProxy.
512 IPC_STRUCT_MEMBER(content::FrameReplicationState
, replicated_frame_state
)
514 // The ID of the proxy object for the main frame in this view. It is only
515 // used if |swapped_out| is true.
516 IPC_STRUCT_MEMBER(int32
, proxy_routing_id
)
518 // Whether the RenderView should initially be hidden.
519 IPC_STRUCT_MEMBER(bool, hidden
)
521 // Whether the RenderView will never be visible.
522 IPC_STRUCT_MEMBER(bool, never_visible
)
524 // Whether the window associated with this view was created with an opener.
525 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener
)
527 // The initial page ID to use for this view, which must be larger than any
528 // existing navigation that might be loaded in the view. Page IDs are unique
529 // to a view and are only updated by the renderer after this initial value.
530 IPC_STRUCT_MEMBER(int32
, next_page_id
)
532 // The initial renderer size.
533 IPC_STRUCT_MEMBER(ViewMsg_Resize_Params
, initial_size
)
535 // Whether to enable auto-resize.
536 IPC_STRUCT_MEMBER(bool, enable_auto_resize
)
538 // The minimum size to layout the page if auto-resize is enabled.
539 IPC_STRUCT_MEMBER(gfx::Size
, min_size
)
541 // The maximum size to layout the page if auto-resize is enabled.
542 IPC_STRUCT_MEMBER(gfx::Size
, max_size
)
545 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params
)
546 // Whether the data format is supplied as serialized script value, or as
547 // a simple string. If it is a raw string, must be converted from string to a
548 // WebSerializedScriptValue in renderer.
549 IPC_STRUCT_MEMBER(bool, is_data_raw_string
)
550 // The serialized script value.
551 IPC_STRUCT_MEMBER(base::string16
, data
)
552 // When sent to the browser, this is the routing ID of the source frame in
553 // the source process. The browser replaces it with the routing ID of the
554 // equivalent (swapped out) frame in the destination process.
555 IPC_STRUCT_MEMBER(int, source_routing_id
)
557 // The origin of the source frame.
558 IPC_STRUCT_MEMBER(base::string16
, source_origin
)
560 // The origin for the message's target.
561 IPC_STRUCT_MEMBER(base::string16
, target_origin
)
563 // Information about the MessagePorts this message contains.
564 IPC_STRUCT_MEMBER(std::vector
<content::TransferredMessagePort
>, message_ports
)
565 IPC_STRUCT_MEMBER(std::vector
<int>, new_routing_ids
)
568 // Messages sent from the browser to the renderer.
570 #if defined(OS_ANDROID)
571 // Tells the renderer to cancel an opened date/time dialog.
572 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
574 // Replaces a date time input field.
575 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
,
576 double /* dialog_value */)
580 // Get all savable resource links from current webpage, include main
581 // frame and sub-frame.
582 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage
,
583 GURL
/* url of page which is needed to save */)
585 // Get html data by serializing all frames of current page with lists
586 // which contain all resource links that have local copy.
587 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
588 std::vector
<GURL
> /* urls that have local copy */,
589 std::vector
<base::FilePath
> /* paths of local copy */,
590 base::FilePath
/* local directory path */)
592 // Tells the render side that a ViewHostMsg_LockMouse message has been
593 // processed. |succeeded| indicates whether the mouse has been successfully
595 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
596 bool /* succeeded */)
597 // Tells the render side that the mouse has been unlocked.
598 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
600 // Sent by the browser when the parameters for vsync alignment have changed.
601 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
602 base::TimeTicks
/* timebase */,
603 base::TimeDelta
/* interval */)
605 // Sent when the history is altered outside of navigation. The history list was
606 // reset to |history_length| length, and the offset was reset to be
608 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryOffsetAndLength
,
609 int /* history_offset */,
610 int /* history_length */)
612 // Tells the renderer to create a new view.
613 // This message is slightly different, the view it takes (via
614 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
615 // non-view control message.
616 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
619 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
620 // similar to the new command, but used when the renderer created a view
621 // first, and we need to update it.
622 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
624 // Sends updated preferences to the renderer.
625 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
626 content::RendererPreferences
)
628 // This passes a set of webkit preferences down to the renderer.
629 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
630 content::WebPreferences
)
632 // Informs the renderer that the timezone has changed.
633 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange
)
635 // Tells the render view to close.
636 // Expects a Close_ACK message when finished.
637 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
639 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
640 // is generated in response provided new_size is not empty and not equal to
641 // the view's current size. The generated ViewHostMsg_UpdateRect message will
642 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
643 // we don't have to fetch it every time WebKit asks for it.
644 IPC_MESSAGE_ROUTED1(ViewMsg_Resize
,
645 ViewMsg_Resize_Params
/* params */)
647 // Enables device emulation. See WebDeviceEmulationParams for description.
648 IPC_MESSAGE_ROUTED1(ViewMsg_EnableDeviceEmulation
,
649 blink::WebDeviceEmulationParams
/* params */)
651 // Disables device emulation, enabled previously by EnableDeviceEmulation.
652 IPC_MESSAGE_ROUTED0(ViewMsg_DisableDeviceEmulation
)
654 // Sent to inform the renderer of its screen device color profile. An empty
655 // profile tells the renderer use the default sRGB color profile.
656 IPC_MESSAGE_ROUTED1(ViewMsg_ColorProfile
,
657 std::vector
<char> /* color profile */)
659 // Tells the render view that the resize rect has changed.
660 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
661 gfx::Rect
/* resizer_rect */)
663 // Sent to inform the view that it was hidden. This allows it to reduce its
664 // resource utilization.
665 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
667 // Tells the render view that it is no longer hidden (see WasHidden), and the
668 // render view is expected to respond with a full repaint if needs_repainting
669 // is true. If needs_repainting is false, then this message does not trigger a
670 // message in response.
671 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown
,
672 bool /* needs_repainting */,
673 ui::LatencyInfo
/* latency_info */)
675 // Tells the renderer to focus the first (last if reverse is true) focusable
677 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
680 // Sent to inform the renderer to invoke a context menu.
681 // The parameter specifies the location in the render view's coordinates.
682 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu
,
684 gfx::Point
/* location where menu should be shown */)
686 // Sent when the user wants to search for a word on the page (find in page).
687 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
688 int /* request_id */,
689 base::string16
/* search_text */,
690 blink::WebFindOptions
)
692 // This message notifies the renderer that the user has closed the FindInPage
693 // window (and what action to take regarding the selection).
694 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
695 content::StopFindAction
/* action */)
697 // Copies the image at location x, y to the clipboard (if there indeed is an
698 // image at that location).
699 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
703 // Saves the image at location x, y to the disk (if there indeed is an
704 // image at that location).
705 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt
,
709 // Tells the renderer to perform the given action on the media player
710 // located at the given point.
711 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
712 gfx::Point
, /* location */
713 blink::WebMediaPlayerAction
)
715 // Tells the renderer to perform the given action on the plugin located at
717 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
718 gfx::Point
, /* location */
719 blink::WebPluginAction
)
721 // Posts a message from a frame in another process to the current renderer.
722 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent
,
723 ViewMsg_PostMessage_Params
)
725 // Resets the page scale for the current main frame to the default page scale.
726 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageScale
)
728 // Change the zoom level for the current main frame. If the level actually
729 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
730 // telling it what url got zoomed and what its current zoom level is.
731 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
732 content::PageZoom
/* function */)
734 // Set the zoom level for a particular url that the renderer is in the
735 // process of loading. This will be stored, to be used if the load commits
736 // and ignored otherwise.
737 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
739 double /* zoom_level */)
741 // Set the zoom level for a particular url, so all render views
742 // displaying this url can update their zoom levels to match.
743 // If scheme is empty, then only host is used for matching.
744 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL
,
745 std::string
/* scheme */,
746 std::string
/* host */,
747 double /* zoom_level */)
749 // Set the zoom level for a particular render view.
750 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView
,
751 bool /* uses_temporary_zoom_level */,
752 double /* zoom_level */)
754 // Change encoding of page in the renderer.
755 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
756 std::string
/*new encoding name*/)
758 // Reset encoding of page in the renderer back to default.
759 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
761 // Used to tell a render view whether it should expose various bindings
762 // that allow JS content extended privileges. See BindingsPolicy for valid
764 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
765 int /* enabled_bindings_flags */)
767 // Tell the renderer to add a property to the WebUI binding object. This
768 // only works if we allowed WebUI bindings.
769 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
770 std::string
/* property_name */,
771 std::string
/* property_value_json */)
773 // This message starts/stop monitoring the input method status of the focused
774 // edit control of a renderer process.
776 // * is_active (bool)
777 // Indicates if an input method is active in the browser process.
778 // The possible actions when a renderer process receives this message are
781 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
782 // to notify the input method status of the focused edit control.
783 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
784 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive
,
785 bool /* is_active */)
787 // IME API oncandidatewindow* events for InputMethodContext.
788 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown
)
789 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated
)
790 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden
)
792 // Used to notify the render-view that we have received a target URL. Used
793 // to prevent target URLs spamming the browser.
794 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
796 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
797 std::vector
<content::FileChooserFileInfo
>)
799 // Provides the results of directory enumeration.
800 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
801 int /* request_id */,
802 std::vector
<base::FilePath
> /* files_in_directory */)
804 // When a renderer sends a ViewHostMsg_Focus to the browser process,
805 // the browser has the option of sending a ViewMsg_CantFocus back to
807 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus
)
809 // Tells the renderer to suppress any further modal dialogs until it receives a
810 // corresponding ViewMsg_SwapOut message. This ensures that no
811 // PageGroupLoadDeferrer is on the stack for SwapOut.
812 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut
)
814 // Instructs the renderer to close the current page, including running the
815 // onunload event handler.
817 // Expects a ClosePage_ACK message when finished.
818 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
820 // Notifies the renderer about ui theme changes
821 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
823 // Notifies the renderer that a paint is to be generated for the rectangle
825 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
826 gfx::Size
/* The view size to be repainted */)
828 // Notification that a move or resize renderer's containing window has
830 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
832 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
833 gfx::Rect
/* view_screen_rect */,
834 gfx::Rect
/* window_screen_rect */)
836 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
837 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
838 // processed the move. The browser may have ignored the move, but it finished
839 // processing. This is used because the renderer keeps a temporary cache of
840 // the widget position while these asynchronous operations are in progress.
841 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
843 // Used to instruct the RenderView to send back updates to the preferred size.
844 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
846 // Used to instruct the RenderView to automatically resize and send back
847 // updates for the new size.
848 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
849 gfx::Size
/* min_size */,
850 gfx::Size
/* max_size */)
852 // Used to instruct the RenderView to disalbe automatically resize.
853 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
854 gfx::Size
/* new_size */)
856 // Changes the text direction of the currently selected input field (if any).
857 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
858 blink::WebTextDirection
/* direction */)
860 // Tells the renderer to clear the focused element (if any).
861 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement
)
863 // Make the RenderView background transparent or opaque.
864 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque
, bool /* opaque */)
866 // Used to tell the renderer not to add scrollbars with height and
867 // width below a threshold.
868 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
869 gfx::Size
/* disable_scrollbar_size_limit */)
871 // Activate/deactivate the RenderView (i.e., set its controls' tint
872 // accordingly, etc.).
873 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
876 // Response message to ViewHostMsg_CreateWorker.
877 // Sent when the worker has started.
878 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
880 // Sent when the worker failed to load the worker script.
881 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
882 // But if the shared worker of the same URL already exists and it has failed
883 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
884 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
885 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed
)
887 // Sent when the worker has connected.
888 // This message is sent only if the worker successfully loaded the script.
889 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected
)
891 // Tells the renderer that the network type has changed so that navigator.onLine
892 // and navigator.connection can be updated.
893 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged
,
894 net::NetworkChangeNotifier::ConnectionType
/* type */)
896 #if defined(ENABLE_PLUGINS)
897 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
898 // Tells the renderer that the channel to the broker has been created.
899 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated
,
900 base::ProcessId
/* broker_pid */,
901 IPC::ChannelHandle
/* handle */)
903 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
904 // Tells the renderer whether permission to access to PPAPI broker was granted
906 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult
,
909 // Tells the renderer to empty its plugin list cache, optional reloading
910 // pages containing plugins.
911 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
912 bool /* reload_pages */)
915 // Used to instruct the RenderView to go into "view source" mode.
916 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
918 // Instructs the renderer to save the current page to MHTML.
919 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
921 IPC::PlatformFileForTransit
/* file handle */)
923 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
924 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData
,
927 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
928 // process to release the magnified image.
929 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap
,
930 cc::SharedBitmapId
/* id */)
932 // Fetches complete rendered content of a web page as plain text.
933 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText
)
935 #if defined(OS_MACOSX)
936 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle
, blink::ScrollerStyleOverlay
)
938 // Notification of a change in scrollbar appearance and/or behavior.
939 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme
,
940 float /* initial_button_delay */,
941 float /* autoscroll_button_delay */,
942 bool /* jump_on_track_click */,
943 blink::ScrollerStyle
/* preferred_scroller_style */,
947 #if defined(OS_ANDROID)
948 // Tells the renderer to suspend/resume the webkit timers.
949 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended
,
952 // Sent when the browser wants the bounding boxes of the current find matches.
954 // If match rects are already cached on the browser side, |current_version|
955 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
956 // they came in, so the renderer can tell if it needs to send updated rects.
957 // Otherwise just pass -1 to always receive the list of rects.
959 // There must be an active search string (it is probably most useful to call
960 // this immediately after a ViewHostMsg_Find_Reply message arrives with
961 // final_update set to true).
962 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
963 int /* current_version */)
965 // Notifies the renderer whether hiding/showing the top controls is enabled
966 // and whether or not to animate to the proper state.
967 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState
,
968 bool /* enable_hiding */,
969 bool /* enable_showing */,
972 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded
)
974 // Sent by the browser when an IME update that requires acknowledgement has been
975 // processed on the browser side.
976 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck
)
978 // Extracts the data at the given rect, returning it through the
979 // ViewHostMsg_SmartClipDataExtracted IPC.
980 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData
,
981 gfx::Rect
/* rect */)
983 #elif defined(OS_MACOSX)
984 // Let the RenderView know its window has changed visibility.
985 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
988 // Let the RenderView know its window's frame has changed.
989 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
990 gfx::Rect
/* window frame */,
991 gfx::Rect
/* content view frame */)
993 // Message sent from the browser to the renderer when the user starts or stops
994 // resizing the view.
995 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
998 // Tell the renderer that plugin IME has completed.
999 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
1000 base::string16
/* text */,
1001 int /* plugin_id */)
1004 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
1005 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck
,
1006 uint32
/* output_surface_id */,
1007 cc::CompositorFrameAck
/* ack */)
1009 // Sent by browser to tell renderer compositor that some resources that were
1010 // given to the browser in a swap are not being used anymore.
1011 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources
,
1012 uint32
/* output_surface_id */,
1013 cc::CompositorFrameAck
/* ack */)
1015 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret
)
1017 // Sent by the browser to ask the renderer to redraw.
1018 // If |request_id| is not zero, it is added to the forced frame's latency info
1019 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
1020 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw
,
1021 int /* request_id */)
1023 // Sent by the browser when the renderer should generate a new frame.
1024 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame
,
1025 cc::BeginFrameArgs
/* args */)
1027 // -----------------------------------------------------------------------------
1028 // Messages sent from the renderer to the browser.
1030 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1031 // display events. If |enabled| is true, the BeginFrame message will continue
1032 // to be be delivered until the notification is disabled.
1033 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrames
,
1036 // Sent by the renderer when it is creating a new window. The browser creates
1037 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1038 // MSG_ROUTING_NONE, the view couldn't be created.
1039 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow
,
1040 ViewHostMsg_CreateWindow_Params
,
1042 int /* main_frame_route_id */,
1043 int32
/* surface_id */,
1044 int64
/* cloned_session_storage_namespace_id */)
1046 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1047 // <select> dropdowns. This message is sent to the WebContentsImpl that
1048 // contains the widget being created.
1049 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
1050 int /* opener_id */,
1051 blink::WebPopupType
/* popup type */,
1053 int32
/* surface_id */)
1055 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1057 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1058 int /* opener_id */,
1060 int32
/* surface_id */)
1062 // Asks the browser for a unique routing ID.
1063 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
1064 int /* routing_id */)
1066 // Asks the browser for the default audio hardware configuration.
1067 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig
,
1068 media::AudioParameters
/* input parameters */,
1069 media::AudioParameters
/* output parameters */)
1071 // Asks the browser for the renderer process memory size stats.
1072 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes
,
1073 size_t /* private_bytes */,
1074 size_t /* shared_bytes */)
1076 // These three messages are sent to the parent RenderViewHost to display the
1077 // page/widget that was created by
1078 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1079 // refers to the id that was returned from the Create message above.
1080 // The initial_rect parameter is in screen coordinates.
1082 // FUTURE: there will probably be flags here to control if the result is
1084 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1086 WindowOpenDisposition
/* disposition */,
1087 gfx::Rect
/* initial_rect */,
1088 bool /* opened_by_user_gesture */)
1090 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1092 gfx::Rect
/* initial_rect */)
1094 // Message to show a full screen widget.
1095 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1098 // Indicates the renderer is ready in response to a ViewMsg_New or
1099 // a ViewMsg_CreatingNew_ACK.
1100 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1102 // Sent by the renderer process to request that the browser close the view.
1103 // This corresponds to the window.close() API, and the browser may ignore
1104 // this message. Otherwise, the browser will generates a ViewMsg_Close
1105 // message to close the view.
1106 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1108 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1109 // throttle these messages.
1110 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1112 // Sent by the renderer process to request that the browser move the view.
1113 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1114 // the browser may ignore this message.
1115 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1116 gfx::Rect
/* position */)
1118 // Result of string search in the page.
1119 // Response to ViewMsg_Find with the results of the requested find-in-page
1120 // search, the number of matches found and the selection rect (in screen
1121 // coordinates) for the string found. If |final_update| is false, it signals
1122 // that this is not the last Find_Reply message - more will be sent as the
1123 // scoping effort continues.
1124 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1125 int /* request_id */,
1126 int /* number of matches */,
1127 gfx::Rect
/* selection_rect */,
1128 int /* active_match_ordinal */,
1129 bool /* final_update */)
1131 // Indicates that the render view has been closed in respose to a
1133 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK
,
1134 int /* old_route_id */)
1136 // Indicates that the current page has been closed, after a ClosePage
1138 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1140 // Notifies the browser that we have session history information.
1141 // page_id: unique ID that allows us to distinguish between history entries.
1142 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1143 int32
/* page_id */,
1144 content::PageState
/* state */)
1146 // Notifies the browser that we want to show a destination url for a potential
1147 // action (e.g. when the user is hovering over a link).
1148 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL
,
1151 // Sent when the document element is available for the top-level frame. This
1152 // happens after the page starts loading, but before all resources are
1154 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame
,
1155 bool /* uses_temporary_zoom_level */)
1157 // Sent when the renderer loads a resource from its memory cache.
1158 // The security info is non empty if the resource was originally loaded over
1159 // a secure connection.
1160 // Note: May only be sent once per URL per frame per committed load.
1161 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache
,
1163 std::string
/* security info */,
1164 std::string
/* http method */,
1165 std::string
/* mime type */,
1166 content::ResourceType
/* resource type */)
1168 // Sent when the renderer displays insecure content in a secure page.
1169 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent
)
1171 // Sent when the renderer runs insecure content in a secure origin.
1172 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent
,
1173 std::string
/* security_origin */,
1174 GURL
/* target URL */)
1176 // Sent to update part of the view. In response to this message, the host
1177 // generates a ViewMsg_UpdateRect_ACK message.
1178 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1179 ViewHostMsg_UpdateRect_Params
)
1181 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1182 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1184 // Message sent from renderer to the browser when focus changes inside the
1185 // webpage. The first parameter says whether the newly focused element needs
1186 // keyboard input (true for textfields, text areas and content editable divs).
1187 // The second parameter is the node bounds relative to RenderWidgetHostView.
1188 IPC_MESSAGE_ROUTED2(ViewHostMsg_FocusedNodeChanged
,
1189 bool /* is_editable_node */,
1190 gfx::Rect
/* node_bounds */)
1192 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
, content::WebCursor
)
1194 // Used to set a cookie. The cookie is set asynchronously, but will be
1195 // available to a subsequent ViewHostMsg_GetCookies request.
1196 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie
,
1197 int /* render_frame_id */,
1199 GURL
/* first_party_for_cookies */,
1200 std::string
/* cookie */)
1202 // Used to get cookies for the given URL. This may block waiting for a
1203 // previous SetCookie message to be processed.
1204 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies
,
1205 int /* render_frame_id */,
1207 GURL
/* first_party_for_cookies */,
1208 std::string
/* cookies */)
1210 // Used to get raw cookie information for the given URL. This may block
1211 // waiting for a previous SetCookie message to be processed.
1212 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies
,
1214 GURL
/* first_party_for_cookies */,
1215 std::vector
<content::CookieData
>
1218 // Used to delete cookie for the given URL and name
1219 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie
,
1221 std::string
/* cookie_name */)
1223 // Used to check if cookies are enabled for the given URL. This may block
1224 // waiting for a previous SetCookie message to be processed.
1225 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled
,
1226 int /* render_frame_id */,
1228 GURL
/* first_party_for_cookies */,
1229 bool /* cookies_enabled */)
1231 // Used to get the list of plugins
1232 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins
,
1234 std::vector
<content::WebPluginInfo
> /* plugins */)
1237 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1238 gfx::NativeViewId
/* dummy_activation_window */)
1240 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1241 gfx::NativeViewId
/* dummy_activation_window */)
1243 // Asks the browser for the user's monitor profile.
1244 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile
,
1245 std::vector
<char> /* profile */)
1248 // Get the list of proxies to use for |url|, as a semicolon delimited list
1249 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1250 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1253 std::string
/* proxy list */)
1255 // A renderer sends this to the browser process when it wants to create a
1256 // worker. The browser will create the worker process if necessary, and
1257 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1258 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1259 ViewHostMsg_CreateWorker_Params
,
1262 // A renderer sends this to the browser process when a document has been
1263 // detached. The browser will use this to constrain the lifecycle of worker
1264 // processes (SharedWorkers are shut down when their last associated document
1266 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1267 uint64
/* document_id */)
1269 // Wraps an IPC message that's destined to the worker on the renderer->browser
1271 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1272 IPC::Message
/* message */)
1274 // Tells the browser that a specific Appcache manifest in the current page
1276 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1277 GURL
/* manifest url */,
1278 bool /* blocked by policy */)
1280 // Initiates a download based on user actions like 'ALT+click'.
1281 IPC_MESSAGE_CONTROL4(ViewHostMsg_DownloadUrl
,
1282 int /* render_view_id */,
1284 content::Referrer
/* referrer */,
1285 base::string16
/* suggested_name */)
1287 // Used to go to the session history entry at the given offset (ie, -1 will
1288 // return the "back" item).
1289 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1290 int /* offset (from current) of history item to get */)
1292 // Sent from an inactive renderer for the browser to route to the active
1293 // renderer, instructing it to close.
1294 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1296 // Sent to the browser from an inactive renderer to post a message to the
1298 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent
,
1299 ViewMsg_PostMessage_Params
)
1301 // Notifies that the preferred size of the content changed.
1302 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1303 gfx::Size
/* pref_size */)
1305 // Notifies whether there are JavaScript touch event handlers or not.
1306 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers
,
1307 bool /* has_handlers */)
1309 // A message from HTML-based UI. When (trusted) Javascript calls
1310 // send(message, args), this message is sent to the browser.
1311 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend
,
1312 GURL
/* source_url */,
1313 std::string
/* message */,
1314 base::ListValue
/* args */)
1316 #if defined(ENABLE_PLUGINS)
1317 // A renderer sends this to the browser process when it wants to create a ppapi
1318 // plugin. The browser will create the plugin process if necessary, and will
1319 // return a handle to the channel on success.
1321 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1322 // process. This ID is valid only in the context of the browser process and is
1323 // used to identify the proper process when the renderer notifies it that the
1326 // On error an empty string and null handles are returned.
1327 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin
,
1328 base::FilePath
/* path */,
1329 IPC::ChannelHandle
/* handle to channel */,
1330 base::ProcessId
/* plugin_pid */,
1331 int /* plugin_child_id */)
1333 // Notification that a plugin has created a new plugin instance. The parameters
1335 // -The plugin process ID that we're creating the instance for.
1336 // -The instance ID of the instance being created.
1337 // -A PepperRendererInstanceData struct which contains properties from the
1338 // renderer which are associated with the plugin instance. This includes the
1339 // routing ID of the associated render view and the URL of plugin.
1340 // -Whether the plugin we're creating an instance for is external or internal.
1342 // This message must be sync even though it returns no parameters to avoid
1343 // a race condition with the plugin process. The plugin process sends messages
1344 // to the browser that assume the browser knows about the instance. We need to
1345 // make sure that the browser actually knows about the instance before we tell
1346 // the plugin to run.
1347 IPC_SYNC_MESSAGE_CONTROL4_0(
1348 ViewHostMsg_DidCreateOutOfProcessPepperInstance
,
1349 int /* plugin_child_id */,
1350 int32
/* pp_instance */,
1351 content::PepperRendererInstanceData
/* creation_data */,
1352 bool /* is_external */)
1354 // Notification that a plugin has destroyed an instance. This is the opposite of
1355 // the "DidCreate" message above.
1356 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance
,
1357 int /* plugin_child_id */,
1358 int32
/* pp_instance */,
1359 bool /* is_external */)
1361 // Message from the renderer to the browser indicating the in-process instance
1362 // has been created.
1363 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance
,
1364 int32
/* instance */,
1365 content::PepperRendererInstanceData
/* instance_data */)
1367 // Message from the renderer to the browser indicating the in-process instance
1368 // has been destroyed.
1369 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance
,
1370 int32
/* instance */)
1372 // A renderer sends this to the browser process when it wants to
1373 // create a ppapi broker. The browser will create the broker process
1374 // if necessary, and will return a handle to the channel on success.
1375 // On error an empty string is returned.
1376 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1377 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker
,
1378 int /* routing_id */,
1379 base::FilePath
/* path */)
1381 // A renderer sends this to the browser process when it wants to access a PPAPI
1382 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1383 // for every connection.
1384 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1385 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission
,
1386 int /* routing_id */,
1387 GURL
/* document_url */,
1388 base::FilePath
/* plugin_path */)
1390 // A renderer sends this to the browser process when it throttles or unthrottles
1391 // a plugin instance for the Plugin Power Saver feature.
1392 IPC_MESSAGE_CONTROL3(ViewHostMsg_PluginInstanceThrottleStateChange
,
1393 int /* plugin_child_id */,
1394 int32
/* pp_instance */,
1395 bool /* is_throttled */)
1396 #endif // defined(ENABLE_PLUGINS)
1398 // Send the tooltip text for the current mouse position to the browser.
1399 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText
,
1400 base::string16
/* tooltip text string */,
1401 blink::WebTextDirection
/* text direction hint */)
1403 // Notification that the text selection has changed.
1404 // Note: The secound parameter is the character based offset of the
1406 // text in the document.
1407 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged
,
1408 base::string16
/* text covers the selection range */,
1409 size_t /* the offset of the text in the document */,
1410 gfx::Range
/* selection range in the document */)
1412 // Notification that the selection bounds have changed.
1413 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged
,
1414 ViewHostMsg_SelectionBounds_Params
)
1416 // Asks the browser to display the file chooser. The result is returned in a
1417 // ViewMsg_RunFileChooserResponse message.
1418 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
1419 content::FileChooserParams
)
1421 // Asks the browser to enumerate a directory. This is equivalent to running
1422 // the file chooser in directory-enumeration mode and having the user select
1423 // the given directory. The result is returned in a
1424 // ViewMsg_EnumerateDirectoryResponse message.
1425 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
1426 int /* request_id */,
1427 base::FilePath
/* file_path */)
1429 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1430 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1431 // a string only to work around size limitations for GURLs in IPC messages.
1432 IPC_MESSAGE_CONTROL2(ViewHostMsg_SaveImageFromDataURL
,
1433 int /* render_view_id */,
1434 std::string
/* data_url */)
1436 // Tells the browser to move the focus to the next (previous if reverse is
1437 // true) focusable element.
1438 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
1441 // Required for opening a date/time dialog
1442 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog
,
1443 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
1445 IPC_MESSAGE_ROUTED4(ViewHostMsg_TextInputTypeChanged
,
1446 ui::TextInputType
/* TextInputType of the focused node */,
1447 ui::TextInputMode
/* TextInputMode of the focused node */,
1448 bool /* can_compose_inline in the focused node */,
1449 int /* flags in the focused node */)
1451 // Required for updating text input state.
1452 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
1453 ViewHostMsg_TextInputState_Params
/* input state params */)
1455 // Sent when the renderer changes the zoom level for a particular url, so the
1456 // browser can update its records. If the view is a plugin doc, then url is
1457 // used to update the zoom level for all pages in that site. Otherwise, the
1458 // render view's id is used so that only the menu is updated.
1459 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL
,
1460 double /* zoom_level */,
1463 // Sent when the renderer changes its page scale factor and whether or not the
1464 // page scale factor is one changes.
1465 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageScaleFactorIsOneChanged
, bool /* is_one */)
1467 // Updates the minimum/maximum allowed zoom percent for this tab from the
1468 // default values. If |remember| is true, then the zoom setting is applied to
1469 // other pages in the site and is saved, otherwise it only applies to this
1471 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits
,
1472 int /* minimum_percent */,
1473 int /* maximum_percent */)
1475 // Notify the browser that this render process can or can't be suddenly
1477 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged
,
1480 IPC_MESSAGE_ROUTED3(
1481 ViewHostMsg_SwapCompositorFrame
,
1482 uint32
/* output_surface_id */,
1483 cc::CompositorFrame
/* frame */,
1484 std::vector
<IPC::Message
> /* messages_to_deliver_with_frame */)
1486 //---------------------------------------------------------------------------
1487 // Request for cryptographic operation messages:
1488 // These are messages from the renderer to the browser to perform a
1489 // cryptographic operation.
1491 // Asks the browser process to generate a keypair for grabbing a client
1492 // certificate from a CA (<keygen> tag), and returns the signed public
1493 // key and challenge string.
1494 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen
,
1495 uint32
/* key size index */,
1496 std::string
/* challenge string */,
1497 GURL
/* URL of requestor */,
1498 std::string
/* signed public key and challenge */)
1500 // Message sent from the renderer to the browser to request that the browser
1501 // cache |data| associated with |url| and |expected_response_time|.
1502 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata
,
1504 base::Time
/* expected_response_time */,
1505 std::vector
<char> /* data */)
1507 // Register a new handler for URL requests with the given scheme.
1508 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler
,
1509 std::string
/* scheme */,
1511 base::string16
/* title */,
1512 bool /* user_gesture */)
1514 // Unregister the registered handler for URL requests with the given scheme.
1515 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler
,
1516 std::string
/* scheme */,
1518 bool /* user_gesture */)
1520 // Send back a string to be recorded by UserMetrics.
1521 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
1522 std::string
/* action */)
1524 // Notifies the browser that the page was or was not saved as MHTML.
1525 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
1527 int64
/* size of the MHTML file, -1 if error */)
1529 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks
,
1530 std::vector
<GURL
> /* all savable resource links */,
1531 std::vector
<content::Referrer
> /* all referrers */,
1532 std::vector
<GURL
> /* all frame links */)
1534 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
1535 GURL
/* frame's url */,
1536 std::string
/* data buffer */,
1537 int32
/* complete status */)
1539 // Notifies the browser of an event occurring in the media pipeline.
1540 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents
,
1541 std::vector
<media::MediaLogEvent
> /* events */)
1543 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1545 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1546 // pop up a bubble to ask for user permission or take mouse lock content into
1548 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
1549 bool /* user_gesture */,
1550 bool /* last_unlocked_by_target */,
1551 bool /* privileged */)
1553 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1554 // whenever the mouse is unlocked (which may or may not be caused by
1555 // ViewHostMsg_UnlockMouse).
1556 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
1558 // Notifies that multiple touch targets may have been pressed, and to show
1559 // the disambiguation popup.
1560 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
1561 gfx::Rect
, /* Border of touched targets */
1562 gfx::Size
, /* Size of zoomed image */
1563 cc::SharedBitmapId
/* id */)
1565 // Sent by the renderer process to check whether client 3D APIs
1566 // (Pepper 3D, WebGL) are explicitly blocked.
1567 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked
,
1568 int /* render_view_id */,
1569 GURL
/* top_origin_url */,
1570 content::ThreeDAPIType
/* requester */,
1573 // Sent by the renderer process to indicate that a context was lost by
1574 // client 3D content (Pepper 3D, WebGL) running on the page at the
1576 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext
,
1577 GURL
/* top_origin_url */,
1578 content::ThreeDAPIType
/* context_type */,
1579 int /* arb_robustness_status_code */)
1581 // Notifies the browser that document has parsed the body. This is used by the
1582 // ResourceScheduler as an indication that bandwidth contention won't block
1584 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody
)
1586 // Notification that the urls for the favicon of a site has been determined.
1587 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL
,
1588 std::vector
<content::FaviconURL
> /* candidates */)
1590 // Message sent from renderer to the browser when the element that is focused
1591 // has been touched. A bool is passed in this message which indicates if the
1592 // node is editable.
1593 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched
,
1594 bool /* editable */)
1596 // Message sent from the renderer to the browser when an HTML form has failed
1597 // validation constraints.
1598 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage
,
1599 gfx::Rect
/* anchor rectangle in root view coordinate */,
1600 base::string16
/* validation message */,
1601 base::string16
/* supplemental text */)
1603 // Message sent from the renderer to the browser when a HTML form validation
1604 // message should be hidden from view.
1605 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage
)
1607 // Message sent from the renderer to the browser when the suggested co-ordinates
1608 // of the anchor for a HTML form validation message have changed.
1609 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage
,
1610 gfx::Rect
/* anchor rectangle in root view coordinate */)
1612 #if defined(OS_ANDROID)
1613 // Response to ViewMsg_FindMatchRects.
1615 // |version| will contain the current version number of the renderer's find
1616 // match list (incremented whenever they change), which should be passed in the
1617 // next call to ViewMsg_FindMatchRects.
1619 // |rects| will either contain a list of the enclosing rects of all matches
1620 // found by the most recent Find operation, or will be empty if |version| is not
1621 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1622 // your locally cached rects should still be valid). The rect coords will be
1623 // custom normalized fractions of the document size. The rects will be sorted by
1624 // frame traversal order starting in the main frame, then by dom order.
1626 // |active_rect| will contain the bounding box of the active find-in-page match
1627 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1628 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
1630 std::vector
<gfx::RectF
> /* rects */,
1631 gfx::RectF
/* active_rect */)
1633 // Start an android intent with the given URI.
1634 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
1635 GURL
/* content_url */)
1637 // Message sent when the renderer changed the background color for the view.
1638 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor
,
1639 uint32
/* bg_color */)
1641 // This message runs the MediaCodec for decoding audio for webaudio.
1642 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec
,
1643 base::SharedMemoryHandle
/* encoded_data_handle */,
1644 base::FileDescriptor
/* pcm_output */,
1645 uint32_t /* data_size*/)
1647 // Reply to the ViewMsg_ExtractSmartClipData message.
1648 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted
,
1649 base::string16
/* text */,
1650 base::string16
/* html */,
1651 gfx::Rect
/* rect */)
1653 // Notifies that an unhandled tap has occurred at the specified x,y position
1654 // and that the UI may need to be triggered.
1655 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowUnhandledTapUIIfNeeded
,
1659 #elif defined(OS_MACOSX)
1660 // Request that the browser load a font into shared memory for us.
1661 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont
,
1662 FontDescriptor
/* font to load */,
1663 uint32
/* buffer size */,
1664 base::SharedMemoryHandle
/* font data */,
1665 uint32
/* font id */)
1667 // Informs the browser that a plugin has gained or lost focus.
1668 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
1670 int /* plugin_id */)
1672 // Instructs the browser to start plugin IME.
1673 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
1675 // Receives content of a web page as plain text.
1676 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted
, std::string
);
1678 #elif defined(OS_WIN)
1679 // Request that the given font characters be loaded by the browser so it's
1680 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1682 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters
,
1683 LOGFONT
/* font_data */,
1684 base::string16
/* characters */)
1687 // Adding a new message? Stick to the sort order above: first platform
1688 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1689 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.