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