Removed requirement for the renderer to know it's process ID
[chromium-blink-merge.git] / content / common / view_messages.h
blob915fde74d1ca5c8b1836dec5a545ecc1b1021a74
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/browser_rendering_stats.h"
15 #include "content/common/content_export.h"
16 #include "content/common/content_param_traits.h"
17 #include "content/common/cookie_data.h"
18 #include "content/common/navigation_gesture.h"
19 #include "content/common/pepper_renderer_instance_data.h"
20 #include "content/common/view_message_enums.h"
21 #include "content/common/webplugin_geometry.h"
22 #include "content/port/common/input_event_ack_state.h"
23 #include "content/public/common/color_suggestion.h"
24 #include "content/public/common/common_param_traits.h"
25 #include "content/public/common/context_menu_params.h"
26 #include "content/public/common/favicon_url.h"
27 #include "content/public/common/file_chooser_params.h"
28 #include "content/public/common/frame_navigate_params.h"
29 #include "content/public/common/javascript_message_type.h"
30 #include "content/public/common/menu_item.h"
31 #include "content/public/common/page_state.h"
32 #include "content/public/common/page_zoom.h"
33 #include "content/public/common/referrer.h"
34 #include "content/public/common/renderer_preferences.h"
35 #include "content/public/common/stop_find_action.h"
36 #include "content/public/common/three_d_api_types.h"
37 #include "content/public/common/window_container_type.h"
38 #include "content/common/date_time_suggestion.h"
39 #include "ipc/ipc_channel_handle.h"
40 #include "ipc/ipc_message_macros.h"
41 #include "ipc/ipc_platform_file.h"
42 #include "media/audio/audio_parameters.h"
43 #include "media/base/channel_layout.h"
44 #include "media/base/media_log_event.h"
45 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
46 #include "third_party/WebKit/public/platform/WebFloatRect.h"
47 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
48 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
49 #include "third_party/WebKit/public/web/WebFindOptions.h"
50 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
51 #include "third_party/WebKit/public/web/WebPluginAction.h"
52 #include "third_party/WebKit/public/web/WebPopupType.h"
53 #include "third_party/WebKit/public/web/WebTextDirection.h"
54 #include "third_party/skia/include/core/SkBitmap.h"
55 #include "ui/base/ime/text_input_mode.h"
56 #include "ui/base/ime/text_input_type.h"
57 #include "ui/base/ui_base_types.h"
58 #include "ui/gfx/point.h"
59 #include "ui/gfx/range/range.h"
60 #include "ui/gfx/rect.h"
61 #include "ui/gfx/rect_f.h"
62 #include "ui/gfx/vector2d.h"
63 #include "ui/gfx/vector2d_f.h"
64 #include "ui/shell_dialogs/selected_file_info.h"
66 #if defined(OS_MACOSX)
67 #include "content/common/mac/font_descriptor.h"
68 #endif
70 #undef IPC_MESSAGE_EXPORT
71 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
73 #define IPC_MESSAGE_START ViewMsgStart
75 IPC_ENUM_TRAITS(AccessibilityMode)
76 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value)
77 IPC_ENUM_TRAITS(blink::WebContextMenuData::MediaType)
78 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type)
79 IPC_ENUM_TRAITS(blink::WebPluginAction::Type)
80 IPC_ENUM_TRAITS(blink::WebPopupType)
81 IPC_ENUM_TRAITS(blink::WebTextDirection)
82 IPC_ENUM_TRAITS(WindowContainerType)
83 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
84 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
85 IPC_ENUM_TRAITS(content::JavaScriptMessageType)
86 IPC_ENUM_TRAITS(content::MenuItem::Type)
87 IPC_ENUM_TRAITS(content::NavigationGesture)
88 IPC_ENUM_TRAITS(content::PageZoom)
89 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum)
90 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum)
91 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
92 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
93 IPC_ENUM_TRAITS(content::StopFindAction)
94 IPC_ENUM_TRAITS(content::ThreeDAPIType)
95 IPC_ENUM_TRAITS(media::ChannelLayout)
96 IPC_ENUM_TRAITS(media::MediaLogEvent::Type)
97 IPC_ENUM_TRAITS(ui::MenuSourceType)
98 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
99 IPC_ENUM_TRAITS(ui::TextInputType)
101 #if defined(OS_MACOSX)
102 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
103 IPC_STRUCT_TRAITS_MEMBER(font_name)
104 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
105 IPC_STRUCT_TRAITS_END()
106 #endif
108 IPC_STRUCT_TRAITS_BEGIN(blink::WebCompositionUnderline)
109 IPC_STRUCT_TRAITS_MEMBER(startOffset)
110 IPC_STRUCT_TRAITS_MEMBER(endOffset)
111 IPC_STRUCT_TRAITS_MEMBER(color)
112 IPC_STRUCT_TRAITS_MEMBER(thick)
113 IPC_STRUCT_TRAITS_END()
115 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
116 IPC_STRUCT_TRAITS_MEMBER(forward)
117 IPC_STRUCT_TRAITS_MEMBER(matchCase)
118 IPC_STRUCT_TRAITS_MEMBER(findNext)
119 IPC_STRUCT_TRAITS_END()
121 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
122 IPC_STRUCT_TRAITS_MEMBER(type)
123 IPC_STRUCT_TRAITS_MEMBER(enable)
124 IPC_STRUCT_TRAITS_END()
126 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction)
127 IPC_STRUCT_TRAITS_MEMBER(type)
128 IPC_STRUCT_TRAITS_MEMBER(enable)
129 IPC_STRUCT_TRAITS_END()
131 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint)
132 IPC_STRUCT_TRAITS_MEMBER(x)
133 IPC_STRUCT_TRAITS_MEMBER(y)
134 IPC_STRUCT_TRAITS_END()
136 IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect)
137 IPC_STRUCT_TRAITS_MEMBER(x)
138 IPC_STRUCT_TRAITS_MEMBER(y)
139 IPC_STRUCT_TRAITS_MEMBER(width)
140 IPC_STRUCT_TRAITS_MEMBER(height)
141 IPC_STRUCT_TRAITS_END()
143 IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo)
144 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
145 IPC_STRUCT_TRAITS_MEMBER(depth)
146 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
147 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
148 IPC_STRUCT_TRAITS_MEMBER(rect)
149 IPC_STRUCT_TRAITS_MEMBER(availableRect)
150 IPC_STRUCT_TRAITS_END()
152 IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
153 IPC_STRUCT_TRAITS_MEMBER(label)
154 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
155 IPC_STRUCT_TRAITS_MEMBER(type)
156 IPC_STRUCT_TRAITS_MEMBER(action)
157 IPC_STRUCT_TRAITS_MEMBER(rtl)
158 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
159 IPC_STRUCT_TRAITS_MEMBER(enabled)
160 IPC_STRUCT_TRAITS_MEMBER(checked)
161 IPC_STRUCT_TRAITS_MEMBER(submenu)
162 IPC_STRUCT_TRAITS_END()
164 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
165 IPC_STRUCT_TRAITS_MEMBER(color)
166 IPC_STRUCT_TRAITS_MEMBER(label)
167 IPC_STRUCT_TRAITS_END()
169 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion)
170 IPC_STRUCT_TRAITS_MEMBER(value)
171 IPC_STRUCT_TRAITS_MEMBER(localized_value)
172 IPC_STRUCT_TRAITS_MEMBER(label)
173 IPC_STRUCT_TRAITS_END()
175 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams)
176 IPC_STRUCT_TRAITS_MEMBER(media_type)
177 IPC_STRUCT_TRAITS_MEMBER(x)
178 IPC_STRUCT_TRAITS_MEMBER(y)
179 IPC_STRUCT_TRAITS_MEMBER(link_url)
180 IPC_STRUCT_TRAITS_MEMBER(link_text)
181 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
182 IPC_STRUCT_TRAITS_MEMBER(src_url)
183 IPC_STRUCT_TRAITS_MEMBER(has_image_contents)
184 IPC_STRUCT_TRAITS_MEMBER(page_url)
185 IPC_STRUCT_TRAITS_MEMBER(keyword_url)
186 IPC_STRUCT_TRAITS_MEMBER(frame_url)
187 IPC_STRUCT_TRAITS_MEMBER(frame_page_state)
188 IPC_STRUCT_TRAITS_MEMBER(media_flags)
189 IPC_STRUCT_TRAITS_MEMBER(selection_text)
190 IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
191 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash)
192 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
193 IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled)
194 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
195 IPC_STRUCT_TRAITS_MEMBER(is_editable)
196 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
197 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
198 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
199 IPC_STRUCT_TRAITS_MEMBER(edit_flags)
200 IPC_STRUCT_TRAITS_MEMBER(security_info)
201 IPC_STRUCT_TRAITS_MEMBER(frame_charset)
202 IPC_STRUCT_TRAITS_MEMBER(referrer_policy)
203 IPC_STRUCT_TRAITS_MEMBER(custom_context)
204 IPC_STRUCT_TRAITS_MEMBER(custom_items)
205 IPC_STRUCT_TRAITS_MEMBER(source_type)
206 #if defined(OS_ANDROID)
207 IPC_STRUCT_TRAITS_MEMBER(selection_start)
208 IPC_STRUCT_TRAITS_MEMBER(selection_end)
209 #endif
210 IPC_STRUCT_TRAITS_END()
212 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
213 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
214 IPC_STRUCT_TRAITS_MEMBER(request_id)
215 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
216 IPC_STRUCT_TRAITS_END()
218 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
219 IPC_STRUCT_TRAITS_MEMBER(icon_url)
220 IPC_STRUCT_TRAITS_MEMBER(icon_type)
221 IPC_STRUCT_TRAITS_END()
223 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
224 IPC_STRUCT_TRAITS_MEMBER(mode)
225 IPC_STRUCT_TRAITS_MEMBER(title)
226 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
227 IPC_STRUCT_TRAITS_MEMBER(accept_types)
228 #if defined(OS_ANDROID)
229 IPC_STRUCT_TRAITS_MEMBER(capture)
230 #endif
231 IPC_STRUCT_TRAITS_END()
233 IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams)
234 IPC_STRUCT_TRAITS_MEMBER(page_id)
235 IPC_STRUCT_TRAITS_MEMBER(url)
236 IPC_STRUCT_TRAITS_MEMBER(base_url)
237 IPC_STRUCT_TRAITS_MEMBER(referrer)
238 IPC_STRUCT_TRAITS_MEMBER(transition)
239 IPC_STRUCT_TRAITS_MEMBER(redirects)
240 IPC_STRUCT_TRAITS_MEMBER(should_update_history)
241 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
242 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding)
243 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type)
244 IPC_STRUCT_TRAITS_MEMBER(socket_address)
245 IPC_STRUCT_TRAITS_END()
247 IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
248 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
249 IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
250 IPC_STRUCT_TRAITS_MEMBER(document_url)
251 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
252 IPC_STRUCT_TRAITS_END()
254 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
255 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
256 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
257 IPC_STRUCT_TRAITS_MEMBER(hinting)
258 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
259 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
260 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
261 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
262 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
263 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
264 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
265 IPC_STRUCT_TRAITS_MEMBER(track_color)
266 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
267 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
268 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
269 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
270 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
271 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
272 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
273 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
274 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
275 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
276 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
277 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
278 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
279 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
280 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile)
281 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile)
282 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
283 IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page)
284 IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed)
285 IPC_STRUCT_TRAITS_END()
287 IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
288 IPC_STRUCT_TRAITS_MEMBER(name)
289 IPC_STRUCT_TRAITS_MEMBER(value)
290 IPC_STRUCT_TRAITS_MEMBER(domain)
291 IPC_STRUCT_TRAITS_MEMBER(path)
292 IPC_STRUCT_TRAITS_MEMBER(expires)
293 IPC_STRUCT_TRAITS_MEMBER(http_only)
294 IPC_STRUCT_TRAITS_MEMBER(secure)
295 IPC_STRUCT_TRAITS_MEMBER(session)
296 IPC_STRUCT_TRAITS_END()
298 IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
299 IPC_STRUCT_TRAITS_MEMBER(window)
300 IPC_STRUCT_TRAITS_MEMBER(window_rect)
301 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
302 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
303 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
304 IPC_STRUCT_TRAITS_MEMBER(visible)
305 IPC_STRUCT_TRAITS_END()
307 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
308 IPC_STRUCT_TRAITS_MEMBER(id)
309 IPC_STRUCT_TRAITS_MEMBER(type)
310 IPC_STRUCT_TRAITS_MEMBER(params)
311 IPC_STRUCT_TRAITS_MEMBER(time)
312 IPC_STRUCT_TRAITS_END()
314 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo)
315 IPC_STRUCT_TRAITS_MEMBER(file_path)
316 IPC_STRUCT_TRAITS_MEMBER(local_path)
317 IPC_STRUCT_TRAITS_MEMBER(display_name)
318 IPC_STRUCT_TRAITS_END()
320 IPC_STRUCT_TRAITS_BEGIN(content::BrowserRenderingStats)
321 IPC_STRUCT_TRAITS_MEMBER(input_event_count)
322 IPC_STRUCT_TRAITS_MEMBER(total_input_latency)
323 IPC_STRUCT_TRAITS_MEMBER(touch_ui_count)
324 IPC_STRUCT_TRAITS_MEMBER(total_touch_ui_latency)
325 IPC_STRUCT_TRAITS_MEMBER(touch_acked_count)
326 IPC_STRUCT_TRAITS_MEMBER(total_touch_acked_latency)
327 IPC_STRUCT_TRAITS_MEMBER(scroll_update_count)
328 IPC_STRUCT_TRAITS_MEMBER(total_scroll_update_latency)
329 IPC_STRUCT_TRAITS_END()
331 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
332 // Routing ID of the view initiating the open.
333 IPC_STRUCT_MEMBER(int, opener_id)
335 // True if this open request came in the context of a user gesture.
336 IPC_STRUCT_MEMBER(bool, user_gesture)
338 // Type of window requested.
339 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
341 // The session storage namespace ID this view should use.
342 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
344 // The name of the resulting frame that should be created (empty if none
345 // has been specified).
346 IPC_STRUCT_MEMBER(base::string16, frame_name)
348 // The frame identifier of the frame initiating the open.
349 IPC_STRUCT_MEMBER(int64, opener_frame_id)
351 // The URL of the frame initiating the open.
352 IPC_STRUCT_MEMBER(GURL, opener_url)
354 // The URL of the top frame containing the opener.
355 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url)
357 // The security origin of the frame initiating the open.
358 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
360 // Whether the opener will be suppressed in the new window, in which case
361 // scripting the new window is not allowed.
362 IPC_STRUCT_MEMBER(bool, opener_suppressed)
364 // Whether the window should be opened in the foreground, background, etc.
365 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
367 // The URL that will be loaded in the new window (empty if none has been
368 // sepcified).
369 IPC_STRUCT_MEMBER(GURL, target_url)
371 // The referrer that will be used to load |target_url| (empty if none has
372 // been specified).
373 IPC_STRUCT_MEMBER(content::Referrer, referrer)
375 // The window features to use for the new view.
376 IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features)
378 // The additional window features to use for the new view. We pass these
379 // separately from |features| above because we cannot serialize WebStrings
380 // over IPC.
381 IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features)
382 IPC_STRUCT_END()
384 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
385 // URL for the worker script.
386 IPC_STRUCT_MEMBER(GURL, url)
388 // Name for a SharedWorker, otherwise empty string.
389 IPC_STRUCT_MEMBER(base::string16, name)
391 // Security policy used in the worker.
392 IPC_STRUCT_MEMBER(base::string16, content_security_policy)
394 // Security policy type used in the worker.
395 IPC_STRUCT_MEMBER(blink::WebContentSecurityPolicyType, security_policy_type)
397 // The ID of the parent document (unique within parent renderer).
398 IPC_STRUCT_MEMBER(unsigned long long, document_id)
400 // RenderFrame routing id used to send messages back to the parent.
401 IPC_STRUCT_MEMBER(int, render_frame_route_id)
403 // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed,
404 // a new unique ID is created and assigned to the worker.
405 IPC_STRUCT_MEMBER(int, route_id)
407 // The ID of the appcache the main shared worker script resource was loaded
408 // from, only valid for shared workers.
409 IPC_STRUCT_MEMBER(int64, script_resource_appcache_id)
410 IPC_STRUCT_END()
412 IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
413 IPC_STRUCT_MEMBER(ui::TextInputType, dialog_type)
414 IPC_STRUCT_MEMBER(double, dialog_value)
415 IPC_STRUCT_MEMBER(double, minimum)
416 IPC_STRUCT_MEMBER(double, maximum)
417 IPC_STRUCT_MEMBER(double, step)
418 IPC_STRUCT_MEMBER(std::vector<content::DateTimeSuggestion>, suggestions)
419 IPC_STRUCT_END()
421 // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
422 // parameters to be reasonably put in a predefined IPC message.
423 IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params,
424 content::FrameNavigateParams)
425 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams)
426 // The frame ID for this navigation. The frame ID uniquely identifies the
427 // frame the navigation happened in for a given renderer.
428 IPC_STRUCT_MEMBER(int64, frame_id)
430 // The WebFrame's uniqueName().
431 IPC_STRUCT_MEMBER(base::string16, frame_unique_name)
433 // Information regarding the security of the connection (empty if the
434 // connection was not secure).
435 IPC_STRUCT_MEMBER(std::string, security_info)
437 // The gesture that initiated this navigation.
438 IPC_STRUCT_MEMBER(content::NavigationGesture, gesture)
440 // True if this was a post request.
441 IPC_STRUCT_MEMBER(bool, is_post)
443 // The POST body identifier. -1 if it doesn't exist.
444 IPC_STRUCT_MEMBER(int64, post_id)
446 // Whether the frame navigation resulted in no change to the documents within
447 // the page. For example, the navigation may have just resulted in scrolling
448 // to a named anchor.
449 IPC_STRUCT_MEMBER(bool, was_within_same_page)
451 // The status code of the HTTP request.
452 IPC_STRUCT_MEMBER(int, http_status_code)
454 // True if the connection was proxied. In this case, socket_address
455 // will represent the address of the proxy, rather than the remote host.
456 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy)
458 // Serialized history item state to store in the navigation entry.
459 IPC_STRUCT_MEMBER(content::PageState, page_state)
461 // Original request's URL.
462 IPC_STRUCT_MEMBER(GURL, original_request_url)
464 // User agent override used to navigate.
465 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
467 // Notifies the browser that for this navigation, the session history was
468 // successfully cleared.
469 IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
470 IPC_STRUCT_END()
472 IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params)
473 IPC_STRUCT_MEMBER(GURL, url)
474 IPC_STRUCT_MEMBER(content::Referrer, referrer)
475 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
476 IPC_STRUCT_MEMBER(int64, frame_id)
477 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
478 IPC_STRUCT_MEMBER(bool, user_gesture)
479 IPC_STRUCT_END()
481 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
482 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
483 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
484 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
485 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
486 IPC_STRUCT_MEMBER(bool, is_anchor_first)
487 IPC_STRUCT_END()
489 // This message is used for supporting popup menus on Mac OS X using native
490 // Cocoa controls. The renderer sends us this message which we use to populate
491 // the popup menu.
492 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params)
493 // Position on the screen.
494 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
496 // The height of each item in the menu.
497 IPC_STRUCT_MEMBER(int, item_height)
499 // The size of the font to use for those items.
500 IPC_STRUCT_MEMBER(double, item_font_size)
502 // The currently selected (displayed) item in the menu.
503 IPC_STRUCT_MEMBER(int, selected_item)
505 // The entire list of items in the popup menu.
506 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
508 // Whether items should be right-aligned.
509 IPC_STRUCT_MEMBER(bool, right_aligned)
511 // Whether this is a multi-select popup.
512 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
513 IPC_STRUCT_END()
515 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
516 // The type of input field
517 IPC_STRUCT_MEMBER(ui::TextInputType, type)
519 // The value of the input field
520 IPC_STRUCT_MEMBER(std::string, value)
522 // The cursor position of the current selection start, or the caret position
523 // if nothing is selected
524 IPC_STRUCT_MEMBER(int, selection_start)
526 // The cursor position of the current selection end, or the caret position
527 // if nothing is selected
528 IPC_STRUCT_MEMBER(int, selection_end)
530 // The start position of the current composition, or -1 if there is none
531 IPC_STRUCT_MEMBER(int, composition_start)
533 // The end position of the current composition, or -1 if there is none
534 IPC_STRUCT_MEMBER(int, composition_end)
536 // Whether or not inline composition can be performed for the current input.
537 IPC_STRUCT_MEMBER(bool, can_compose_inline)
539 // Whether or not the IME should be shown as a result of this update. Even if
540 // true, the IME will only be shown if the type is appropriate (e.g. not
541 // TEXT_INPUT_TYPE_NONE).
542 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
544 // Whether an acknowledgement is required for this update.
545 IPC_STRUCT_MEMBER(bool, require_ack)
546 IPC_STRUCT_END()
548 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
549 // The bitmap to be painted into the view at the locations specified by
550 // update_rects.
551 IPC_STRUCT_MEMBER(TransportDIB::Id, bitmap)
553 // The position and size of the bitmap.
554 IPC_STRUCT_MEMBER(gfx::Rect, bitmap_rect)
556 // The scroll delta. Only one of the delta components can be non-zero, and if
557 // they are both zero, then it means there is no scrolling and the scroll_rect
558 // is ignored.
559 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_delta)
561 // The rectangular region to scroll.
562 IPC_STRUCT_MEMBER(gfx::Rect, scroll_rect)
564 // The scroll offset of the render view.
565 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset)
567 // The regions of the bitmap (in view coords) that contain updated pixels.
568 // In the case of scrolling, this includes the scroll damage rect.
569 IPC_STRUCT_MEMBER(std::vector<gfx::Rect>, copy_rects)
571 // The size of the RenderView when this message was generated. This is
572 // included so the host knows how large the view is from the perspective of
573 // the renderer process. This is necessary in case a resize operation is in
574 // progress. If auto-resize is enabled, this should update the corresponding
575 // view size.
576 IPC_STRUCT_MEMBER(gfx::Size, view_size)
578 // New window locations for plugin child windows.
579 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
580 plugin_window_moves)
582 // The following describes the various bits that may be set in flags:
584 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
585 // Indicates that this is a response to a ViewMsg_Resize message.
587 // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
588 // Indicates that this is a response to a ViewMsg_WasShown message.
590 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
591 // Indicates that this is a response to a ViewMsg_Repaint message.
593 // If flags is zero, then this message corresponds to an unsolicited paint
594 // request by the render view. Any of the above bits may be set in flags,
595 // which would indicate that this paint message is an ACK for multiple
596 // request messages.
597 IPC_STRUCT_MEMBER(int, flags)
599 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
600 // update. True for 2D painting, but false for accelerated compositing.
601 IPC_STRUCT_MEMBER(bool, needs_ack)
603 // All the above coordinates are in DIP. This is the scale factor needed
604 // to convert them to pixels.
605 IPC_STRUCT_MEMBER(float, scale_factor)
607 // The latency information for the frame. Only valid when accelerated
608 // compositing is disabled.
609 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
610 IPC_STRUCT_END()
612 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params)
613 // The page_id for this navigation, or -1 if it is a new navigation. Back,
614 // Forward, and Reload navigations should have a valid page_id. If the load
615 // succeeds, then this page_id will be reflected in the resultant
616 // ViewHostMsg_FrameNavigate message.
617 IPC_STRUCT_MEMBER(int32, page_id)
619 // If page_id is -1, then pending_history_list_offset will also be -1.
620 // Otherwise, it contains the offset into the history list corresponding to
621 // the current navigation.
622 IPC_STRUCT_MEMBER(int, pending_history_list_offset)
624 // Informs the RenderView of where its current page contents reside in
625 // session history and the total size of the session history list.
626 IPC_STRUCT_MEMBER(int, current_history_list_offset)
627 IPC_STRUCT_MEMBER(int, current_history_list_length)
629 // Informs the RenderView the session history should be cleared. In that
630 // case, the RenderView needs to notify the browser that the clearing was
631 // succesful when the navigation commits.
632 IPC_STRUCT_MEMBER(bool, should_clear_history_list)
634 // The URL to load.
635 IPC_STRUCT_MEMBER(GURL, url)
637 // Base URL for use in WebKit's SubstituteData.
638 // Is only used with data: URLs.
639 IPC_STRUCT_MEMBER(GURL, base_url_for_data_url)
641 // History URL for use in WebKit's SubstituteData.
642 // Is only used with data: URLs.
643 IPC_STRUCT_MEMBER(GURL, history_url_for_data_url)
645 // The URL to send in the "Referer" header field. Can be empty if there is
646 // no referrer.
647 IPC_STRUCT_MEMBER(content::Referrer, referrer)
649 // Any redirect URLs that occurred before |url|. Useful for cross-process
650 // navigations; defaults to empty.
651 IPC_STRUCT_MEMBER(std::vector<GURL>, redirects)
653 // The type of transition.
654 IPC_STRUCT_MEMBER(content::PageTransition, transition)
656 // Informs the RenderView the pending navigation should replace the current
657 // history entry when it commits. This is used for cross-process redirects so
658 // the transferred navigation can recover the navigation state.
659 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
661 // Opaque history state (received by ViewHostMsg_UpdateState).
662 IPC_STRUCT_MEMBER(content::PageState, page_state)
664 // Type of navigation.
665 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value, navigation_type)
667 // The time the request was created
668 IPC_STRUCT_MEMBER(base::Time, request_time)
670 // Extra headers (separated by \n) to send during the request.
671 IPC_STRUCT_MEMBER(std::string, extra_headers)
673 // The following two members identify a previous request that has been
674 // created before this navigation is being transferred to a new render view.
675 // This serves the purpose of recycling the old request.
676 // Unless this refers to a transferred navigation, these values are -1 and -1.
677 IPC_STRUCT_MEMBER(int, transferred_request_child_id)
678 IPC_STRUCT_MEMBER(int, transferred_request_request_id)
680 // Whether or not we should allow the url to download.
681 IPC_STRUCT_MEMBER(bool, allow_download)
683 // Whether or not the user agent override string should be used.
684 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
686 // True if this was a post request.
687 IPC_STRUCT_MEMBER(bool, is_post)
689 // If is_post is true, holds the post_data information from browser. Empty
690 // otherwise.
691 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data)
693 // Whether or not this url should be allowed to access local file://
694 // resources.
695 IPC_STRUCT_MEMBER(bool, can_load_local_resources)
697 // If not empty, which frame to navigate.
698 IPC_STRUCT_MEMBER(std::string, frame_to_navigate)
700 // The navigationStart time to expose to JS for this navigation.
701 IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start)
702 IPC_STRUCT_END()
704 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
705 // Renderer-wide preferences.
706 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
708 // Preferences for this view.
709 IPC_STRUCT_MEMBER(WebPreferences, web_preferences)
711 // The ID of the view to be created.
712 IPC_STRUCT_MEMBER(int32, view_id)
714 // The ID of the main frame hosted in the view.
715 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
717 // The ID of the rendering surface.
718 IPC_STRUCT_MEMBER(int32, surface_id)
720 // The session storage namespace ID this view should use.
721 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
723 // The name of the frame associated with this view (or empty if none).
724 IPC_STRUCT_MEMBER(base::string16, frame_name)
726 // The route ID of the opener RenderView if we need to set one
727 // (MSG_ROUTING_NONE otherwise).
728 IPC_STRUCT_MEMBER(int, opener_route_id)
730 // Whether the RenderView should initially be swapped out.
731 IPC_STRUCT_MEMBER(bool, swapped_out)
733 // Whether the RenderView should initially be hidden.
734 IPC_STRUCT_MEMBER(bool, hidden)
736 // The initial page ID to use for this view, which must be larger than any
737 // existing navigation that might be loaded in the view. Page IDs are unique
738 // to a view and are only updated by the renderer after this initial value.
739 IPC_STRUCT_MEMBER(int32, next_page_id)
741 // The properties of the screen associated with the view.
742 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
744 // The accessibility mode of the renderer.
745 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
747 // Specifies whether partially swapping composited buffers is
748 // allowed for a renderer. Partial swaps will be used if they are both
749 // allowed and supported.
750 IPC_STRUCT_MEMBER(bool, allow_partial_swap)
751 IPC_STRUCT_END()
753 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
754 // The serialized script value.
755 IPC_STRUCT_MEMBER(base::string16, data)
757 // When sent to the browser, this is the routing ID of the source frame in
758 // the source process. The browser replaces it with the routing ID of the
759 // equivalent (swapped out) frame in the destination process.
760 IPC_STRUCT_MEMBER(int, source_routing_id)
762 // The origin of the source frame.
763 IPC_STRUCT_MEMBER(base::string16, source_origin)
765 // The origin for the message's target.
766 IPC_STRUCT_MEMBER(base::string16, target_origin)
768 // Information about the MessagePorts this message contains.
769 IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids)
770 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
771 IPC_STRUCT_END()
773 // Messages sent from the browser to the renderer.
775 // Tells the renderer to cancel an opened date/time dialog.
776 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
778 // Get all savable resource links from current webpage, include main
779 // frame and sub-frame.
780 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
781 GURL /* url of page which is needed to save */)
783 // Get html data by serializing all frames of current page with lists
784 // which contain all resource links that have local copy.
785 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
786 std::vector<GURL> /* urls that have local copy */,
787 std::vector<base::FilePath> /* paths of local copy */,
788 base::FilePath /* local directory path */)
790 // Tells the render side that a ViewHostMsg_LockMouse message has been
791 // processed. |succeeded| indicates whether the mouse has been successfully
792 // locked or not.
793 IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
794 bool /* succeeded */)
795 // Tells the render side that the mouse has been unlocked.
796 IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
798 // Screen was rotated. Dispatched to the onorientationchange javascript API.
799 IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent,
800 int /* orientation */)
802 // Sent by the browser when the parameters for vsync alignment have changed.
803 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
804 base::TimeTicks /* timebase */,
805 base::TimeDelta /* interval */)
807 // Set the top-level frame to the provided name.
808 IPC_MESSAGE_ROUTED1(ViewMsg_SetName,
809 std::string /* frame_name */)
811 // Sent to the RenderView when a new tab is swapped into an existing
812 // tab and the histories need to be merged. The existing tab has a history of
813 // |merged_history_length| which precedes the history of the new tab. All
814 // page_ids >= |minimum_page_id| in the new tab are appended to the history.
816 // For example, suppose the history of page_ids in the new tab's RenderView
817 // is [4 7 8]. This is merged into an existing tab with 3 history items, and
818 // all pages in the new tab with page_id >= 7 are to be preserved.
819 // The resulting page history is [-1 -1 -1 7 8].
820 IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
821 int, /* merge_history_length */
822 int32 /* minimum_page_id */)
824 // Tells the renderer to create a new view.
825 // This message is slightly different, the view it takes (via
826 // ViewMsg_New_Params) is the view to create, the message itself is sent as a
827 // non-view control message.
828 IPC_MESSAGE_CONTROL1(ViewMsg_New,
829 ViewMsg_New_Params)
831 // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
832 // similar to the new command, but used when the renderer created a view
833 // first, and we need to update it.
834 IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
836 // Sends updated preferences to the renderer.
837 IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
838 content::RendererPreferences)
840 // This passes a set of webkit preferences down to the renderer.
841 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
842 WebPreferences)
844 // Informs the renderer that the timezone has changed.
845 IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange)
847 // Tells the render view to close.
848 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
850 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
851 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
852 IPC_STRUCT_MEMBER(gfx::Size, new_size)
853 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
854 IPC_STRUCT_MEMBER(float, overdraw_bottom_height)
855 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
856 IPC_STRUCT_MEMBER(bool, is_fullscreen)
857 IPC_STRUCT_END()
859 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
860 // is generated in response provided new_size is not empty and not equal to
861 // the view's current size. The generated ViewHostMsg_UpdateRect message will
862 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
863 // we don't have to fetch it every time WebKit asks for it.
864 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
865 ViewMsg_Resize_Params /* params */)
867 // Tells the render view that the resize rect has changed.
868 IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
869 gfx::Rect /* resizer_rect */)
871 // Sent to inform the view that it was hidden. This allows it to reduce its
872 // resource utilization.
873 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
875 // Tells the render view that it is no longer hidden (see WasHidden), and the
876 // render view is expected to respond with a full repaint if needs_repainting
877 // is true. In that case, the generated ViewHostMsg_UpdateRect message will
878 // have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this
879 // message does not trigger a message in response.
880 IPC_MESSAGE_ROUTED1(ViewMsg_WasShown,
881 bool /* needs_repainting */)
883 // Sent to inform the view that it was swapped out. This allows the process to
884 // exit if no other views are using it.
885 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut)
887 // Sent to render the view into the supplied transport DIB, resize
888 // the web widget to match the |page_size|, scale it by the
889 // appropriate scale to make it fit the |desired_size|, and return
890 // it. In response to this message, the host generates a
891 // ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be
892 // the right size to receive an RGBA image at the |desired_size|.
893 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
894 // identify the PaintAtSize message the ACK belongs to.
895 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize,
896 TransportDIB::Handle /* dib_handle */,
897 int /* tag */,
898 gfx::Size /* page_size */,
899 gfx::Size /* desired_size */)
901 // Tells the render view that a ViewHostMsg_UpdateRect message was processed.
902 // This signals the render view that it can send another UpdateRect message.
903 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK)
905 // Tells the render view that a SwapBuffers was completed. Typically,
906 // SwapBuffers requests go from renderer -> GPU process -> browser. Most
907 // platforms still use the GfxCxt3D Echo for receiving the SwapBuffers Ack.
908 // Using Echo routes the ack from browser -> GPU process -> renderer, while this
909 // Ack goes directly from browser -> renderer. This is not used for the threaded
910 // compositor path.
911 IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK)
913 // Tells the renderer to focus the first (last if reverse is true) focusable
914 // node.
915 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
916 bool /* reverse */)
918 // Executes custom context menu action that was provided from WebKit.
919 IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction,
920 content::CustomContextMenuContext /* custom_context */,
921 unsigned /* action */)
923 // Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that
924 // the menu has been closed.
925 IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed,
926 content::CustomContextMenuContext /* custom_context */)
928 // Sent to inform the renderer to invoke a context menu.
929 // The parameter specifies the location in the render view's coordinates.
930 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu,
931 gfx::Point /* location where menu should be shown */)
933 // Tells the renderer to perform the specified navigation, interrupting any
934 // existing navigation.
935 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params)
937 IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
939 // Tells the renderer to reload the current focused frame
940 IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame)
942 // Sent when the user wants to search for a word on the page (find in page).
943 IPC_MESSAGE_ROUTED3(ViewMsg_Find,
944 int /* request_id */,
945 base::string16 /* search_text */,
946 blink::WebFindOptions)
948 // This message notifies the renderer that the user has closed the FindInPage
949 // window (and what action to take regarding the selection).
950 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
951 content::StopFindAction /* action */)
953 // Informs the renderer about various statistics the browser has (e.g.
954 // latency) regarding the frames that have been displayed.
955 IPC_MESSAGE_ROUTED1(ViewMsg_SetBrowserRenderingStats,
956 content::BrowserRenderingStats /* stats */)
958 // Replaces a date time input field.
959 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
960 double /* dialog_value */)
962 // Copies the image at location x, y to the clipboard (if there indeed is an
963 // image at that location).
964 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
965 int /* x */,
966 int /* y */)
968 // Tells the renderer to perform the given action on the media player
969 // located at the given point.
970 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
971 gfx::Point, /* location */
972 blink::WebMediaPlayerAction)
974 // Tells the renderer to perform the given action on the plugin located at
975 // the given point.
976 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
977 gfx::Point, /* location */
978 blink::WebPluginAction)
980 // Request for the renderer to evaluate an xpath to a frame and execute a
981 // javascript: url in that frame's context. The message is completely
982 // asynchronous and no corresponding response message is sent back.
984 // frame_xpath contains the modified xpath notation to identify an inner
985 // subframe (starting from the root frame). It is a concatenation of
986 // number of smaller xpaths delimited by '\n'. Each chunk in the string can
987 // be evaluated to a frame in its parent-frame's context.
989 // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
990 // can be broken into 3 xpaths
991 // /html/body/iframe evaluates to an iframe within the root frame
992 // /html/body/div/iframe evaluates to an iframe within the level-1 iframe
993 // /frameset/frame[0] evaluates to first frame within the level-2 iframe
995 // jscript_url is the string containing the javascript: url to be executed
996 // in the target frame's context. The string should start with "javascript:"
997 // and continue with a valid JS text.
999 // If the fourth parameter is true the result is sent back to the renderer
1000 // using the message ViewHostMsg_ScriptEvalResponse.
1001 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
1002 // client can uniquely identify the request.
1003 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
1004 base::string16, /* frame_xpath */
1005 base::string16, /* jscript_url */
1006 int, /* ID */
1007 bool /* If true, result is sent back. */)
1009 // Posts a message from a frame in another process to the current renderer.
1010 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
1011 ViewMsg_PostMessage_Params)
1013 // Requests that the RenderView's main frame sets its opener to null.
1014 IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener)
1016 // Request for the renderer to evaluate an xpath to a frame and insert css
1017 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
1018 // allowed xpath expressions.
1019 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest,
1020 base::string16, /* frame_xpath */
1021 std::string /* css string */)
1023 // Change the zoom level for the current main frame. If the level actually
1024 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1025 // telling it what url got zoomed and what its current zoom level is.
1026 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
1027 content::PageZoom /* function */)
1029 // Set the zoom level for the current main frame. If the level actually
1030 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1031 // telling it what url got zoomed and what its current zoom level is.
1032 IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel,
1033 double /* zoom_level */)
1035 // Zooms the page by the factor defined in the renderer.
1036 IPC_MESSAGE_ROUTED3(ViewMsg_ZoomFactor,
1037 content::PageZoom,
1038 int /* zoom center_x */,
1039 int /* zoom center_y */)
1041 // Set the zoom level for a particular url that the renderer is in the
1042 // process of loading. This will be stored, to be used if the load commits
1043 // and ignored otherwise.
1044 IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
1045 GURL /* url */,
1046 double /* zoom_level */)
1048 // Set the zoom level for a particular url, so all render views
1049 // displaying this url can update their zoom levels to match.
1050 // If scheme is empty, then only host is used for matching.
1051 IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
1052 std::string /* scheme */,
1053 std::string /* host */,
1054 double /* zoom_level */)
1056 // Change encoding of page in the renderer.
1057 IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
1058 std::string /*new encoding name*/)
1060 // Reset encoding of page in the renderer back to default.
1061 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
1063 // Used to tell a render view whether it should expose various bindings
1064 // that allow JS content extended privileges. See BindingsPolicy for valid
1065 // flag values.
1066 IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
1067 int /* enabled_bindings_flags */)
1069 // Tell the renderer to add a property to the WebUI binding object. This
1070 // only works if we allowed WebUI bindings.
1071 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
1072 std::string /* property_name */,
1073 std::string /* property_value_json */)
1075 // This message starts/stop monitoring the input method status of the focused
1076 // edit control of a renderer process.
1077 // Parameters
1078 // * is_active (bool)
1079 // Indicates if an input method is active in the browser process.
1080 // The possible actions when a renderer process receives this message are
1081 // listed below:
1082 // Value Action
1083 // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
1084 // to notify the input method status of the focused edit control.
1085 // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
1086 IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
1087 bool /* is_active */)
1089 // IME API oncandidatewindow* events for InputMethodContext.
1090 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowShown)
1091 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowUpdated)
1092 IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden)
1094 // This message sends a string being composed with an input method.
1095 IPC_MESSAGE_ROUTED4(
1096 ViewMsg_ImeSetComposition,
1097 base::string16, /* text */
1098 std::vector<blink::WebCompositionUnderline>, /* underlines */
1099 int, /* selectiont_start */
1100 int /* selection_end */)
1102 // This message confirms an ongoing composition.
1103 IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition,
1104 base::string16 /* text */,
1105 gfx::Range /* replacement_range */,
1106 bool /* keep_selection */)
1108 // Sets the text composition to be between the given start and end offsets
1109 // in the currently focused editable field.
1110 IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText,
1111 int /* start */,
1112 int /* end */,
1113 std::vector<blink::WebCompositionUnderline> /* underlines */)
1115 // Selects between the given start and end offsets in the currently focused
1116 // editable field.
1117 IPC_MESSAGE_ROUTED2(ViewMsg_SetEditableSelectionOffsets,
1118 int /* start */,
1119 int /* end */)
1121 // Deletes the current selection plus the specified number of characters before
1122 // and after the selection or caret.
1123 IPC_MESSAGE_ROUTED2(ViewMsg_ExtendSelectionAndDelete,
1124 int /* before */,
1125 int /* after */)
1127 // Used to notify the render-view that we have received a target URL. Used
1128 // to prevent target URLs spamming the browser.
1129 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
1131 // Notifies the color chooser client that the user selected a color.
1132 IPC_MESSAGE_ROUTED2(ViewMsg_DidChooseColorResponse, unsigned, SkColor)
1134 // Notifies the color chooser client that the color chooser has ended.
1135 IPC_MESSAGE_ROUTED1(ViewMsg_DidEndColorChooser, unsigned)
1137 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
1138 std::vector<ui::SelectedFileInfo>)
1140 // Provides the results of directory enumeration.
1141 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
1142 int /* request_id */,
1143 std::vector<base::FilePath> /* files_in_directory */)
1145 // When a renderer sends a ViewHostMsg_Focus to the browser process,
1146 // the browser has the option of sending a ViewMsg_CantFocus back to
1147 // the renderer.
1148 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
1150 // Instructs the renderer to invoke the frame's shouldClose method, which
1151 // runs the onbeforeunload event handler. Expects the result to be returned
1152 // via ViewHostMsg_ShouldClose.
1153 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose)
1155 // Tells the renderer to suppress any further modal dialogs until it receives a
1156 // corresponding ViewMsg_SwapOut message. This ensures that no
1157 // PageGroupLoadDeferrer is on the stack for SwapOut.
1158 IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
1160 // Instructs the renderer to swap out for a cross-site transition, including
1161 // running the unload event handler. Expects a SwapOut_ACK message when
1162 // finished.
1163 IPC_MESSAGE_ROUTED0(ViewMsg_SwapOut)
1165 // Instructs the renderer to close the current page, including running the
1166 // onunload event handler.
1168 // Expects a ClosePage_ACK message when finished.
1169 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
1171 // Notifies the renderer about ui theme changes
1172 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
1174 // Notifies the renderer that a paint is to be generated for the rectangle
1175 // passed in.
1176 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
1177 gfx::Size /* The view size to be repainted */)
1179 // Notification that a move or resize renderer's containing window has
1180 // started.
1181 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
1183 IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
1184 gfx::Rect /* view_screen_rect */,
1185 gfx::Rect /* window_screen_rect */)
1187 // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
1188 // ViewHostMsg_ShowWidget to inform the renderer that the browser has
1189 // processed the move. The browser may have ignored the move, but it finished
1190 // processing. This is used because the renderer keeps a temporary cache of
1191 // the widget position while these asynchronous operations are in progress.
1192 IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
1194 // Used to instruct the RenderView to send back updates to the preferred size.
1195 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
1197 // Used to instruct the RenderView to automatically resize and send back
1198 // updates for the new size.
1199 IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
1200 gfx::Size /* min_size */,
1201 gfx::Size /* max_size */)
1203 // Used to instruct the RenderView to disalbe automatically resize.
1204 IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
1205 gfx::Size /* new_size */)
1207 // Changes the text direction of the currently selected input field (if any).
1208 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
1209 blink::WebTextDirection /* direction */)
1211 // Tells the renderer to clear the focused node (if any).
1212 IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode)
1214 // Make the RenderView transparent and render it onto a custom background. The
1215 // background will be tiled in both directions if it is not large enough.
1216 IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground,
1217 SkBitmap /* background */)
1219 // Used to tell the renderer not to add scrollbars with height and
1220 // width below a threshold.
1221 IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
1222 gfx::Size /* disable_scrollbar_size_limit */)
1224 // Activate/deactivate the RenderView (i.e., set its controls' tint
1225 // accordingly, etc.).
1226 IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
1227 bool /* active */)
1229 // Response message to ViewHostMsg_CreateShared/DedicatedWorker.
1230 // Sent when the worker has started.
1231 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
1233 // Tells the renderer that the network state has changed and that
1234 // window.navigator.onLine should be updated for all WebViews.
1235 IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged,
1236 bool /* online */)
1238 // Reply to ViewHostMsg_OpenChannelToPpapiBroker
1239 // Tells the renderer that the channel to the broker has been created.
1240 IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
1241 base::ProcessId /* broker_pid */,
1242 IPC::ChannelHandle /* handle */)
1244 // Reply to ViewHostMsg_RequestPpapiBrokerPermission.
1245 // Tells the renderer whether permission to access to PPAPI broker was granted
1246 // or not.
1247 IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
1248 bool /* result */)
1250 // Tells the renderer to empty its plugin list cache, optional reloading
1251 // pages containing plugins.
1252 IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
1253 bool /* reload_pages */)
1255 // Used to instruct the RenderView to go into "view source" mode.
1256 IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
1258 // Instructs the renderer to save the current page to MHTML.
1259 IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
1260 int /* job_id */,
1261 IPC::PlatformFileForTransit /* file handle */)
1263 // Temporary message to diagnose an unexpected condition in WebContentsImpl.
1264 IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
1265 GURL /* data */)
1267 // Change the accessibility mode in the renderer process.
1268 IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode,
1269 AccessibilityMode)
1271 // An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
1272 // process to release the magnified image.
1273 IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupDIB,
1274 TransportDIB::Handle /* DIB handle */)
1276 // Notifies the renderer that a snapshot has been retrieved.
1277 IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
1278 int /* snapshot_id */,
1279 gfx::Size /* size */,
1280 std::vector<unsigned char> /* png */)
1282 #if defined(OS_MACOSX)
1283 // Notification of a change in scrollbar appearance and/or behavior.
1284 IPC_MESSAGE_CONTROL4(ViewMsg_UpdateScrollbarTheme,
1285 float /* initial_button_delay */,
1286 float /* autoscroll_button_delay */,
1287 bool /* jump_on_track_click */,
1288 bool /* redraw */)
1289 #endif
1291 #if defined(OS_ANDROID)
1292 // Tells the renderer to suspend/resume the webkit timers.
1293 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
1294 bool /* suspend */)
1296 // Sent when the browser wants the bounding boxes of the current find matches.
1298 // If match rects are already cached on the browser side, |current_version|
1299 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
1300 // they came in, so the renderer can tell if it needs to send updated rects.
1301 // Otherwise just pass -1 to always receive the list of rects.
1303 // There must be an active search string (it is probably most useful to call
1304 // this immediately after a ViewHostMsg_Find_Reply message arrives with
1305 // final_update set to true).
1306 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
1307 int /* current_version */)
1309 // External popup menus.
1310 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems,
1311 bool /* user canceled the popup */,
1312 std::vector<int> /* selected indices */)
1314 // Tells the renderer to try to revert to the zoom level we were at before
1315 // ViewMsg_ScrollFocusedEditableNodeIntoView was called.
1316 IPC_MESSAGE_ROUTED0(ViewMsg_UndoScrollFocusedEditableNodeIntoView)
1318 // Notifies the renderer whether hiding/showing the top controls is enabled
1319 // and whether or not to animate to the proper state.
1320 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
1321 bool /* enable_hiding */,
1322 bool /* enable_showing */,
1323 bool /* animate */)
1325 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
1327 // Sent by the browser when the renderer should generate a new frame.
1328 IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
1329 cc::BeginFrameArgs /* args */)
1331 // Sent by the browser when an IME update that requires acknowledgement has been
1332 // processed on the browser side.
1333 IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
1335 // Sent by the browser when we should pause video playback.
1336 IPC_MESSAGE_ROUTED0(ViewMsg_PauseVideo);
1338 // Extracts the data at the given rect, returning it through the
1339 // ViewHostMsg_SmartClipDataExtracted IPC.
1340 IPC_MESSAGE_ROUTED1(ViewMsg_ExtractSmartClipData,
1341 gfx::Rect /* rect */)
1343 #elif defined(OS_MACOSX)
1344 // Let the RenderView know its window has changed visibility.
1345 IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
1346 bool /* visibile */)
1348 // Let the RenderView know its window's frame has changed.
1349 IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
1350 gfx::Rect /* window frame */,
1351 gfx::Rect /* content view frame */)
1353 // Message sent from the browser to the renderer when the user starts or stops
1354 // resizing the view.
1355 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
1356 bool /* enable */)
1358 // Tell the renderer that plugin IME has completed.
1359 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
1360 base::string16 /* text */,
1361 int /* plugin_id */)
1363 // External popup menus.
1364 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
1365 int /* selected index, -1 means no selection */)
1366 #endif
1368 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
1369 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
1370 uint32 /* output_surface_id */,
1371 cc::CompositorFrameAck /* ack */)
1373 // Sent by browser to tell renderer compositor that some resources that were
1374 // given to the browser in a swap are not being used anymore.
1375 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
1376 uint32 /* output_surface_id */,
1377 cc::CompositorFrameAck /* ack */)
1379 // Sent by the browser to ask the renderer for a snapshot of the current view.
1380 IPC_MESSAGE_ROUTED1(ViewMsg_Snapshot,
1381 gfx::Rect /* src_subrect */)
1383 // -----------------------------------------------------------------------------
1384 // Messages sent from the renderer to the browser.
1386 // Sent by the renderer when it is creating a new window. The browser creates
1387 // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1388 // MSG_ROUTING_NONE, the view couldn't be created.
1389 IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
1390 ViewHostMsg_CreateWindow_Params,
1391 int /* route_id */,
1392 int /* main_frame_route_id */,
1393 int32 /* surface_id */,
1394 int64 /* cloned_session_storage_namespace_id */)
1396 // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1397 // <select> dropdowns. This message is sent to the WebContentsImpl that
1398 // contains the widget being created.
1399 IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1400 int /* opener_id */,
1401 blink::WebPopupType /* popup type */,
1402 int /* route_id */,
1403 int32 /* surface_id */)
1405 // Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1406 // window.
1407 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1408 int /* opener_id */,
1409 int /* route_id */,
1410 int32 /* surface_id */)
1412 // Asks the browser for a unique routing ID.
1413 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1414 int /* routing_id */)
1416 // Asks the browser for the default audio hardware configuration.
1417 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1418 media::AudioParameters /* input parameters */,
1419 media::AudioParameters /* output parameters */)
1421 // Asks the browser for CPU usage of the renderer process in percents.
1422 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage,
1423 int /* CPU usage in percents */)
1425 // Asks the browser for the renderer process memory size stats.
1426 IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1427 size_t /* private_bytes */,
1428 size_t /* shared_bytes */)
1430 // These three messages are sent to the parent RenderViewHost to display the
1431 // page/widget that was created by
1432 // CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1433 // refers to the id that was returned from the Create message above.
1434 // The initial_position parameter is a rectangle in screen coordinates.
1436 // FUTURE: there will probably be flags here to control if the result is
1437 // in a new window.
1438 IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1439 int /* route_id */,
1440 WindowOpenDisposition /* disposition */,
1441 gfx::Rect /* initial_pos */,
1442 bool /* opened_by_user_gesture */)
1444 IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1445 int /* route_id */,
1446 gfx::Rect /* initial_pos */)
1448 // Message to show a full screen widget.
1449 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1450 int /* route_id */)
1452 // This message is sent after ViewHostMsg_ShowView to cause the RenderView
1453 // to run in a modal fashion until it is closed.
1454 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1455 int /* opener_id */)
1457 // Indicates the renderer is ready in response to a ViewMsg_New or
1458 // a ViewMsg_CreatingNew_ACK.
1459 IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1461 // Indicates the renderer process is gone. This actually is sent by the
1462 // browser process to itself, but keeps the interface cleaner.
1463 IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
1464 int, /* this really is base::TerminationStatus */
1465 int /* exit_code */)
1467 // Sent by the renderer process to request that the browser close the view.
1468 // This corresponds to the window.close() API, and the browser may ignore
1469 // this message. Otherwise, the browser will generates a ViewMsg_Close
1470 // message to close the view.
1471 IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1473 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1474 // throttle these messages.
1475 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1477 // Sent by the renderer process to request that the browser move the view.
1478 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1479 // the browser may ignore this message.
1480 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1481 gfx::Rect /* position */)
1483 // Notifies the browser that a frame in the view has changed. This message
1484 // has a lot of parameters and is packed/unpacked by functions defined in
1485 // render_messages.h.
1486 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
1487 ViewHostMsg_FrameNavigate_Params)
1489 // Used to tell the parent that the user right clicked on an area of the
1490 // content area, and a context menu should be shown for it. The params
1491 // object contains information about the node(s) that were selected when the
1492 // user right clicked.
1493 IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu, content::ContextMenuParams)
1495 // Message to show a popup menu using native cocoa controls (Mac only).
1496 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1497 ViewHostMsg_ShowPopup_Params)
1499 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
1500 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the
1501 // script as its only element, one of Null, Boolean, Integer, Real, Date, or
1502 // String.
1503 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse,
1504 int /* id */,
1505 base::ListValue /* result */)
1507 // Result of string search in the page.
1508 // Response to ViewMsg_Find with the results of the requested find-in-page
1509 // search, the number of matches found and the selection rect (in screen
1510 // coordinates) for the string found. If |final_update| is false, it signals
1511 // that this is not the last Find_Reply message - more will be sent as the
1512 // scoping effort continues.
1513 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1514 int /* request_id */,
1515 int /* number of matches */,
1516 gfx::Rect /* selection_rect */,
1517 int /* active_match_ordinal */,
1518 bool /* final_update */)
1520 // Provides the result from running OnMsgShouldClose. |proceed| matches the
1521 // return value of the the frame's shouldClose method (which includes the
1522 // onbeforeunload handler): true if the user decided to proceed with leaving
1523 // the page.
1524 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK,
1525 bool /* proceed */,
1526 base::TimeTicks /* before_unload_start_time */,
1527 base::TimeTicks /* before_unload_end_time */)
1529 // Indicates that the current renderer has swapped out, after a SwapOut
1530 // message.
1531 IPC_MESSAGE_ROUTED0(ViewHostMsg_SwapOut_ACK)
1533 // Indicates that the current page has been closed, after a ClosePage
1534 // message.
1535 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1537 // Notifies the browser that media has started/stopped playing.
1538 IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification,
1539 int64 /* player_cookie, distinguishes instances */,
1540 bool /* has_video */,
1541 bool /* has_audio */,
1542 bool /* is_playing */)
1544 // Notifies the browser that we have session history information.
1545 // page_id: unique ID that allows us to distinguish between history entries.
1546 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1547 int32 /* page_id */,
1548 content::PageState /* state */)
1550 // Notifies the browser that a document has been loaded in a frame.
1551 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
1552 int64 /* frame_id */)
1554 // Notifies the browser that a frame finished loading.
1555 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad,
1556 int64 /* frame_id */,
1557 GURL /* validated_url */,
1558 bool /* is_main_frame */)
1560 // Changes the title for the page in the UI when the page is navigated or the
1561 // title changes.
1562 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle,
1563 int32 /* page_id */,
1564 base::string16 /* title */,
1565 blink::WebTextDirection /* title direction */)
1567 // Change the encoding name of the page in UI when the page has detected
1568 // proper encoding name.
1569 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
1570 std::string /* new encoding name */)
1572 // Notifies the browser that we want to show a destination url for a potential
1573 // action (e.g. when the user is hovering over a link).
1574 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
1575 int32,
1576 GURL)
1578 // Sent when the renderer starts loading the page. This corresponds to
1579 // WebKit's notion of the throbber starting. Note that sometimes you may get
1580 // duplicates of these during a single load.
1581 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
1583 // Sent when the renderer is done loading a page. This corresponds to WebKit's
1584 // notion of the throbber stopping.
1585 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
1587 // Sent when the renderer main frame has made progress loading.
1588 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
1589 double /* load_progress */)
1591 // Sent when the renderer main frame sets its opener to null, disowning it for
1592 // the lifetime of the window.
1593 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisownOpener)
1595 // Sent when the document element is available for the top-level frame. This
1596 // happens after the page starts loading, but before all resources are
1597 // finished.
1598 IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
1600 // Sent when after the onload handler has been invoked for the document
1601 // in the top-level frame.
1602 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
1603 int32 /* page_id */)
1605 // Sent when the renderer loads a resource from its memory cache.
1606 // The security info is non empty if the resource was originally loaded over
1607 // a secure connection.
1608 // Note: May only be sent once per URL per frame per committed load.
1609 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1610 GURL /* url */,
1611 std::string /* security info */,
1612 std::string /* http method */,
1613 std::string /* mime type */,
1614 ResourceType::Type /* resource type */)
1616 // Sent when the renderer displays insecure content in a secure page.
1617 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1619 // Sent when the renderer runs insecure content in a secure origin.
1620 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1621 std::string /* security_origin */,
1622 GURL /* target URL */)
1624 IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError,
1625 int64 /* frame_id */,
1626 GURL /* validated_url */,
1627 bool /* is_main_frame */,
1628 int /* error_code */,
1629 base::string16 /* error_description */)
1631 // Tells the render view that a ViewHostMsg_PaintAtSize message was
1632 // processed, and the DIB is ready for use. |tag| has the same value that
1633 // the tag sent along with ViewMsg_PaintAtSize.
1634 IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
1635 int /* tag */,
1636 gfx::Size /* size */)
1638 // Sent to update part of the view. In response to this message, the host
1639 // generates a ViewMsg_UpdateRect_ACK message.
1640 IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1641 ViewHostMsg_UpdateRect_Params)
1643 // Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
1644 // which may get delayed until the browser's UI unblocks.
1645 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed)
1647 // Sent by the renderer when accelerated compositing is enabled or disabled to
1648 // notify the browser whether or not is should do painting.
1649 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
1650 bool /* true if the accelerated compositor is actve */)
1652 IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1653 IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1655 // Message sent from renderer to the browser when focus changes inside the
1656 // webpage. The parameter says whether the newly focused element needs
1657 // keyboard input (true for textfields, text areas and content editable divs).
1658 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1659 bool /* is_editable_node */)
1661 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor,
1662 WebCursor)
1664 // Used to set a cookie. The cookie is set asynchronously, but will be
1665 // available to a subsequent ViewHostMsg_GetCookies request.
1666 IPC_MESSAGE_CONTROL4(ViewHostMsg_SetCookie,
1667 int /* render_frame_id */,
1668 GURL /* url */,
1669 GURL /* first_party_for_cookies */,
1670 std::string /* cookie */)
1672 // Used to get cookies for the given URL. This may block waiting for a
1673 // previous SetCookie message to be processed.
1674 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_GetCookies,
1675 int /* render_frame_id */,
1676 GURL /* url */,
1677 GURL /* first_party_for_cookies */,
1678 std::string /* cookies */)
1680 // Used to get raw cookie information for the given URL. This may block
1681 // waiting for a previous SetCookie message to be processed.
1682 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1683 GURL /* url */,
1684 GURL /* first_party_for_cookies */,
1685 std::vector<content::CookieData>
1686 /* raw_cookies */)
1688 // Used to delete cookie for the given URL and name
1689 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1690 GURL /* url */,
1691 std::string /* cookie_name */)
1693 // Used to check if cookies are enabled for the given URL. This may block
1694 // waiting for a previous SetCookie message to be processed.
1695 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled,
1696 GURL /* url */,
1697 GURL /* first_party_for_cookies */,
1698 bool /* cookies_enabled */)
1700 // Used to get the list of plugins
1701 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1702 bool /* refresh*/,
1703 std::vector<content::WebPluginInfo> /* plugins */)
1705 #if defined(OS_WIN)
1706 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1707 gfx::NativeViewId /* dummy_activation_window */)
1709 IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1710 gfx::NativeViewId /* dummy_activation_window */)
1712 // Asks the browser for the user's monitor profile.
1713 IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1714 std::vector<char> /* profile */)
1715 #endif
1717 // Get the list of proxies to use for |url|, as a semicolon delimited list
1718 // of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1719 IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1720 GURL /* url */,
1721 bool /* result */,
1722 std::string /* proxy list */)
1724 // A renderer sends this to the browser process when it wants to create a
1725 // worker. The browser will create the worker process if necessary, and
1726 // will return the route id on success. On error returns MSG_ROUTING_NONE.
1727 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1728 ViewHostMsg_CreateWorker_Params,
1729 int /* route_id */)
1731 // This message is sent to the browser to see if an instance of this shared
1732 // worker already exists. If so, it returns exists == true. If a
1733 // non-empty name is passed, also validates that the url matches the url of
1734 // the existing worker. If a matching worker is found, the passed-in
1735 // document_id is associated with that worker, to ensure that the worker
1736 // stays alive until the document is detached.
1737 // The route_id returned can be used to forward messages to the worker via
1738 // ForwardToWorker if it exists, otherwise it should be passed in to any
1739 // future call to CreateWorker to avoid creating duplicate workers.
1740 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker,
1741 ViewHostMsg_CreateWorker_Params,
1742 bool /* exists */,
1743 int /* route_id */,
1744 bool /* url_mismatch */)
1746 // A renderer sends this to the browser process when a document has been
1747 // detached. The browser will use this to constrain the lifecycle of worker
1748 // processes (SharedWorkers are shut down when their last associated document
1749 // is detached).
1750 IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1751 uint64 /* document_id */)
1753 // Wraps an IPC message that's destined to the worker on the renderer->browser
1754 // hop.
1755 IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1756 IPC::Message /* message */)
1758 // Tells the browser that a specific Appcache manifest in the current page
1759 // was accessed.
1760 IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1761 GURL /* manifest url */,
1762 bool /* blocked by policy */)
1764 // Initiates a download based on user actions like 'ALT+click'.
1765 IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl,
1766 GURL /* url */,
1767 content::Referrer /* referrer */,
1768 base::string16 /* suggested_name */)
1770 // Used to go to the session history entry at the given offset (ie, -1 will
1771 // return the "back" item).
1772 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1773 int /* offset (from current) of history item to get */)
1775 // Sent from an inactive renderer for the browser to route to the active
1776 // renderer, instructing it to close.
1777 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1779 // Sent to the browser from an inactive renderer to post a message to the
1780 // active renderer.
1781 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1782 ViewMsg_PostMessage_Params)
1784 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
1785 base::string16 /* in - alert message */,
1786 base::string16 /* in - default prompt */,
1787 GURL /* in - originating page URL */,
1788 content::JavaScriptMessageType /* in - type */,
1789 bool /* out - success */,
1790 base::string16 /* out - user_input field */)
1792 // Requests that the given URL be opened in the specified manner.
1793 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL, ViewHostMsg_OpenURL_Params)
1795 // Notifies that the preferred size of the content changed.
1796 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1797 gfx::Size /* pref_size */)
1799 // Notifies that the scroll offset changed.
1800 // This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1801 // is not sent at all when threaded compositing is enabled while
1802 // ViewHostMsg_DidChangeScrollOffset works properly in this case.
1803 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset)
1805 // Notifies that the pinned-to-side state of the content changed.
1806 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
1807 bool /* pinned_to_left */,
1808 bool /* pinned_to_right */)
1810 // Notifies that the scrollbars-visible state of the content changed.
1811 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame,
1812 bool /* has_horizontal_scrollbar */,
1813 bool /* has_vertical_scrollbar */)
1815 // Notifies that the number of JavaScript scroll handlers changed.
1816 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents,
1817 int /* count */)
1819 // Notifies whether there are JavaScript touch event handlers or not.
1820 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1821 bool /* has_handlers */)
1823 // A message from HTML-based UI. When (trusted) Javascript calls
1824 // send(message, args), this message is sent to the browser.
1825 IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1826 GURL /* source_url */,
1827 std::string /* message */,
1828 base::ListValue /* args */)
1830 // A renderer sends this to the browser process when it wants to create a ppapi
1831 // plugin. The browser will create the plugin process if necessary, and will
1832 // return a handle to the channel on success.
1834 // The plugin_child_id is the ChildProcessHost ID assigned in the browser
1835 // process. This ID is valid only in the context of the browser process and is
1836 // used to identify the proper process when the renderer notifies it that the
1837 // plugin is hung.
1839 // On error an empty string and null handles are returned.
1840 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1841 base::FilePath /* path */,
1842 IPC::ChannelHandle /* handle to channel */,
1843 base::ProcessId /* plugin_pid */,
1844 int /* plugin_child_id */)
1846 // Notification that a plugin has created a new plugin instance. The parameters
1847 // indicate:
1848 // -The plugin process ID that we're creating the instance for.
1849 // -The instance ID of the instance being created.
1850 // -A PepperRendererInstanceData struct which contains properties from the
1851 // renderer which are associated with the plugin instance. This includes the
1852 // routing ID of the associated render view and the URL of plugin.
1853 // -Whether the plugin we're creating an instance for is external or internal.
1855 // This message must be sync even though it returns no parameters to avoid
1856 // a race condition with the plugin process. The plugin process sends messages
1857 // to the browser that assume the browser knows about the instance. We need to
1858 // make sure that the browser actually knows about the instance before we tell
1859 // the plugin to run.
1860 IPC_SYNC_MESSAGE_CONTROL4_0(
1861 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1862 int /* plugin_child_id */,
1863 int32 /* pp_instance */,
1864 content::PepperRendererInstanceData /* creation_data */,
1865 bool /* is_external */)
1867 // Notification that a plugin has destroyed an instance. This is the opposite of
1868 // the "DidCreate" message above.
1869 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1870 int /* plugin_child_id */,
1871 int32 /* pp_instance */,
1872 bool /* is_external */)
1874 // Message from the renderer to the browser indicating the in-process instance
1875 // has been created.
1876 IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1877 int32 /* instance */,
1878 content::PepperRendererInstanceData /* instance_data */)
1880 // Message from the renderer to the browser indicating the in-process instance
1881 // has been destroyed.
1882 IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1883 int32 /* instance */)
1885 // A renderer sends this to the browser process when it wants to
1886 // create a ppapi broker. The browser will create the broker process
1887 // if necessary, and will return a handle to the channel on success.
1888 // On error an empty string is returned.
1889 // The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
1890 IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
1891 int /* routing_id */,
1892 base::FilePath /* path */)
1894 // A renderer sends this to the browser process when it wants to access a PPAPI
1895 // broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1896 // for every connection.
1897 // The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1898 IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
1899 int /* routing_id */,
1900 GURL /* document_url */,
1901 base::FilePath /* plugin_path */)
1903 #if defined(USE_X11)
1904 // A renderer sends this when it needs a browser-side widget for
1905 // hosting a windowed plugin. id is the XID of the plugin window, for which
1906 // the container is created.
1907 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
1908 gfx::PluginWindowHandle /* id */)
1910 // Destroy a plugin container previously created using CreatePluginContainer.
1911 // id is the XID of the plugin window corresponding to the container that is
1912 // to be destroyed.
1913 IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
1914 gfx::PluginWindowHandle /* id */)
1915 #endif
1917 // Send the tooltip text for the current mouse position to the browser.
1918 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1919 base::string16 /* tooltip text string */,
1920 blink::WebTextDirection /* text direction hint */)
1922 IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
1923 IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
1925 // Notification that the text selection has changed.
1926 // Note: The secound parameter is the character based offset of the
1927 // base::string16
1928 // text in the document.
1929 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1930 base::string16 /* text covers the selection range */,
1931 size_t /* the offset of the text in the document */,
1932 gfx::Range /* selection range in the document */)
1934 // Notification that the selection bounds have changed.
1935 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1936 ViewHostMsg_SelectionBounds_Params)
1938 // Asks the browser to open the color chooser.
1939 IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenColorChooser,
1940 int /* id */,
1941 SkColor /* color */,
1942 std::vector<content::ColorSuggestion> /* suggestions */)
1944 // Asks the browser to end the color chooser.
1945 IPC_MESSAGE_ROUTED1(ViewHostMsg_EndColorChooser, int /* id */)
1947 // Change the selected color in the color chooser.
1948 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSelectedColorInColorChooser,
1949 int /* id */,
1950 SkColor /* color */)
1952 // Asks the browser to display the file chooser. The result is returned in a
1953 // ViewHost_RunFileChooserResponse message.
1954 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1955 content::FileChooserParams)
1957 // Asks the browser to enumerate a directory. This is equivalent to running
1958 // the file chooser in directory-enumeration mode and having the user select
1959 // the given directory. The result is returned in a
1960 // ViewMsg_EnumerateDirectoryResponse message.
1961 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1962 int /* request_id */,
1963 base::FilePath /* file_path */)
1965 // Tells the browser to move the focus to the next (previous if reverse is
1966 // true) focusable element.
1967 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1968 bool /* reverse */)
1970 // Required for opening a date/time dialog
1971 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1972 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1974 IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged,
1975 ui::TextInputType /* TextInputType of the focused node */,
1976 ui::TextInputMode /* TextInputMode of the focused node */,
1977 bool /* can_compose_inline in the focused node */)
1979 // Required for updating text input state.
1980 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1981 ViewHostMsg_TextInputState_Params /* input state params */)
1983 // Required for cancelling an ongoing input method composition.
1984 IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition)
1986 // WebKit and JavaScript error messages to log to the console
1987 // or debugger UI.
1988 IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole,
1989 int32, /* log level */
1990 base::string16, /* msg */
1991 int32, /* line number */
1992 base::string16 /* source id */ )
1994 // Displays a box to confirm that the user wants to navigate away from the
1995 // page. Replies true if yes, false otherwise, the reply string is ignored,
1996 // but is included so that we can use OnJavaScriptMessageBoxClosed.
1997 IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm,
1998 GURL, /* in - originating frame URL */
1999 base::string16 /* in - alert message */,
2000 bool /* in - is a reload */,
2001 bool /* out - success */,
2002 base::string16 /* out - This is ignored.*/)
2004 // Sent when the renderer changes the zoom level for a particular url, so the
2005 // browser can update its records. If remember is true, then url is used to
2006 // update the zoom level for all pages in that site. Otherwise, the render
2007 // view's id is used so that only the menu is updated.
2008 IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL,
2009 double /* zoom_level */,
2010 bool /* remember */,
2011 GURL /* url */)
2013 // Updates the minimum/maximum allowed zoom percent for this tab from the
2014 // default values. If |remember| is true, then the zoom setting is applied to
2015 // other pages in the site and is saved, otherwise it only applies to this
2016 // tab.
2017 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits,
2018 int /* minimum_percent */,
2019 int /* maximum_percent */,
2020 bool /* remember */)
2022 // Notify the browser that this render process can or can't be suddenly
2023 // terminated.
2024 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
2025 bool /* enabled */)
2027 // Informs the browser of updated frame names.
2028 IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateFrameName,
2029 int /* frame_id */,
2030 bool /* is_top_level */,
2031 std::string /* name */)
2034 IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params)
2035 IPC_STRUCT_MEMBER(int32, surface_id)
2036 IPC_STRUCT_MEMBER(uint64, surface_handle)
2037 IPC_STRUCT_MEMBER(int32, route_id)
2038 IPC_STRUCT_MEMBER(gfx::Size, size)
2039 IPC_STRUCT_MEMBER(float, scale_factor)
2040 IPC_STRUCT_MEMBER(int32, gpu_process_host_id)
2041 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
2042 IPC_STRUCT_END()
2044 // This message is synthesized by GpuProcessHost to pass through a swap message
2045 // to the RenderWidgetHelper. This allows GetBackingStore to block for either a
2046 // software or GPU frame.
2047 IPC_MESSAGE_ROUTED1(
2048 ViewHostMsg_CompositorSurfaceBuffersSwapped,
2049 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params /* params */)
2051 IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame,
2052 uint32 /* output_surface_id */,
2053 cc::CompositorFrame /* frame */)
2055 // Sent by the compositor when input scroll events are dropped due to bounds
2056 // restricions on the root scroll offset.
2057 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidOverscroll,
2058 gfx::Vector2dF /* accumulated_overscroll */,
2059 gfx::Vector2dF /* current_fling_velocity */)
2061 // Sent by the compositor when a flinging animation is stopped.
2062 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopFlinging)
2064 // Reply to a snapshot request containing whether snapshotting succeeded and the
2065 // SkBitmap if it succeeded.
2066 IPC_MESSAGE_ROUTED2(ViewHostMsg_Snapshot,
2067 bool, /* success */
2068 SkBitmap /* bitmap */)
2070 //---------------------------------------------------------------------------
2071 // Request for cryptographic operation messages:
2072 // These are messages from the renderer to the browser to perform a
2073 // cryptographic operation.
2075 // Asks the browser process to generate a keypair for grabbing a client
2076 // certificate from a CA (<keygen> tag), and returns the signed public
2077 // key and challenge string.
2078 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
2079 uint32 /* key size index */,
2080 std::string /* challenge string */,
2081 GURL /* URL of requestor */,
2082 std::string /* signed public key and challenge */)
2084 // Message sent from the renderer to the browser to request that the browser
2085 // cache |data| associated with |url|.
2086 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
2087 GURL /* url */,
2088 double /* expected_response_time */,
2089 std::vector<char> /* data */)
2091 // Displays a JavaScript out-of-memory message in the infobar.
2092 IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory)
2094 // Register a new handler for URL requests with the given scheme.
2095 IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
2096 std::string /* scheme */,
2097 GURL /* url */,
2098 base::string16 /* title */,
2099 bool /* user_gesture */)
2101 // Stores new inspector setting in the profile.
2102 // TODO(jam): this should be in the chrome module
2103 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
2104 std::string, /* key */
2105 std::string /* value */)
2107 // Puts the browser into "tab fullscreen" mode for the sending renderer.
2108 // See the comment in chrome/browser/ui/browser.h for more details.
2109 IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
2110 bool /* enter_fullscreen */)
2112 // Send back a string to be recorded by UserMetrics.
2113 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
2114 std::string /* action */)
2116 // Notifies the browser that the page was or was not saved as MHTML.
2117 IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
2118 int /* job_id */,
2119 int64 /* size of the MHTML file, -1 if error */)
2121 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
2122 std::vector<GURL> /* all savable resource links */,
2123 std::vector<content::Referrer> /* all referrers */,
2124 std::vector<GURL> /* all frame links */)
2126 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
2127 GURL /* frame's url */,
2128 std::string /* data buffer */,
2129 int32 /* complete status */)
2131 // Notifies the browser of an event occurring in the media pipeline.
2132 IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
2133 std::vector<media::MediaLogEvent> /* events */)
2135 // Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
2136 // being sent back.
2137 // |privileged| is used by Pepper Flash. If this flag is set to true, we won't
2138 // pop up a bubble to ask for user permission or take mouse lock content into
2139 // account.
2140 IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
2141 bool /* user_gesture */,
2142 bool /* last_unlocked_by_target */,
2143 bool /* privileged */)
2145 // Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
2146 // whenever the mouse is unlocked (which may or may not be caused by
2147 // ViewHostMsg_UnlockMouse).
2148 IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
2150 // Notifies that the initial empty document of a view has been accessed.
2151 // After this, it is no longer safe to show a pending navigation's URL without
2152 // making a URL spoof possible.
2153 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidAccessInitialDocument)
2155 // Following message is used to communicate the values received by the
2156 // callback binding the JS to Cpp.
2157 // An instance of browser that has an automation host listening to it can
2158 // have a javascript send a native value (string, number, boolean) to the
2159 // listener in Cpp. (DomAutomationController)
2160 IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
2161 std::string /* json_string */,
2162 int /* automation_id */)
2164 // Notifies that multiple touch targets may have been pressed, and to show
2165 // the disambiguation popup.
2166 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
2167 gfx::Rect, /* Border of touched targets */
2168 gfx::Size, /* Size of zoomed image */
2169 TransportDIB::Id /* DIB of zoomed image */)
2171 // Sent by the renderer process to check whether client 3D APIs
2172 // (Pepper 3D, WebGL) are explicitly blocked.
2173 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
2174 int /* render_view_id */,
2175 GURL /* top_origin_url */,
2176 content::ThreeDAPIType /* requester */,
2177 bool /* blocked */)
2179 // Sent by the renderer process to indicate that a context was lost by
2180 // client 3D content (Pepper 3D, WebGL) running on the page at the
2181 // given URL.
2182 IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
2183 GURL /* top_origin_url */,
2184 content::ThreeDAPIType /* context_type */,
2185 int /* arb_robustness_status_code */)
2187 // Notifies the browser that document has parsed the body. This is used by the
2188 // ResourceScheduler as an indication that bandwidth contention won't block
2189 // first paint.
2190 IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
2192 // Notification that the urls for the favicon of a site has been determined.
2193 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
2194 int32 /* page_id */,
2195 std::vector<content::FaviconURL> /* candidates */)
2197 // Sent once a paint happens after the first non empty layout. In other words
2198 // after the page has painted something.
2199 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFirstVisuallyNonEmptyPaint,
2200 int /* page_id */)
2202 // Sent by the renderer to the browser to start a vibration with the given
2203 // duration.
2204 IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
2205 int64 /* milliseconds */)
2207 // Sent by the renderer to the browser to cancel the currently running
2208 // vibration, if there is one.
2209 IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
2211 // Message sent from renderer to the browser when the element that is focused
2212 // has been touched. A bool is passed in this message which indicates if the
2213 // node is editable.
2214 IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeTouched,
2215 bool /* editable */)
2217 // Message sent from the renderer to the browser when an HTML form has failed
2218 // validation constraints.
2219 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowValidationMessage,
2220 gfx::Rect /* anchor rectangle in root view coordinate */,
2221 base::string16 /* validation message */,
2222 base::string16 /* supplemental text */)
2224 // Message sent from the renderer to the browser when a HTML form validation
2225 // message should be hidden from view.
2226 IPC_MESSAGE_ROUTED0(ViewHostMsg_HideValidationMessage)
2228 // Message sent from the renderer to the browser when the suggested co-ordinates
2229 // of the anchor for a HTML form validation message have changed.
2230 IPC_MESSAGE_ROUTED1(ViewHostMsg_MoveValidationMessage,
2231 gfx::Rect /* anchor rectangle in root view coordinate */)
2233 #if defined(OS_ANDROID)
2234 // Response to ViewMsg_FindMatchRects.
2236 // |version| will contain the current version number of the renderer's find
2237 // match list (incremented whenever they change), which should be passed in the
2238 // next call to ViewMsg_FindMatchRects.
2240 // |rects| will either contain a list of the enclosing rects of all matches
2241 // found by the most recent Find operation, or will be empty if |version| is not
2242 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
2243 // your locally cached rects should still be valid). The rect coords will be
2244 // custom normalized fractions of the document size. The rects will be sorted by
2245 // frame traversal order starting in the main frame, then by dom order.
2247 // |active_rect| will contain the bounding box of the active find-in-page match
2248 // marker, in similarly normalized coords (or an empty rect if there isn't one).
2249 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
2250 int /* version */,
2251 std::vector<gfx::RectF> /* rects */,
2252 gfx::RectF /* active_rect */)
2254 // Start an android intent with the given URI.
2255 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
2256 GURL /* content_url */)
2258 // Message sent when the renderer changed the background color for the view.
2259 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
2260 uint32 /* bg_color */)
2262 // This message runs the MediaCodec for decoding audio for webaudio.
2263 IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
2264 base::SharedMemoryHandle /* encoded_data_handle */,
2265 base::FileDescriptor /* pcm_output */,
2266 uint32_t /* data_size*/)
2268 // Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
2269 // display events. If |enabled| is true, the BeginFrame message will continue
2270 // to be be delivered until the notification is disabled.
2271 IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
2272 bool /* enabled */)
2274 // Reply to the ViewMsg_ExtractSmartClipData message.
2275 // TODO(juhui24.lee@samsung.com): this should be changed to a vector of structs
2276 // instead of encoding the data as a string which is not allowed normally. Since
2277 // ths is only used in Android WebView, it's allowed temporarily.
2278 // http://crbug.com/330872
2279 IPC_MESSAGE_ROUTED1(ViewHostMsg_SmartClipDataExtracted, base::string16)
2281 #elif defined(OS_MACOSX)
2282 // Request that the browser load a font into shared memory for us.
2283 IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
2284 FontDescriptor /* font to load */,
2285 uint32 /* buffer size */,
2286 base::SharedMemoryHandle /* font data */,
2287 uint32 /* font id */)
2289 // Informs the browser that a plugin has gained or lost focus.
2290 IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
2291 bool, /* focused */
2292 int /* plugin_id */)
2294 // Instructs the browser to start plugin IME.
2295 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
2297 #elif defined(OS_WIN)
2298 // Request that the given font characters be loaded by the browser so it's
2299 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
2300 // for details.
2301 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
2302 LOGFONT /* font_data */,
2303 base::string16 /* characters */)
2304 #endif
2306 #if defined(OS_POSIX)
2307 // On POSIX, we cannot allocated shared memory from within the sandbox, so
2308 // this call exists for the renderer to ask the browser to allocate memory
2309 // on its behalf. We return a file descriptor to the POSIX shared memory.
2310 // If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
2311 // by the browser, and it is the caller's repsonsibility to send a
2312 // ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
2313 // In all cases, the caller is responsible for deleting the resulting
2314 // TransportDIB.
2315 IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
2316 uint32_t, /* bytes requested */
2317 bool, /* cache in the browser */
2318 TransportDIB::Handle /* DIB */)
2320 // Since the browser keeps handles to the allocated transport DIBs, this
2321 // message is sent to tell the browser that it may release them when the
2322 // renderer is finished with them.
2323 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
2324 TransportDIB::Id /* DIB id */)
2325 #endif
2327 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
2328 // On MACOSX, WIN and AURA IME can request composition character bounds
2329 // synchronously (see crbug.com/120597). This IPC message sends the character
2330 // bounds after every composition change to always have correct bound info.
2331 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged,
2332 gfx::Range /* composition range */,
2333 std::vector<gfx::Rect> /* character bounds */)
2334 #endif
2336 // Adding a new message? Stick to the sort order above: first platform
2337 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
2338 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.