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 "third_party/WebKit/public/platform/WebFloatPoint.h"
40 #include "third_party/WebKit/public/platform/WebFloatRect.h"
41 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
42 #include "third_party/WebKit/public/web/WebFindOptions.h"
43 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
44 #include "third_party/WebKit/public/web/WebPluginAction.h"
45 #include "third_party/WebKit/public/web/WebPopupType.h"
46 #include "third_party/WebKit/public/web/WebTextDirection.h"
47 #include "third_party/skia/include/core/SkBitmap.h"
48 #include "ui/base/ime/text_input_mode.h"
49 #include "ui/base/ime/text_input_type.h"
50 #include "ui/base/ui_base_types.h"
51 #include "ui/gfx/point.h"
52 #include "ui/gfx/range/range.h"
53 #include "ui/gfx/rect.h"
54 #include "ui/gfx/rect_f.h"
55 #include "ui/gfx/vector2d.h"
56 #include "ui/gfx/vector2d_f.h"
57 #include "ui/shell_dialogs/selected_file_info.h"
59 #if defined(OS_MACOSX)
60 #include "content/common/mac/font_descriptor.h"
61 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
64 #undef IPC_MESSAGE_EXPORT
65 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
67 #define IPC_MESSAGE_START ViewMsgStart
69 IPC_ENUM_TRAITS(AccessibilityMode
)
70 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type
)
71 IPC_ENUM_TRAITS(blink::WebPluginAction::Type
)
72 IPC_ENUM_TRAITS(blink::WebPopupType
)
73 IPC_ENUM_TRAITS(blink::WebTextDirection
)
74 IPC_ENUM_TRAITS(WindowContainerType
)
75 IPC_ENUM_TRAITS(content::FaviconURL::IconType
)
76 IPC_ENUM_TRAITS(content::FileChooserParams::Mode
)
77 IPC_ENUM_TRAITS(content::MenuItem::Type
)
78 IPC_ENUM_TRAITS(content::NavigationGesture
)
79 IPC_ENUM_TRAITS(content::PageZoom
)
80 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum
)
81 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum
)
82 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy
,
83 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX
)
84 IPC_ENUM_TRAITS(content::StopFindAction
)
85 IPC_ENUM_TRAITS(content::ThreeDAPIType
)
86 IPC_ENUM_TRAITS(media::ChannelLayout
)
87 IPC_ENUM_TRAITS(media::MediaLogEvent::Type
)
88 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode
, ui::TEXT_INPUT_MODE_MAX
)
89 IPC_ENUM_TRAITS(ui::TextInputType
)
91 #if defined(OS_MACOSX)
92 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
93 IPC_STRUCT_TRAITS_MEMBER(font_name
)
94 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
95 IPC_STRUCT_TRAITS_END()
98 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions
)
99 IPC_STRUCT_TRAITS_MEMBER(forward
)
100 IPC_STRUCT_TRAITS_MEMBER(matchCase
)
101 IPC_STRUCT_TRAITS_MEMBER(findNext
)
102 IPC_STRUCT_TRAITS_END()
104 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction
)
105 IPC_STRUCT_TRAITS_MEMBER(type
)
106 IPC_STRUCT_TRAITS_MEMBER(enable
)
107 IPC_STRUCT_TRAITS_END()
109 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction
)
110 IPC_STRUCT_TRAITS_MEMBER(type
)
111 IPC_STRUCT_TRAITS_MEMBER(enable
)
112 IPC_STRUCT_TRAITS_END()
114 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint
)
115 IPC_STRUCT_TRAITS_MEMBER(x
)
116 IPC_STRUCT_TRAITS_MEMBER(y
)
117 IPC_STRUCT_TRAITS_END()
119 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect
)
120 IPC_STRUCT_TRAITS_MEMBER(x
)
121 IPC_STRUCT_TRAITS_MEMBER(y
)
122 IPC_STRUCT_TRAITS_MEMBER(width
)
123 IPC_STRUCT_TRAITS_MEMBER(height
)
124 IPC_STRUCT_TRAITS_END()
126 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo
)
127 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor
)
128 IPC_STRUCT_TRAITS_MEMBER(depth
)
129 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent
)
130 IPC_STRUCT_TRAITS_MEMBER(isMonochrome
)
131 IPC_STRUCT_TRAITS_MEMBER(rect
)
132 IPC_STRUCT_TRAITS_MEMBER(availableRect
)
133 IPC_STRUCT_TRAITS_MEMBER(orientationType
)
134 IPC_STRUCT_TRAITS_MEMBER(orientationAngle
)
135 IPC_STRUCT_TRAITS_END()
137 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem
)
138 IPC_STRUCT_TRAITS_MEMBER(label
)
139 IPC_STRUCT_TRAITS_MEMBER(tool_tip
)
140 IPC_STRUCT_TRAITS_MEMBER(type
)
141 IPC_STRUCT_TRAITS_MEMBER(action
)
142 IPC_STRUCT_TRAITS_MEMBER(rtl
)
143 IPC_STRUCT_TRAITS_MEMBER(has_directional_override
)
144 IPC_STRUCT_TRAITS_MEMBER(enabled
)
145 IPC_STRUCT_TRAITS_MEMBER(checked
)
146 IPC_STRUCT_TRAITS_MEMBER(submenu
)
147 IPC_STRUCT_TRAITS_END()
149 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion
)
150 IPC_STRUCT_TRAITS_MEMBER(value
)
151 IPC_STRUCT_TRAITS_MEMBER(localized_value
)
152 IPC_STRUCT_TRAITS_MEMBER(label
)
153 IPC_STRUCT_TRAITS_END()
155 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL
)
156 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
157 IPC_STRUCT_TRAITS_MEMBER(icon_type
)
158 IPC_STRUCT_TRAITS_MEMBER(icon_sizes
)
159 IPC_STRUCT_TRAITS_END()
161 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams
)
162 IPC_STRUCT_TRAITS_MEMBER(mode
)
163 IPC_STRUCT_TRAITS_MEMBER(title
)
164 IPC_STRUCT_TRAITS_MEMBER(default_file_name
)
165 IPC_STRUCT_TRAITS_MEMBER(accept_types
)
166 #if defined(OS_ANDROID)
167 IPC_STRUCT_TRAITS_MEMBER(capture
)
169 IPC_STRUCT_TRAITS_END()
171 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData
)
172 IPC_STRUCT_TRAITS_MEMBER(render_process_id
)
173 IPC_STRUCT_TRAITS_MEMBER(render_frame_id
)
174 IPC_STRUCT_TRAITS_MEMBER(document_url
)
175 IPC_STRUCT_TRAITS_MEMBER(plugin_url
)
176 IPC_STRUCT_TRAITS_END()
178 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences
)
179 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops
)
180 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text
)
181 IPC_STRUCT_TRAITS_MEMBER(hinting
)
182 IPC_STRUCT_TRAITS_MEMBER(use_autohinter
)
183 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps
)
184 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering
)
185 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning
)
186 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color
)
187 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color
)
188 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color
)
189 IPC_STRUCT_TRAITS_MEMBER(track_color
)
190 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color
)
191 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color
)
192 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color
)
193 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color
)
194 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests
)
195 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests
)
196 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval
)
197 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors
)
198 IPC_STRUCT_TRAITS_MEMBER(enable_referrers
)
199 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track
)
200 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level
)
201 IPC_STRUCT_TRAITS_MEMBER(user_agent_override
)
202 IPC_STRUCT_TRAITS_MEMBER(accept_languages
)
203 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes
)
204 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile
)
205 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile
)
206 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy
)
207 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page
)
208 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed
)
209 IPC_STRUCT_TRAITS_MEMBER(use_video_overlay_for_embedded_encrypted_video
)
210 IPC_STRUCT_TRAITS_END()
212 IPC_STRUCT_TRAITS_BEGIN(content::CookieData
)
213 IPC_STRUCT_TRAITS_MEMBER(name
)
214 IPC_STRUCT_TRAITS_MEMBER(value
)
215 IPC_STRUCT_TRAITS_MEMBER(domain
)
216 IPC_STRUCT_TRAITS_MEMBER(path
)
217 IPC_STRUCT_TRAITS_MEMBER(expires
)
218 IPC_STRUCT_TRAITS_MEMBER(http_only
)
219 IPC_STRUCT_TRAITS_MEMBER(secure
)
220 IPC_STRUCT_TRAITS_MEMBER(session
)
221 IPC_STRUCT_TRAITS_END()
223 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry
)
224 IPC_STRUCT_TRAITS_MEMBER(window
)
225 IPC_STRUCT_TRAITS_MEMBER(window_rect
)
226 IPC_STRUCT_TRAITS_MEMBER(clip_rect
)
227 IPC_STRUCT_TRAITS_MEMBER(cutout_rects
)
228 IPC_STRUCT_TRAITS_MEMBER(rects_valid
)
229 IPC_STRUCT_TRAITS_MEMBER(visible
)
230 IPC_STRUCT_TRAITS_END()
232 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent
)
233 IPC_STRUCT_TRAITS_MEMBER(id
)
234 IPC_STRUCT_TRAITS_MEMBER(type
)
235 IPC_STRUCT_TRAITS_MEMBER(params
)
236 IPC_STRUCT_TRAITS_MEMBER(time
)
237 IPC_STRUCT_TRAITS_END()
239 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo
)
240 IPC_STRUCT_TRAITS_MEMBER(file_path
)
241 IPC_STRUCT_TRAITS_MEMBER(local_path
)
242 IPC_STRUCT_TRAITS_MEMBER(display_name
)
243 IPC_STRUCT_TRAITS_END()
245 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params
)
246 // Routing ID of the view initiating the open.
247 IPC_STRUCT_MEMBER(int, opener_id
)
249 // True if this open request came in the context of a user gesture.
250 IPC_STRUCT_MEMBER(bool, user_gesture
)
252 // Type of window requested.
253 IPC_STRUCT_MEMBER(WindowContainerType
, window_container_type
)
255 // The session storage namespace ID this view should use.
256 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
258 // The name of the resulting frame that should be created (empty if none
259 // has been specified).
260 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
262 // The routing id of the frame initiating the open.
263 IPC_STRUCT_MEMBER(int, opener_render_frame_id
)
265 // The URL of the frame initiating the open.
266 IPC_STRUCT_MEMBER(GURL
, opener_url
)
268 // The URL of the top frame containing the opener.
269 IPC_STRUCT_MEMBER(GURL
, opener_top_level_frame_url
)
271 // The security origin of the frame initiating the open.
272 IPC_STRUCT_MEMBER(GURL
, opener_security_origin
)
274 // Whether the opener will be suppressed in the new window, in which case
275 // scripting the new window is not allowed.
276 IPC_STRUCT_MEMBER(bool, opener_suppressed
)
278 // Whether the window should be opened in the foreground, background, etc.
279 IPC_STRUCT_MEMBER(WindowOpenDisposition
, disposition
)
281 // The URL that will be loaded in the new window (empty if none has been
283 IPC_STRUCT_MEMBER(GURL
, target_url
)
285 // The referrer that will be used to load |target_url| (empty if none has
287 IPC_STRUCT_MEMBER(content::Referrer
, referrer
)
289 // The window features to use for the new view.
290 IPC_STRUCT_MEMBER(blink::WebWindowFeatures
, features
)
292 // The additional window features to use for the new view. We pass these
293 // separately from |features| above because we cannot serialize WebStrings
295 IPC_STRUCT_MEMBER(std::vector
<base::string16
>, additional_features
)
298 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params
)
299 // URL for the worker script.
300 IPC_STRUCT_MEMBER(GURL
, url
)
302 // Name for a SharedWorker, otherwise empty string.
303 IPC_STRUCT_MEMBER(base::string16
, name
)
305 // Security policy used in the worker.
306 IPC_STRUCT_MEMBER(base::string16
, content_security_policy
)
308 // Security policy type used in the worker.
309 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType
, security_policy_type
)
311 // The ID of the parent document (unique within parent renderer).
312 IPC_STRUCT_MEMBER(unsigned long long, document_id
)
314 // RenderFrame routing id used to send messages back to the parent.
315 IPC_STRUCT_MEMBER(int, render_frame_route_id
)
318 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params
)
319 IPC_STRUCT_MEMBER(ui::TextInputType
, dialog_type
)
320 IPC_STRUCT_MEMBER(double, dialog_value
)
321 IPC_STRUCT_MEMBER(double, minimum
)
322 IPC_STRUCT_MEMBER(double, maximum
)
323 IPC_STRUCT_MEMBER(double, step
)
324 IPC_STRUCT_MEMBER(std::vector
<content::DateTimeSuggestion
>, suggestions
)
327 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params
)
328 IPC_STRUCT_MEMBER(gfx::Rect
, anchor_rect
)
329 IPC_STRUCT_MEMBER(blink::WebTextDirection
, anchor_dir
)
330 IPC_STRUCT_MEMBER(gfx::Rect
, focus_rect
)
331 IPC_STRUCT_MEMBER(blink::WebTextDirection
, focus_dir
)
332 IPC_STRUCT_MEMBER(bool, is_anchor_first
)
335 // This message is used for supporting popup menus on Mac OS X using native
336 // Cocoa controls. The renderer sends us this message which we use to populate
338 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params
)
339 // Position on the screen.
340 IPC_STRUCT_MEMBER(gfx::Rect
, bounds
)
342 // The height of each item in the menu.
343 IPC_STRUCT_MEMBER(int, item_height
)
345 // The size of the font to use for those items.
346 IPC_STRUCT_MEMBER(double, item_font_size
)
348 // The currently selected (displayed) item in the menu.
349 IPC_STRUCT_MEMBER(int, selected_item
)
351 // The entire list of items in the popup menu.
352 IPC_STRUCT_MEMBER(std::vector
<content::MenuItem
>, popup_items
)
354 // Whether items should be right-aligned.
355 IPC_STRUCT_MEMBER(bool, right_aligned
)
357 // Whether this is a multi-select popup.
358 IPC_STRUCT_MEMBER(bool, allow_multiple_selection
)
361 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params
)
362 // The type of input field
363 IPC_STRUCT_MEMBER(ui::TextInputType
, type
)
365 // The value of the input field
366 IPC_STRUCT_MEMBER(std::string
, value
)
368 // The cursor position of the current selection start, or the caret position
369 // if nothing is selected
370 IPC_STRUCT_MEMBER(int, selection_start
)
372 // The cursor position of the current selection end, or the caret position
373 // if nothing is selected
374 IPC_STRUCT_MEMBER(int, selection_end
)
376 // The start position of the current composition, or -1 if there is none
377 IPC_STRUCT_MEMBER(int, composition_start
)
379 // The end position of the current composition, or -1 if there is none
380 IPC_STRUCT_MEMBER(int, composition_end
)
382 // Whether or not inline composition can be performed for the current input.
383 IPC_STRUCT_MEMBER(bool, can_compose_inline
)
385 // Whether or not the IME should be shown as a result of this update. Even if
386 // true, the IME will only be shown if the type is appropriate (e.g. not
387 // TEXT_INPUT_TYPE_NONE).
388 IPC_STRUCT_MEMBER(bool, show_ime_if_needed
)
390 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
391 IPC_STRUCT_MEMBER(bool, is_non_ime_change
)
394 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params
)
395 // The scroll offset of the render view.
396 IPC_STRUCT_MEMBER(gfx::Vector2d
, scroll_offset
)
398 // The size of the RenderView when this message was generated. This is
399 // included so the host knows how large the view is from the perspective of
400 // the renderer process. This is necessary in case a resize operation is in
401 // progress. If auto-resize is enabled, this should update the corresponding
403 IPC_STRUCT_MEMBER(gfx::Size
, view_size
)
405 // New window locations for plugin child windows.
406 IPC_STRUCT_MEMBER(std::vector
<content::WebPluginGeometry
>,
409 // The following describes the various bits that may be set in flags:
411 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
412 // Indicates that this is a response to a ViewMsg_Resize message.
414 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
415 // Indicates that this is a response to a ViewMsg_Repaint message.
417 // If flags is zero, then this message corresponds to an unsolicited paint
418 // request by the render view. Any of the above bits may be set in flags,
419 // which would indicate that this paint message is an ACK for multiple
421 IPC_STRUCT_MEMBER(int, flags
)
423 // All the above coordinates are in DIP. This is the scale factor needed
424 // to convert them to pixels.
425 IPC_STRUCT_MEMBER(float, scale_factor
)
428 IPC_STRUCT_BEGIN(ViewMsg_New_Params
)
429 // Renderer-wide preferences.
430 IPC_STRUCT_MEMBER(content::RendererPreferences
, renderer_preferences
)
432 // Preferences for this view.
433 IPC_STRUCT_MEMBER(WebPreferences
, web_preferences
)
435 // The ID of the view to be created.
436 IPC_STRUCT_MEMBER(int32
, view_id
)
438 // The ID of the main frame hosted in the view.
439 IPC_STRUCT_MEMBER(int32
, main_frame_routing_id
)
441 // The ID of the rendering surface.
442 IPC_STRUCT_MEMBER(int32
, surface_id
)
444 // The session storage namespace ID this view should use.
445 IPC_STRUCT_MEMBER(int64
, session_storage_namespace_id
)
447 // The name of the frame associated with this view (or empty if none).
448 IPC_STRUCT_MEMBER(base::string16
, frame_name
)
450 // The route ID of the opener RenderView if we need to set one
451 // (MSG_ROUTING_NONE otherwise).
452 IPC_STRUCT_MEMBER(int, opener_route_id
)
454 // Whether the RenderView should initially be swapped out.
455 IPC_STRUCT_MEMBER(bool, swapped_out
)
457 // The ID of the proxy object for the main frame in this view. It is only
458 // used if |swapped_out| is true.
459 IPC_STRUCT_MEMBER(int32
, proxy_routing_id
)
461 // Whether the RenderView should initially be hidden.
462 IPC_STRUCT_MEMBER(bool, hidden
)
464 // Whether the RenderView will never be visible.
465 IPC_STRUCT_MEMBER(bool, never_visible
)
467 // Whether the window associated with this view was created with an opener.
468 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener
)
470 // The initial page ID to use for this view, which must be larger than any
471 // existing navigation that might be loaded in the view. Page IDs are unique
472 // to a view and are only updated by the renderer after this initial value.
473 IPC_STRUCT_MEMBER(int32
, next_page_id
)
475 // The properties of the screen associated with the view.
476 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
478 // The accessibility mode of the renderer.
479 IPC_STRUCT_MEMBER(AccessibilityMode
, accessibility_mode
)
482 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params
)
483 // The serialized script value.
484 IPC_STRUCT_MEMBER(base::string16
, data
)
486 // When sent to the browser, this is the routing ID of the source frame in
487 // the source process. The browser replaces it with the routing ID of the
488 // equivalent (swapped out) frame in the destination process.
489 IPC_STRUCT_MEMBER(int, source_routing_id
)
491 // The origin of the source frame.
492 IPC_STRUCT_MEMBER(base::string16
, source_origin
)
494 // The origin for the message's target.
495 IPC_STRUCT_MEMBER(base::string16
, target_origin
)
497 // Information about the MessagePorts this message contains.
498 IPC_STRUCT_MEMBER(std::vector
<int>, message_port_ids
)
499 IPC_STRUCT_MEMBER(std::vector
<int>, new_routing_ids
)
502 // Messages sent from the browser to the renderer.
504 // Tells the renderer to cancel an opened date/time dialog.
505 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog
)
507 // Get all savable resource links from current webpage, include main
508 // frame and sub-frame.
509 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage
,
510 GURL
/* url of page which is needed to save */)
512 // Get html data by serializing all frames of current page with lists
513 // which contain all resource links that have local copy.
514 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks
,
515 std::vector
<GURL
> /* urls that have local copy */,
516 std::vector
<base::FilePath
> /* paths of local copy */,
517 base::FilePath
/* local directory path */)
519 // Tells the render side that a ViewHostMsg_LockMouse message has been
520 // processed. |succeeded| indicates whether the mouse has been successfully
522 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK
,
523 bool /* succeeded */)
524 // Tells the render side that the mouse has been unlocked.
525 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost
)
527 // Sent by the browser when the parameters for vsync alignment have changed.
528 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters
,
529 base::TimeTicks
/* timebase */,
530 base::TimeDelta
/* interval */)
532 // Sent to the RenderView when a new tab is swapped into an existing
533 // tab and the histories need to be merged. The existing tab has a history of
534 // |merged_history_length| which precedes the history of the new tab. All
535 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
537 // For example, suppose the history of page_ids in the new tab's RenderView
538 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
539 // all pages in the new tab with page_id >= 7 are to be preserved.
540 // The resulting page history is [-1 -1 -1 7 8].
541 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune
,
542 int, /* merge_history_length */
543 int32
/* minimum_page_id */)
545 // Tells the renderer to create a new view.
546 // This message is slightly different, the view it takes (via
547 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
548 // non-view control message.
549 IPC_MESSAGE_CONTROL1(ViewMsg_New
,
552 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
553 // similar to the new command, but used when the renderer created a view
554 // first, and we need to update it.
555 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK
)
557 // Sends updated preferences to the renderer.
558 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs
,
559 content::RendererPreferences
)
561 // This passes a set of webkit preferences down to the renderer.
562 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences
,
565 // Informs the renderer that the timezone has changed.
566 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange
)
568 // Tells the render view to close.
569 IPC_MESSAGE_ROUTED0(ViewMsg_Close
)
571 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params
)
572 IPC_STRUCT_MEMBER(blink::WebScreenInfo
, screen_info
)
573 IPC_STRUCT_MEMBER(gfx::Size
, new_size
)
574 IPC_STRUCT_MEMBER(gfx::Size
, physical_backing_size
)
575 IPC_STRUCT_MEMBER(float, overdraw_bottom_height
)
576 IPC_STRUCT_MEMBER(gfx::Size
, visible_viewport_size
)
577 IPC_STRUCT_MEMBER(gfx::Rect
, resizer_rect
)
578 IPC_STRUCT_MEMBER(bool, is_fullscreen
)
581 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
582 // is generated in response provided new_size is not empty and not equal to
583 // the view's current size. The generated ViewHostMsg_UpdateRect message will
584 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
585 // we don't have to fetch it every time WebKit asks for it.
586 IPC_MESSAGE_ROUTED1(ViewMsg_Resize
,
587 ViewMsg_Resize_Params
/* params */)
589 // Tells the render view that the resize rect has changed.
590 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect
,
591 gfx::Rect
/* resizer_rect */)
593 // Sent to inform the view that it was hidden. This allows it to reduce its
594 // resource utilization.
595 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden
)
597 // Tells the render view that it is no longer hidden (see WasHidden), and the
598 // render view is expected to respond with a full repaint if needs_repainting
599 // is true. If needs_repainting is false, then this message does not trigger a
600 // message in response.
601 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown
,
602 bool /* needs_repainting */)
604 // Sent to inform the view that it was swapped out. This allows the process to
605 // exit if no other views are using it.
606 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut
)
608 // Tells the renderer to focus the first (last if reverse is true) focusable
610 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus
,
613 // Sent to inform the renderer to invoke a context menu.
614 // The parameter specifies the location in the render view's coordinates.
615 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu
,
616 gfx::Point
/* location where menu should be shown */)
618 IPC_MESSAGE_ROUTED0(ViewMsg_Stop
)
620 // Sent when the user wants to search for a word on the page (find in page).
621 IPC_MESSAGE_ROUTED3(ViewMsg_Find
,
622 int /* request_id */,
623 base::string16
/* search_text */,
624 blink::WebFindOptions
)
626 // This message notifies the renderer that the user has closed the FindInPage
627 // window (and what action to take regarding the selection).
628 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding
,
629 content::StopFindAction
/* action */)
631 // Replaces a date time input field.
632 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime
,
633 double /* dialog_value */)
635 // Copies the image at location x, y to the clipboard (if there indeed is an
636 // image at that location).
637 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt
,
641 // Saves the image at location x, y to the disk (if there indeed is an
642 // image at that location).
643 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt
,
647 // Tells the renderer to perform the given action on the media player
648 // located at the given point.
649 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt
,
650 gfx::Point
, /* location */
651 blink::WebMediaPlayerAction
)
653 // Tells the renderer to perform the given action on the plugin located at
655 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt
,
656 gfx::Point
, /* location */
657 blink::WebPluginAction
)
659 // Posts a message from a frame in another process to the current renderer.
660 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent
,
661 ViewMsg_PostMessage_Params
)
663 // Requests that the RenderView's main frame sets its opener to null.
664 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener
)
666 // Change the zoom level for the current main frame. If the level actually
667 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
668 // telling it what url got zoomed and what its current zoom level is.
669 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom
,
670 content::PageZoom
/* function */)
672 // Set the zoom level for the current main frame. If the level actually
673 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
674 // telling it what url got zoomed and what its current zoom level is.
675 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel
,
676 double /* zoom_level */)
678 // Set the zoom level for a particular url that the renderer is in the
679 // process of loading. This will be stored, to be used if the load commits
680 // and ignored otherwise.
681 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL
,
683 double /* zoom_level */)
685 // Set the zoom level for a particular url, so all render views
686 // displaying this url can update their zoom levels to match.
687 // If scheme is empty, then only host is used for matching.
688 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL
,
689 std::string
/* scheme */,
690 std::string
/* host */,
691 double /* zoom_level */)
693 // Change encoding of page in the renderer.
694 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding
,
695 std::string
/*new encoding name*/)
697 // Reset encoding of page in the renderer back to default.
698 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault
)
700 // Used to tell a render view whether it should expose various bindings
701 // that allow JS content extended privileges. See BindingsPolicy for valid
703 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings
,
704 int /* enabled_bindings_flags */)
706 // Tell the renderer to add a property to the WebUI binding object. This
707 // only works if we allowed WebUI bindings.
708 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty
,
709 std::string
/* property_name */,
710 std::string
/* property_value_json */)
712 // This message starts/stop monitoring the input method status of the focused
713 // edit control of a renderer process.
715 // * is_active (bool)
716 // Indicates if an input method is active in the browser process.
717 // The possible actions when a renderer process receives this message are
720 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
721 // to notify the input method status of the focused edit control.
722 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
723 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive
,
724 bool /* is_active */)
726 // IME API oncandidatewindow* events for InputMethodContext.
727 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown
)
728 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated
)
729 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden
)
731 // This message sends a string being composed with an input method.
733 ViewMsg_ImeSetComposition
,
734 base::string16
, /* text */
735 std::vector
<blink::WebCompositionUnderline
>, /* underlines */
736 int, /* selectiont_start */
737 int /* selection_end */)
739 // This message confirms an ongoing composition.
740 IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition
,
741 base::string16
/* text */,
742 gfx::Range
/* replacement_range */,
743 bool /* keep_selection */)
745 // Used to notify the render-view that we have received a target URL. Used
746 // to prevent target URLs spamming the browser.
747 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK
)
749 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse
,
750 std::vector
<ui::SelectedFileInfo
>)
752 // Provides the results of directory enumeration.
753 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse
,
754 int /* request_id */,
755 std::vector
<base::FilePath
> /* files_in_directory */)
757 // When a renderer sends a ViewHostMsg_Focus to the browser process,
758 // the browser has the option of sending a ViewMsg_CantFocus back to
760 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus
)
762 // Tells the renderer to suppress any further modal dialogs until it receives a
763 // corresponding ViewMsg_SwapOut message. This ensures that no
764 // PageGroupLoadDeferrer is on the stack for SwapOut.
765 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut
)
767 // Instructs the renderer to close the current page, including running the
768 // onunload event handler.
770 // Expects a ClosePage_ACK message when finished.
771 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage
)
773 // Notifies the renderer about ui theme changes
774 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged
)
776 // Notifies the renderer that a paint is to be generated for the rectangle
778 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint
,
779 gfx::Size
/* The view size to be repainted */)
781 // Notification that a move or resize renderer's containing window has
783 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted
)
785 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects
,
786 gfx::Rect
/* view_screen_rect */,
787 gfx::Rect
/* window_screen_rect */)
789 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
790 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
791 // processed the move. The browser may have ignored the move, but it finished
792 // processing. This is used because the renderer keeps a temporary cache of
793 // the widget position while these asynchronous operations are in progress.
794 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK
)
796 // Used to instruct the RenderView to send back updates to the preferred size.
797 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode
)
799 // Used to instruct the RenderView to automatically resize and send back
800 // updates for the new size.
801 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize
,
802 gfx::Size
/* min_size */,
803 gfx::Size
/* max_size */)
805 // Used to instruct the RenderView to disalbe automatically resize.
806 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize
,
807 gfx::Size
/* new_size */)
809 // Changes the text direction of the currently selected input field (if any).
810 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection
,
811 blink::WebTextDirection
/* direction */)
813 // Tells the renderer to clear the focused element (if any).
814 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedElement
)
816 // Make the RenderView background transparent or opaque.
817 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque
, bool /* opaque */)
819 // Used to tell the renderer not to add scrollbars with height and
820 // width below a threshold.
821 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows
,
822 gfx::Size
/* disable_scrollbar_size_limit */)
824 // Activate/deactivate the RenderView (i.e., set its controls' tint
825 // accordingly, etc.).
826 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive
,
829 // Response message to ViewHostMsg_CreateWorker.
830 // Sent when the worker has started.
831 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated
)
833 // Sent when the worker failed to load the worker script.
834 // In normal cases, this message is sent after ViewMsg_WorkerCreated is sent.
835 // But if the shared worker of the same URL already exists and it has failed
836 // to load the script, when the renderer send ViewHostMsg_CreateWorker before
837 // the shared worker is killed only ViewMsg_WorkerScriptLoadFailed is sent.
838 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerScriptLoadFailed
)
840 // Sent when the worker has connected.
841 // This message is sent only if the worker successfully loaded the script.
842 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected
)
844 // Tells the renderer that the network state has changed and that
845 // window.navigator.onLine should be updated for all WebViews.
846 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged
,
849 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
850 // Tells the renderer that the channel to the broker has been created.
851 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated
,
852 base::ProcessId
/* broker_pid */,
853 IPC::ChannelHandle
/* handle */)
855 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
856 // Tells the renderer whether permission to access to PPAPI broker was granted
858 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult
,
861 // Tells the renderer to empty its plugin list cache, optional reloading
862 // pages containing plugins.
863 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache
,
864 bool /* reload_pages */)
866 // Used to instruct the RenderView to go into "view source" mode.
867 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode
)
869 // Instructs the renderer to save the current page to MHTML.
870 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML
,
872 IPC::PlatformFileForTransit
/* file handle */)
874 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
875 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData
,
878 // Change the accessibility mode in the renderer process.
879 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode
,
882 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
883 // process to release the magnified image.
884 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap
,
885 cc::SharedBitmapId
/* id */)
887 // Notifies the renderer that a snapshot has been retrieved.
888 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted
,
889 int /* snapshot_id */,
890 gfx::Size
/* size */,
891 std::vector
<unsigned char> /* png */)
893 #if defined(OS_MACOSX)
894 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle
, blink::ScrollerStyleOverlay
);
896 // Notification of a change in scrollbar appearance and/or behavior.
897 IPC_MESSAGE_CONTROL5(ViewMsg_UpdateScrollbarTheme
,
898 float /* initial_button_delay */,
899 float /* autoscroll_button_delay */,
900 bool /* jump_on_track_click */,
901 blink::ScrollerStyle
/* preferred_scroller_style */,
905 #if defined(OS_ANDROID)
906 // Tells the renderer to suspend/resume the webkit timers.
907 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended
,
910 // Sent when the browser wants the bounding boxes of the current find matches.
912 // If match rects are already cached on the browser side, |current_version|
913 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
914 // they came in, so the renderer can tell if it needs to send updated rects.
915 // Otherwise just pass -1 to always receive the list of rects.
917 // There must be an active search string (it is probably most useful to call
918 // this immediately after a ViewHostMsg_Find_Reply message arrives with
919 // final_update set to true).
920 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects
,
921 int /* current_version */)
923 // External popup menus.
924 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems
,
925 bool /* user canceled the popup */,
926 std::vector
<int> /* selected indices */)
928 // Notifies the renderer whether hiding/showing the top controls is enabled
929 // and whether or not to animate to the proper state.
930 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState
,
931 bool /* enable_hiding */,
932 bool /* enable_showing */,
935 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded
)
937 // Sent by the browser when the renderer should generate a new frame.
938 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame
,
939 cc::BeginFrameArgs
/* args */)
941 // Sent by the browser when an IME update that requires acknowledgement has been
942 // processed on the browser side.
943 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck
)
945 // Extracts the data at the given rect, returning it through the
946 // ViewHostMsg_SmartClipDataExtracted IPC.
947 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData
,
948 gfx::Rect
/* rect */)
950 #elif defined(OS_MACOSX)
951 // Let the RenderView know its window has changed visibility.
952 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility
,
955 // Let the RenderView know its window's frame has changed.
956 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged
,
957 gfx::Rect
/* window frame */,
958 gfx::Rect
/* content view frame */)
960 // Message sent from the browser to the renderer when the user starts or stops
961 // resizing the view.
962 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize
,
965 // Tell the renderer that plugin IME has completed.
966 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted
,
967 base::string16
/* text */,
970 // External popup menus.
971 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem
,
972 int /* selected index, -1 means no selection */)
975 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
976 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck
,
977 uint32
/* output_surface_id */,
978 cc::CompositorFrameAck
/* ack */)
980 // Sent by browser to tell renderer compositor that some resources that were
981 // given to the browser in a swap are not being used anymore.
982 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources
,
983 uint32
/* output_surface_id */,
984 cc::CompositorFrameAck
/* ack */)
986 IPC_MESSAGE_ROUTED0(ViewMsg_SelectWordAroundCaret
)
988 // -----------------------------------------------------------------------------
989 // Messages sent from the renderer to the browser.
991 // Sent by the renderer when it is creating a new window. The browser creates
992 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
993 // MSG_ROUTING_NONE, the view couldn't be created.
994 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow
,
995 ViewHostMsg_CreateWindow_Params
,
997 int /* main_frame_route_id */,
998 int32
/* surface_id */,
999 int64
/* cloned_session_storage_namespace_id */)
1001 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1002 // <select> dropdowns. This message is sent to the WebContentsImpl that
1003 // contains the widget being created.
1004 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget
,
1005 int /* opener_id */,
1006 blink::WebPopupType
/* popup type */,
1008 int32
/* surface_id */)
1010 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1012 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget
,
1013 int /* opener_id */,
1015 int32
/* surface_id */)
1017 // Asks the browser for a unique routing ID.
1018 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID
,
1019 int /* routing_id */)
1021 // Asks the browser for the default audio hardware configuration.
1022 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig
,
1023 media::AudioParameters
/* input parameters */,
1024 media::AudioParameters
/* output parameters */)
1026 // Asks the browser for CPU usage of the renderer process in percents.
1027 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage
,
1028 int /* CPU usage in percents */)
1030 // Asks the browser for the renderer process memory size stats.
1031 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes
,
1032 size_t /* private_bytes */,
1033 size_t /* shared_bytes */)
1035 // These three messages are sent to the parent RenderViewHost to display the
1036 // page/widget that was created by
1037 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1038 // refers to the id that was returned from the Create message above.
1039 // The initial_position parameter is a rectangle in screen coordinates.
1041 // FUTURE: there will probably be flags here to control if the result is
1043 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView
,
1045 WindowOpenDisposition
/* disposition */,
1046 gfx::Rect
/* initial_pos */,
1047 bool /* opened_by_user_gesture */)
1049 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget
,
1051 gfx::Rect
/* initial_pos */)
1053 // Message to show a full screen widget.
1054 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget
,
1057 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1058 // to run in a modal fashion until it is closed.
1059 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal
,
1060 int /* opener_id */)
1062 // Indicates the renderer is ready in response to a ViewMsg_New or
1063 // a ViewMsg_CreatingNew_ACK.
1064 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady
)
1066 // Indicates the renderer process is gone. This actually is sent by the
1067 // browser process to itself, but keeps the interface cleaner.
1068 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone
,
1069 int, /* this really is base::TerminationStatus */
1070 int /* exit_code */)
1072 // Sent by the renderer process to request that the browser close the view.
1073 // This corresponds to the window.close() API, and the browser may ignore
1074 // this message. Otherwise, the browser will generates a ViewMsg_Close
1075 // message to close the view.
1076 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close
)
1078 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1079 // throttle these messages.
1080 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK
)
1082 // Sent by the renderer process to request that the browser move the view.
1083 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1084 // the browser may ignore this message.
1085 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove
,
1086 gfx::Rect
/* position */)
1088 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1089 // Message to show/hide a popup menu using native controls.
1090 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup
,
1091 ViewHostMsg_ShowPopup_Params
)
1092 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup
)
1095 // Result of string search in the page.
1096 // Response to ViewMsg_Find with the results of the requested find-in-page
1097 // search, the number of matches found and the selection rect (in screen
1098 // coordinates) for the string found. If |final_update| is false, it signals
1099 // that this is not the last Find_Reply message - more will be sent as the
1100 // scoping effort continues.
1101 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply
,
1102 int /* request_id */,
1103 int /* number of matches */,
1104 gfx::Rect
/* selection_rect */,
1105 int /* active_match_ordinal */,
1106 bool /* final_update */)
1108 // Indicates that the current page has been closed, after a ClosePage
1110 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK
)
1112 // Notifies the browser that we have session history information.
1113 // page_id: unique ID that allows us to distinguish between history entries.
1114 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState
,
1115 int32
/* page_id */,
1116 content::PageState
/* state */)
1118 // Notifies the browser that we want to show a destination url for a potential
1119 // action (e.g. when the user is hovering over a link).
1120 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL
,
1124 // Sent when the document element is available for the top-level frame. This
1125 // happens after the page starts loading, but before all resources are
1127 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame
)
1129 // Sent when the renderer loads a resource from its memory cache.
1130 // The security info is non empty if the resource was originally loaded over
1131 // a secure connection.
1132 // Note: May only be sent once per URL per frame per committed load.
1133 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache
,
1135 std::string
/* security info */,
1136 std::string
/* http method */,
1137 std::string
/* mime type */,
1138 ResourceType::Type
/* resource type */)
1140 // Sent when the renderer displays insecure content in a secure page.
1141 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent
)
1143 // Sent when the renderer runs insecure content in a secure origin.
1144 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent
,
1145 std::string
/* security_origin */,
1146 GURL
/* target URL */)
1148 // Sent to update part of the view. In response to this message, the host
1149 // generates a ViewMsg_UpdateRect_ACK message.
1150 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect
,
1151 ViewHostMsg_UpdateRect_Params
)
1153 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus
)
1154 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur
)
1156 // Message sent from renderer to the browser when focus changes inside the
1157 // webpage. The parameter says whether the newly focused element needs
1158 // keyboard input (true for textfields, text areas and content editable divs).
1159 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged
,
1160 bool /* is_editable_node */)
1162 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor
, content::WebCursor
)
1164 // Message sent from renderer requesting touch emulation using mouse.
1165 // Shift-scrolling should be converted to pinch, if |allow_pinch| is true.
1166 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchEventEmulationEnabled
,
1168 bool /* allow_pinch */)
1170 // Used to set a cookie. The cookie is set asynchronously, but will be
1171 // available to a subsequent ViewHostMsg_GetCookies request.
1172 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie
,
1173 int /* render_frame_id */,
1175 GURL
/* first_party_for_cookies */,
1176 std::string
/* cookie */)
1178 // Used to get cookies for the given URL. This may block waiting for a
1179 // previous SetCookie message to be processed.
1180 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies
,
1181 int /* render_frame_id */,
1183 GURL
/* first_party_for_cookies */,
1184 std::string
/* cookies */)
1186 // Used to get raw cookie information for the given URL. This may block
1187 // waiting for a previous SetCookie message to be processed.
1188 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies
,
1190 GURL
/* first_party_for_cookies */,
1191 std::vector
<content::CookieData
>
1194 // Used to delete cookie for the given URL and name
1195 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie
,
1197 std::string
/* cookie_name */)
1199 // Used to check if cookies are enabled for the given URL. This may block
1200 // waiting for a previous SetCookie message to be processed.
1201 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled
,
1203 GURL
/* first_party_for_cookies */,
1204 bool /* cookies_enabled */)
1206 // Used to get the list of plugins
1207 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins
,
1209 std::vector
<content::WebPluginInfo
> /* plugins */)
1212 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated
,
1213 gfx::NativeViewId
/* dummy_activation_window */)
1215 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed
,
1216 gfx::NativeViewId
/* dummy_activation_window */)
1218 // Asks the browser for the user's monitor profile.
1219 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile
,
1220 std::vector
<char> /* profile */)
1223 // Get the list of proxies to use for |url|, as a semicolon delimited list
1224 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1225 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy
,
1228 std::string
/* proxy list */)
1230 // A renderer sends this to the browser process when it wants to create a
1231 // worker. The browser will create the worker process if necessary, and
1232 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1233 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker
,
1234 ViewHostMsg_CreateWorker_Params
,
1237 // A renderer sends this to the browser process when a document has been
1238 // detached. The browser will use this to constrain the lifecycle of worker
1239 // processes (SharedWorkers are shut down when their last associated document
1241 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached
,
1242 uint64
/* document_id */)
1244 // Wraps an IPC message that's destined to the worker on the renderer->browser
1246 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker
,
1247 IPC::Message
/* message */)
1249 // Tells the browser that a specific Appcache manifest in the current page
1251 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed
,
1252 GURL
/* manifest url */,
1253 bool /* blocked by policy */)
1255 // Initiates a download based on user actions like 'ALT+click'.
1256 IPC_MESSAGE_CONTROL5(ViewHostMsg_DownloadUrl
,
1257 int /* render_view_id */,
1259 content::Referrer
/* referrer */,
1260 base::string16
/* suggested_name */,
1261 bool /* use prompt for save location */)
1263 // Used to go to the session history entry at the given offset (ie, -1 will
1264 // return the "back" item).
1265 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset
,
1266 int /* offset (from current) of history item to get */)
1268 // Sent from an inactive renderer for the browser to route to the active
1269 // renderer, instructing it to close.
1270 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent
)
1272 // Sent to the browser from an inactive renderer to post a message to the
1274 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent
,
1275 ViewMsg_PostMessage_Params
)
1277 // Notifies that the preferred size of the content changed.
1278 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange
,
1279 gfx::Size
/* pref_size */)
1281 // Notifies that the scroll offset changed.
1282 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1283 // is not sent at all when threaded compositing is enabled while
1284 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1285 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset
)
1287 // Notifies that the pinned-to-side state of the content changed.
1288 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame
,
1289 bool /* pinned_to_left */,
1290 bool /* pinned_to_right */)
1292 // Notifies that the number of JavaScript scroll handlers changed.
1293 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents
,
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
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
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
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 #if defined(OS_ANDROID)
1402 // Notification that the selection root bounds have changed.
1403 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionRootBoundsChanged
,
1404 gfx::Rect
/* bounds of the selection root */)
1407 // Asks the browser to display the file chooser. The result is returned in a
1408 // ViewMsg_RunFileChooserResponse message.
1409 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser
,
1410 content::FileChooserParams
)
1412 // Asks the browser to enumerate a directory. This is equivalent to running
1413 // the file chooser in directory-enumeration mode and having the user select
1414 // the given directory. The result is returned in a
1415 // ViewMsg_EnumerateDirectoryResponse message.
1416 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory
,
1417 int /* request_id */,
1418 base::FilePath
/* file_path */)
1420 // Tells the browser to move the focus to the next (previous if reverse is
1421 // true) focusable element.
1422 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus
,
1425 // Required for opening a date/time dialog
1426 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog
,
1427 ViewHostMsg_DateTimeDialogValue_Params
/* value */)
1429 IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged
,
1430 ui::TextInputType
/* TextInputType of the focused node */,
1431 ui::TextInputMode
/* TextInputMode of the focused node */,
1432 bool /* can_compose_inline in the focused node */)
1434 // Required for updating text input state.
1435 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged
,
1436 ViewHostMsg_TextInputState_Params
/* input state params */)
1438 // Required for cancelling an ongoing input method composition.
1439 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition
)
1441 // Sent when the renderer changes the zoom level for a particular url, so the
1442 // browser can update its records. If remember is true, then url is used to
1443 // update the zoom level for all pages in that site. Otherwise, the render
1444 // view's id is used so that only the menu is updated.
1445 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL
,
1446 double /* zoom_level */,
1447 bool /* remember */,
1450 // Updates the minimum/maximum allowed zoom percent for this tab from the
1451 // default values. If |remember| is true, then the zoom setting is applied to
1452 // other pages in the site and is saved, otherwise it only applies to this
1454 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits
,
1455 int /* minimum_percent */,
1456 int /* maximum_percent */,
1457 bool /* remember */)
1459 // Notify the browser that this render process can or can't be suddenly
1461 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged
,
1464 IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params
)
1465 IPC_STRUCT_MEMBER(int32
, surface_id
)
1466 IPC_STRUCT_MEMBER(uint64
, surface_handle
)
1467 IPC_STRUCT_MEMBER(int32
, route_id
)
1468 IPC_STRUCT_MEMBER(gfx::Size
, size
)
1469 IPC_STRUCT_MEMBER(float, scale_factor
)
1470 IPC_STRUCT_MEMBER(int32
, gpu_process_host_id
)
1471 IPC_STRUCT_MEMBER(std::vector
<ui::LatencyInfo
>, latency_info
)
1474 // This message is synthesized by GpuProcessHost to pass through a swap message
1475 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
1476 // software or GPU frame.
1477 IPC_MESSAGE_ROUTED1(
1478 ViewHostMsg_CompositorSurfaceBuffersSwapped
,
1479 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params
/* params */)
1481 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame
,
1482 uint32
/* output_surface_id */,
1483 cc::CompositorFrame
/* frame */)
1485 // Sent by the compositor when a flinging animation is stopped.
1486 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging
)
1488 //---------------------------------------------------------------------------
1489 // Request for cryptographic operation messages:
1490 // These are messages from the renderer to the browser to perform a
1491 // cryptographic operation.
1493 // Asks the browser process to generate a keypair for grabbing a client
1494 // certificate from a CA (<keygen> tag), and returns the signed public
1495 // key and challenge string.
1496 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen
,
1497 uint32
/* key size index */,
1498 std::string
/* challenge string */,
1499 GURL
/* URL of requestor */,
1500 std::string
/* signed public key and challenge */)
1502 // Message sent from the renderer to the browser to request that the browser
1503 // cache |data| associated with |url|.
1504 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata
,
1506 double /* expected_response_time */,
1507 std::vector
<char> /* data */)
1509 // Register a new handler for URL requests with the given scheme.
1510 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler
,
1511 std::string
/* scheme */,
1513 base::string16
/* title */,
1514 bool /* user_gesture */)
1516 // Stores new inspector setting in the profile.
1517 // TODO(jam): this should be in the chrome module
1518 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting
,
1519 std::string
, /* key */
1520 std::string
/* value */)
1522 // Puts the browser into "tab fullscreen" mode for the sending renderer.
1523 // See the comment in chrome/browser/ui/browser.h for more details.
1524 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen
,
1525 bool /* enter_fullscreen */)
1527 // Send back a string to be recorded by UserMetrics.
1528 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction
,
1529 std::string
/* action */)
1531 // Notifies the browser that the page was or was not saved as MHTML.
1532 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML
,
1534 int64
/* size of the MHTML file, -1 if error */)
1536 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks
,
1537 std::vector
<GURL
> /* all savable resource links */,
1538 std::vector
<content::Referrer
> /* all referrers */,
1539 std::vector
<GURL
> /* all frame links */)
1541 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData
,
1542 GURL
/* frame's url */,
1543 std::string
/* data buffer */,
1544 int32
/* complete status */)
1546 // Notifies the browser of an event occurring in the media pipeline.
1547 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents
,
1548 std::vector
<media::MediaLogEvent
> /* events */)
1550 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
1552 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
1553 // pop up a bubble to ask for user permission or take mouse lock content into
1555 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse
,
1556 bool /* user_gesture */,
1557 bool /* last_unlocked_by_target */,
1558 bool /* privileged */)
1560 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
1561 // whenever the mouse is unlocked (which may or may not be caused by
1562 // ViewHostMsg_UnlockMouse).
1563 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse
)
1565 // Notifies that multiple touch targets may have been pressed, and to show
1566 // the disambiguation popup.
1567 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup
,
1568 gfx::Rect
, /* Border of touched targets */
1569 gfx::Size
, /* Size of zoomed image */
1570 cc::SharedBitmapId
/* id */)
1572 // Sent by the renderer process to check whether client 3D APIs
1573 // (Pepper 3D, WebGL) are explicitly blocked.
1574 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked
,
1575 int /* render_view_id */,
1576 GURL
/* top_origin_url */,
1577 content::ThreeDAPIType
/* requester */,
1580 // Sent by the renderer process to indicate that a context was lost by
1581 // client 3D content (Pepper 3D, WebGL) running on the page at the
1583 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext
,
1584 GURL
/* top_origin_url */,
1585 content::ThreeDAPIType
/* context_type */,
1586 int /* arb_robustness_status_code */)
1588 // Notifies the browser that document has parsed the body. This is used by the
1589 // ResourceScheduler as an indication that bandwidth contention won't block
1591 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody
)
1593 // Notification that the urls for the favicon of a site has been determined.
1594 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateFaviconURL
,
1595 std::vector
<content::FaviconURL
> /* candidates */)
1597 // Sent once a paint happens after the first non empty layout. In other words
1598 // after the page has painted something.
1599 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstVisuallyNonEmptyPaint
)
1601 // Sent by the renderer to the browser to start a vibration with the given
1603 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate
,
1604 int64
/* milliseconds */)
1606 // Sent by the renderer to the browser to cancel the currently running
1607 // vibration, if there is one.
1608 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration
)
1610 // Message sent from renderer to the browser when the element that is focused
1611 // has been touched. A bool is passed in this message which indicates if the
1612 // node is editable.
1613 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched
,
1614 bool /* editable */)
1616 // Message sent from the renderer to the browser when an HTML form has failed
1617 // validation constraints.
1618 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage
,
1619 gfx::Rect
/* anchor rectangle in root view coordinate */,
1620 base::string16
/* validation message */,
1621 base::string16
/* supplemental text */)
1623 // Message sent from the renderer to the browser when a HTML form validation
1624 // message should be hidden from view.
1625 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage
)
1627 // Message sent from the renderer to the browser when the suggested co-ordinates
1628 // of the anchor for a HTML form validation message have changed.
1629 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage
,
1630 gfx::Rect
/* anchor rectangle in root view coordinate */)
1632 #if defined(OS_ANDROID)
1633 // Response to ViewMsg_FindMatchRects.
1635 // |version| will contain the current version number of the renderer's find
1636 // match list (incremented whenever they change), which should be passed in the
1637 // next call to ViewMsg_FindMatchRects.
1639 // |rects| will either contain a list of the enclosing rects of all matches
1640 // found by the most recent Find operation, or will be empty if |version| is not
1641 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
1642 // your locally cached rects should still be valid). The rect coords will be
1643 // custom normalized fractions of the document size. The rects will be sorted by
1644 // frame traversal order starting in the main frame, then by dom order.
1646 // |active_rect| will contain the bounding box of the active find-in-page match
1647 // marker, in similarly normalized coords (or an empty rect if there isn't one).
1648 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply
,
1650 std::vector
<gfx::RectF
> /* rects */,
1651 gfx::RectF
/* active_rect */)
1653 // Start an android intent with the given URI.
1654 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent
,
1655 GURL
/* content_url */)
1657 // Message sent when the renderer changed the background color for the view.
1658 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor
,
1659 uint32
/* bg_color */)
1661 // This message runs the MediaCodec for decoding audio for webaudio.
1662 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec
,
1663 base::SharedMemoryHandle
/* encoded_data_handle */,
1664 base::FileDescriptor
/* pcm_output */,
1665 uint32_t /* data_size*/)
1667 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
1668 // display events. If |enabled| is true, the BeginFrame message will continue
1669 // to be be delivered until the notification is disabled.
1670 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame
,
1673 // Reply to the ViewMsg_ExtractSmartClipData message.
1674 // TODO(juhui24.lee@samsung.com): this should be changed to a vector of structs
1675 // instead of encoding the data as a string which is not allowed normally. Since
1676 // ths is only used in Android WebView, it's allowed temporarily.
1677 // http://crbug.com/330872
1678 IPC_MESSAGE_ROUTED1(ViewHostMsg_SmartClipDataExtracted
, base::string16
)
1680 #elif defined(OS_MACOSX)
1681 // Request that the browser load a font into shared memory for us.
1682 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont
,
1683 FontDescriptor
/* font to load */,
1684 uint32
/* buffer size */,
1685 base::SharedMemoryHandle
/* font data */,
1686 uint32
/* font id */)
1688 // Informs the browser that a plugin has gained or lost focus.
1689 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged
,
1691 int /* plugin_id */)
1693 // Instructs the browser to start plugin IME.
1694 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme
)
1696 // Notifies that the scrollbars-visible state of the content changed.
1697 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame
,
1698 bool /* has_horizontal_scrollbar */,
1699 bool /* has_vertical_scrollbar */)
1701 #elif defined(OS_WIN)
1702 // Request that the given font characters be loaded by the browser so it's
1703 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1705 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters
,
1706 LOGFONT
/* font_data */,
1707 base::string16
/* characters */)
1710 #if defined(OS_POSIX)
1711 // On POSIX, we cannot allocated shared memory from within the sandbox, so
1712 // this call exists for the renderer to ask the browser to allocate memory
1713 // on its behalf. We return a file descriptor to the POSIX shared memory.
1714 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
1715 // by the browser, and it is the caller's repsonsibility to send a
1716 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
1717 // In all cases, the caller is responsible for deleting the resulting
1719 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB
,
1720 uint32_t, /* bytes requested */
1721 bool, /* cache in the browser */
1722 TransportDIB::Handle
/* DIB */)
1724 // Since the browser keeps handles to the allocated transport DIBs, this
1725 // message is sent to tell the browser that it may release them when the
1726 // renderer is finished with them.
1727 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB
,
1728 TransportDIB::Id
/* DIB id */)
1731 #if defined(OS_MACOSX) || defined(USE_AURA)
1732 // On Mac and Aura IME can request composition character bounds
1733 // synchronously (see crbug.com/120597). This IPC message sends the character
1734 // bounds after every composition change to always have correct bound info.
1735 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged
,
1736 gfx::Range
/* composition range */,
1737 std::vector
<gfx::Rect
> /* character bounds */)
1740 // Adding a new message? Stick to the sort order above: first platform
1741 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1742 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.