Apply _RELATIVE relocations ahead of others.
[chromium-blink-merge.git] / content / common / view_messages.h
blob426ac1faa1213af5657497bcc4901e15d81c1674
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // IPC messages for page rendering.
6 // Multiply-included message file, hence no include guard.
8 #include "base/memory/shared_memory.h"
9 #include "base/process/process.h"
10 #include "base/strings/string16.h"
11 #include "cc/output/begin_frame_args.h"
12 #include "cc/output/compositor_frame.h"
13 #include "cc/output/compositor_frame_ack.h"
14 #include "content/common/content_export.h"
15 #include "content/common/content_param_traits.h"
16 #include "content/common/cookie_data.h"
17 #include "content/common/date_time_suggestion.h"
18 #include "content/common/navigation_gesture.h"
19 #include "content/common/view_message_enums.h"
20 #include "content/common/webplugin_geometry.h"
21 #include "content/public/common/common_param_traits.h"
22 #include "content/public/common/favicon_url.h"
23 #include "content/public/common/file_chooser_file_info.h"
24 #include "content/public/common/file_chooser_params.h"
25 #include "content/public/common/menu_item.h"
26 #include "content/public/common/page_state.h"
27 #include "content/public/common/page_zoom.h"
28 #include "content/public/common/referrer.h"
29 #include "content/public/common/renderer_preferences.h"
30 #include "content/public/common/stop_find_action.h"
31 #include "content/public/common/three_d_api_types.h"
32 #include "content/public/common/window_container_type.h"
33 #include "ipc/ipc_channel_handle.h"
34 #include "ipc/ipc_message_macros.h"
35 #include "ipc/ipc_platform_file.h"
36 #include "media/audio/audio_parameters.h"
37 #include "media/base/channel_layout.h"
38 #include "media/base/media_log_event.h"
39 #include "net/base/network_change_notifier.h"
40 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
41 #include "third_party/WebKit/public/platform/WebFloatRect.h"
42 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
43 #include "third_party/WebKit/public/web/WebFindOptions.h"
44 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
45 #include "third_party/WebKit/public/web/WebPluginAction.h"
46 #include "third_party/WebKit/public/web/WebPopupType.h"
47 #include "third_party/WebKit/public/web/WebTextDirection.h"
48 #include "third_party/skia/include/core/SkBitmap.h"
49 #include "ui/base/ime/text_input_mode.h"
50 #include "ui/base/ime/text_input_type.h"
51 #include "ui/base/ui_base_types.h"
52 #include "ui/gfx/ipc/gfx_param_traits.h"
53 #include "ui/gfx/point.h"
54 #include "ui/gfx/range/range.h"
55 #include "ui/gfx/rect.h"
56 #include "ui/gfx/rect_f.h"
57 #include "ui/gfx/vector2d.h"
58 #include "ui/gfx/vector2d_f.h"
60 #if defined(OS_MACOSX)
61 #include "content/common/mac/font_descriptor.h"
62 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
63 #endif
65 #if defined(ENABLE_PLUGINS)
66 #include "content/common/pepper_renderer_instance_data.h"
67 #endif
69 #undef IPC_MESSAGE_EXPORT
70 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
72 #define IPC_MESSAGE_START ViewMsgStart
74 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type,
75 blink::WebMediaPlayerAction::Type::TypeLast)
76 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type,
77 blink::WebPluginAction::Type::TypeLast)
78 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType,
79 blink::WebPopupType::WebPopupTypeLast)
80 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection,
81 blink::WebTextDirection::WebTextDirectionLast)
82 IPC_ENUM_TRAITS(WindowContainerType)
83 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
84 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
85 IPC_ENUM_TRAITS(content::MenuItem::Type)
86 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture,
87 content::NavigationGestureLast)
88 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom,
89 content::PageZoom::PAGE_ZOOM_OUT,
90 content::PageZoom::PAGE_ZOOM_IN)
91 IPC_ENUM_TRAITS(gfx::FontRenderParams::Hinting)
92 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering)
93 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
94 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
95 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
96 content::STOP_FIND_ACTION_LAST)
97 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
98 content::THREE_D_API_TYPE_LAST)
99 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1)
100 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
101 media::MediaLogEvent::TYPE_LAST)
102 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
103 IPC_ENUM_TRAITS(ui::TextInputType)
105 #if defined(OS_MACOSX)
106 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
107 IPC_STRUCT_TRAITS_MEMBER(font_name)
108 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
109 IPC_STRUCT_TRAITS_END()
110 #endif
112 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
113 IPC_STRUCT_TRAITS_MEMBER(forward)
114 IPC_STRUCT_TRAITS_MEMBER(matchCase)
115 IPC_STRUCT_TRAITS_MEMBER(findNext)
116 IPC_STRUCT_TRAITS_END()
118 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
119 IPC_STRUCT_TRAITS_MEMBER(type)
120 IPC_STRUCT_TRAITS_MEMBER(enable)
121 IPC_STRUCT_TRAITS_END()
123 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
124 IPC_STRUCT_TRAITS_MEMBER(type)
125 IPC_STRUCT_TRAITS_MEMBER(enable)
126 IPC_STRUCT_TRAITS_END()
128 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
129 IPC_STRUCT_TRAITS_MEMBER(x)
130 IPC_STRUCT_TRAITS_MEMBER(y)
131 IPC_STRUCT_TRAITS_END()
133 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
134 IPC_STRUCT_TRAITS_MEMBER(x)
135 IPC_STRUCT_TRAITS_MEMBER(y)
136 IPC_STRUCT_TRAITS_MEMBER(width)
137 IPC_STRUCT_TRAITS_MEMBER(height)
138 IPC_STRUCT_TRAITS_END()
140 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
141 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
142 IPC_STRUCT_TRAITS_MEMBER(depth)
143 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
144 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
145 IPC_STRUCT_TRAITS_MEMBER(rect)
146 IPC_STRUCT_TRAITS_MEMBER(availableRect)
147 IPC_STRUCT_TRAITS_MEMBER(orientationType)
148 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
149 IPC_STRUCT_TRAITS_END()
151 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
152 IPC_STRUCT_TRAITS_MEMBER(label)
153 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
154 IPC_STRUCT_TRAITS_MEMBER(type)
155 IPC_STRUCT_TRAITS_MEMBER(action)
156 IPC_STRUCT_TRAITS_MEMBER(rtl)
157 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
158 IPC_STRUCT_TRAITS_MEMBER(enabled)
159 IPC_STRUCT_TRAITS_MEMBER(checked)
160 IPC_STRUCT_TRAITS_MEMBER(submenu)
161 IPC_STRUCT_TRAITS_END()
163 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
164 IPC_STRUCT_TRAITS_MEMBER(value)
165 IPC_STRUCT_TRAITS_MEMBER(localized_value)
166 IPC_STRUCT_TRAITS_MEMBER(label)
167 IPC_STRUCT_TRAITS_END()
169 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
170 IPC_STRUCT_TRAITS_MEMBER(icon_url)
171 IPC_STRUCT_TRAITS_MEMBER(icon_type)
172 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
173 IPC_STRUCT_TRAITS_END()
175 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
176 IPC_STRUCT_TRAITS_MEMBER(file_path)
177 IPC_STRUCT_TRAITS_MEMBER(display_name)
178 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
179 IPC_STRUCT_TRAITS_MEMBER(modification_time)
180 IPC_STRUCT_TRAITS_MEMBER(length)
181 IPC_STRUCT_TRAITS_MEMBER(is_directory)
182 IPC_STRUCT_TRAITS_END()
184 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
185 IPC_STRUCT_TRAITS_MEMBER(mode)
186 IPC_STRUCT_TRAITS_MEMBER(title)
187 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
188 IPC_STRUCT_TRAITS_MEMBER(accept_types)
189 IPC_STRUCT_TRAITS_MEMBER(need_local_path)
190 #if defined(OS_ANDROID)
191 IPC_STRUCT_TRAITS_MEMBER(capture)
192 #endif
193 IPC_STRUCT_TRAITS_END()
195 #if defined(ENABLE_PLUGINS)
196 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
197 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
198 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
199 IPC_STRUCT_TRAITS_MEMBER(document_url)
200 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
201 IPC_STRUCT_TRAITS_END()
202 #endif
204 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
205 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
206 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
207 IPC_STRUCT_TRAITS_MEMBER(hinting)
208 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
209 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
210 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
211 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
212 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
213 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
214 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
215 IPC_STRUCT_TRAITS_MEMBER(track_color)
216 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
217 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
218 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
219 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
220 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
221 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
222 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
223 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
224 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
225 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
226 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
227 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
228 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
229 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
230 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
231 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
232 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
233 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
234 IPC_STRUCT_TRAITS_END()
236 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
237 IPC_STRUCT_TRAITS_MEMBER(name)
238 IPC_STRUCT_TRAITS_MEMBER(value)
239 IPC_STRUCT_TRAITS_MEMBER(domain)
240 IPC_STRUCT_TRAITS_MEMBER(path)
241 IPC_STRUCT_TRAITS_MEMBER(expires)
242 IPC_STRUCT_TRAITS_MEMBER(http_only)
243 IPC_STRUCT_TRAITS_MEMBER(secure)
244 IPC_STRUCT_TRAITS_MEMBER(session)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
248 IPC_STRUCT_TRAITS_MEMBER(window)
249 IPC_STRUCT_TRAITS_MEMBER(window_rect)
250 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
251 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
252 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
253 IPC_STRUCT_TRAITS_MEMBER(visible)
254 IPC_STRUCT_TRAITS_END()
256 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
257 IPC_STRUCT_TRAITS_MEMBER(id)
258 IPC_STRUCT_TRAITS_MEMBER(type)
259 IPC_STRUCT_TRAITS_MEMBER(params)
260 IPC_STRUCT_TRAITS_MEMBER(time)
261 IPC_STRUCT_TRAITS_END()
263 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
264 // Routing ID of the view initiating the open.
265 IPC_STRUCT_MEMBER(int, opener_id)
267 // True if this open request came in the context of a user gesture.
268 IPC_STRUCT_MEMBER(bool, user_gesture)
270 // Type of window requested.
271 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
273 // The session storage namespace ID this view should use.
274 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
276 // The name of the resulting frame that should be created (empty if none
277 // has been specified).
278 IPC_STRUCT_MEMBER(base::string16, frame_name)
280 // The routing id of the frame initiating the open.
281 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
283 // The URL of the frame initiating the open.
284 IPC_STRUCT_MEMBER(GURL, opener_url)
286 // The URL of the top frame containing the opener.
287 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
289 // The security origin of the frame initiating the open.
290 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
292 // Whether the opener will be suppressed in the new window, in which case
293 // scripting the new window is not allowed.
294 IPC_STRUCT_MEMBER(bool, opener_suppressed)
296 // Whether the window should be opened in the foreground, background, etc.
297 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
299 // The URL that will be loaded in the new window (empty if none has been
300 // sepcified).
301 IPC_STRUCT_MEMBER(GURL, target_url)
303 // The referrer that will be used to load |target_url| (empty if none has
304 // been specified).
305 IPC_STRUCT_MEMBER(content::Referrer, referrer)
307 // The window features to use for the new view.
308 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
310 // The additional window features to use for the new view. We pass these
311 // separately from |features| above because we cannot serialize WebStrings
312 // over IPC.
313 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
314 IPC_STRUCT_END()
316 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
317 // URL for the worker script.
318 IPC_STRUCT_MEMBER(GURL, url)
320 // Name for a SharedWorker, otherwise empty string.
321 IPC_STRUCT_MEMBER(base::string16, name)
323 // Security policy used in the worker.
324 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
326 // Security policy type used in the worker.
327 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
329 // The ID of the parent document (unique within parent renderer).
330 IPC_STRUCT_MEMBER(unsigned long long, document_id)
332 // RenderFrame routing id used to send messages back to the parent.
333 IPC_STRUCT_MEMBER(int, render_frame_route_id)
334 IPC_STRUCT_END()
336 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
337 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
338 IPC_STRUCT_MEMBER(double, dialog_value)
339 IPC_STRUCT_MEMBER(double, minimum)
340 IPC_STRUCT_MEMBER(double, maximum)
341 IPC_STRUCT_MEMBER(double, step)
342 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
343 IPC_STRUCT_END()
345 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
346 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
347 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
348 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
349 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
350 IPC_STRUCT_MEMBER(bool, is_anchor_first)
351 IPC_STRUCT_END()
353 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
354 // The type of input field
355 IPC_STRUCT_MEMBER(ui::TextInputType, type)
357 // The flags of the input field (autocorrect, autocomplete, etc.)
358 IPC_STRUCT_MEMBER(int, flags)
360 // The value of the input field
361 IPC_STRUCT_MEMBER(std::string, value)
363 // The cursor position of the current selection start, or the caret position
364 // if nothing is selected
365 IPC_STRUCT_MEMBER(int, selection_start)
367 // The cursor position of the current selection end, or the caret position
368 // if nothing is selected
369 IPC_STRUCT_MEMBER(int, selection_end)
371 // The start position of the current composition, or -1 if there is none
372 IPC_STRUCT_MEMBER(int, composition_start)
374 // The end position of the current composition, or -1 if there is none
375 IPC_STRUCT_MEMBER(int, composition_end)
377 // Whether or not inline composition can be performed for the current input.
378 IPC_STRUCT_MEMBER(bool, can_compose_inline)
380 // Whether or not the IME should be shown as a result of this update. Even if
381 // true, the IME will only be shown if the type is appropriate (e.g. not
382 // TEXT_INPUT_TYPE_NONE).
383 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
385 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
386 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
387 IPC_STRUCT_END()
389 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
390 // The size of the RenderView when this message was generated. This is
391 // included so the host knows how large the view is from the perspective of
392 // the renderer process. This is necessary in case a resize operation is in
393 // progress. If auto-resize is enabled, this should update the corresponding
394 // view size.
395 IPC_STRUCT_MEMBER(gfx::Size, view_size)
397 // New window locations for plugin child windows.
398 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
399 plugin_window_moves)
401 // The following describes the various bits that may be set in flags:
403 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
404 // Indicates that this is a response to a ViewMsg_Resize message.
406 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
407 // Indicates that this is a response to a ViewMsg_Repaint message.
409 // If flags is zero, then this message corresponds to an unsolicited paint
410 // request by the render view. Any of the above bits may be set in flags,
411 // which would indicate that this paint message is an ACK for multiple
412 // request messages.
413 IPC_STRUCT_MEMBER(int, flags)
414 IPC_STRUCT_END()
416 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
417 // Renderer-wide preferences.
418 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
420 // Preferences for this view.
421 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
423 // The ID of the view to be created.
424 IPC_STRUCT_MEMBER(int32, view_id)
426 // The ID of the main frame hosted in the view.
427 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
429 // The ID of the rendering surface.
430 IPC_STRUCT_MEMBER(int32, surface_id)
432 // The session storage namespace ID this view should use.
433 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
435 // The name of the frame associated with this view (or empty if none).
436 IPC_STRUCT_MEMBER(base::string16, frame_name)
438 // The route ID of the opener RenderView if we need to set one
439 // (MSG_ROUTING_NONE otherwise).
440 IPC_STRUCT_MEMBER(int, opener_route_id)
442 // Whether the RenderView should initially be swapped out.
443 IPC_STRUCT_MEMBER(bool, swapped_out)
445 // The ID of the proxy object for the main frame in this view. It is only
446 // used if |swapped_out| is true.
447 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
449 // Whether the RenderView should initially be hidden.
450 IPC_STRUCT_MEMBER(bool, hidden)
452 // Whether the RenderView will never be visible.
453 IPC_STRUCT_MEMBER(bool, never_visible)
455 // Whether the window associated with this view was created with an opener.
456 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
458 // The initial page ID to use for this view, which must be larger than any
459 // existing navigation that might be loaded in the view. Page IDs are unique
460 // to a view and are only updated by the renderer after this initial value.
461 IPC_STRUCT_MEMBER(int32, next_page_id)
463 // The properties of the screen associated with the view.
464 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
465 IPC_STRUCT_END()
467 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
468 // Whether the data format is supplied as serialized script value, or as
469 // a simple string. If it is a raw string, must be converted from string to a
470 // WebSerializedScriptValue in renderer.
471 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
472 // The serialized script value.
473 IPC_STRUCT_MEMBER(base::string16, data)
474 // When sent to the browser, this is the routing ID of the source frame in
475 // the source process. The browser replaces it with the routing ID of the
476 // equivalent (swapped out) frame in the destination process.
477 IPC_STRUCT_MEMBER(int, source_routing_id)
479 // The origin of the source frame.
480 IPC_STRUCT_MEMBER(base::string16, source_origin)
482 // The origin for the message's target.
483 IPC_STRUCT_MEMBER(base::string16, target_origin)
485 // Information about the MessagePorts this message contains.
486 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
487 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
488 IPC_STRUCT_END()
490 // Messages sent from the browser to the renderer.
492 #if defined(OS_ANDROID)
493 // Tells the renderer to cancel an opened date/time dialog.
494 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
496 // Replaces a date time input field.
497 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
498 double /* dialog_value */)
500 #endif
502 // Get all savable resource links from current webpage, include main
503 // frame and sub-frame.
504 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
505 GURL /* url of page which is needed to save */)
507 // Get html data by serializing all frames of current page with lists
508 // which contain all resource links that have local copy.
509 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
510 std::vector<GURL> /* urls that have local copy */,
511 std::vector<base::FilePath> /* paths of local copy */,
512 base::FilePath /* local directory path */)
514 // Tells the render side that a ViewHostMsg_LockMouse message has been
515 // processed. |succeeded| indicates whether the mouse has been successfully
516 // locked or not.
517 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
518 bool /* succeeded */)
519 // Tells the render side that the mouse has been unlocked.
520 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
522 // Sent by the browser when the parameters for vsync alignment have changed.
523 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
524 base::TimeTicks /* timebase */,
525 base::TimeDelta /* interval */)
527 // Sent to the RenderView when a new tab is swapped into an existing
528 // tab and the histories need to be merged. The existing tab has a history of
529 // |merged_history_length| which precedes the history of the new tab. All
530 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
532 // For example, suppose the history of page_ids in the new tab's RenderView
533 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
534 // all pages in the new tab with page_id >= 7 are to be preserved.
535 // The resulting page history is [-1 -1 -1 7 8].
536 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
537 int, /* merge_history_length */
538 int32 /* minimum_page_id */)
540 // Tells the renderer to create a new view.
541 // This message is slightly different, the view it takes (via
542 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
543 // non-view control message.
544 IPC_MESSAGE_CONTROL1(ViewMsg_New,
545 ViewMsg_New_Params)
547 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
548 // similar to the new command, but used when the renderer created a view
549 // first, and we need to update it.
550 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
552 // Sends updated preferences to the renderer.
553 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
554 content::RendererPreferences)
556 // This passes a set of webkit preferences down to the renderer.
557 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
558 content::WebPreferences)
560 // Informs the renderer that the timezone has changed.
561 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
563 // Tells the render view to close.
564 // Expects a Close_ACK message when finished.
565 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
567 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
568 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
569 IPC_STRUCT_MEMBER(gfx::Size, new_size)
570 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
571 IPC_STRUCT_MEMBER(float, top_controls_layout_height)
572 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
573 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
574 IPC_STRUCT_MEMBER(bool, is_fullscreen)
575 IPC_STRUCT_END()
577 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
578 // is generated in response provided new_size is not empty and not equal to
579 // the view's current size. The generated ViewHostMsg_UpdateRect message will
580 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
581 // we don't have to fetch it every time WebKit asks for it.
582 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
583 ViewMsg_Resize_Params /* params */)
585 // Sent to inform the renderer of its screen device color profile. An empty
586 // profile tells the renderer use the default sRGB color profile.
587 IPC_MESSAGE_ROUTED1(ViewMsg_ColorProfile,
588 std::vector<char> /* color profile */)
590 // Tells the render view that the resize rect has changed.
591 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
592 gfx::Rect /* resizer_rect */)
594 // Sent to inform the view that it was hidden. This allows it to reduce its
595 // resource utilization.
596 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
598 // Tells the render view that it is no longer hidden (see WasHidden), and the
599 // render view is expected to respond with a full repaint if needs_repainting
600 // is true. If needs_repainting is false, then this message does not trigger a
601 // message in response.
602 IPC_MESSAGE_ROUTED2(ViewMsg_WasShown,
603 bool /* needs_repainting */,
604 ui::LatencyInfo /* latency_info */)
606 // Tells the renderer to focus the first (last if reverse is true) focusable
607 // node.
608 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
609 bool /* reverse */)
611 // Sent to inform the renderer to invoke a context menu.
612 // The parameter specifies the location in the render view's coordinates.
613 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
614 ui::MenuSourceType,
615 gfx::Point /* location where menu should be shown */)
617 // Sent when the user wants to search for a word on the page (find in page).
618 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
619 int /* request_id */,
620 base::string16 /* search_text */,
621 blink::WebFindOptions)
623 // This message notifies the renderer that the user has closed the FindInPage
624 // window (and what action to take regarding the selection).
625 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
626 content::StopFindAction /* action */)
628 // Copies the image at location x, y to the clipboard (if there indeed is an
629 // image at that location).
630 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
631 int /* x */,
632 int /* y */)
634 // Saves the image at location x, y to the disk (if there indeed is an
635 // image at that location).
636 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
637 int /* x */,
638 int /* y */)
640 // Tells the renderer to perform the given action on the media player
641 // located at the given point.
642 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
643 gfx::Point, /* location */
644 blink::WebMediaPlayerAction)
646 // Tells the renderer to perform the given action on the plugin located at
647 // the given point.
648 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
649 gfx::Point, /* location */
650 blink::WebPluginAction)
652 // Posts a message from a frame in another process to the current renderer.
653 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
654 ViewMsg_PostMessage_Params)
656 // Change the zoom level for the current main frame. If the level actually
657 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
658 // telling it what url got zoomed and what its current zoom level is.
659 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
660 content::PageZoom /* function */)
662 // Set the zoom level for a particular url that the renderer is in the
663 // process of loading. This will be stored, to be used if the load commits
664 // and ignored otherwise.
665 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
666 GURL /* url */,
667 double /* zoom_level */)
669 // Set the zoom level for a particular url, so all render views
670 // displaying this url can update their zoom levels to match.
671 // If scheme is empty, then only host is used for matching.
672 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
673 std::string /* scheme */,
674 std::string /* host */,
675 double /* zoom_level */)
677 // Set the zoom level for a particular render view.
678 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
679 bool /* uses_temporary_zoom_level */,
680 double /* zoom_level */)
682 // Change encoding of page in the renderer.
683 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
684 std::string /*new encoding name*/)
686 // Reset encoding of page in the renderer back to default.
687 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
689 // Used to tell a render view whether it should expose various bindings
690 // that allow JS content extended privileges. See BindingsPolicy for valid
691 // flag values.
692 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
693 int /* enabled_bindings_flags */)
695 // Tell the renderer to add a property to the WebUI binding object. This
696 // only works if we allowed WebUI bindings.
697 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
698 std::string /* property_name */,
699 std::string /* property_value_json */)
701 // This message starts/stop monitoring the input method status of the focused
702 // edit control of a renderer process.
703 // Parameters
704 // * is_active (bool)
705 // Indicates if an input method is active in the browser process.
706 // The possible actions when a renderer process receives this message are
707 // listed below:
708 // Value Action
709 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
710 // to notify the input method status of the focused edit control.
711 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
712 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
713 bool /* is_active */)
715 // IME API oncandidatewindow* events for InputMethodContext.
716 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
717 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
718 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
720 // Used to notify the render-view that we have received a target URL. Used
721 // to prevent target URLs spamming the browser.
722 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
724 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
725 std::vector<content::FileChooserFileInfo>)
727 // Provides the results of directory enumeration.
728 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
729 int /* request_id */,
730 std::vector<base::FilePath> /* files_in_directory */)
732 // When a renderer sends a ViewHostMsg_Focus to the browser process,
733 // the browser has the option of sending a ViewMsg_CantFocus back to
734 // the renderer.
735 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
737 // Tells the renderer to suppress any further modal dialogs until it receives a
738 // corresponding ViewMsg_SwapOut message. This ensures that no
739 // PageGroupLoadDeferrer is on the stack for SwapOut.
740 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
742 // Instructs the renderer to close the current page, including running the
743 // onunload event handler.
745 // Expects a ClosePage_ACK message when finished.
746 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
748 // Notifies the renderer about ui theme changes
749 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
751 // Notifies the renderer that a paint is to be generated for the rectangle
752 // passed in.
753 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
754 gfx::Size /* The view size to be repainted */)
756 // Notification that a move or resize renderer's containing window has
757 // started.
758 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
760 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
761 gfx::Rect /* view_screen_rect */,
762 gfx::Rect /* window_screen_rect */)
764 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
765 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
766 // processed the move. The browser may have ignored the move, but it finished
767 // processing. This is used because the renderer keeps a temporary cache of
768 // the widget position while these asynchronous operations are in progress.
769 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
771 // Used to instruct the RenderView to send back updates to the preferred size.
772 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
774 // Used to instruct the RenderView to automatically resize and send back
775 // updates for the new size.
776 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
777 gfx::Size /* min_size */,
778 gfx::Size /* max_size */)
780 // Used to instruct the RenderView to disalbe automatically resize.
781 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
782 gfx::Size /* new_size */)
784 // Changes the text direction of the currently selected input field (if any).
785 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
786 blink::WebTextDirection /* direction */)
788 // Tells the renderer to clear the focused element (if any).
789 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
791 // Make the RenderView background transparent or opaque.
792 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
794 // Used to tell the renderer not to add scrollbars with height and
795 // width below a threshold.
796 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
797 gfx::Size /* disable_scrollbar_size_limit */)
799 // Activate/deactivate the RenderView (i.e., set its controls' tint
800 // accordingly, etc.).
801 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
802 bool /* active */)
804 // Response message to ViewHostMsg_CreateWorker.
805 // Sent when the worker has started.
806 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
808 // Sent when the worker failed to load the worker script.
809 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
810 // But if the shared worker of the same URL already exists and it has failed
811 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
812 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
813 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
815 // Sent when the worker has connected.
816 // This message is sent only if the worker successfully loaded the script.
817 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
819 // Tells the renderer that the network type has changed so that navigator.onLine
820 // and navigator.connection can be updated.
821 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
822 net::NetworkChangeNotifier::ConnectionType /* type */)
824 #if defined(ENABLE_PLUGINS)
825 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
826 // Tells the renderer that the channel to the broker has been created.
827 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
828 base::ProcessId /* broker_pid */,
829 IPC::ChannelHandle /* handle */)
831 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
832 // Tells the renderer whether permission to access to PPAPI broker was granted
833 // or not.
834 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
835 bool /* result */)
837 // Tells the renderer to empty its plugin list cache, optional reloading
838 // pages containing plugins.
839 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
840 bool /* reload_pages */)
841 #endif
843 // Used to instruct the RenderView to go into "view source" mode.
844 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
846 // Instructs the renderer to save the current page to MHTML.
847 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
848 int /* job_id */,
849 IPC::PlatformFileForTransit /* file handle */)
851 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
852 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
853 GURL /* data */)
855 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
856 // process to release the magnified image.
857 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
858 cc::SharedBitmapId /* id */)
860 // Notifies the renderer that a snapshot has been retrieved.
861 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
862 int /* snapshot_id */,
863 gfx::Size /* size */,
864 std::vector<unsigned char> /* png */)
866 // Fetches complete rendered content of a web page as plain text.
867 IPC_MESSAGE_ROUTED0(ViewMsg_GetRenderedText)
869 #if defined(OS_MACOSX)
870 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
872 // Notification of a change in scrollbar appearance and/or behavior.
873 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
874 float /* initial_button_delay */,
875 float /* autoscroll_button_delay */,
876 bool /* jump_on_track_click */,
877 blink::ScrollerStyle /* preferred_scroller_style */,
878 bool /* redraw */)
879 #endif
881 #if defined(OS_ANDROID)
882 // Tells the renderer to suspend/resume the webkit timers.
883 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
884 bool /* suspend */)
886 // Sent when the browser wants the bounding boxes of the current find matches.
888 // If match rects are already cached on the browser side, |current_version|
889 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
890 // they came in, so the renderer can tell if it needs to send updated rects.
891 // Otherwise just pass -1 to always receive the list of rects.
893 // There must be an active search string (it is probably most useful to call
894 // this immediately after a ViewHostMsg_Find_Reply message arrives with
895 // final_update set to true).
896 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
897 int /* current_version */)
899 // Notifies the renderer whether hiding/showing the top controls is enabled
900 // and whether or not to animate to the proper state.
901 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
902 bool /* enable_hiding */,
903 bool /* enable_showing */,
904 bool /* animate */)
906 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
908 // Sent by the browser when the renderer should generate a new frame.
909 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
910 cc::BeginFrameArgs /* args */)
912 // Sent by the browser when an IME update that requires acknowledgement has been
913 // processed on the browser side.
914 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
916 // Extracts the data at the given rect, returning it through the
917 // ViewHostMsg_SmartClipDataExtracted IPC.
918 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
919 gfx::Rect /* rect */)
921 #elif defined(OS_MACOSX)
922 // Let the RenderView know its window has changed visibility.
923 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
924 bool /* visibile */)
926 // Let the RenderView know its window's frame has changed.
927 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
928 gfx::Rect /* window frame */,
929 gfx::Rect /* content view frame */)
931 // Message sent from the browser to the renderer when the user starts or stops
932 // resizing the view.
933 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
934 bool /* enable */)
936 // Tell the renderer that plugin IME has completed.
937 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
938 base::string16 /* text */,
939 int /* plugin_id */)
940 #endif
942 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
943 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
944 uint32 /* output_surface_id */,
945 cc::CompositorFrameAck /* ack */)
947 // Sent by browser to tell renderer compositor that some resources that were
948 // given to the browser in a swap are not being used anymore.
949 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
950 uint32 /* output_surface_id */,
951 cc::CompositorFrameAck /* ack */)
953 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
955 // Sent by the browser to ask the renderer to redraw.
956 // If |request_id| is not zero, it is added to the forced frame's latency info
957 // as ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT.
958 IPC_MESSAGE_ROUTED1(ViewMsg_ForceRedraw,
959 int /* request_id */)
961 // -----------------------------------------------------------------------------
962 // Messages sent from the renderer to the browser.
964 // Sent by the renderer when it is creating a new window. The browser creates
965 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
966 // MSG_ROUTING_NONE, the view couldn't be created.
967 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
968 ViewHostMsg_CreateWindow_Params,
969 int /* route_id */,
970 int /* main_frame_route_id */,
971 int32 /* surface_id */,
972 int64 /* cloned_session_storage_namespace_id */)
974 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
975 // <select> dropdowns. This message is sent to the WebContentsImpl that
976 // contains the widget being created.
977 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
978 int /* opener_id */,
979 blink::WebPopupType /* popup type */,
980 int /* route_id */,
981 int32 /* surface_id */)
983 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
984 // window.
985 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
986 int /* opener_id */,
987 int /* route_id */,
988 int32 /* surface_id */)
990 // Asks the browser for a unique routing ID.
991 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
992 int /* routing_id */)
994 // Asks the browser for the default audio hardware configuration.
995 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
996 media::AudioParameters /* input parameters */,
997 media::AudioParameters /* output parameters */)
999 // Asks the browser for the renderer process memory size stats.
1000 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1001 size_t /* private_bytes */,
1002 size_t /* shared_bytes */)
1004 // These three messages are sent to the parent RenderViewHost to display the
1005 // page/widget that was created by
1006 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1007 // refers to the id that was returned from the Create message above.
1008 // The initial_position parameter is a rectangle in screen coordinates.
1010 // FUTURE: there will probably be flags here to control if the result is
1011 // in a new window.
1012 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1013 int /* route_id */,
1014 WindowOpenDisposition /* disposition */,
1015 gfx::Rect /* initial_pos */,
1016 bool /* opened_by_user_gesture */)
1018 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1019 int /* route_id */,
1020 gfx::Rect /* initial_pos */)
1022 // Message to show a full screen widget.
1023 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1024 int /* route_id */)
1026 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1027 // to run in a modal fashion until it is closed.
1028 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1029 int /* opener_id */)
1031 // Indicates the renderer is ready in response to a ViewMsg_New or
1032 // a ViewMsg_CreatingNew_ACK.
1033 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1035 // Indicates the renderer process is gone. This actually is sent by the
1036 // browser process to itself, but keeps the interface cleaner.
1037 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1038 int, /* this really is base::TerminationStatus */
1039 int /* exit_code */)
1041 // Sent by the renderer process to request that the browser close the view.
1042 // This corresponds to the window.close() API, and the browser may ignore
1043 // this message. Otherwise, the browser will generates a ViewMsg_Close
1044 // message to close the view.
1045 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1047 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1048 // throttle these messages.
1049 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1051 // Sent by the renderer process to request that the browser move the view.
1052 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1053 // the browser may ignore this message.
1054 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1055 gfx::Rect /* position */)
1057 // Result of string search in the page.
1058 // Response to ViewMsg_Find with the results of the requested find-in-page
1059 // search, the number of matches found and the selection rect (in screen
1060 // coordinates) for the string found. If |final_update| is false, it signals
1061 // that this is not the last Find_Reply message - more will be sent as the
1062 // scoping effort continues.
1063 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1064 int /* request_id */,
1065 int /* number of matches */,
1066 gfx::Rect /* selection_rect */,
1067 int /* active_match_ordinal */,
1068 bool /* final_update */)
1070 // Indicates that the render view has been closed in respose to a
1071 // Close message.
1072 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1073 int /* old_route_id */)
1075 // Indicates that the current page has been closed, after a ClosePage
1076 // message.
1077 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1079 // Notifies the browser that we have session history information.
1080 // page_id: unique ID that allows us to distinguish between history entries.
1081 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1082 int32 /* page_id */,
1083 content::PageState /* state */)
1085 // Notifies the browser that we want to show a destination url for a potential
1086 // action (e.g. when the user is hovering over a link).
1087 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateTargetURL,
1088 GURL)
1090 // Sent when the document element is available for the top-level frame. This
1091 // happens after the page starts loading, but before all resources are
1092 // finished.
1093 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1094 bool /* uses_temporary_zoom_level */)
1096 // Sent when the renderer loads a resource from its memory cache.
1097 // The security info is non empty if the resource was originally loaded over
1098 // a secure connection.
1099 // Note: May only be sent once per URL per frame per committed load.
1100 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1101 GURL /* url */,
1102 std::string /* security info */,
1103 std::string /* http method */,
1104 std::string /* mime type */,
1105 content::ResourceType /* resource type */)
1107 // Sent when the renderer displays insecure content in a secure page.
1108 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1110 // Sent when the renderer runs insecure content in a secure origin.
1111 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1112 std::string /* security_origin */,
1113 GURL /* target URL */)
1115 // Sent to update part of the view. In response to this message, the host
1116 // generates a ViewMsg_UpdateRect_ACK message.
1117 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1118 ViewHostMsg_UpdateRect_Params)
1120 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1121 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1123 // Message sent from renderer to the browser when focus changes inside the
1124 // webpage. The parameter says whether the newly focused element needs
1125 // keyboard input (true for textfields, text areas and content editable divs).
1126 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1127 bool /* is_editable_node */)
1129 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1131 // Used to set a cookie. The cookie is set asynchronously, but will be
1132 // available to a subsequent ViewHostMsg_GetCookies request.
1133 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1134 int /* render_frame_id */,
1135 GURL /* url */,
1136 GURL /* first_party_for_cookies */,
1137 std::string /* cookie */)
1139 // Used to get cookies for the given URL. This may block waiting for a
1140 // previous SetCookie message to be processed.
1141 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1142 int /* render_frame_id */,
1143 GURL /* url */,
1144 GURL /* first_party_for_cookies */,
1145 std::string /* cookies */)
1147 // Used to get raw cookie information for the given URL. This may block
1148 // waiting for a previous SetCookie message to be processed.
1149 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1150 GURL /* url */,
1151 GURL /* first_party_for_cookies */,
1152 std::vector<content::CookieData>
1153 /* raw_cookies */)
1155 // Used to delete cookie for the given URL and name
1156 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1157 GURL /* url */,
1158 std::string /* cookie_name */)
1160 // Used to check if cookies are enabled for the given URL. This may block
1161 // waiting for a previous SetCookie message to be processed.
1162 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1163 int /* render_frame_id */,
1164 GURL /* url */,
1165 GURL /* first_party_for_cookies */,
1166 bool /* cookies_enabled */)
1168 // Used to get the list of plugins
1169 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1170 bool /* refresh*/,
1171 std::vector<content::WebPluginInfo> /* plugins */)
1173 #if defined(OS_WIN)
1174 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1175 gfx::NativeViewId /* dummy_activation_window */)
1177 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1178 gfx::NativeViewId /* dummy_activation_window */)
1180 // Asks the browser for the user's monitor profile.
1181 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1182 std::vector<char> /* profile */)
1183 #endif
1185 // Get the list of proxies to use for |url|, as a semicolon delimited list
1186 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1187 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1188 GURL /* url */,
1189 bool /* result */,
1190 std::string /* proxy list */)
1192 // A renderer sends this to the browser process when it wants to create a
1193 // worker. The browser will create the worker process if necessary, and
1194 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1195 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1196 ViewHostMsg_CreateWorker_Params,
1197 int /* route_id */)
1199 // A renderer sends this to the browser process when a document has been
1200 // detached. The browser will use this to constrain the lifecycle of worker
1201 // processes (SharedWorkers are shut down when their last associated document
1202 // is detached).
1203 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1204 uint64 /* document_id */)
1206 // Wraps an IPC message that's destined to the worker on the renderer->browser
1207 // hop.
1208 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1209 IPC::Message /* message */)
1211 // Tells the browser that a specific Appcache manifest in the current page
1212 // was accessed.
1213 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1214 GURL /* manifest url */,
1215 bool /* blocked by policy */)
1217 // Initiates a download based on user actions like 'ALT+click'.
1218 IPC_MESSAGE_CONTROL4(ViewHostMsg_DownloadUrl,
1219 int /* render_view_id */,
1220 GURL /* url */,
1221 content::Referrer /* referrer */,
1222 base::string16 /* suggested_name */)
1224 // Used to go to the session history entry at the given offset (ie, -1 will
1225 // return the "back" item).
1226 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1227 int /* offset (from current) of history item to get */)
1229 // Sent from an inactive renderer for the browser to route to the active
1230 // renderer, instructing it to close.
1231 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1233 // Sent to the browser from an inactive renderer to post a message to the
1234 // active renderer.
1235 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1236 ViewMsg_PostMessage_Params)
1238 // Notifies that the preferred size of the content changed.
1239 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1240 gfx::Size /* pref_size */)
1242 // Notifies whether there are JavaScript touch event handlers or not.
1243 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1244 bool /* has_handlers */)
1246 // A message from HTML-based UI. When (trusted) Javascript calls
1247 // send(message, args), this message is sent to the browser.
1248 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1249 GURL /* source_url */,
1250 std::string /* message */,
1251 base::ListValue /* args */)
1253 #if defined(ENABLE_PLUGINS)
1254 // A renderer sends this to the browser process when it wants to create a ppapi
1255 // plugin. The browser will create the plugin process if necessary, and will
1256 // return a handle to the channel on success.
1258 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1259 // process. This ID is valid only in the context of the browser process and is
1260 // used to identify the proper process when the renderer notifies it that the
1261 // plugin is hung.
1263 // On error an empty string and null handles are returned.
1264 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1265 base::FilePath /* path */,
1266 IPC::ChannelHandle /* handle to channel */,
1267 base::ProcessId /* plugin_pid */,
1268 int /* plugin_child_id */)
1270 // Notification that a plugin has created a new plugin instance. The parameters
1271 // indicate:
1272 // -The plugin process ID that we're creating the instance for.
1273 // -The instance ID of the instance being created.
1274 // -A PepperRendererInstanceData struct which contains properties from the
1275 // renderer which are associated with the plugin instance. This includes the
1276 // routing ID of the associated render view and the URL of plugin.
1277 // -Whether the plugin we're creating an instance for is external or internal.
1279 // This message must be sync even though it returns no parameters to avoid
1280 // a race condition with the plugin process. The plugin process sends messages
1281 // to the browser that assume the browser knows about the instance. We need to
1282 // make sure that the browser actually knows about the instance before we tell
1283 // the plugin to run.
1284 IPC_SYNC_MESSAGE_CONTROL4_0(
1285 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1286 int /* plugin_child_id */,
1287 int32 /* pp_instance */,
1288 content::PepperRendererInstanceData /* creation_data */,
1289 bool /* is_external */)
1291 // Notification that a plugin has destroyed an instance. This is the opposite of
1292 // the "DidCreate" message above.
1293 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1294 int /* plugin_child_id */,
1295 int32 /* pp_instance */,
1296 bool /* is_external */)
1298 // Message from the renderer to the browser indicating the in-process instance
1299 // has been created.
1300 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1301 int32 /* instance */,
1302 content::PepperRendererInstanceData /* instance_data */)
1304 // Message from the renderer to the browser indicating the in-process instance
1305 // has been destroyed.
1306 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1307 int32 /* instance */)
1309 // A renderer sends this to the browser process when it wants to
1310 // create a ppapi broker. The browser will create the broker process
1311 // if necessary, and will return a handle to the channel on success.
1312 // On error an empty string is returned.
1313 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1314 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1315 int /* routing_id */,
1316 base::FilePath /* path */)
1318 // A renderer sends this to the browser process when it wants to access a PPAPI
1319 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1320 // for every connection.
1321 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1322 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1323 int /* routing_id */,
1324 GURL /* document_url */,
1325 base::FilePath /* plugin_path */)
1326 #endif // defined(ENABLE_PLUGINS)
1328 // Send the tooltip text for the current mouse position to the browser.
1329 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1330 base::string16 /* tooltip text string */,
1331 blink::WebTextDirection /* text direction hint */)
1333 // Notification that the text selection has changed.
1334 // Note: The secound parameter is the character based offset of the
1335 // base::string16
1336 // text in the document.
1337 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1338 base::string16 /* text covers the selection range */,
1339 size_t /* the offset of the text in the document */,
1340 gfx::Range /* selection range in the document */)
1342 // Notification that the selection bounds have changed.
1343 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1344 ViewHostMsg_SelectionBounds_Params)
1346 // Asks the browser to display the file chooser. The result is returned in a
1347 // ViewMsg_RunFileChooserResponse message.
1348 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1349 content::FileChooserParams)
1351 // Asks the browser to enumerate a directory. This is equivalent to running
1352 // the file chooser in directory-enumeration mode and having the user select
1353 // the given directory. The result is returned in a
1354 // ViewMsg_EnumerateDirectoryResponse message.
1355 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1356 int /* request_id */,
1357 base::FilePath /* file_path */)
1359 // Asks the browser to save a image (for <canvas> or <img>) from a data URL.
1360 // Note: |data_url| is the contents of a data:URL, and that it's represented as
1361 // a string only to work around size limitations for GURLs in IPC messages.
1362 IPC_MESSAGE_CONTROL2(ViewHostMsg_SaveImageFromDataURL,
1363 int /* render_view_id */,
1364 std::string /* data_url */)
1366 // Tells the browser to move the focus to the next (previous if reverse is
1367 // true) focusable element.
1368 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1369 bool /* reverse */)
1371 // Required for opening a date/time dialog
1372 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1373 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1375 IPC_MESSAGE_ROUTED4(ViewHostMsg_TextInputTypeChanged,
1376 ui::TextInputType /* TextInputType of the focused node */,
1377 ui::TextInputMode /* TextInputMode of the focused node */,
1378 bool /* can_compose_inline in the focused node */,
1379 int /* flags in the focused node */)
1381 // Required for updating text input state.
1382 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1383 ViewHostMsg_TextInputState_Params /* input state params */)
1385 // Sent when the renderer changes the zoom level for a particular url, so the
1386 // browser can update its records. If the view is a plugin doc, then url is
1387 // used to update the zoom level for all pages in that site. Otherwise, the
1388 // render view's id is used so that only the menu is updated.
1389 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1390 double /* zoom_level */,
1391 GURL /* url */)
1393 // Updates the minimum/maximum allowed zoom percent for this tab from the
1394 // default values. If |remember| is true, then the zoom setting is applied to
1395 // other pages in the site and is saved, otherwise it only applies to this
1396 // tab.
1397 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1398 int /* minimum_percent */,
1399 int /* maximum_percent */)
1401 // Notify the browser that this render process can or can't be suddenly
1402 // terminated.
1403 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1404 bool /* enabled */)
1406 IPC_MESSAGE_ROUTED3(
1407 ViewHostMsg_SwapCompositorFrame,
1408 uint32 /* output_surface_id */,
1409 cc::CompositorFrame /* frame */,
1410 std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
1412 // Sent by the compositor when a flinging animation is stopped.
1413 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1415 //---------------------------------------------------------------------------
1416 // Request for cryptographic operation messages:
1417 // These are messages from the renderer to the browser to perform a
1418 // cryptographic operation.
1420 // Asks the browser process to generate a keypair for grabbing a client
1421 // certificate from a CA (<keygen> tag), and returns the signed public
1422 // key and challenge string.
1423 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1424 uint32 /* key size index */,
1425 std::string /* challenge string */,
1426 GURL /* URL of requestor */,
1427 std::string /* signed public key and challenge */)
1429 // Message sent from the renderer to the browser to request that the browser
1430 // cache |data| associated with |url|.
1431 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1432 GURL /* url */,
1433 double /* expected_response_time */,
1434 std::vector<char> /* data */)
1436 // Register a new handler for URL requests with the given scheme.
1437 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1438 std::string /* scheme */,
1439 GURL /* url */,
1440 base::string16 /* title */,
1441 bool /* user_gesture */)
1443 // Unregister the registered handler for URL requests with the given scheme.
1444 IPC_MESSAGE_ROUTED3(ViewHostMsg_UnregisterProtocolHandler,
1445 std::string /* scheme */,
1446 GURL /* url */,
1447 bool /* user_gesture */)
1449 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1450 // See the comment in chrome/browser/ui/browser.h for more details.
1451 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1452 bool /* enter_fullscreen */)
1454 // Send back a string to be recorded by UserMetrics.
1455 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1456 std::string /* action */)
1458 // Notifies the browser that the page was or was not saved as MHTML.
1459 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1460 int /* job_id */,
1461 int64 /* size of the MHTML file, -1 if error */)
1463 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1464 std::vector<GURL> /* all savable resource links */,
1465 std::vector<content::Referrer> /* all referrers */,
1466 std::vector<GURL> /* all frame links */)
1468 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1469 GURL /* frame's url */,
1470 std::string /* data buffer */,
1471 int32 /* complete status */)
1473 // Notifies the browser of an event occurring in the media pipeline.
1474 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1475 std::vector<media::MediaLogEvent> /* events */)
1477 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1478 // being sent back.
1479 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1480 // pop up a bubble to ask for user permission or take mouse lock content into
1481 // account.
1482 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1483 bool /* user_gesture */,
1484 bool /* last_unlocked_by_target */,
1485 bool /* privileged */)
1487 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1488 // whenever the mouse is unlocked (which may or may not be caused by
1489 // ViewHostMsg_UnlockMouse).
1490 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1492 // Notifies that multiple touch targets may have been pressed, and to show
1493 // the disambiguation popup.
1494 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1495 gfx::Rect, /* Border of touched targets */
1496 gfx::Size, /* Size of zoomed image */
1497 cc::SharedBitmapId /* id */)
1499 // Sent by the renderer process to check whether client 3D APIs
1500 // (Pepper 3D, WebGL) are explicitly blocked.
1501 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1502 int /* render_view_id */,
1503 GURL /* top_origin_url */,
1504 content::ThreeDAPIType /* requester */,
1505 bool /* blocked */)
1507 // Sent by the renderer process to indicate that a context was lost by
1508 // client 3D content (Pepper 3D, WebGL) running on the page at the
1509 // given URL.
1510 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1511 GURL /* top_origin_url */,
1512 content::ThreeDAPIType /* context_type */,
1513 int /* arb_robustness_status_code */)
1515 // Notifies the browser that document has parsed the body. This is used by the
1516 // ResourceScheduler as an indication that bandwidth contention won't block
1517 // first paint.
1518 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1520 // Notification that the urls for the favicon of a site has been determined.
1521 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1522 std::vector<content::FaviconURL> /* candidates */)
1524 // Sent by the renderer to the browser to start a vibration with the given
1525 // duration.
1526 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1527 int64 /* milliseconds */)
1529 // Sent by the renderer to the browser to cancel the currently running
1530 // vibration, if there is one.
1531 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1533 // Message sent from renderer to the browser when the element that is focused
1534 // has been touched. A bool is passed in this message which indicates if the
1535 // node is editable.
1536 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1537 bool /* editable */)
1539 // Message sent from the renderer to the browser when an HTML form has failed
1540 // validation constraints.
1541 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1542 gfx::Rect /* anchor rectangle in root view coordinate */,
1543 base::string16 /* validation message */,
1544 base::string16 /* supplemental text */)
1546 // Message sent from the renderer to the browser when a HTML form validation
1547 // message should be hidden from view.
1548 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1550 // Message sent from the renderer to the browser when the suggested co-ordinates
1551 // of the anchor for a HTML form validation message have changed.
1552 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1553 gfx::Rect /* anchor rectangle in root view coordinate */)
1555 #if defined(OS_ANDROID)
1556 // Response to ViewMsg_FindMatchRects.
1558 // |version| will contain the current version number of the renderer's find
1559 // match list (incremented whenever they change), which should be passed in the
1560 // next call to ViewMsg_FindMatchRects.
1562 // |rects| will either contain a list of the enclosing rects of all matches
1563 // found by the most recent Find operation, or will be empty if |version| is not
1564 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1565 // your locally cached rects should still be valid). The rect coords will be
1566 // custom normalized fractions of the document size. The rects will be sorted by
1567 // frame traversal order starting in the main frame, then by dom order.
1569 // |active_rect| will contain the bounding box of the active find-in-page match
1570 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1571 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1572 int /* version */,
1573 std::vector<gfx::RectF> /* rects */,
1574 gfx::RectF /* active_rect */)
1576 // Start an android intent with the given URI.
1577 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1578 GURL /* content_url */)
1580 // Message sent when the renderer changed the background color for the view.
1581 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1582 uint32 /* bg_color */)
1584 // This message runs the MediaCodec for decoding audio for webaudio.
1585 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1586 base::SharedMemoryHandle /* encoded_data_handle */,
1587 base::FileDescriptor /* pcm_output */,
1588 uint32_t /* data_size*/)
1590 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1591 // display events. If |enabled| is true, the BeginFrame message will continue
1592 // to be be delivered until the notification is disabled.
1593 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
1594 bool /* enabled */)
1596 // Reply to the ViewMsg_ExtractSmartClipData message.
1597 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted,
1598 base::string16 /* text */,
1599 base::string16 /* html */,
1600 gfx::Rect /* rect */)
1602 #elif defined(OS_MACOSX)
1603 // Request that the browser load a font into shared memory for us.
1604 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1605 FontDescriptor /* font to load */,
1606 uint32 /* buffer size */,
1607 base::SharedMemoryHandle /* font data */,
1608 uint32 /* font id */)
1610 // Informs the browser that a plugin has gained or lost focus.
1611 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1612 bool, /* focused */
1613 int /* plugin_id */)
1615 // Instructs the browser to start plugin IME.
1616 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1618 // Receives content of a web page as plain text.
1619 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string);
1621 #elif defined(OS_WIN)
1622 // Request that the given font characters be loaded by the browser so it's
1623 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1624 // for details.
1625 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1626 LOGFONT /* font_data */,
1627 base::string16 /* characters */)
1628 #endif
1630 #if defined(OS_POSIX)
1631 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1632 // this call exists for the renderer to ask the browser to allocate memory
1633 // on its behalf. We return a file descriptor to the POSIX shared memory.
1634 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1635 // by the browser, and it is the caller's repsonsibility to send a
1636 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1637 // In all cases, the caller is responsible for deleting the resulting
1638 // TransportDIB.
1639 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1640 uint32_t, /* bytes requested */
1641 bool, /* cache in the browser */
1642 TransportDIB::Handle /* DIB */)
1644 // Since the browser keeps handles to the allocated transport DIBs, this
1645 // message is sent to tell the browser that it may release them when the
1646 // renderer is finished with them.
1647 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1648 TransportDIB::Id /* DIB id */)
1649 #endif
1651 // Adding a new message? Stick to the sort order above: first platform
1652 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1653 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.