Add an extension override bubble and warning box for proxy extensions. (2nd attempt...
[chromium-blink-merge.git] / content / common / view_messages.h
blob5505194094069fb349b16cd194f9ef61ca55a80a
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/navigation_gesture.h"
18 #include "content/common/pepper_renderer_instance_data.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_params.h"
24 #include "content/public/common/menu_item.h"
25 #include "content/public/common/page_state.h"
26 #include "content/public/common/page_zoom.h"
27 #include "content/public/common/referrer.h"
28 #include "content/public/common/renderer_preferences.h"
29 #include "content/public/common/stop_find_action.h"
30 #include "content/public/common/three_d_api_types.h"
31 #include "content/public/common/window_container_type.h"
32 #include "content/common/date_time_suggestion.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/point.h"
53 #include "ui/gfx/range/range.h"
54 #include "ui/gfx/rect.h"
55 #include "ui/gfx/rect_f.h"
56 #include "ui/gfx/vector2d.h"
57 #include "ui/gfx/vector2d_f.h"
58 #include "ui/shell_dialogs/selected_file_info.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 #undef IPC_MESSAGE_EXPORT
66 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
68 #define IPC_MESSAGE_START ViewMsgStart
70 IPC_ENUM_TRAITS(AccessibilityMode)
71 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type)
72 IPC_ENUM_TRAITS(blink::WebPluginAction::Type)
73 IPC_ENUM_TRAITS(blink::WebPopupType)
74 IPC_ENUM_TRAITS(blink::WebTextDirection)
75 IPC_ENUM_TRAITS(WindowContainerType)
76 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
77 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
78 IPC_ENUM_TRAITS(content::MenuItem::Type)
79 IPC_ENUM_TRAITS(content::NavigationGesture)
80 IPC_ENUM_TRAITS(content::PageZoom)
81 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum)
82 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum)
83 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
84 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
85 IPC_ENUM_TRAITS(content::StopFindAction)
86 IPC_ENUM_TRAITS(content::ThreeDAPIType)
87 IPC_ENUM_TRAITS(media::ChannelLayout)
88 IPC_ENUM_TRAITS(media::MediaLogEvent::Type)
89 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
90 IPC_ENUM_TRAITS(ui::TextInputType)
92 #if defined(OS_MACOSX)
93 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
94 IPC_STRUCT_TRAITS_MEMBER(font_name)
95 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
96 IPC_STRUCT_TRAITS_END()
97 #endif
99 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
100 IPC_STRUCT_TRAITS_MEMBER(forward)
101 IPC_STRUCT_TRAITS_MEMBER(matchCase)
102 IPC_STRUCT_TRAITS_MEMBER(findNext)
103 IPC_STRUCT_TRAITS_END()
105 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
106 IPC_STRUCT_TRAITS_MEMBER(type)
107 IPC_STRUCT_TRAITS_MEMBER(enable)
108 IPC_STRUCT_TRAITS_END()
110 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
111 IPC_STRUCT_TRAITS_MEMBER(type)
112 IPC_STRUCT_TRAITS_MEMBER(enable)
113 IPC_STRUCT_TRAITS_END()
115 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
116 IPC_STRUCT_TRAITS_MEMBER(x)
117 IPC_STRUCT_TRAITS_MEMBER(y)
118 IPC_STRUCT_TRAITS_END()
120 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
121 IPC_STRUCT_TRAITS_MEMBER(x)
122 IPC_STRUCT_TRAITS_MEMBER(y)
123 IPC_STRUCT_TRAITS_MEMBER(width)
124 IPC_STRUCT_TRAITS_MEMBER(height)
125 IPC_STRUCT_TRAITS_END()
127 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
128 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
129 IPC_STRUCT_TRAITS_MEMBER(depth)
130 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
131 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
132 IPC_STRUCT_TRAITS_MEMBER(rect)
133 IPC_STRUCT_TRAITS_MEMBER(availableRect)
134 IPC_STRUCT_TRAITS_MEMBER(orientationType)
135 IPC_STRUCT_TRAITS_MEMBER(orientationAngle)
136 IPC_STRUCT_TRAITS_END()
138 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
139 IPC_STRUCT_TRAITS_MEMBER(label)
140 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
141 IPC_STRUCT_TRAITS_MEMBER(type)
142 IPC_STRUCT_TRAITS_MEMBER(action)
143 IPC_STRUCT_TRAITS_MEMBER(rtl)
144 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
145 IPC_STRUCT_TRAITS_MEMBER(enabled)
146 IPC_STRUCT_TRAITS_MEMBER(checked)
147 IPC_STRUCT_TRAITS_MEMBER(submenu)
148 IPC_STRUCT_TRAITS_END()
150 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
151 IPC_STRUCT_TRAITS_MEMBER(value)
152 IPC_STRUCT_TRAITS_MEMBER(localized_value)
153 IPC_STRUCT_TRAITS_MEMBER(label)
154 IPC_STRUCT_TRAITS_END()
156 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
157 IPC_STRUCT_TRAITS_MEMBER(icon_url)
158 IPC_STRUCT_TRAITS_MEMBER(icon_type)
159 IPC_STRUCT_TRAITS_MEMBER(icon_sizes)
160 IPC_STRUCT_TRAITS_END()
162 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
163 IPC_STRUCT_TRAITS_MEMBER(mode)
164 IPC_STRUCT_TRAITS_MEMBER(title)
165 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
166 IPC_STRUCT_TRAITS_MEMBER(accept_types)
167 #if defined(OS_ANDROID)
168 IPC_STRUCT_TRAITS_MEMBER(capture)
169 #endif
170 IPC_STRUCT_TRAITS_END()
172 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
173 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
174 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
175 IPC_STRUCT_TRAITS_MEMBER(document_url)
176 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
177 IPC_STRUCT_TRAITS_END()
179 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
180 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
181 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
182 IPC_STRUCT_TRAITS_MEMBER(hinting)
183 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
184 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
185 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
186 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
187 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
188 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
189 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
190 IPC_STRUCT_TRAITS_MEMBER(track_color)
191 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
192 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
193 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
194 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
195 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
196 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
197 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
198 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
199 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
200 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
201 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
202 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
203 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
204 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
205 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile)
206 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile)
207 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
208 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
209 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
210 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video)
211 IPC_STRUCT_TRAITS_END()
213 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
214 IPC_STRUCT_TRAITS_MEMBER(name)
215 IPC_STRUCT_TRAITS_MEMBER(value)
216 IPC_STRUCT_TRAITS_MEMBER(domain)
217 IPC_STRUCT_TRAITS_MEMBER(path)
218 IPC_STRUCT_TRAITS_MEMBER(expires)
219 IPC_STRUCT_TRAITS_MEMBER(http_only)
220 IPC_STRUCT_TRAITS_MEMBER(secure)
221 IPC_STRUCT_TRAITS_MEMBER(session)
222 IPC_STRUCT_TRAITS_END()
224 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
225 IPC_STRUCT_TRAITS_MEMBER(window)
226 IPC_STRUCT_TRAITS_MEMBER(window_rect)
227 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
228 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
229 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
230 IPC_STRUCT_TRAITS_MEMBER(visible)
231 IPC_STRUCT_TRAITS_END()
233 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
234 IPC_STRUCT_TRAITS_MEMBER(id)
235 IPC_STRUCT_TRAITS_MEMBER(type)
236 IPC_STRUCT_TRAITS_MEMBER(params)
237 IPC_STRUCT_TRAITS_MEMBER(time)
238 IPC_STRUCT_TRAITS_END()
240 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo)
241 IPC_STRUCT_TRAITS_MEMBER(file_path)
242 IPC_STRUCT_TRAITS_MEMBER(local_path)
243 IPC_STRUCT_TRAITS_MEMBER(display_name)
244 IPC_STRUCT_TRAITS_END()
246 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
247 // Routing ID of the view initiating the open.
248 IPC_STRUCT_MEMBER(int, opener_id)
250 // True if this open request came in the context of a user gesture.
251 IPC_STRUCT_MEMBER(bool, user_gesture)
253 // Type of window requested.
254 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
256 // The session storage namespace ID this view should use.
257 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
259 // The name of the resulting frame that should be created (empty if none
260 // has been specified).
261 IPC_STRUCT_MEMBER(base::string16, frame_name)
263 // The routing id of the frame initiating the open.
264 IPC_STRUCT_MEMBER(int, opener_render_frame_id)
266 // The URL of the frame initiating the open.
267 IPC_STRUCT_MEMBER(GURL, opener_url)
269 // The URL of the top frame containing the opener.
270 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
272 // The security origin of the frame initiating the open.
273 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
275 // Whether the opener will be suppressed in the new window, in which case
276 // scripting the new window is not allowed.
277 IPC_STRUCT_MEMBER(bool, opener_suppressed)
279 // Whether the window should be opened in the foreground, background, etc.
280 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
282 // The URL that will be loaded in the new window (empty if none has been
283 // sepcified).
284 IPC_STRUCT_MEMBER(GURL, target_url)
286 // The referrer that will be used to load |target_url| (empty if none has
287 // been specified).
288 IPC_STRUCT_MEMBER(content::Referrer, referrer)
290 // The window features to use for the new view.
291 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
293 // The additional window features to use for the new view. We pass these
294 // separately from |features| above because we cannot serialize WebStrings
295 // over IPC.
296 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
297 IPC_STRUCT_END()
299 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
300 // URL for the worker script.
301 IPC_STRUCT_MEMBER(GURL, url)
303 // Name for a SharedWorker, otherwise empty string.
304 IPC_STRUCT_MEMBER(base::string16, name)
306 // Security policy used in the worker.
307 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
309 // Security policy type used in the worker.
310 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
312 // The ID of the parent document (unique within parent renderer).
313 IPC_STRUCT_MEMBER(unsigned long long, document_id)
315 // RenderFrame routing id used to send messages back to the parent.
316 IPC_STRUCT_MEMBER(int, render_frame_route_id)
317 IPC_STRUCT_END()
319 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
320 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
321 IPC_STRUCT_MEMBER(double, dialog_value)
322 IPC_STRUCT_MEMBER(double, minimum)
323 IPC_STRUCT_MEMBER(double, maximum)
324 IPC_STRUCT_MEMBER(double, step)
325 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
326 IPC_STRUCT_END()
328 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
329 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
330 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
331 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
332 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
333 IPC_STRUCT_MEMBER(bool, is_anchor_first)
334 IPC_STRUCT_END()
336 // This message is used for supporting popup menus on Mac OS X using native
337 // Cocoa controls. The renderer sends us this message which we use to populate
338 // the popup menu.
339 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params)
340 // Position on the screen.
341 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
343 // The height of each item in the menu.
344 IPC_STRUCT_MEMBER(int, item_height)
346 // The size of the font to use for those items.
347 IPC_STRUCT_MEMBER(double, item_font_size)
349 // The currently selected (displayed) item in the menu.
350 IPC_STRUCT_MEMBER(int, selected_item)
352 // The entire list of items in the popup menu.
353 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
355 // Whether items should be right-aligned.
356 IPC_STRUCT_MEMBER(bool, right_aligned)
358 // Whether this is a multi-select popup.
359 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
360 IPC_STRUCT_END()
362 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
363 // The type of input field
364 IPC_STRUCT_MEMBER(ui::TextInputType, type)
366 // The value of the input field
367 IPC_STRUCT_MEMBER(std::string, value)
369 // The cursor position of the current selection start, or the caret position
370 // if nothing is selected
371 IPC_STRUCT_MEMBER(int, selection_start)
373 // The cursor position of the current selection end, or the caret position
374 // if nothing is selected
375 IPC_STRUCT_MEMBER(int, selection_end)
377 // The start position of the current composition, or -1 if there is none
378 IPC_STRUCT_MEMBER(int, composition_start)
380 // The end position of the current composition, or -1 if there is none
381 IPC_STRUCT_MEMBER(int, composition_end)
383 // Whether or not inline composition can be performed for the current input.
384 IPC_STRUCT_MEMBER(bool, can_compose_inline)
386 // Whether or not the IME should be shown as a result of this update. Even if
387 // true, the IME will only be shown if the type is appropriate (e.g. not
388 // TEXT_INPUT_TYPE_NONE).
389 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
391 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
392 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
393 IPC_STRUCT_END()
395 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
396 // The scroll offset of the render view.
397 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset)
399 // The size of the RenderView when this message was generated. This is
400 // included so the host knows how large the view is from the perspective of
401 // the renderer process. This is necessary in case a resize operation is in
402 // progress. If auto-resize is enabled, this should update the corresponding
403 // view size.
404 IPC_STRUCT_MEMBER(gfx::Size, view_size)
406 // New window locations for plugin child windows.
407 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
408 plugin_window_moves)
410 // The following describes the various bits that may be set in flags:
412 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
413 // Indicates that this is a response to a ViewMsg_Resize message.
415 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
416 // Indicates that this is a response to a ViewMsg_Repaint message.
418 // If flags is zero, then this message corresponds to an unsolicited paint
419 // request by the render view. Any of the above bits may be set in flags,
420 // which would indicate that this paint message is an ACK for multiple
421 // request messages.
422 IPC_STRUCT_MEMBER(int, flags)
424 // All the above coordinates are in DIP. This is the scale factor needed
425 // to convert them to pixels.
426 IPC_STRUCT_MEMBER(float, scale_factor)
427 IPC_STRUCT_END()
429 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
430 // Renderer-wide preferences.
431 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
433 // Preferences for this view.
434 IPC_STRUCT_MEMBER(WebPreferences, web_preferences)
436 // The ID of the view to be created.
437 IPC_STRUCT_MEMBER(int32, view_id)
439 // The ID of the main frame hosted in the view.
440 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
442 // The ID of the rendering surface.
443 IPC_STRUCT_MEMBER(int32, surface_id)
445 // The session storage namespace ID this view should use.
446 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
448 // The name of the frame associated with this view (or empty if none).
449 IPC_STRUCT_MEMBER(base::string16, frame_name)
451 // The route ID of the opener RenderView if we need to set one
452 // (MSG_ROUTING_NONE otherwise).
453 IPC_STRUCT_MEMBER(int, opener_route_id)
455 // Whether the RenderView should initially be swapped out.
456 IPC_STRUCT_MEMBER(bool, swapped_out)
458 // The ID of the proxy object for the main frame in this view. It is only
459 // used if |swapped_out| is true.
460 IPC_STRUCT_MEMBER(int32, proxy_routing_id)
462 // Whether the RenderView should initially be hidden.
463 IPC_STRUCT_MEMBER(bool, hidden)
465 // Whether the RenderView will never be visible.
466 IPC_STRUCT_MEMBER(bool, never_visible)
468 // Whether the window associated with this view was created with an opener.
469 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
471 // The initial page ID to use for this view, which must be larger than any
472 // existing navigation that might be loaded in the view. Page IDs are unique
473 // to a view and are only updated by the renderer after this initial value.
474 IPC_STRUCT_MEMBER(int32, next_page_id)
476 // The properties of the screen associated with the view.
477 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
479 // The accessibility mode of the renderer.
480 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
481 IPC_STRUCT_END()
483 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
484 // The serialized script value.
485 IPC_STRUCT_MEMBER(base::string16, data)
487 // When sent to the browser, this is the routing ID of the source frame in
488 // the source process. The browser replaces it with the routing ID of the
489 // equivalent (swapped out) frame in the destination process.
490 IPC_STRUCT_MEMBER(int, source_routing_id)
492 // The origin of the source frame.
493 IPC_STRUCT_MEMBER(base::string16, source_origin)
495 // The origin for the message's target.
496 IPC_STRUCT_MEMBER(base::string16, target_origin)
498 // Information about the MessagePorts this message contains.
499 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
500 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
501 IPC_STRUCT_END()
503 // Messages sent from the browser to the renderer.
505 // Tells the renderer to cancel an opened date/time dialog.
506 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
508 // Get all savable resource links from current webpage, include main
509 // frame and sub-frame.
510 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
511 GURL /* url of page which is needed to save */)
513 // Get html data by serializing all frames of current page with lists
514 // which contain all resource links that have local copy.
515 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
516 std::vector<GURL> /* urls that have local copy */,
517 std::vector<base::FilePath> /* paths of local copy */,
518 base::FilePath /* local directory path */)
520 // Tells the render side that a ViewHostMsg_LockMouse message has been
521 // processed. |succeeded| indicates whether the mouse has been successfully
522 // locked or not.
523 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
524 bool /* succeeded */)
525 // Tells the render side that the mouse has been unlocked.
526 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
528 // Sent by the browser when the parameters for vsync alignment have changed.
529 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
530 base::TimeTicks /* timebase */,
531 base::TimeDelta /* interval */)
533 // Sent to the RenderView when a new tab is swapped into an existing
534 // tab and the histories need to be merged. The existing tab has a history of
535 // |merged_history_length| which precedes the history of the new tab. All
536 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
538 // For example, suppose the history of page_ids in the new tab's RenderView
539 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
540 // all pages in the new tab with page_id >= 7 are to be preserved.
541 // The resulting page history is [-1 -1 -1 7 8].
542 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
543 int, /* merge_history_length */
544 int32 /* minimum_page_id */)
546 // Tells the renderer to create a new view.
547 // This message is slightly different, the view it takes (via
548 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
549 // non-view control message.
550 IPC_MESSAGE_CONTROL1(ViewMsg_New,
551 ViewMsg_New_Params)
553 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
554 // similar to the new command, but used when the renderer created a view
555 // first, and we need to update it.
556 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
558 // Sends updated preferences to the renderer.
559 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
560 content::RendererPreferences)
562 // This passes a set of webkit preferences down to the renderer.
563 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
564 WebPreferences)
566 // Informs the renderer that the timezone has changed.
567 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
569 // Tells the render view to close.
570 // Expects a Close_ACK message when finished.
571 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
573 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
574 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
575 IPC_STRUCT_MEMBER(gfx::Size, new_size)
576 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
577 IPC_STRUCT_MEMBER(float, overdraw_bottom_height)
578 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
579 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
580 IPC_STRUCT_MEMBER(bool, is_fullscreen)
581 IPC_STRUCT_END()
583 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
584 // is generated in response provided new_size is not empty and not equal to
585 // the view's current size. The generated ViewHostMsg_UpdateRect message will
586 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
587 // we don't have to fetch it every time WebKit asks for it.
588 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
589 ViewMsg_Resize_Params /* params */)
591 // Tells the render view that the resize rect has changed.
592 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
593 gfx::Rect /* resizer_rect */)
595 // Sent to inform the view that it was hidden. This allows it to reduce its
596 // resource utilization.
597 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
599 // Tells the render view that it is no longer hidden (see WasHidden), and the
600 // render view is expected to respond with a full repaint if needs_repainting
601 // is true. If needs_repainting is false, then this message does not trigger a
602 // message in response.
603 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown,
604 bool /* needs_repainting */)
606 // Sent to inform the view that it was swapped out. This allows the process to
607 // exit if no other views are using it.
608 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut)
610 // Tells the renderer to focus the first (last if reverse is true) focusable
611 // node.
612 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
613 bool /* reverse */)
615 // Sent to inform the renderer to invoke a context menu.
616 // The parameter specifies the location in the render view's coordinates.
617 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu,
618 gfx::Point /* location where menu should be shown */)
620 IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
622 // Sent when the user wants to search for a word on the page (find in page).
623 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
624 int /* request_id */,
625 base::string16 /* search_text */,
626 blink::WebFindOptions)
628 // This message notifies the renderer that the user has closed the FindInPage
629 // window (and what action to take regarding the selection).
630 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
631 content::StopFindAction /* action */)
633 // Replaces a date time input field.
634 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
635 double /* dialog_value */)
637 // Copies the image at location x, y to the clipboard (if there indeed is an
638 // image at that location).
639 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
640 int /* x */,
641 int /* y */)
643 // Saves the image at location x, y to the disk (if there indeed is an
644 // image at that location).
645 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt,
646 int /* x */,
647 int /* y */)
649 // Tells the renderer to perform the given action on the media player
650 // located at the given point.
651 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
652 gfx::Point, /* location */
653 blink::WebMediaPlayerAction)
655 // Tells the renderer to perform the given action on the plugin located at
656 // the given point.
657 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
658 gfx::Point, /* location */
659 blink::WebPluginAction)
661 // Posts a message from a frame in another process to the current renderer.
662 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
663 ViewMsg_PostMessage_Params)
665 // Requests that the RenderView's main frame sets its opener to null.
666 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener)
668 // Change the zoom level for the current main frame. If the level actually
669 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
670 // telling it what url got zoomed and what its current zoom level is.
671 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
672 content::PageZoom /* function */)
674 // Set the zoom level for a particular url that the renderer is in the
675 // process of loading. This will be stored, to be used if the load commits
676 // and ignored otherwise.
677 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
678 GURL /* url */,
679 double /* zoom_level */)
681 // Set the zoom level for a particular url, so all render views
682 // displaying this url can update their zoom levels to match.
683 // If scheme is empty, then only host is used for matching.
684 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
685 std::string /* scheme */,
686 std::string /* host */,
687 double /* zoom_level */)
689 // Change encoding of page in the renderer.
690 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
691 std::string /*new encoding name*/)
693 // Reset encoding of page in the renderer back to default.
694 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
696 // Used to tell a render view whether it should expose various bindings
697 // that allow JS content extended privileges. See BindingsPolicy for valid
698 // flag values.
699 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
700 int /* enabled_bindings_flags */)
702 // Tell the renderer to add a property to the WebUI binding object. This
703 // only works if we allowed WebUI bindings.
704 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
705 std::string /* property_name */,
706 std::string /* property_value_json */)
708 // This message starts/stop monitoring the input method status of the focused
709 // edit control of a renderer process.
710 // Parameters
711 // * is_active (bool)
712 // Indicates if an input method is active in the browser process.
713 // The possible actions when a renderer process receives this message are
714 // listed below:
715 // Value Action
716 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
717 // to notify the input method status of the focused edit control.
718 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
719 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
720 bool /* is_active */)
722 // IME API oncandidatewindow* events for InputMethodContext.
723 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
724 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
725 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
727 // This message sends a string being composed with an input method.
728 IPC_MESSAGE_ROUTED4(
729 ViewMsg_ImeSetComposition,
730 base::string16, /* text */
731 std::vector<blink::WebCompositionUnderline>, /* underlines */
732 int, /* selectiont_start */
733 int /* selection_end */)
735 // This message confirms an ongoing composition.
736 IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition,
737 base::string16 /* text */,
738 gfx::Range /* replacement_range */,
739 bool /* keep_selection */)
741 // Used to notify the render-view that we have received a target URL. Used
742 // to prevent target URLs spamming the browser.
743 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
745 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
746 std::vector<ui::SelectedFileInfo>)
748 // Provides the results of directory enumeration.
749 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
750 int /* request_id */,
751 std::vector<base::FilePath> /* files_in_directory */)
753 // When a renderer sends a ViewHostMsg_Focus to the browser process,
754 // the browser has the option of sending a ViewMsg_CantFocus back to
755 // the renderer.
756 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
758 // Tells the renderer to suppress any further modal dialogs until it receives a
759 // corresponding ViewMsg_SwapOut message. This ensures that no
760 // PageGroupLoadDeferrer is on the stack for SwapOut.
761 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
763 // Instructs the renderer to close the current page, including running the
764 // onunload event handler.
766 // Expects a ClosePage_ACK message when finished.
767 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
769 // Notifies the renderer about ui theme changes
770 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
772 // Notifies the renderer that a paint is to be generated for the rectangle
773 // passed in.
774 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
775 gfx::Size /* The view size to be repainted */)
777 // Notification that a move or resize renderer's containing window has
778 // started.
779 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
781 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
782 gfx::Rect /* view_screen_rect */,
783 gfx::Rect /* window_screen_rect */)
785 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
786 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
787 // processed the move. The browser may have ignored the move, but it finished
788 // processing. This is used because the renderer keeps a temporary cache of
789 // the widget position while these asynchronous operations are in progress.
790 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
792 // Used to instruct the RenderView to send back updates to the preferred size.
793 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
795 // Used to instruct the RenderView to automatically resize and send back
796 // updates for the new size.
797 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
798 gfx::Size /* min_size */,
799 gfx::Size /* max_size */)
801 // Used to instruct the RenderView to disalbe automatically resize.
802 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
803 gfx::Size /* new_size */)
805 // Changes the text direction of the currently selected input field (if any).
806 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
807 blink::WebTextDirection /* direction */)
809 // Tells the renderer to clear the focused element (if any).
810 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement)
812 // Make the RenderView background transparent or opaque.
813 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
815 // Used to tell the renderer not to add scrollbars with height and
816 // width below a threshold.
817 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
818 gfx::Size /* disable_scrollbar_size_limit */)
820 // Activate/deactivate the RenderView (i.e., set its controls' tint
821 // accordingly, etc.).
822 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
823 bool /* active */)
825 // Response message to ViewHostMsg_CreateWorker.
826 // Sent when the worker has started.
827 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
829 // Sent when the worker failed to load the worker script.
830 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
831 // But if the shared worker of the same URL already exists and it has failed
832 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
833 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
834 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed)
836 // Sent when the worker has connected.
837 // This message is sent only if the worker successfully loaded the script.
838 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
840 // Tells the renderer that the network state has changed so that
841 // navigator.onLine and navigator.connection can be updated.
842 IPC_MESSAGE_CONTROL2(ViewMsg_NetworkStateChanged,
843 bool /* is_online */,
844 net::NetworkChangeNotifier::ConnectionType /* type */)
846 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
847 // Tells the renderer that the channel to the broker has been created.
848 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
849 base::ProcessId /* broker_pid */,
850 IPC::ChannelHandle /* handle */)
852 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
853 // Tells the renderer whether permission to access to PPAPI broker was granted
854 // or not.
855 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
856 bool /* result */)
858 // Tells the renderer to empty its plugin list cache, optional reloading
859 // pages containing plugins.
860 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
861 bool /* reload_pages */)
863 // Used to instruct the RenderView to go into "view source" mode.
864 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
866 // Instructs the renderer to save the current page to MHTML.
867 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
868 int /* job_id */,
869 IPC::PlatformFileForTransit /* file handle */)
871 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
872 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
873 GURL /* data */)
875 // Change the accessibility mode in the renderer process.
876 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode,
877 AccessibilityMode)
879 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
880 // process to release the magnified image.
881 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,
882 cc::SharedBitmapId /* id */)
884 // Notifies the renderer that a snapshot has been retrieved.
885 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
886 int /* snapshot_id */,
887 gfx::Size /* size */,
888 std::vector<unsigned char> /* png */)
890 #if defined(OS_MACOSX)
891 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay);
893 // Notification of a change in scrollbar appearance and/or behavior.
894 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme,
895 float /* initial_button_delay */,
896 float /* autoscroll_button_delay */,
897 bool /* jump_on_track_click */,
898 blink::ScrollerStyle /* preferred_scroller_style */,
899 bool /* redraw */)
900 #endif
902 #if defined(OS_ANDROID)
903 // Tells the renderer to suspend/resume the webkit timers.
904 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
905 bool /* suspend */)
907 // Sent when the browser wants the bounding boxes of the current find matches.
909 // If match rects are already cached on the browser side, |current_version|
910 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
911 // they came in, so the renderer can tell if it needs to send updated rects.
912 // Otherwise just pass -1 to always receive the list of rects.
914 // There must be an active search string (it is probably most useful to call
915 // this immediately after a ViewHostMsg_Find_Reply message arrives with
916 // final_update set to true).
917 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
918 int /* current_version */)
920 // External popup menus.
921 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems,
922 bool /* user canceled the popup */,
923 std::vector<int> /* selected indices */)
925 // Notifies the renderer whether hiding/showing the top controls is enabled
926 // and whether or not to animate to the proper state.
927 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
928 bool /* enable_hiding */,
929 bool /* enable_showing */,
930 bool /* animate */)
932 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
934 // Sent by the browser when the renderer should generate a new frame.
935 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
936 cc::BeginFrameArgs /* args */)
938 // Sent by the browser when an IME update that requires acknowledgement has been
939 // processed on the browser side.
940 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
942 // Extracts the data at the given rect, returning it through the
943 // ViewHostMsg_SmartClipDataExtracted IPC.
944 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
945 gfx::Rect /* rect */)
947 #elif defined(OS_MACOSX)
948 // Let the RenderView know its window has changed visibility.
949 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
950 bool /* visibile */)
952 // Let the RenderView know its window's frame has changed.
953 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
954 gfx::Rect /* window frame */,
955 gfx::Rect /* content view frame */)
957 // Message sent from the browser to the renderer when the user starts or stops
958 // resizing the view.
959 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
960 bool /* enable */)
962 // Tell the renderer that plugin IME has completed.
963 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
964 base::string16 /* text */,
965 int /* plugin_id */)
967 // External popup menus.
968 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
969 int /* selected index, -1 means no selection */)
970 #endif
972 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
973 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
974 uint32 /* output_surface_id */,
975 cc::CompositorFrameAck /* ack */)
977 // Sent by browser to tell renderer compositor that some resources that were
978 // given to the browser in a swap are not being used anymore.
979 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
980 uint32 /* output_surface_id */,
981 cc::CompositorFrameAck /* ack */)
983 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret)
985 // -----------------------------------------------------------------------------
986 // Messages sent from the renderer to the browser.
988 // Sent by the renderer when it is creating a new window. The browser creates
989 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
990 // MSG_ROUTING_NONE, the view couldn't be created.
991 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
992 ViewHostMsg_CreateWindow_Params,
993 int /* route_id */,
994 int /* main_frame_route_id */,
995 int32 /* surface_id */,
996 int64 /* cloned_session_storage_namespace_id */)
998 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
999 // <select> dropdowns. This message is sent to the WebContentsImpl that
1000 // contains the widget being created.
1001 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1002 int /* opener_id */,
1003 blink::WebPopupType /* popup type */,
1004 int /* route_id */,
1005 int32 /* surface_id */)
1007 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1008 // window.
1009 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1010 int /* opener_id */,
1011 int /* route_id */,
1012 int32 /* surface_id */)
1014 // Asks the browser for a unique routing ID.
1015 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1016 int /* routing_id */)
1018 // Asks the browser for the default audio hardware configuration.
1019 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1020 media::AudioParameters /* input parameters */,
1021 media::AudioParameters /* output parameters */)
1023 // Asks the browser for CPU usage of the renderer process in percents.
1024 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage,
1025 int /* CPU usage in percents */)
1027 // Asks the browser for the renderer process memory size stats.
1028 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1029 size_t /* private_bytes */,
1030 size_t /* shared_bytes */)
1032 // These three messages are sent to the parent RenderViewHost to display the
1033 // page/widget that was created by
1034 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1035 // refers to the id that was returned from the Create message above.
1036 // The initial_position parameter is a rectangle in screen coordinates.
1038 // FUTURE: there will probably be flags here to control if the result is
1039 // in a new window.
1040 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1041 int /* route_id */,
1042 WindowOpenDisposition /* disposition */,
1043 gfx::Rect /* initial_pos */,
1044 bool /* opened_by_user_gesture */)
1046 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1047 int /* route_id */,
1048 gfx::Rect /* initial_pos */)
1050 // Message to show a full screen widget.
1051 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1052 int /* route_id */)
1054 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1055 // to run in a modal fashion until it is closed.
1056 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1057 int /* opener_id */)
1059 // Indicates the renderer is ready in response to a ViewMsg_New or
1060 // a ViewMsg_CreatingNew_ACK.
1061 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1063 // Indicates the renderer process is gone. This actually is sent by the
1064 // browser process to itself, but keeps the interface cleaner.
1065 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1066 int, /* this really is base::TerminationStatus */
1067 int /* exit_code */)
1069 // Sent by the renderer process to request that the browser close the view.
1070 // This corresponds to the window.close() API, and the browser may ignore
1071 // this message. Otherwise, the browser will generates a ViewMsg_Close
1072 // message to close the view.
1073 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1075 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1076 // throttle these messages.
1077 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1079 // Sent by the renderer process to request that the browser move the view.
1080 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1081 // the browser may ignore this message.
1082 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1083 gfx::Rect /* position */)
1085 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1086 // Message to show/hide a popup menu using native controls.
1087 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1088 ViewHostMsg_ShowPopup_Params)
1089 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup)
1090 #endif
1092 // Result of string search in the page.
1093 // Response to ViewMsg_Find with the results of the requested find-in-page
1094 // search, the number of matches found and the selection rect (in screen
1095 // coordinates) for the string found. If |final_update| is false, it signals
1096 // that this is not the last Find_Reply message - more will be sent as the
1097 // scoping effort continues.
1098 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1099 int /* request_id */,
1100 int /* number of matches */,
1101 gfx::Rect /* selection_rect */,
1102 int /* active_match_ordinal */,
1103 bool /* final_update */)
1105 // Indicates that the render view has been closed in respose to a
1106 // Close message.
1107 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
1108 int /* old_route_id */);
1110 // Indicates that the current page has been closed, after a ClosePage
1111 // message.
1112 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1114 // Notifies the browser that we have session history information.
1115 // page_id: unique ID that allows us to distinguish between history entries.
1116 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1117 int32 /* page_id */,
1118 content::PageState /* state */)
1120 // Notifies the browser that we want to show a destination url for a potential
1121 // action (e.g. when the user is hovering over a link).
1122 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
1123 int32,
1124 GURL)
1126 // Sent when the document element is available for the top-level frame. This
1127 // happens after the page starts loading, but before all resources are
1128 // finished.
1129 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentAvailableInMainFrame,
1130 bool /* uses_temporary_zoom_level */)
1132 // Sent when the renderer loads a resource from its memory cache.
1133 // The security info is non empty if the resource was originally loaded over
1134 // a secure connection.
1135 // Note: May only be sent once per URL per frame per committed load.
1136 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1137 GURL /* url */,
1138 std::string /* security info */,
1139 std::string /* http method */,
1140 std::string /* mime type */,
1141 ResourceType::Type /* resource type */)
1143 // Sent when the renderer displays insecure content in a secure page.
1144 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1146 // Sent when the renderer runs insecure content in a secure origin.
1147 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1148 std::string /* security_origin */,
1149 GURL /* target URL */)
1151 // Sent to update part of the view. In response to this message, the host
1152 // generates a ViewMsg_UpdateRect_ACK message.
1153 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1154 ViewHostMsg_UpdateRect_Params)
1156 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1157 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1159 // Message sent from renderer to the browser when focus changes inside the
1160 // webpage. The parameter says whether the newly focused element needs
1161 // keyboard input (true for textfields, text areas and content editable divs).
1162 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1163 bool /* is_editable_node */)
1165 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, content::WebCursor)
1167 // Message sent from renderer requesting touch emulation using mouse.
1168 // Shift-scrolling should be converted to pinch, if |allow_pinch| is true.
1169 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchEventEmulationEnabled,
1170 bool /* enabled */,
1171 bool /* allow_pinch */)
1173 // Used to set a cookie. The cookie is set asynchronously, but will be
1174 // available to a subsequent ViewHostMsg_GetCookies request.
1175 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1176 int /* render_frame_id */,
1177 GURL /* url */,
1178 GURL /* first_party_for_cookies */,
1179 std::string /* cookie */)
1181 // Used to get cookies for the given URL. This may block waiting for a
1182 // previous SetCookie message to be processed.
1183 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1184 int /* render_frame_id */,
1185 GURL /* url */,
1186 GURL /* first_party_for_cookies */,
1187 std::string /* cookies */)
1189 // Used to get raw cookie information for the given URL. This may block
1190 // waiting for a previous SetCookie message to be processed.
1191 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1192 GURL /* url */,
1193 GURL /* first_party_for_cookies */,
1194 std::vector<content::CookieData>
1195 /* raw_cookies */)
1197 // Used to delete cookie for the given URL and name
1198 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1199 GURL /* url */,
1200 std::string /* cookie_name */)
1202 // Used to check if cookies are enabled for the given URL. This may block
1203 // waiting for a previous SetCookie message to be processed.
1204 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_CookiesEnabled,
1205 int /* render_frame_id */,
1206 GURL /* url */,
1207 GURL /* first_party_for_cookies */,
1208 bool /* cookies_enabled */)
1210 // Used to get the list of plugins
1211 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1212 bool /* refresh*/,
1213 std::vector<content::WebPluginInfo> /* plugins */)
1215 #if defined(OS_WIN)
1216 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1217 gfx::NativeViewId /* dummy_activation_window */)
1219 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1220 gfx::NativeViewId /* dummy_activation_window */)
1222 // Asks the browser for the user's monitor profile.
1223 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1224 std::vector<char> /* profile */)
1225 #endif
1227 // Get the list of proxies to use for |url|, as a semicolon delimited list
1228 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1229 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1230 GURL /* url */,
1231 bool /* result */,
1232 std::string /* proxy list */)
1234 // A renderer sends this to the browser process when it wants to create a
1235 // worker. The browser will create the worker process if necessary, and
1236 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1237 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1238 ViewHostMsg_CreateWorker_Params,
1239 int /* route_id */)
1241 // A renderer sends this to the browser process when a document has been
1242 // detached. The browser will use this to constrain the lifecycle of worker
1243 // processes (SharedWorkers are shut down when their last associated document
1244 // is detached).
1245 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1246 uint64 /* document_id */)
1248 // Wraps an IPC message that's destined to the worker on the renderer->browser
1249 // hop.
1250 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1251 IPC::Message /* message */)
1253 // Tells the browser that a specific Appcache manifest in the current page
1254 // was accessed.
1255 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1256 GURL /* manifest url */,
1257 bool /* blocked by policy */)
1259 // Initiates a download based on user actions like 'ALT+click'.
1260 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl,
1261 int /* render_view_id */,
1262 GURL /* url */,
1263 content::Referrer /* referrer */,
1264 base::string16 /* suggested_name */,
1265 bool /* use prompt for save location */)
1267 // Used to go to the session history entry at the given offset (ie, -1 will
1268 // return the "back" item).
1269 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1270 int /* offset (from current) of history item to get */)
1272 // Sent from an inactive renderer for the browser to route to the active
1273 // renderer, instructing it to close.
1274 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1276 // Sent to the browser from an inactive renderer to post a message to the
1277 // active renderer.
1278 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1279 ViewMsg_PostMessage_Params)
1281 // Notifies that the preferred size of the content changed.
1282 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1283 gfx::Size /* pref_size */)
1285 // Notifies that the scroll offset changed.
1286 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1287 // is not sent at all when threaded compositing is enabled while
1288 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1289 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset)
1291 // Notifies that the pinned-to-side state of the content changed.
1292 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
1293 bool /* pinned_to_left */,
1294 bool /* pinned_to_right */)
1296 // Notifies whether there are JavaScript touch event handlers or not.
1297 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1298 bool /* has_handlers */)
1300 // A message from HTML-based UI. When (trusted) Javascript calls
1301 // send(message, args), this message is sent to the browser.
1302 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1303 GURL /* source_url */,
1304 std::string /* message */,
1305 base::ListValue /* args */)
1307 // A renderer sends this to the browser process when it wants to create a ppapi
1308 // plugin. The browser will create the plugin process if necessary, and will
1309 // return a handle to the channel on success.
1311 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1312 // process. This ID is valid only in the context of the browser process and is
1313 // used to identify the proper process when the renderer notifies it that the
1314 // plugin is hung.
1316 // On error an empty string and null handles are returned.
1317 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1318 base::FilePath /* path */,
1319 IPC::ChannelHandle /* handle to channel */,
1320 base::ProcessId /* plugin_pid */,
1321 int /* plugin_child_id */)
1323 // Notification that a plugin has created a new plugin instance. The parameters
1324 // indicate:
1325 // -The plugin process ID that we're creating the instance for.
1326 // -The instance ID of the instance being created.
1327 // -A PepperRendererInstanceData struct which contains properties from the
1328 // renderer which are associated with the plugin instance. This includes the
1329 // routing ID of the associated render view and the URL of plugin.
1330 // -Whether the plugin we're creating an instance for is external or internal.
1332 // This message must be sync even though it returns no parameters to avoid
1333 // a race condition with the plugin process. The plugin process sends messages
1334 // to the browser that assume the browser knows about the instance. We need to
1335 // make sure that the browser actually knows about the instance before we tell
1336 // the plugin to run.
1337 IPC_SYNC_MESSAGE_CONTROL4_0(
1338 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1339 int /* plugin_child_id */,
1340 int32 /* pp_instance */,
1341 content::PepperRendererInstanceData /* creation_data */,
1342 bool /* is_external */)
1344 // Notification that a plugin has destroyed an instance. This is the opposite of
1345 // the "DidCreate" message above.
1346 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1347 int /* plugin_child_id */,
1348 int32 /* pp_instance */,
1349 bool /* is_external */)
1351 // Message from the renderer to the browser indicating the in-process instance
1352 // has been created.
1353 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1354 int32 /* instance */,
1355 content::PepperRendererInstanceData /* instance_data */)
1357 // Message from the renderer to the browser indicating the in-process instance
1358 // has been destroyed.
1359 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1360 int32 /* instance */)
1362 // A renderer sends this to the browser process when it wants to
1363 // create a ppapi broker. The browser will create the broker process
1364 // if necessary, and will return a handle to the channel on success.
1365 // On error an empty string is returned.
1366 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1367 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1368 int /* routing_id */,
1369 base::FilePath /* path */)
1371 // A renderer sends this to the browser process when it wants to access a PPAPI
1372 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1373 // for every connection.
1374 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1375 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1376 int /* routing_id */,
1377 GURL /* document_url */,
1378 base::FilePath /* plugin_path */)
1380 // Send the tooltip text for the current mouse position to the browser.
1381 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1382 base::string16 /* tooltip text string */,
1383 blink::WebTextDirection /* text direction hint */)
1385 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
1386 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
1388 // Notification that the text selection has changed.
1389 // Note: The secound parameter is the character based offset of the
1390 // base::string16
1391 // text in the document.
1392 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1393 base::string16 /* text covers the selection range */,
1394 size_t /* the offset of the text in the document */,
1395 gfx::Range /* selection range in the document */)
1397 // Notification that the selection bounds have changed.
1398 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1399 ViewHostMsg_SelectionBounds_Params)
1401 // Asks the browser to display the file chooser. The result is returned in a
1402 // ViewMsg_RunFileChooserResponse message.
1403 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1404 content::FileChooserParams)
1406 // Asks the browser to enumerate a directory. This is equivalent to running
1407 // the file chooser in directory-enumeration mode and having the user select
1408 // the given directory. The result is returned in a
1409 // ViewMsg_EnumerateDirectoryResponse message.
1410 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1411 int /* request_id */,
1412 base::FilePath /* file_path */)
1414 // Tells the browser to move the focus to the next (previous if reverse is
1415 // true) focusable element.
1416 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1417 bool /* reverse */)
1419 // Required for opening a date/time dialog
1420 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1421 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1423 IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged,
1424 ui::TextInputType /* TextInputType of the focused node */,
1425 ui::TextInputMode /* TextInputMode of the focused node */,
1426 bool /* can_compose_inline in the focused node */)
1428 // Required for updating text input state.
1429 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1430 ViewHostMsg_TextInputState_Params /* input state params */)
1432 // Required for cancelling an ongoing input method composition.
1433 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition)
1435 // Sent when the renderer changes the zoom level for a particular url, so the
1436 // browser can update its records. If the view is a plugin doc, then url is
1437 // used to update the zoom level for all pages in that site. Otherwise, the
1438 // render view's id is used so that only the menu is updated.
1439 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1440 double /* zoom_level */,
1441 GURL /* url */)
1443 // Updates the minimum/maximum allowed zoom percent for this tab from the
1444 // default values. If |remember| is true, then the zoom setting is applied to
1445 // other pages in the site and is saved, otherwise it only applies to this
1446 // tab.
1447 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateZoomLimits,
1448 int /* minimum_percent */,
1449 int /* maximum_percent */)
1451 // Notify the browser that this render process can or can't be suddenly
1452 // terminated.
1453 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1454 bool /* enabled */)
1456 IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params)
1457 IPC_STRUCT_MEMBER(int32, surface_id)
1458 IPC_STRUCT_MEMBER(uint64, surface_handle)
1459 IPC_STRUCT_MEMBER(int32, route_id)
1460 IPC_STRUCT_MEMBER(gfx::Size, size)
1461 IPC_STRUCT_MEMBER(float, scale_factor)
1462 IPC_STRUCT_MEMBER(int32, gpu_process_host_id)
1463 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
1464 IPC_STRUCT_END()
1466 // This message is synthesized by GpuProcessHost to pass through a swap message
1467 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
1468 // software or GPU frame.
1469 IPC_MESSAGE_ROUTED1(
1470 ViewHostMsg_CompositorSurfaceBuffersSwapped,
1471 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params /* params */)
1473 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame,
1474 uint32 /* output_surface_id */,
1475 cc::CompositorFrame /* frame */)
1477 // Sent by the compositor when a flinging animation is stopped.
1478 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
1480 //---------------------------------------------------------------------------
1481 // Request for cryptographic operation messages:
1482 // These are messages from the renderer to the browser to perform a
1483 // cryptographic operation.
1485 // Asks the browser process to generate a keypair for grabbing a client
1486 // certificate from a CA (<keygen> tag), and returns the signed public
1487 // key and challenge string.
1488 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
1489 uint32 /* key size index */,
1490 std::string /* challenge string */,
1491 GURL /* URL of requestor */,
1492 std::string /* signed public key and challenge */)
1494 // Message sent from the renderer to the browser to request that the browser
1495 // cache |data| associated with |url|.
1496 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
1497 GURL /* url */,
1498 double /* expected_response_time */,
1499 std::vector<char> /* data */)
1501 // Register a new handler for URL requests with the given scheme.
1502 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
1503 std::string /* scheme */,
1504 GURL /* url */,
1505 base::string16 /* title */,
1506 bool /* user_gesture */)
1508 // Stores new inspector setting in the profile.
1509 // TODO(jam): this should be in the chrome module
1510 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
1511 std::string, /* key */
1512 std::string /* value */)
1514 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1515 // See the comment in chrome/browser/ui/browser.h for more details.
1516 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
1517 bool /* enter_fullscreen */)
1519 // Send back a string to be recorded by UserMetrics.
1520 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
1521 std::string /* action */)
1523 // Notifies the browser that the page was or was not saved as MHTML.
1524 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
1525 int /* job_id */,
1526 int64 /* size of the MHTML file, -1 if error */)
1528 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
1529 std::vector<GURL> /* all savable resource links */,
1530 std::vector<content::Referrer> /* all referrers */,
1531 std::vector<GURL> /* all frame links */)
1533 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
1534 GURL /* frame's url */,
1535 std::string /* data buffer */,
1536 int32 /* complete status */)
1538 // Notifies the browser of an event occurring in the media pipeline.
1539 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
1540 std::vector<media::MediaLogEvent> /* events */)
1542 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1543 // being sent back.
1544 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1545 // pop up a bubble to ask for user permission or take mouse lock content into
1546 // account.
1547 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
1548 bool /* user_gesture */,
1549 bool /* last_unlocked_by_target */,
1550 bool /* privileged */)
1552 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1553 // whenever the mouse is unlocked (which may or may not be caused by
1554 // ViewHostMsg_UnlockMouse).
1555 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
1557 // Notifies that multiple touch targets may have been pressed, and to show
1558 // the disambiguation popup.
1559 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
1560 gfx::Rect, /* Border of touched targets */
1561 gfx::Size, /* Size of zoomed image */
1562 cc::SharedBitmapId /* id */)
1564 // Sent by the renderer process to check whether client 3D APIs
1565 // (Pepper 3D, WebGL) are explicitly blocked.
1566 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
1567 int /* render_view_id */,
1568 GURL /* top_origin_url */,
1569 content::ThreeDAPIType /* requester */,
1570 bool /* blocked */)
1572 // Sent by the renderer process to indicate that a context was lost by
1573 // client 3D content (Pepper 3D, WebGL) running on the page at the
1574 // given URL.
1575 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
1576 GURL /* top_origin_url */,
1577 content::ThreeDAPIType /* context_type */,
1578 int /* arb_robustness_status_code */)
1580 // Notifies the browser that document has parsed the body. This is used by the
1581 // ResourceScheduler as an indication that bandwidth contention won't block
1582 // first paint.
1583 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
1585 // Notification that the urls for the favicon of a site has been determined.
1586 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL,
1587 std::vector<content::FaviconURL> /* candidates */)
1589 // Sent once a paint happens after the first non empty layout. In other words
1590 // after the page has painted something.
1591 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint)
1593 // Sent by the renderer to the browser to start a vibration with the given
1594 // duration.
1595 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
1596 int64 /* milliseconds */)
1598 // Sent by the renderer to the browser to cancel the currently running
1599 // vibration, if there is one.
1600 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
1602 // Message sent from renderer to the browser when the element that is focused
1603 // has been touched. A bool is passed in this message which indicates if the
1604 // node is editable.
1605 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
1606 bool /* editable */)
1608 // Message sent from the renderer to the browser when an HTML form has failed
1609 // validation constraints.
1610 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
1611 gfx::Rect /* anchor rectangle in root view coordinate */,
1612 base::string16 /* validation message */,
1613 base::string16 /* supplemental text */)
1615 // Message sent from the renderer to the browser when a HTML form validation
1616 // message should be hidden from view.
1617 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
1619 // Message sent from the renderer to the browser when the suggested co-ordinates
1620 // of the anchor for a HTML form validation message have changed.
1621 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
1622 gfx::Rect /* anchor rectangle in root view coordinate */)
1624 #if defined(OS_ANDROID)
1625 // Response to ViewMsg_FindMatchRects.
1627 // |version| will contain the current version number of the renderer's find
1628 // match list (incremented whenever they change), which should be passed in the
1629 // next call to ViewMsg_FindMatchRects.
1631 // |rects| will either contain a list of the enclosing rects of all matches
1632 // found by the most recent Find operation, or will be empty if |version| is not
1633 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1634 // your locally cached rects should still be valid). The rect coords will be
1635 // custom normalized fractions of the document size. The rects will be sorted by
1636 // frame traversal order starting in the main frame, then by dom order.
1638 // |active_rect| will contain the bounding box of the active find-in-page match
1639 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1640 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
1641 int /* version */,
1642 std::vector<gfx::RectF> /* rects */,
1643 gfx::RectF /* active_rect */)
1645 // Start an android intent with the given URI.
1646 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
1647 GURL /* content_url */)
1649 // Message sent when the renderer changed the background color for the view.
1650 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
1651 uint32 /* bg_color */)
1653 // This message runs the MediaCodec for decoding audio for webaudio.
1654 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
1655 base::SharedMemoryHandle /* encoded_data_handle */,
1656 base::FileDescriptor /* pcm_output */,
1657 uint32_t /* data_size*/)
1659 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1660 // display events. If |enabled| is true, the BeginFrame message will continue
1661 // to be be delivered until the notification is disabled.
1662 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
1663 bool /* enabled */)
1665 // Reply to the ViewMsg_ExtractSmartClipData message.
1666 // TODO(juhui24.lee@samsung.com): this should be changed to a vector of structs
1667 // instead of encoding the data as a string which is not allowed normally. Since
1668 // ths is only used in Android WebView, it's allowed temporarily.
1669 // http://crbug.com/330872
1670 IPC_MESSAGE_ROUTED1(ViewHostMsg_SmartClipDataExtracted, base::string16)
1672 #elif defined(OS_MACOSX)
1673 // Request that the browser load a font into shared memory for us.
1674 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
1675 FontDescriptor /* font to load */,
1676 uint32 /* buffer size */,
1677 base::SharedMemoryHandle /* font data */,
1678 uint32 /* font id */)
1680 // Informs the browser that a plugin has gained or lost focus.
1681 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
1682 bool, /* focused */
1683 int /* plugin_id */)
1685 // Instructs the browser to start plugin IME.
1686 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1688 // Notifies that the scrollbars-visible state of the content changed.
1689 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame,
1690 bool /* has_horizontal_scrollbar */,
1691 bool /* has_vertical_scrollbar */)
1693 #elif defined(OS_WIN)
1694 // Request that the given font characters be loaded by the browser so it's
1695 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1696 // for details.
1697 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1698 LOGFONT /* font_data */,
1699 base::string16 /* characters */)
1700 #endif
1702 #if defined(OS_POSIX)
1703 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1704 // this call exists for the renderer to ask the browser to allocate memory
1705 // on its behalf. We return a file descriptor to the POSIX shared memory.
1706 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1707 // by the browser, and it is the caller's repsonsibility to send a
1708 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1709 // In all cases, the caller is responsible for deleting the resulting
1710 // TransportDIB.
1711 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
1712 uint32_t, /* bytes requested */
1713 bool, /* cache in the browser */
1714 TransportDIB::Handle /* DIB */)
1716 // Since the browser keeps handles to the allocated transport DIBs, this
1717 // message is sent to tell the browser that it may release them when the
1718 // renderer is finished with them.
1719 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1720 TransportDIB::Id /* DIB id */)
1721 #endif
1723 #if defined(OS_MACOSX) || defined(USE_AURA)
1724 // On Mac and Aura IME can request composition character bounds
1725 // synchronously (see crbug.com/120597). This IPC message sends the character
1726 // bounds after every composition change to always have correct bound info.
1727 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged,
1728 gfx::Range /* composition range */,
1729 std::vector<gfx::Rect> /* character bounds */)
1730 #endif
1732 // Adding a new message? Stick to the sort order above: first platform
1733 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1734 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.