blob: 9ab0e9928c9ea403132721b725aa9c13d4871520 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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.
4
5// IPC messages for page rendering.
6// Multiply-included message file, hence no include guard.
7
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01008#include "base/memory/shared_memory.h"
Ben Murdoch58e6fbe2013-07-26 10:20:38 +01009#include "base/process/process.h"
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +010010#include "base/strings/string16.h"
11#include "cc/output/begin_frame_args.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000012#include "cc/output/compositor_frame.h"
13#include "cc/output/compositor_frame_ack.h"
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010014#include "content/common/browser_rendering_stats.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000015#include "content/common/content_export.h"
16#include "content/common/content_param_traits.h"
Ben Murdocheb525c52013-07-10 11:40:50 +010017#include "content/common/cookie_data.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000018#include "content/common/navigation_gesture.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000019#include "content/common/pepper_renderer_instance_data.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000020#include "content/common/view_message_enums.h"
Ben Murdochca12bfa2013-07-23 11:17:05 +010021#include "content/common/webplugin_geometry.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000022#include "content/port/common/input_event_ack_state.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000023#include "content/public/common/common_param_traits.h"
24#include "content/public/common/context_menu_params.h"
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010025#include "content/public/common/favicon_url.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000026#include "content/public/common/file_chooser_params.h"
27#include "content/public/common/frame_navigate_params.h"
28#include "content/public/common/javascript_message_type.h"
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010029#include "content/public/common/menu_item.h"
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +010030#include "content/public/common/page_state.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000031#include "content/public/common/page_zoom.h"
32#include "content/public/common/referrer.h"
33#include "content/public/common/renderer_preferences.h"
34#include "content/public/common/stop_find_action.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000035#include "content/public/common/three_d_api_types.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000036#include "content/public/common/window_container_type.h"
37#include "ipc/ipc_channel_handle.h"
38#include "ipc/ipc_message_macros.h"
39#include "ipc/ipc_platform_file.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000040#include "media/audio/audio_parameters.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000041#include "media/base/channel_layout.h"
42#include "media/base/media_log_event.h"
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010043#include "third_party/WebKit/public/platform/WebFloatPoint.h"
44#include "third_party/WebKit/public/platform/WebFloatRect.h"
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +010045#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
46#include "third_party/WebKit/public/web/WebFindOptions.h"
47#include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
48#include "third_party/WebKit/public/web/WebPluginAction.h"
49#include "third_party/WebKit/public/web/WebPopupType.h"
50#include "third_party/WebKit/public/web/WebScreenInfo.h"
51#include "third_party/WebKit/public/web/WebTextDirection.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000052#include "third_party/skia/include/core/SkBitmap.h"
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010053#include "ui/base/ime/text_input_mode.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000054#include "ui/base/ime/text_input_type.h"
55#include "ui/base/range/range.h"
Ben Murdocheb525c52013-07-10 11:40:50 +010056#include "ui/base/ui_base_types.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000057#include "ui/gfx/point.h"
58#include "ui/gfx/rect.h"
59#include "ui/gfx/rect_f.h"
60#include "ui/gfx/vector2d.h"
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +010061#include "ui/gfx/vector2d_f.h"
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000062#include "ui/shell_dialogs/selected_file_info.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000063
64#if defined(OS_MACOSX)
65#include "content/common/mac/font_descriptor.h"
66#endif
67
68#undef IPC_MESSAGE_EXPORT
69#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
70
71#define IPC_MESSAGE_START ViewMsgStart
72
73IPC_ENUM_TRAITS(AccessibilityMode)
74IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value)
75IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType)
76IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type)
77IPC_ENUM_TRAITS(WebKit::WebPluginAction::Type)
78IPC_ENUM_TRAITS(WebKit::WebPopupType)
79IPC_ENUM_TRAITS(WebKit::WebTextDirection)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000080IPC_ENUM_TRAITS(WindowContainerType)
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010081IPC_ENUM_TRAITS(content::FaviconURL::IconType)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000082IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
83IPC_ENUM_TRAITS(content::JavaScriptMessageType)
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010084IPC_ENUM_TRAITS(content::MenuItem::Type)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000085IPC_ENUM_TRAITS(content::NavigationGesture)
86IPC_ENUM_TRAITS(content::PageZoom)
87IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum)
88IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum)
Ben Murdoch2385ea32013-08-06 11:01:04 +010089IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
90 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000091IPC_ENUM_TRAITS(content::StopFindAction)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000092IPC_ENUM_TRAITS(content::ThreeDAPIType)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000093IPC_ENUM_TRAITS(media::ChannelLayout)
94IPC_ENUM_TRAITS(media::MediaLogEvent::Type)
Ben Murdocheb525c52013-07-10 11:40:50 +010095IPC_ENUM_TRAITS(ui::MenuSourceType)
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010096IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
Torne (Richard Coles)58218062012-11-14 11:43:16 +000097IPC_ENUM_TRAITS(ui::TextInputType)
98
99#if defined(OS_MACOSX)
100IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
101 IPC_STRUCT_TRAITS_MEMBER(font_name)
102 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
103IPC_STRUCT_TRAITS_END()
104#endif
105
106IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCompositionUnderline)
107 IPC_STRUCT_TRAITS_MEMBER(startOffset)
108 IPC_STRUCT_TRAITS_MEMBER(endOffset)
109 IPC_STRUCT_TRAITS_MEMBER(color)
110 IPC_STRUCT_TRAITS_MEMBER(thick)
111IPC_STRUCT_TRAITS_END()
112
113IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFindOptions)
114 IPC_STRUCT_TRAITS_MEMBER(forward)
115 IPC_STRUCT_TRAITS_MEMBER(matchCase)
116 IPC_STRUCT_TRAITS_MEMBER(findNext)
117IPC_STRUCT_TRAITS_END()
118
119IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction)
120 IPC_STRUCT_TRAITS_MEMBER(type)
121 IPC_STRUCT_TRAITS_MEMBER(enable)
122IPC_STRUCT_TRAITS_END()
123
124IPC_STRUCT_TRAITS_BEGIN(WebKit::WebPluginAction)
125 IPC_STRUCT_TRAITS_MEMBER(type)
126 IPC_STRUCT_TRAITS_MEMBER(enable)
127IPC_STRUCT_TRAITS_END()
128
129IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatPoint)
130 IPC_STRUCT_TRAITS_MEMBER(x)
131 IPC_STRUCT_TRAITS_MEMBER(y)
132IPC_STRUCT_TRAITS_END()
133
134IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatRect)
135 IPC_STRUCT_TRAITS_MEMBER(x)
136 IPC_STRUCT_TRAITS_MEMBER(y)
137 IPC_STRUCT_TRAITS_MEMBER(width)
138 IPC_STRUCT_TRAITS_MEMBER(height)
139IPC_STRUCT_TRAITS_END()
140
141IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000142 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000143 IPC_STRUCT_TRAITS_MEMBER(depth)
144 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
145 IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
146 IPC_STRUCT_TRAITS_MEMBER(rect)
147 IPC_STRUCT_TRAITS_MEMBER(availableRect)
148IPC_STRUCT_TRAITS_END()
149
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100150IPC_STRUCT_TRAITS_BEGIN(content::MenuItem)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000151 IPC_STRUCT_TRAITS_MEMBER(label)
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100152 IPC_STRUCT_TRAITS_MEMBER(tool_tip)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000153 IPC_STRUCT_TRAITS_MEMBER(type)
154 IPC_STRUCT_TRAITS_MEMBER(action)
155 IPC_STRUCT_TRAITS_MEMBER(rtl)
156 IPC_STRUCT_TRAITS_MEMBER(has_directional_override)
157 IPC_STRUCT_TRAITS_MEMBER(enabled)
158 IPC_STRUCT_TRAITS_MEMBER(checked)
159 IPC_STRUCT_TRAITS_MEMBER(submenu)
160IPC_STRUCT_TRAITS_END()
161
162IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams)
163 IPC_STRUCT_TRAITS_MEMBER(media_type)
164 IPC_STRUCT_TRAITS_MEMBER(x)
165 IPC_STRUCT_TRAITS_MEMBER(y)
166 IPC_STRUCT_TRAITS_MEMBER(link_url)
167 IPC_STRUCT_TRAITS_MEMBER(link_text)
168 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
169 IPC_STRUCT_TRAITS_MEMBER(src_url)
170 IPC_STRUCT_TRAITS_MEMBER(is_image_blocked)
171 IPC_STRUCT_TRAITS_MEMBER(page_url)
172 IPC_STRUCT_TRAITS_MEMBER(keyword_url)
173 IPC_STRUCT_TRAITS_MEMBER(frame_url)
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100174 IPC_STRUCT_TRAITS_MEMBER(frame_page_state)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000175 IPC_STRUCT_TRAITS_MEMBER(media_flags)
176 IPC_STRUCT_TRAITS_MEMBER(selection_text)
177 IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100178 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000179 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
180 IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled)
181 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
182 IPC_STRUCT_TRAITS_MEMBER(is_editable)
183#if defined(OS_MACOSX)
184 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
185 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
186 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
187#endif // OS_MACOSX
188 IPC_STRUCT_TRAITS_MEMBER(edit_flags)
189 IPC_STRUCT_TRAITS_MEMBER(security_info)
190 IPC_STRUCT_TRAITS_MEMBER(frame_charset)
191 IPC_STRUCT_TRAITS_MEMBER(referrer_policy)
192 IPC_STRUCT_TRAITS_MEMBER(custom_context)
193 IPC_STRUCT_TRAITS_MEMBER(custom_items)
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100194 IPC_STRUCT_TRAITS_MEMBER(source_type)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000195#if defined(OS_ANDROID)
196 IPC_STRUCT_TRAITS_MEMBER(selection_start)
197 IPC_STRUCT_TRAITS_MEMBER(selection_end)
198#endif
199IPC_STRUCT_TRAITS_END()
200
201IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
202 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
203 IPC_STRUCT_TRAITS_MEMBER(request_id)
204 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
205IPC_STRUCT_TRAITS_END()
206
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100207IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL)
208 IPC_STRUCT_TRAITS_MEMBER(icon_url)
209 IPC_STRUCT_TRAITS_MEMBER(icon_type)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000210IPC_STRUCT_TRAITS_END()
211
212IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams)
213 IPC_STRUCT_TRAITS_MEMBER(mode)
214 IPC_STRUCT_TRAITS_MEMBER(title)
215 IPC_STRUCT_TRAITS_MEMBER(default_file_name)
216 IPC_STRUCT_TRAITS_MEMBER(accept_types)
217#if defined(OS_ANDROID)
218 IPC_STRUCT_TRAITS_MEMBER(capture)
219#endif
220IPC_STRUCT_TRAITS_END()
221
222IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams)
223 IPC_STRUCT_TRAITS_MEMBER(page_id)
224 IPC_STRUCT_TRAITS_MEMBER(url)
225 IPC_STRUCT_TRAITS_MEMBER(base_url)
226 IPC_STRUCT_TRAITS_MEMBER(referrer)
227 IPC_STRUCT_TRAITS_MEMBER(transition)
228 IPC_STRUCT_TRAITS_MEMBER(redirects)
229 IPC_STRUCT_TRAITS_MEMBER(should_update_history)
230 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url)
231 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding)
232 IPC_STRUCT_TRAITS_MEMBER(password_form)
233 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type)
234 IPC_STRUCT_TRAITS_MEMBER(socket_address)
235IPC_STRUCT_TRAITS_END()
236
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000237IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData)
238 IPC_STRUCT_TRAITS_MEMBER(render_process_id)
239 IPC_STRUCT_TRAITS_MEMBER(render_view_id)
240 IPC_STRUCT_TRAITS_MEMBER(document_url)
241 IPC_STRUCT_TRAITS_MEMBER(plugin_url)
242IPC_STRUCT_TRAITS_END()
243
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000244IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences)
245 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
246 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
247 IPC_STRUCT_TRAITS_MEMBER(hinting)
248 IPC_STRUCT_TRAITS_MEMBER(use_autohinter)
249 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps)
250 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering)
251 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning)
252 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color)
253 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color)
254 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color)
255 IPC_STRUCT_TRAITS_MEMBER(track_color)
256 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color)
257 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color)
258 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color)
259 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color)
260 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests)
261 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests)
262 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000263 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000264 IPC_STRUCT_TRAITS_MEMBER(enable_referrers)
265 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track)
266 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level)
267 IPC_STRUCT_TRAITS_MEMBER(user_agent_override)
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100268 IPC_STRUCT_TRAITS_MEMBER(accept_languages)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000269 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes)
270 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile)
271 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile)
Ben Murdoch2385ea32013-08-06 11:01:04 +0100272 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000273IPC_STRUCT_TRAITS_END()
274
Ben Murdocheb525c52013-07-10 11:40:50 +0100275IPC_STRUCT_TRAITS_BEGIN(content::CookieData)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000276 IPC_STRUCT_TRAITS_MEMBER(name)
277 IPC_STRUCT_TRAITS_MEMBER(value)
278 IPC_STRUCT_TRAITS_MEMBER(domain)
279 IPC_STRUCT_TRAITS_MEMBER(path)
280 IPC_STRUCT_TRAITS_MEMBER(expires)
281 IPC_STRUCT_TRAITS_MEMBER(http_only)
282 IPC_STRUCT_TRAITS_MEMBER(secure)
283 IPC_STRUCT_TRAITS_MEMBER(session)
284IPC_STRUCT_TRAITS_END()
285
Ben Murdochca12bfa2013-07-23 11:17:05 +0100286IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000287 IPC_STRUCT_TRAITS_MEMBER(window)
288 IPC_STRUCT_TRAITS_MEMBER(window_rect)
289 IPC_STRUCT_TRAITS_MEMBER(clip_rect)
290 IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
291 IPC_STRUCT_TRAITS_MEMBER(rects_valid)
292 IPC_STRUCT_TRAITS_MEMBER(visible)
293IPC_STRUCT_TRAITS_END()
294
295IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
296 IPC_STRUCT_TRAITS_MEMBER(id)
297 IPC_STRUCT_TRAITS_MEMBER(type)
298 IPC_STRUCT_TRAITS_MEMBER(params)
299 IPC_STRUCT_TRAITS_MEMBER(time)
300IPC_STRUCT_TRAITS_END()
301
302IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo)
303 IPC_STRUCT_TRAITS_MEMBER(file_path)
304 IPC_STRUCT_TRAITS_MEMBER(local_path)
305 IPC_STRUCT_TRAITS_MEMBER(display_name)
306IPC_STRUCT_TRAITS_END()
307
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100308IPC_STRUCT_TRAITS_BEGIN(content::BrowserRenderingStats)
309 IPC_STRUCT_TRAITS_MEMBER(input_event_count)
310 IPC_STRUCT_TRAITS_MEMBER(total_input_latency)
Ben Murdocheb525c52013-07-10 11:40:50 +0100311 IPC_STRUCT_TRAITS_MEMBER(touch_ui_count)
312 IPC_STRUCT_TRAITS_MEMBER(total_touch_ui_latency)
313 IPC_STRUCT_TRAITS_MEMBER(touch_acked_count)
314 IPC_STRUCT_TRAITS_MEMBER(total_touch_acked_latency)
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100315 IPC_STRUCT_TRAITS_MEMBER(scroll_update_count)
316 IPC_STRUCT_TRAITS_MEMBER(total_scroll_update_latency)
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100317IPC_STRUCT_TRAITS_END()
318
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000319IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
320 // Routing ID of the view initiating the open.
321 IPC_STRUCT_MEMBER(int, opener_id)
322
323 // True if this open request came in the context of a user gesture.
324 IPC_STRUCT_MEMBER(bool, user_gesture)
325
326 // Type of window requested.
327 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
328
329 // The session storage namespace ID this view should use.
330 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
331
332 // The name of the resulting frame that should be created (empty if none
333 // has been specified).
334 IPC_STRUCT_MEMBER(string16, frame_name)
335
336 // The frame identifier of the frame initiating the open.
337 IPC_STRUCT_MEMBER(int64, opener_frame_id)
338
339 // The URL of the frame initiating the open.
340 IPC_STRUCT_MEMBER(GURL, opener_url)
341
342 // The security origin of the frame initiating the open.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000343 IPC_STRUCT_MEMBER(GURL, opener_security_origin)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000344
345 // Whether the opener will be suppressed in the new window, in which case
346 // scripting the new window is not allowed.
347 IPC_STRUCT_MEMBER(bool, opener_suppressed)
348
349 // Whether the window should be opened in the foreground, background, etc.
350 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
351
352 // The URL that will be loaded in the new window (empty if none has been
353 // sepcified).
354 IPC_STRUCT_MEMBER(GURL, target_url)
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100355
356 // The referrer that will be used to load |target_url| (empty if none has
357 // been specified).
358 IPC_STRUCT_MEMBER(content::Referrer, referrer)
359
360 // The window features to use for the new view.
361 IPC_STRUCT_MEMBER(WebKit::WebWindowFeatures, features)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000362IPC_STRUCT_END()
363
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000364IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
365 // URL for the worker script.
366 IPC_STRUCT_MEMBER(GURL, url)
367
368 // Name for a SharedWorker, otherwise empty string.
369 IPC_STRUCT_MEMBER(string16, name)
370
371 // The ID of the parent document (unique within parent renderer).
372 IPC_STRUCT_MEMBER(unsigned long long, document_id)
373
374 // RenderView routing id used to send messages back to the parent.
375 IPC_STRUCT_MEMBER(int, render_view_route_id)
376
377 // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed,
378 // a new unique ID is created and assigned to the worker.
379 IPC_STRUCT_MEMBER(int, route_id)
380
381 // The ID of the appcache the main shared worker script resource was loaded
382 // from, only valid for shared workers.
383 IPC_STRUCT_MEMBER(int64, script_resource_appcache_id)
384IPC_STRUCT_END()
385
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000386IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params)
387 IPC_STRUCT_MEMBER(int, dialog_type)
388 IPC_STRUCT_MEMBER(int, year)
389 IPC_STRUCT_MEMBER(int, month)
390 IPC_STRUCT_MEMBER(int, day)
391 IPC_STRUCT_MEMBER(int, hour)
392 IPC_STRUCT_MEMBER(int, minute)
393 IPC_STRUCT_MEMBER(int, second)
Ben Murdocheb525c52013-07-10 11:40:50 +0100394 IPC_STRUCT_MEMBER(int, week)
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100395 IPC_STRUCT_MEMBER(double, minimum)
396 IPC_STRUCT_MEMBER(double, maximum)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000397IPC_STRUCT_END()
398
399IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params)
400 // The frame ID for the failure report.
401 IPC_STRUCT_MEMBER(int64, frame_id)
402 // True if this is the top-most frame.
403 IPC_STRUCT_MEMBER(bool, is_main_frame)
404 // Error code as reported in the DidFailProvisionalLoad callback.
405 IPC_STRUCT_MEMBER(int, error_code)
406 // An error message generated from the error_code. This can be an empty
407 // string if we were unable to find a meaningful description.
408 IPC_STRUCT_MEMBER(string16, error_description)
409 // The URL that the error is reported for.
410 IPC_STRUCT_MEMBER(GURL, url)
411 // True if the failure is the result of navigating to a POST again
412 // and we're going to show the POST interstitial.
413 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial)
414IPC_STRUCT_END()
415
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000416// Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
417// parameters to be reasonably put in a predefined IPC message.
418IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params,
419 content::FrameNavigateParams)
420 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams)
421 // The frame ID for this navigation. The frame ID uniquely identifies the
422 // frame the navigation happened in for a given renderer.
423 IPC_STRUCT_MEMBER(int64, frame_id)
424
425 // Information regarding the security of the connection (empty if the
426 // connection was not secure).
427 IPC_STRUCT_MEMBER(std::string, security_info)
428
429 // The gesture that initiated this navigation.
430 IPC_STRUCT_MEMBER(content::NavigationGesture, gesture)
431
432 // True if this was a post request.
433 IPC_STRUCT_MEMBER(bool, is_post)
434
435 // The POST body identifier. -1 if it doesn't exist.
436 IPC_STRUCT_MEMBER(int64, post_id)
437
438 // Whether the frame navigation resulted in no change to the documents within
439 // the page. For example, the navigation may have just resulted in scrolling
440 // to a named anchor.
441 IPC_STRUCT_MEMBER(bool, was_within_same_page)
442
443 // The status code of the HTTP request.
444 IPC_STRUCT_MEMBER(int, http_status_code)
445
446 // True if the connection was proxied. In this case, socket_address
447 // will represent the address of the proxy, rather than the remote host.
448 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy)
449
450 // Serialized history item state to store in the navigation entry.
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100451 IPC_STRUCT_MEMBER(content::PageState, page_state)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000452
453 // Original request's URL.
454 IPC_STRUCT_MEMBER(GURL, original_request_url)
455
456 // User agent override used to navigate.
457 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100458
459 // Notifies the browser that for this navigation, the session history was
460 // successfully cleared.
461 IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000462IPC_STRUCT_END()
463
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000464IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params)
465 IPC_STRUCT_MEMBER(GURL, url)
466 IPC_STRUCT_MEMBER(content::Referrer, referrer)
467 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
468 IPC_STRUCT_MEMBER(int64, frame_id)
Ben Murdochca12bfa2013-07-23 11:17:05 +0100469 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100470 IPC_STRUCT_MEMBER(bool, user_gesture)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000471IPC_STRUCT_END()
472
473IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
474 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
475 IPC_STRUCT_MEMBER(WebKit::WebTextDirection, anchor_dir)
476 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
477 IPC_STRUCT_MEMBER(WebKit::WebTextDirection, focus_dir)
478 IPC_STRUCT_MEMBER(bool, is_anchor_first)
479IPC_STRUCT_END()
480
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000481// This message is used for supporting popup menus on Mac OS X using native
482// Cocoa controls. The renderer sends us this message which we use to populate
483// the popup menu.
484IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params)
485 // Position on the screen.
486 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
487
488 // The height of each item in the menu.
489 IPC_STRUCT_MEMBER(int, item_height)
490
491 // The size of the font to use for those items.
492 IPC_STRUCT_MEMBER(double, item_font_size)
493
494 // The currently selected (displayed) item in the menu.
495 IPC_STRUCT_MEMBER(int, selected_item)
496
497 // The entire list of items in the popup menu.
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100498 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000499
500 // Whether items should be right-aligned.
501 IPC_STRUCT_MEMBER(bool, right_aligned)
502
503 // Whether this is a multi-select popup.
504 IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
505IPC_STRUCT_END()
506
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000507IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
508 // The type of input field
509 IPC_STRUCT_MEMBER(ui::TextInputType, type)
510
511 // The value of the input field
512 IPC_STRUCT_MEMBER(std::string, value)
513
514 // The cursor position of the current selection start, or the caret position
515 // if nothing is selected
516 IPC_STRUCT_MEMBER(int, selection_start)
517
518 // The cursor position of the current selection end, or the caret position
519 // if nothing is selected
520 IPC_STRUCT_MEMBER(int, selection_end)
521
522 // The start position of the current composition, or -1 if there is none
523 IPC_STRUCT_MEMBER(int, composition_start)
524
525 // The end position of the current composition, or -1 if there is none
526 IPC_STRUCT_MEMBER(int, composition_end)
527
528 // Whether or not inline composition can be performed for the current input.
529 IPC_STRUCT_MEMBER(bool, can_compose_inline)
530
531 // Whether or not the IME should be shown as a result of this update. Even if
532 // true, the IME will only be shown if the type is appropriate (e.g. not
533 // TEXT_INPUT_TYPE_NONE).
534 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
Ben Murdoch2385ea32013-08-06 11:01:04 +0100535
536 // Whether an acknowledgement is required for this update.
537 IPC_STRUCT_MEMBER(bool, require_ack)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000538IPC_STRUCT_END()
539
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000540IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
541 // The bitmap to be painted into the view at the locations specified by
542 // update_rects.
543 IPC_STRUCT_MEMBER(TransportDIB::Id, bitmap)
544
545 // The position and size of the bitmap.
546 IPC_STRUCT_MEMBER(gfx::Rect, bitmap_rect)
547
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000548 // The scroll delta. Only one of the delta components can be non-zero, and if
549 // they are both zero, then it means there is no scrolling and the scroll_rect
550 // is ignored.
551 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_delta)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000552
553 // The rectangular region to scroll.
554 IPC_STRUCT_MEMBER(gfx::Rect, scroll_rect)
555
556 // The scroll offset of the render view.
557 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset)
558
559 // The regions of the bitmap (in view coords) that contain updated pixels.
560 // In the case of scrolling, this includes the scroll damage rect.
561 IPC_STRUCT_MEMBER(std::vector<gfx::Rect>, copy_rects)
562
563 // The size of the RenderView when this message was generated. This is
564 // included so the host knows how large the view is from the perspective of
565 // the renderer process. This is necessary in case a resize operation is in
566 // progress. If auto-resize is enabled, this should update the corresponding
567 // view size.
568 IPC_STRUCT_MEMBER(gfx::Size, view_size)
569
570 // New window locations for plugin child windows.
Ben Murdochca12bfa2013-07-23 11:17:05 +0100571 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>,
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000572 plugin_window_moves)
573
574 // The following describes the various bits that may be set in flags:
575 //
576 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
577 // Indicates that this is a response to a ViewMsg_Resize message.
578 //
579 // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
580 // Indicates that this is a response to a ViewMsg_WasShown message.
581 //
582 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
583 // Indicates that this is a response to a ViewMsg_Repaint message.
584 //
585 // If flags is zero, then this message corresponds to an unsolicited paint
586 // request by the render view. Any of the above bits may be set in flags,
587 // which would indicate that this paint message is an ACK for multiple
588 // request messages.
589 IPC_STRUCT_MEMBER(int, flags)
590
591 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
592 // update. True for 2D painting, but false for accelerated compositing.
593 IPC_STRUCT_MEMBER(bool, needs_ack)
594
595 // All the above coordinates are in DIP. This is the scale factor needed
596 // to convert them to pixels.
597 IPC_STRUCT_MEMBER(float, scale_factor)
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100598
599 // The latency information for the frame. Only valid when accelerated
600 // compositing is disabled.
601 IPC_STRUCT_MEMBER(ui::LatencyInfo, latency_info)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000602IPC_STRUCT_END()
603
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000604IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params)
605 // The page_id for this navigation, or -1 if it is a new navigation. Back,
606 // Forward, and Reload navigations should have a valid page_id. If the load
607 // succeeds, then this page_id will be reflected in the resultant
608 // ViewHostMsg_FrameNavigate message.
609 IPC_STRUCT_MEMBER(int32, page_id)
610
611 // If page_id is -1, then pending_history_list_offset will also be -1.
612 // Otherwise, it contains the offset into the history list corresponding to
613 // the current navigation.
614 IPC_STRUCT_MEMBER(int, pending_history_list_offset)
615
616 // Informs the RenderView of where its current page contents reside in
617 // session history and the total size of the session history list.
618 IPC_STRUCT_MEMBER(int, current_history_list_offset)
619 IPC_STRUCT_MEMBER(int, current_history_list_length)
620
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100621 // Informs the RenderView the session history should be cleared. In that
622 // case, the RenderView needs to notify the browser that the clearing was
623 // succesful when the navigation commits.
624 IPC_STRUCT_MEMBER(bool, should_clear_history_list)
625
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000626 // The URL to load.
627 IPC_STRUCT_MEMBER(GURL, url)
628
629 // Base URL for use in WebKit's SubstituteData.
630 // Is only used with data: URLs.
631 IPC_STRUCT_MEMBER(GURL, base_url_for_data_url)
632
633 // History URL for use in WebKit's SubstituteData.
634 // Is only used with data: URLs.
635 IPC_STRUCT_MEMBER(GURL, history_url_for_data_url)
636
637 // The URL to send in the "Referer" header field. Can be empty if there is
638 // no referrer.
639 IPC_STRUCT_MEMBER(content::Referrer, referrer)
640
641 // The type of transition.
642 IPC_STRUCT_MEMBER(content::PageTransition, transition)
643
644 // Opaque history state (received by ViewHostMsg_UpdateState).
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100645 IPC_STRUCT_MEMBER(content::PageState, page_state)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000646
647 // Type of navigation.
648 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value, navigation_type)
649
650 // The time the request was created
651 IPC_STRUCT_MEMBER(base::Time, request_time)
652
653 // Extra headers (separated by \n) to send during the request.
654 IPC_STRUCT_MEMBER(std::string, extra_headers)
655
656 // The following two members identify a previous request that has been
657 // created before this navigation is being transferred to a new render view.
658 // This serves the purpose of recycling the old request.
659 // Unless this refers to a transferred navigation, these values are -1 and -1.
660 IPC_STRUCT_MEMBER(int, transferred_request_child_id)
661 IPC_STRUCT_MEMBER(int, transferred_request_request_id)
662
663 // Whether or not we should allow the url to download.
664 IPC_STRUCT_MEMBER(bool, allow_download)
665
666 // Whether or not the user agent override string should be used.
667 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
668
669 // True if this was a post request.
670 IPC_STRUCT_MEMBER(bool, is_post)
671
672 // If is_post is true, holds the post_data information from browser. Empty
673 // otherwise.
674 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data)
675
676 // Whether or not this url should be allowed to access local file://
677 // resources.
678 IPC_STRUCT_MEMBER(bool, can_load_local_resources)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000679
680 // If not empty, which frame to navigate.
681 IPC_STRUCT_MEMBER(std::string, frame_to_navigate)
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100682
683 // The navigationStart time to expose to JS for this navigation.
684 IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000685IPC_STRUCT_END()
686
687IPC_STRUCT_BEGIN(ViewMsg_New_Params)
688 // Renderer-wide preferences.
689 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
690
691 // Preferences for this view.
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100692 IPC_STRUCT_MEMBER(WebPreferences, web_preferences)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000693
694 // The ID of the view to be created.
695 IPC_STRUCT_MEMBER(int32, view_id)
696
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100697 // The ID of the main frame hosted in the view.
698 IPC_STRUCT_MEMBER(int32, main_frame_routing_id)
699
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000700 // The ID of the rendering surface.
701 IPC_STRUCT_MEMBER(int32, surface_id)
702
703 // The session storage namespace ID this view should use.
704 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
705
706 // The name of the frame associated with this view (or empty if none).
707 IPC_STRUCT_MEMBER(string16, frame_name)
708
709 // The route ID of the opener RenderView if we need to set one
710 // (MSG_ROUTING_NONE otherwise).
711 IPC_STRUCT_MEMBER(int, opener_route_id)
712
713 // Whether the RenderView should initially be swapped out.
714 IPC_STRUCT_MEMBER(bool, swapped_out)
715
716 // The initial page ID to use for this view, which must be larger than any
717 // existing navigation that might be loaded in the view. Page IDs are unique
718 // to a view and are only updated by the renderer after this initial value.
719 IPC_STRUCT_MEMBER(int32, next_page_id)
720
721 // The properties of the screen associated with the view.
722 IPC_STRUCT_MEMBER(WebKit::WebScreenInfo, screen_info)
723
724 // The accessibility mode of the renderer.
725 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000726
727 // Specifies whether partially swapping composited buffers is
728 // allowed for a renderer. Partial swaps will be used if they are both
729 // allowed and supported.
730 IPC_STRUCT_MEMBER(bool, allow_partial_swap)
731IPC_STRUCT_END()
732
733IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
734 // The serialized script value.
735 IPC_STRUCT_MEMBER(string16, data)
736
737 // When sent to the browser, this is the routing ID of the source frame in
738 // the source process. The browser replaces it with the routing ID of the
739 // equivalent (swapped out) frame in the destination process.
740 IPC_STRUCT_MEMBER(int, source_routing_id)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000741
742 // The origin of the source frame.
743 IPC_STRUCT_MEMBER(string16, source_origin)
744
745 // The origin for the message's target.
746 IPC_STRUCT_MEMBER(string16, target_origin)
747IPC_STRUCT_END()
748
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000749// Messages sent from the browser to the renderer.
750
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000751// Tells the renderer to cancel an opened date/time dialog.
752IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
753
754// Get all savable resource links from current webpage, include main
755// frame and sub-frame.
756IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
757 GURL /* url of page which is needed to save */)
758
759// Get html data by serializing all frames of current page with lists
760// which contain all resource links that have local copy.
761IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
762 std::vector<GURL> /* urls that have local copy */,
763 std::vector<base::FilePath> /* paths of local copy */,
764 base::FilePath /* local directory path */)
765
766// Tells the render side that a ViewHostMsg_LockMouse message has been
767// processed. |succeeded| indicates whether the mouse has been successfully
768// locked or not.
769IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK,
770 bool /* succeeded */)
771// Tells the render side that the mouse has been unlocked.
772IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost)
773
774// Screen was rotated. Dispatched to the onorientationchange javascript API.
775IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent,
776 int /* orientation */)
777
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100778// Sent by the browser when the parameters for vsync alignment have changed.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000779IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters,
780 base::TimeTicks /* timebase */,
781 base::TimeDelta /* interval */)
782
783// Set the top-level frame to the provided name.
784IPC_MESSAGE_ROUTED1(ViewMsg_SetName,
785 std::string /* frame_name */)
786
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000787// Sent to the RenderView when a new tab is swapped into an existing
788// tab and the histories need to be merged. The existing tab has a history of
789// |merged_history_length| which precedes the history of the new tab. All
790// page_ids >= |minimum_page_id| in the new tab are appended to the history.
791//
792// For example, suppose the history of page_ids in the new tab's RenderView
793// is [4 7 8]. This is merged into an existing tab with 3 history items, and
794// all pages in the new tab with page_id >= 7 are to be preserved.
795// The resulting page history is [-1 -1 -1 7 8].
796IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune,
797 int, /* merge_history_length */
798 int32 /* minimum_page_id */)
799
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000800// Tells the renderer to create a new view.
801// This message is slightly different, the view it takes (via
802// ViewMsg_New_Params) is the view to create, the message itself is sent as a
803// non-view control message.
804IPC_MESSAGE_CONTROL1(ViewMsg_New,
805 ViewMsg_New_Params)
806
807// Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
808// similar to the new command, but used when the renderer created a view
809// first, and we need to update it.
810IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK)
811
812// Sends updated preferences to the renderer.
813IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
814 content::RendererPreferences)
815
816// This passes a set of webkit preferences down to the renderer.
817IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100818 WebPreferences)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000819
820// Informs the renderer that the timezone has changed.
821IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange)
822
823// Tells the render view to close.
824IPC_MESSAGE_ROUTED0(ViewMsg_Close)
825
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100826IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
827 IPC_STRUCT_MEMBER(WebKit::WebScreenInfo, screen_info)
828 IPC_STRUCT_MEMBER(gfx::Size, new_size)
829 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
830 IPC_STRUCT_MEMBER(float, overdraw_bottom_height)
831 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
832 IPC_STRUCT_MEMBER(bool, is_fullscreen)
833IPC_STRUCT_END()
834
835// Tells the render view to change its size. A ViewHostMsg_UpdateRect message
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000836// is generated in response provided new_size is not empty and not equal to
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100837// the view's current size. The generated ViewHostMsg_UpdateRect message will
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000838// have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
839// we don't have to fetch it every time WebKit asks for it.
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100840IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
841 ViewMsg_Resize_Params /* params */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000842
843// Tells the render view that the resize rect has changed.
844IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect,
845 gfx::Rect /* resizer_rect */)
846
847// Sent to inform the view that it was hidden. This allows it to reduce its
848// resource utilization.
849IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden)
850
851// Tells the render view that it is no longer hidden (see WasHidden), and the
852// render view is expected to respond with a full repaint if needs_repainting
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100853// is true. In that case, the generated ViewHostMsg_UpdateRect message will
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000854// have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this
855// message does not trigger a message in response.
856IPC_MESSAGE_ROUTED1(ViewMsg_WasShown,
857 bool /* needs_repainting */)
858
859// Sent to inform the view that it was swapped out. This allows the process to
860// exit if no other views are using it.
861IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut)
862
863// Sent to render the view into the supplied transport DIB, resize
864// the web widget to match the |page_size|, scale it by the
865// appropriate scale to make it fit the |desired_size|, and return
866// it. In response to this message, the host generates a
867// ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be
868// the right size to receive an RGBA image at the |desired_size|.
869// |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to
870// identify the PaintAtSize message the ACK belongs to.
871IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize,
872 TransportDIB::Handle /* dib_handle */,
873 int /* tag */,
874 gfx::Size /* page_size */,
875 gfx::Size /* desired_size */)
876
877// Tells the render view that a ViewHostMsg_UpdateRect message was processed.
878// This signals the render view that it can send another UpdateRect message.
879IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK)
880
881// Tells the render view that a SwapBuffers was completed. Typically,
882// SwapBuffers requests go from renderer -> GPU process -> browser. Most
883// platforms still use the GfxCxt3D Echo for receiving the SwapBuffers Ack.
884// Using Echo routes the ack from browser -> GPU process -> renderer, while this
885// Ack goes directly from browser -> renderer. This is not used for the threaded
886// compositor path.
887IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK)
888
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000889// Tells the render widget that a smooth scroll completed.
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100890IPC_MESSAGE_ROUTED0(ViewMsg_SmoothScrollCompleted)
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000891
892// Tells the renderer to focus the first (last if reverse is true) focusable
893// node.
894IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
895 bool /* reverse */)
896
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000897// Executes custom context menu action that was provided from WebKit.
898IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction,
899 content::CustomContextMenuContext /* custom_context */,
900 unsigned /* action */)
901
902// Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that
903// the menu has been closed.
904IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed,
905 content::CustomContextMenuContext /* custom_context */)
906
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100907// Sent to inform the renderer to invoke a context menu.
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100908// The parameter specifies the location in the render view's coordinates.
909IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu,
910 gfx::Point /* location where menu should be shown */)
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100911
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000912// Tells the renderer to perform the specified navigation, interrupting any
913// existing navigation.
914IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params)
915
916IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
917
918// Tells the renderer to reload the current focused frame
919IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame)
920
921// Sent when the user wants to search for a word on the page (find in page).
922IPC_MESSAGE_ROUTED3(ViewMsg_Find,
923 int /* request_id */,
924 string16 /* search_text */,
925 WebKit::WebFindOptions)
926
927// This message notifies the renderer that the user has closed the FindInPage
928// window (and what action to take regarding the selection).
929IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
930 content::StopFindAction /* action */)
931
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100932// Informs the renderer about various statistics the browser has (e.g.
933// latency) regarding the frames that have been displayed.
934IPC_MESSAGE_ROUTED1(ViewMsg_SetBrowserRenderingStats,
935 content::BrowserRenderingStats /* stats */)
936
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000937// Replaces a date time input field.
938IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
939 ViewHostMsg_DateTimeDialogValue_Params /* value */)
940
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000941// Copies the image at location x, y to the clipboard (if there indeed is an
942// image at that location).
943IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
944 int /* x */,
945 int /* y */)
946
947// Tells the renderer to perform the given action on the media player
948// located at the given point.
949IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
950 gfx::Point, /* location */
951 WebKit::WebMediaPlayerAction)
952
953// Tells the renderer to perform the given action on the plugin located at
954// the given point.
955IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
956 gfx::Point, /* location */
957 WebKit::WebPluginAction)
958
959// Request for the renderer to evaluate an xpath to a frame and execute a
960// javascript: url in that frame's context. The message is completely
961// asynchronous and no corresponding response message is sent back.
962//
963// frame_xpath contains the modified xpath notation to identify an inner
964// subframe (starting from the root frame). It is a concatenation of
965// number of smaller xpaths delimited by '\n'. Each chunk in the string can
966// be evaluated to a frame in its parent-frame's context.
967//
968// Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0]
969// can be broken into 3 xpaths
970// /html/body/iframe evaluates to an iframe within the root frame
971// /html/body/div/iframe evaluates to an iframe within the level-1 iframe
972// /frameset/frame[0] evaluates to first frame within the level-2 iframe
973//
974// jscript_url is the string containing the javascript: url to be executed
975// in the target frame's context. The string should start with "javascript:"
976// and continue with a valid JS text.
977//
978// If the fourth parameter is true the result is sent back to the renderer
979// using the message ViewHostMsg_ScriptEvalResponse.
980// ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
981// client can uniquely identify the request.
982IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
983 string16, /* frame_xpath */
984 string16, /* jscript_url */
985 int, /* ID */
986 bool /* If true, result is sent back. */)
987
988// Posts a message from a frame in another process to the current renderer.
989IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
990 ViewMsg_PostMessage_Params)
991
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000992// Requests that the RenderView's main frame sets its opener to null.
993IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener)
994
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000995// Request for the renderer to evaluate an xpath to a frame and insert css
996// into that frame's document. See ViewMsg_ScriptEvalRequest for details on
997// allowed xpath expressions.
998IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest,
999 string16, /* frame_xpath */
1000 std::string /* css string */)
1001
1002// Change the zoom level for the current main frame. If the level actually
1003// changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1004// telling it what url got zoomed and what its current zoom level is.
1005IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
1006 content::PageZoom /* function */)
1007
1008// Set the zoom level for the current main frame. If the level actually
1009// changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
1010// telling it what url got zoomed and what its current zoom level is.
1011IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel,
1012 double /* zoom_level */)
1013
1014// Zooms the page by the factor defined in the renderer.
1015IPC_MESSAGE_ROUTED3(ViewMsg_ZoomFactor,
1016 content::PageZoom,
1017 int /* zoom center_x */,
1018 int /* zoom center_y */)
1019
1020// Set the zoom level for a particular url that the renderer is in the
1021// process of loading. This will be stored, to be used if the load commits
1022// and ignored otherwise.
1023IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL,
1024 GURL /* url */,
1025 double /* zoom_level */)
1026
1027// Set the zoom level for a particular url, so all render views
1028// displaying this url can update their zoom levels to match.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001029// If scheme is empty, then only host is used for matching.
1030IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL,
1031 std::string /* scheme */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001032 std::string /* host */,
1033 double /* zoom_level */)
1034
1035// Change encoding of page in the renderer.
1036IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
1037 std::string /*new encoding name*/)
1038
1039// Reset encoding of page in the renderer back to default.
1040IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault)
1041
1042// Used to tell a render view whether it should expose various bindings
1043// that allow JS content extended privileges. See BindingsPolicy for valid
1044// flag values.
1045IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings,
1046 int /* enabled_bindings_flags */)
1047
1048// Tell the renderer to add a property to the WebUI binding object. This
1049// only works if we allowed WebUI bindings.
1050IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty,
1051 std::string /* property_name */,
1052 std::string /* property_value_json */)
1053
1054// This message starts/stop monitoring the input method status of the focused
1055// edit control of a renderer process.
1056// Parameters
1057// * is_active (bool)
1058// Indicates if an input method is active in the browser process.
1059// The possible actions when a renderer process receives this message are
1060// listed below:
1061// Value Action
1062// true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState
1063// to notify the input method status of the focused edit control.
1064// false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState.
1065IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive,
1066 bool /* is_active */)
1067
1068// This message sends a string being composed with an input method.
1069IPC_MESSAGE_ROUTED4(
1070 ViewMsg_ImeSetComposition,
1071 string16, /* text */
1072 std::vector<WebKit::WebCompositionUnderline>, /* underlines */
1073 int, /* selectiont_start */
1074 int /* selection_end */)
1075
1076// This message confirms an ongoing composition.
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001077IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001078 string16 /* text */,
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001079 ui::Range /* replacement_range */,
1080 bool /* keep_selection */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001081
1082// Sets the text composition to be between the given start and end offsets
1083// in the currently focused editable field.
1084IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText,
1085 int /* start */,
1086 int /* end */,
1087 std::vector<WebKit::WebCompositionUnderline> /* underlines */)
1088
1089// Selects between the given start and end offsets in the currently focused
1090// editable field.
1091IPC_MESSAGE_ROUTED2(ViewMsg_SetEditableSelectionOffsets,
1092 int /* start */,
1093 int /* end */)
1094
1095// Deletes the current selection plus the specified number of characters before
1096// and after the selection or caret.
1097IPC_MESSAGE_ROUTED2(ViewMsg_ExtendSelectionAndDelete,
1098 int /* before */,
1099 int /* after */)
1100
1101// Used to notify the render-view that we have received a target URL. Used
1102// to prevent target URLs spamming the browser.
1103IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK)
1104
1105
1106// Sets the alternate error page URL (link doctor) for the renderer process.
1107IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL,
1108 GURL)
1109
1110// Notifies the color chooser client that the user selected a color.
1111IPC_MESSAGE_ROUTED2(ViewMsg_DidChooseColorResponse, unsigned, SkColor)
1112
1113// Notifies the color chooser client that the color chooser has ended.
1114IPC_MESSAGE_ROUTED1(ViewMsg_DidEndColorChooser, unsigned)
1115
1116IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse,
1117 std::vector<ui::SelectedFileInfo>)
1118
1119// Provides the results of directory enumeration.
1120IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse,
1121 int /* request_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001122 std::vector<base::FilePath> /* files_in_directory */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001123
1124// When a renderer sends a ViewHostMsg_Focus to the browser process,
1125// the browser has the option of sending a ViewMsg_CantFocus back to
1126// the renderer.
1127IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus)
1128
1129// Instructs the renderer to invoke the frame's shouldClose method, which
1130// runs the onbeforeunload event handler. Expects the result to be returned
1131// via ViewHostMsg_ShouldClose.
1132IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose)
1133
1134// Instructs the renderer to swap out for a cross-site transition, including
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01001135// running the unload event handler. Expects a SwapOut_ACK message when
1136// finished.
1137IPC_MESSAGE_ROUTED0(ViewMsg_SwapOut)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001138
1139// Instructs the renderer to close the current page, including running the
1140// onunload event handler.
1141//
1142// Expects a ClosePage_ACK message when finished.
1143IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage)
1144
1145// Notifies the renderer about ui theme changes
1146IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged)
1147
1148// Notifies the renderer that a paint is to be generated for the rectangle
1149// passed in.
1150IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
1151 gfx::Size /* The view size to be repainted */)
1152
1153// Notification that a move or resize renderer's containing window has
1154// started.
1155IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
1156
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001157IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects,
1158 gfx::Rect /* view_screen_rect */,
1159 gfx::Rect /* window_screen_rect */)
1160
1161// Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and
1162// ViewHostMsg_ShowWidget to inform the renderer that the browser has
1163// processed the move. The browser may have ignored the move, but it finished
1164// processing. This is used because the renderer keeps a temporary cache of
1165// the widget position while these asynchronous operations are in progress.
1166IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK)
1167
1168// Used to instruct the RenderView to send back updates to the preferred size.
1169IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
1170
1171// Used to instruct the RenderView to automatically resize and send back
1172// updates for the new size.
1173IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize,
1174 gfx::Size /* min_size */,
1175 gfx::Size /* max_size */)
1176
1177// Used to instruct the RenderView to disalbe automatically resize.
1178IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize,
1179 gfx::Size /* new_size */)
1180
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001181// Changes the text direction of the currently selected input field (if any).
1182IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
1183 WebKit::WebTextDirection /* direction */)
1184
1185// Tells the renderer to clear the focused node (if any).
1186IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode)
1187
1188// Make the RenderView transparent and render it onto a custom background. The
1189// background will be tiled in both directions if it is not large enough.
1190IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground,
1191 SkBitmap /* background */)
1192
1193// Used to tell the renderer not to add scrollbars with height and
1194// width below a threshold.
1195IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
1196 gfx::Size /* disable_scrollbar_size_limit */)
1197
1198// Activate/deactivate the RenderView (i.e., set its controls' tint
1199// accordingly, etc.).
1200IPC_MESSAGE_ROUTED1(ViewMsg_SetActive,
1201 bool /* active */)
1202
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001203// Response message to ViewHostMsg_CreateShared/DedicatedWorker.
1204// Sent when the worker has started.
1205IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
1206
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +01001207// The response to ViewHostMsg_AsyncOpenPepperFile.
1208IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenPepperFile_ACK,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001209 base::PlatformFileError /* error_code */,
1210 IPC::PlatformFileForTransit /* file descriptor */,
1211 int /* message_id */)
1212
1213// Tells the renderer that the network state has changed and that
1214// window.navigator.onLine should be updated for all WebViews.
1215IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged,
1216 bool /* online */)
1217
1218// Reply to ViewHostMsg_OpenChannelToPpapiBroker
1219// Tells the renderer that the channel to the broker has been created.
Ben Murdoch32409262013-08-07 11:04:47 +01001220IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001221 base::ProcessId /* broker_pid */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001222 IPC::ChannelHandle /* handle */)
1223
1224// Reply to ViewHostMsg_RequestPpapiBrokerPermission.
1225// Tells the renderer whether permission to access to PPAPI broker was granted
1226// or not.
Ben Murdoch32409262013-08-07 11:04:47 +01001227IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001228 bool /* result */)
1229
1230// Tells the renderer to empty its plugin list cache, optional reloading
1231// pages containing plugins.
1232IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
1233 bool /* reload_pages */)
1234
1235// Sent to the renderer when a popup window should no longer count against
1236// the current popup count (either because it's not a popup or because it was
1237// a generated by a user action).
1238IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
1239
1240// Used to instruct the RenderView to go into "view source" mode.
1241IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
1242
1243// Instructs the renderer to save the current page to MHTML.
1244IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
1245 int /* job_id */,
1246 IPC::PlatformFileForTransit /* file handle */)
1247
1248// Temporary message to diagnose an unexpected condition in WebContentsImpl.
1249IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
1250 GURL /* data */)
1251
1252// Change the accessibility mode in the renderer process.
1253IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode,
1254 AccessibilityMode)
1255
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001256// An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
1257// process to release the magnified image.
1258IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupDIB,
1259 TransportDIB::Handle /* DIB handle */)
1260
1261// Notifies the renderer that a snapshot has been retrieved.
1262IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted,
1263 int /* snapshot_id */,
1264 gfx::Size /* size */,
1265 std::vector<unsigned char> /* png */)
1266
1267// Tells the renderer to suspend/resume the webkit timers.
1268IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
1269 bool /* suspend */)
1270
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001271#if defined(OS_ANDROID)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001272// Sent when the browser wants the bounding boxes of the current find matches.
1273//
1274// If match rects are already cached on the browser side, |current_version|
1275// should be the version number from the ViewHostMsg_FindMatchRects_Reply
1276// they came in, so the renderer can tell if it needs to send updated rects.
1277// Otherwise just pass -1 to always receive the list of rects.
1278//
1279// There must be an active search string (it is probably most useful to call
1280// this immediately after a ViewHostMsg_Find_Reply message arrives with
1281// final_update set to true).
1282IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
1283 int /* current_version */)
1284
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001285// External popup menus.
1286IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems,
1287 bool /* user canceled the popup */,
1288 std::vector<int> /* selected indices */)
1289
1290// Tells the renderer to try to revert to the zoom level we were at before
1291// ViewMsg_ScrollFocusedEditableNodeIntoView was called.
1292IPC_MESSAGE_ROUTED0(ViewMsg_UndoScrollFocusedEditableNodeIntoView)
1293
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001294// This message relays the beginning or end of a batch event in the IME.
1295IPC_MESSAGE_ROUTED1(ViewMsg_ImeBatchStateChanged,
1296 bool /* is_begin */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001297
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001298// Notifies the renderer whether hiding/showing the top controls is enabled
1299// and whether or not to animate to the proper state.
1300IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
1301 bool /* enable_hiding */,
1302 bool /* enable_showing */,
1303 bool /* animate */)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001304
1305IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001306
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01001307// Sent by the browser when the renderer should generate a new frame.
1308IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame,
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01001309 cc::BeginFrameArgs /* args */)
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001310
Ben Murdoch2385ea32013-08-06 11:01:04 +01001311// Sent by the browser when an IME update that requires acknowledgement has been
1312// processed on the browser side.
1313IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck)
1314
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001315#elif defined(OS_MACOSX)
1316// Let the RenderView know its window has changed visibility.
1317IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility,
1318 bool /* visibile */)
1319
1320// Let the RenderView know its window's frame has changed.
1321IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged,
1322 gfx::Rect /* window frame */,
1323 gfx::Rect /* content view frame */)
1324
1325// Message sent from the browser to the renderer when the user starts or stops
1326// resizing the view.
1327IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
1328 bool /* enable */)
1329
1330// Tell the renderer that plugin IME has completed.
1331IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
1332 string16 /* text */,
1333 int /* plugin_id */)
1334
1335// External popup menus.
1336IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
1337 int /* selected index, -1 means no selection */)
1338#endif
1339
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001340// Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
Ben Murdochca12bfa2013-07-23 11:17:05 +01001341IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
1342 uint32 /* output_surface_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001343 cc::CompositorFrameAck /* ack */)
1344
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001345// Sent by the browser to ask the renderer for a snapshot of the current view.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001346IPC_MESSAGE_ROUTED1(ViewMsg_Snapshot,
1347 gfx::Rect /* src_subrect */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001348
1349// -----------------------------------------------------------------------------
1350// Messages sent from the renderer to the browser.
1351
1352// Sent by the renderer when it is creating a new window. The browser creates
1353// a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
1354// MSG_ROUTING_NONE, the view couldn't be created.
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01001355IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001356 ViewHostMsg_CreateWindow_Params,
1357 int /* route_id */,
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01001358 int /* main_frame_route_id */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001359 int32 /* surface_id */,
1360 int64 /* cloned_session_storage_namespace_id */)
1361
1362// Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
1363// <select> dropdowns. This message is sent to the WebContentsImpl that
1364// contains the widget being created.
1365IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget,
1366 int /* opener_id */,
1367 WebKit::WebPopupType /* popup type */,
1368 int /* route_id */,
1369 int32 /* surface_id */)
1370
1371// Similar to ViewHostMsg_CreateWidget except the widget is a full screen
1372// window.
1373IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget,
1374 int /* opener_id */,
1375 int /* route_id */,
1376 int32 /* surface_id */)
1377
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001378// Asks the browser for a unique routing ID.
1379IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID,
1380 int /* routing_id */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001381
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001382// Asks the browser for the default audio hardware configuration.
1383IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig,
1384 media::AudioParameters /* input parameters */,
1385 media::AudioParameters /* output parameters */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001386
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001387// Asks the browser for CPU usage of the renderer process in percents.
1388IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage,
1389 int /* CPU usage in percents */)
1390
1391// Asks the browser for the user's monitor profile.
1392IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile,
1393 std::vector<char> /* profile */)
1394
1395// Asks the browser for the renderer process memory size stats.
1396IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes,
1397 size_t /* private_bytes */,
1398 size_t /* shared_bytes */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001399
1400// These three messages are sent to the parent RenderViewHost to display the
1401// page/widget that was created by
1402// CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
1403// refers to the id that was returned from the Create message above.
1404// The initial_position parameter is a rectangle in screen coordinates.
1405//
1406// FUTURE: there will probably be flags here to control if the result is
1407// in a new window.
1408IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
1409 int /* route_id */,
1410 WindowOpenDisposition /* disposition */,
1411 gfx::Rect /* initial_pos */,
1412 bool /* opened_by_user_gesture */)
1413
1414IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
1415 int /* route_id */,
1416 gfx::Rect /* initial_pos */)
1417
1418// Message to show a full screen widget.
1419IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
1420 int /* route_id */)
1421
1422// This message is sent after ViewHostMsg_ShowView to cause the RenderView
1423// to run in a modal fashion until it is closed.
1424IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal,
1425 int /* opener_id */)
1426
1427// Indicates the renderer is ready in response to a ViewMsg_New or
1428// a ViewMsg_CreatingNew_ACK.
1429IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
1430
1431// Indicates the renderer process is gone. This actually is sent by the
1432// browser process to itself, but keeps the interface cleaner.
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001433IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001434 int, /* this really is base::TerminationStatus */
1435 int /* exit_code */)
1436
1437// Sent by the renderer process to request that the browser close the view.
1438// This corresponds to the window.close() API, and the browser may ignore
1439// this message. Otherwise, the browser will generates a ViewMsg_Close
1440// message to close the view.
1441IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
1442
1443// Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1444// throttle these messages.
1445IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1446
1447// Sent by the renderer process to request that the browser move the view.
1448// This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1449// the browser may ignore this message.
1450IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1451 gfx::Rect /* position */)
1452
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01001453// Sent by the renderer process to notify the browser that the web page has
1454// programmatically scrolled.
1455IPC_MESSAGE_ROUTED1(ViewHostMsg_DidProgrammaticallyScroll,
1456 gfx::Vector2d /* scroll_point */)
1457
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001458// Notifies the browser that a frame in the view has changed. This message
1459// has a lot of parameters and is packed/unpacked by functions defined in
1460// render_messages.h.
1461IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
1462 ViewHostMsg_FrameNavigate_Params)
1463
1464// Used to tell the parent that the user right clicked on an area of the
1465// content area, and a context menu should be shown for it. The params
1466// object contains information about the node(s) that were selected when the
1467// user right clicked.
1468IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu, content::ContextMenuParams)
1469
1470// Message to show a popup menu using native cocoa controls (Mac only).
1471IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1472 ViewHostMsg_ShowPopup_Params)
1473
1474// Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
1475// to ViewMsg_ScriptEvalRequest. The result has the value returned by the
1476// script as its only element, one of Null, Boolean, Integer, Real, Date, or
1477// String.
1478IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse,
1479 int /* id */,
1480 base::ListValue /* result */)
1481
1482// Result of string search in the page.
1483// Response to ViewMsg_Find with the results of the requested find-in-page
1484// search, the number of matches found and the selection rect (in screen
1485// coordinates) for the string found. If |final_update| is false, it signals
1486// that this is not the last Find_Reply message - more will be sent as the
1487// scoping effort continues.
1488IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1489 int /* request_id */,
1490 int /* number of matches */,
1491 gfx::Rect /* selection_rect */,
1492 int /* active_match_ordinal */,
1493 bool /* final_update */)
1494
1495// Provides the result from running OnMsgShouldClose. |proceed| matches the
1496// return value of the the frame's shouldClose method (which includes the
1497// onbeforeunload handler): true if the user decided to proceed with leaving
1498// the page.
1499IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK,
1500 bool /* proceed */,
1501 base::TimeTicks /* before_unload_start_time */,
1502 base::TimeTicks /* before_unload_end_time */)
1503
1504// Indicates that the current renderer has swapped out, after a SwapOut
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01001505// message.
1506IPC_MESSAGE_ROUTED0(ViewHostMsg_SwapOut_ACK)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001507
1508// Indicates that the current page has been closed, after a ClosePage
1509// message.
1510IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK)
1511
1512// Notifies the browser that media has started/stopped playing.
1513IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification,
1514 int64 /* player_cookie, distinguishes instances */,
1515 bool /* has_video */,
1516 bool /* has_audio */,
1517 bool /* is_playing */)
1518
1519// Notifies the browser that we have session history information.
1520// page_id: unique ID that allows us to distinguish between history entries.
1521IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
1522 int32 /* page_id */,
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01001523 content::PageState /* state */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001524
1525// Notifies the browser that a document has been loaded in a frame.
1526IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
1527 int64 /* frame_id */)
1528
1529// Notifies the browser that a frame finished loading.
1530IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad,
1531 int64 /* frame_id */,
1532 GURL /* validated_url */,
1533 bool /* is_main_frame */)
1534
1535// Changes the title for the page in the UI when the page is navigated or the
1536// title changes.
1537IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle,
1538 int32 /* page_id */,
1539 string16 /* title */,
1540 WebKit::WebTextDirection /* title direction */)
1541
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001542// Change the encoding name of the page in UI when the page has detected
1543// proper encoding name.
1544IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
1545 std::string /* new encoding name */)
1546
1547// Notifies the browser that we want to show a destination url for a potential
1548// action (e.g. when the user is hovering over a link).
1549IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
1550 int32,
1551 GURL)
1552
1553// Sent when the renderer starts loading the page. This corresponds to
1554// WebKit's notion of the throbber starting. Note that sometimes you may get
1555// duplicates of these during a single load.
1556IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
1557
1558// Sent when the renderer is done loading a page. This corresponds to WebKit's
1559// notion of the throbber stopping.
1560IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
1561
1562// Sent when the renderer main frame has made progress loading.
1563IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
1564 double /* load_progress */)
1565
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001566// Sent when the renderer main frame sets its opener to null, disowning it for
1567// the lifetime of the window.
1568IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisownOpener)
1569
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001570// Sent when the document element is available for the top-level frame. This
1571// happens after the page starts loading, but before all resources are
1572// finished.
1573IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
1574
1575// Sent when after the onload handler has been invoked for the document
1576// in the top-level frame.
1577IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
1578 int32 /* page_id */)
1579
1580// Sent when the renderer loads a resource from its memory cache.
1581// The security info is non empty if the resource was originally loaded over
1582// a secure connection.
1583// Note: May only be sent once per URL per frame per committed load.
1584IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache,
1585 GURL /* url */,
1586 std::string /* security info */,
1587 std::string /* http method */,
1588 std::string /* mime type */,
1589 ResourceType::Type /* resource type */)
1590
1591// Sent when the renderer displays insecure content in a secure page.
1592IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
1593
1594// Sent when the renderer runs insecure content in a secure origin.
1595IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
1596 std::string /* security_origin */,
1597 GURL /* target URL */)
1598
1599// Sent when the renderer starts a provisional load for a frame.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001600IPC_MESSAGE_ROUTED4(ViewHostMsg_DidStartProvisionalLoadForFrame,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001601 int64 /* frame_id */,
1602 int64 /* parent_frame_id */,
1603 bool /* true if it is the main frame */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001604 GURL /* url */)
1605
1606IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError,
1607 int64 /* frame_id */,
1608 GURL /* validated_url */,
1609 bool /* is_main_frame */,
1610 int /* error_code */,
1611 string16 /* error_description */)
1612
1613// Sent when the renderer fails a provisional load with an error.
1614IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFailProvisionalLoadWithError,
1615 ViewHostMsg_DidFailProvisionalLoadWithError_Params)
1616
1617// Tells the render view that a ViewHostMsg_PaintAtSize message was
1618// processed, and the DIB is ready for use. |tag| has the same value that
1619// the tag sent along with ViewMsg_PaintAtSize.
1620IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
1621 int /* tag */,
1622 gfx::Size /* size */)
1623
1624// Sent to update part of the view. In response to this message, the host
1625// generates a ViewMsg_UpdateRect_ACK message.
1626IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
1627 ViewHostMsg_UpdateRect_Params)
1628
1629// Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
1630// which may get delayed until the browser's UI unblocks.
1631IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed)
1632
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001633// Sent by the renderer when accelerated compositing is enabled or disabled to
1634// notify the browser whether or not is should do painting.
1635IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
1636 bool /* true if the accelerated compositor is actve */)
1637
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001638IPC_STRUCT_BEGIN(ViewHostMsg_BeginSmoothScroll_Params)
1639 IPC_STRUCT_MEMBER(bool, scroll_down)
1640 IPC_STRUCT_MEMBER(int, pixels_to_scroll)
1641 IPC_STRUCT_MEMBER(int, mouse_event_x)
1642 IPC_STRUCT_MEMBER(int, mouse_event_y)
1643IPC_STRUCT_END()
1644
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001645IPC_MESSAGE_ROUTED1(ViewHostMsg_BeginSmoothScroll,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001646 ViewHostMsg_BeginSmoothScroll_Params /* params */)
1647
1648IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
1649IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
1650
1651// Message sent from renderer to the browser when focus changes inside the
1652// webpage. The parameter says whether the newly focused element needs
1653// keyboard input (true for textfields, text areas and content editable divs).
1654IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
1655 bool /* is_editable_node */)
1656
1657IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor,
1658 WebCursor)
1659
1660// Used to set a cookie. The cookie is set asynchronously, but will be
1661// available to a subsequent ViewHostMsg_GetCookies request.
1662IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
1663 GURL /* url */,
1664 GURL /* first_party_for_cookies */,
1665 std::string /* cookie */)
1666
1667// Used to get cookies for the given URL. This may block waiting for a
1668// previous SetCookie message to be processed.
1669IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies,
1670 GURL /* url */,
1671 GURL /* first_party_for_cookies */,
1672 std::string /* cookies */)
1673
1674// Used to get raw cookie information for the given URL. This may block
1675// waiting for a previous SetCookie message to be processed.
1676IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies,
1677 GURL /* url */,
1678 GURL /* first_party_for_cookies */,
Ben Murdocheb525c52013-07-10 11:40:50 +01001679 std::vector<content::CookieData>
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001680 /* raw_cookies */)
1681
1682// Used to delete cookie for the given URL and name
1683IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
1684 GURL /* url */,
1685 std::string /* cookie_name */)
1686
1687// Used to check if cookies are enabled for the given URL. This may block
1688// waiting for a previous SetCookie message to be processed.
1689IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled,
1690 GURL /* url */,
1691 GURL /* first_party_for_cookies */,
1692 bool /* cookies_enabled */)
1693
1694// Used to get the list of plugins
1695IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
1696 bool /* refresh*/,
Ben Murdochca12bfa2013-07-23 11:17:05 +01001697 std::vector<content::WebPluginInfo> /* plugins */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001698
1699// Return information about a plugin for the given URL and MIME
1700// type. If there is no matching plugin, |found| is false.
1701// |actual_mime_type| is the actual mime type supported by the
1702// found plugin.
1703IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo,
1704 int /* routing_id */,
1705 GURL /* url */,
1706 GURL /* page_url */,
1707 std::string /* mime_type */,
1708 bool /* found */,
Ben Murdochca12bfa2013-07-23 11:17:05 +01001709 content::WebPluginInfo /* plugin info */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001710 std::string /* actual_mime_type */)
1711
1712// A renderer sends this to the browser process when it wants to
1713// create a plugin. The browser will create the plugin process if
1714// necessary, and will return a handle to the channel on success.
1715// On error an empty string is returned.
1716IPC_SYNC_MESSAGE_CONTROL4_2(ViewHostMsg_OpenChannelToPlugin,
1717 int /* routing_id */,
1718 GURL /* url */,
1719 GURL /* page_url */,
1720 std::string /* mime_type */,
1721 IPC::ChannelHandle /* channel_handle */,
Ben Murdochca12bfa2013-07-23 11:17:05 +01001722 content::WebPluginInfo /* info */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001723
1724#if defined(OS_WIN)
1725IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated,
1726 gfx::NativeViewId /* dummy_activation_window */)
1727
1728IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed,
1729 gfx::NativeViewId /* dummy_activation_window */)
1730#endif
1731
1732// Get the list of proxies to use for |url|, as a semicolon delimited list
1733// of "<TYPE> <HOST>:<PORT>" | "DIRECT".
1734IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy,
1735 GURL /* url */,
1736 bool /* result */,
1737 std::string /* proxy list */)
1738
1739// A renderer sends this to the browser process when it wants to create a
1740// worker. The browser will create the worker process if necessary, and
1741// will return the route id on success. On error returns MSG_ROUTING_NONE.
1742IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker,
1743 ViewHostMsg_CreateWorker_Params,
1744 int /* route_id */)
1745
1746// This message is sent to the browser to see if an instance of this shared
1747// worker already exists. If so, it returns exists == true. If a
1748// non-empty name is passed, also validates that the url matches the url of
1749// the existing worker. If a matching worker is found, the passed-in
1750// document_id is associated with that worker, to ensure that the worker
1751// stays alive until the document is detached.
1752// The route_id returned can be used to forward messages to the worker via
1753// ForwardToWorker if it exists, otherwise it should be passed in to any
1754// future call to CreateWorker to avoid creating duplicate workers.
1755IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker,
1756 ViewHostMsg_CreateWorker_Params,
1757 bool /* exists */,
1758 int /* route_id */,
1759 bool /* url_mismatch */)
1760
1761// A renderer sends this to the browser process when a document has been
1762// detached. The browser will use this to constrain the lifecycle of worker
1763// processes (SharedWorkers are shut down when their last associated document
1764// is detached).
1765IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
1766 uint64 /* document_id */)
1767
1768// Wraps an IPC message that's destined to the worker on the renderer->browser
1769// hop.
1770IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
1771 IPC::Message /* message */)
1772
1773// Tells the browser that a specific Appcache manifest in the current page
1774// was accessed.
1775IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
1776 GURL /* manifest url */,
1777 bool /* blocked by policy */)
1778
1779// Initiates a download based on user actions like 'ALT+click'.
1780IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl,
1781 GURL /* url */,
1782 content::Referrer /* referrer */,
1783 string16 /* suggested_name */)
1784
1785// Used to go to the session history entry at the given offset (ie, -1 will
1786// return the "back" item).
1787IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1788 int /* offset (from current) of history item to get */)
1789
1790// Sent from an inactive renderer for the browser to route to the active
1791// renderer, instructing it to close.
1792IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1793
1794// Sent to the browser from an inactive renderer to post a message to the
1795// active renderer.
1796IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1797 ViewMsg_PostMessage_Params)
1798
1799IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
1800 string16 /* in - alert message */,
1801 string16 /* in - default prompt */,
1802 GURL /* in - originating page URL */,
1803 content::JavaScriptMessageType /* in - type */,
1804 bool /* out - success */,
1805 string16 /* out - user_input field */)
1806
1807// Requests that the given URL be opened in the specified manner.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001808IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL, ViewHostMsg_OpenURL_Params)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001809
1810// Notifies that the preferred size of the content changed.
1811IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1812 gfx::Size /* pref_size */)
1813
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001814// Notifies that the scroll offset changed.
1815// This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect
1816// is not sent at all when threaded compositing is enabled while
1817// ViewHostMsg_DidChangeScrollOffset works properly in this case.
1818IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset)
1819
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001820// Notifies that the pinned-to-side state of the content changed.
Ben Murdocheb525c52013-07-10 11:40:50 +01001821IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001822 bool /* pinned_to_left */,
1823 bool /* pinned_to_right */)
1824
Ben Murdocheb525c52013-07-10 11:40:50 +01001825// Notifies that the scrollbars-visible state of the content changed.
1826IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame,
1827 bool /* has_horizontal_scrollbar */,
1828 bool /* has_vertical_scrollbar */)
1829
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001830// Notifies that the number of JavaScript scroll handlers changed.
1831IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents,
1832 int /* count */)
1833
Ben Murdocheb525c52013-07-10 11:40:50 +01001834// Notifies whether there are JavaScript touch event handlers or not.
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001835IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1836 bool /* has_handlers */)
1837
1838// A message from HTML-based UI. When (trusted) Javascript calls
1839// send(message, args), this message is sent to the browser.
1840IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
1841 GURL /* source_url */,
1842 std::string /* message */,
1843 base::ListValue /* args */)
1844
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001845// Requests a snapshot of the given window.
1846IPC_MESSAGE_ROUTED1(ViewHostMsg_GetWindowSnapshot,
1847 int /* snapshot_id */)
1848
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001849// A renderer sends this to the browser process when it wants to create a ppapi
1850// plugin. The browser will create the plugin process if necessary, and will
1851// return a handle to the channel on success.
1852//
1853// The plugin_child_id is the ChildProcessHost ID assigned in the browser
1854// process. This ID is valid only in the context of the browser process and is
1855// used to identify the proper process when the renderer notifies it that the
1856// plugin is hung.
1857//
1858// On error an empty string and null handles are returned.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001859IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin,
1860 base::FilePath /* path */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001861 IPC::ChannelHandle /* handle to channel */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001862 base::ProcessId /* plugin_pid */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001863 int /* plugin_child_id */)
1864
1865// Notification that a plugin has created a new plugin instance. The parameters
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001866// indicate:
1867// -The plugin process ID that we're creating the instance for.
1868// -The instance ID of the instance being created.
1869// -A PepperRendererInstanceData struct which contains properties from the
1870// renderer which are associated with the plugin instance. This includes the
1871// routing ID of the associated render view and the URL of plugin.
1872// -Whether the plugin we're creating an instance for is external or internal.
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001873//
1874// This message must be sync even though it returns no parameters to avoid
1875// a race condition with the plugin process. The plugin process sends messages
1876// to the browser that assume the browser knows about the instance. We need to
1877// make sure that the browser actually knows about the instance before we tell
1878// the plugin to run.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001879IPC_SYNC_MESSAGE_CONTROL4_0(
1880 ViewHostMsg_DidCreateOutOfProcessPepperInstance,
1881 int /* plugin_child_id */,
1882 int32 /* pp_instance */,
1883 content::PepperRendererInstanceData /* creation_data */,
1884 bool /* is_external */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001885
1886// Notification that a plugin has destroyed an instance. This is the opposite of
1887// the "DidCreate" message above.
1888IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance,
1889 int /* plugin_child_id */,
1890 int32 /* pp_instance */,
1891 bool /* is_external */)
1892
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +01001893// Message from the renderer to the browser indicating the in-process instance
1894// has been created.
1895IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance,
1896 int32 /* instance */,
1897 content::PepperRendererInstanceData /* instance_data */)
1898
1899// Message from the renderer to the browser indicating the in-process instance
1900// has been destroyed.
1901IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance,
1902 int32 /* instance */)
1903
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001904// A renderer sends this to the browser process when it wants to
1905// create a ppapi broker. The browser will create the broker process
1906// if necessary, and will return a handle to the channel on success.
1907// On error an empty string is returned.
1908// The browser will respond with ViewMsg_PpapiBrokerChannelCreated.
Ben Murdoch32409262013-08-07 11:04:47 +01001909IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001910 int /* routing_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001911 base::FilePath /* path */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001912
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +01001913// Opens a Pepper file asynchronously. The response returns a file descriptor
1914// and an error code from base/platform_file.h.
Ben Murdoch2385ea32013-08-06 11:01:04 +01001915IPC_MESSAGE_CONTROL4(ViewHostMsg_AsyncOpenPepperFile,
1916 int /* routing_id */,
1917 base::FilePath /* file path */,
1918 int /* pp_open_flags */,
1919 int /* message_id */)
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +01001920
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001921// A renderer sends this to the browser process when it wants to access a PPAPI
1922// broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called
1923// for every connection.
1924// The browser will respond with ViewMsg_PpapiBrokerPermissionResult.
1925IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission,
Ben Murdoch32409262013-08-07 11:04:47 +01001926 int /* routing_id */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001927 GURL /* document_url */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001928 base::FilePath /* plugin_path */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001929
1930#if defined(USE_X11)
1931// A renderer sends this when it needs a browser-side widget for
1932// hosting a windowed plugin. id is the XID of the plugin window, for which
1933// the container is created.
1934IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
1935 gfx::PluginWindowHandle /* id */)
1936
1937// Destroy a plugin container previously created using CreatePluginContainer.
1938// id is the XID of the plugin window corresponding to the container that is
1939// to be destroyed.
1940IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
1941 gfx::PluginWindowHandle /* id */)
1942#endif
1943
1944// Send the tooltip text for the current mouse position to the browser.
1945IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
1946 string16 /* tooltip text string */,
1947 WebKit::WebTextDirection /* text direction hint */)
1948
1949IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001950IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001951
1952// Notification that the text selection has changed.
1953// Note: The secound parameter is the character based offset of the string16
1954// text in the document.
1955IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged,
1956 string16 /* text covers the selection range */,
1957 size_t /* the offset of the text in the document */,
1958 ui::Range /* selection range in the document */)
1959
1960// Notification that the selection bounds have changed.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001961IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged,
1962 ViewHostMsg_SelectionBounds_Params)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001963
1964// Asks the browser to open the color chooser.
1965IPC_MESSAGE_ROUTED2(ViewHostMsg_OpenColorChooser,
1966 int /* id */,
1967 SkColor /* color */)
1968
1969// Asks the browser to end the color chooser.
1970IPC_MESSAGE_ROUTED1(ViewHostMsg_EndColorChooser, int /* id */)
1971
1972// Change the selected color in the color chooser.
1973IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSelectedColorInColorChooser,
1974 int /* id */,
1975 SkColor /* color */)
1976
1977// Asks the browser to display the file chooser. The result is returned in a
1978// ViewHost_RunFileChooserResponse message.
1979IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
1980 content::FileChooserParams)
1981
1982// Asks the browser to enumerate a directory. This is equivalent to running
1983// the file chooser in directory-enumeration mode and having the user select
1984// the given directory. The result is returned in a
1985// ViewMsg_EnumerateDirectoryResponse message.
1986IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory,
1987 int /* request_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001988 base::FilePath /* file_path */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001989
1990// Tells the browser to move the focus to the next (previous if reverse is
1991// true) focusable element.
1992IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1993 bool /* reverse */)
1994
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001995// Required for opening a date/time dialog
1996IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1997 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1998
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001999IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged,
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01002000 ui::TextInputType /* TextInputType of the focused node */,
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01002001 bool /* can_compose_inline in the focused node */,
2002 ui::TextInputMode /* TextInputMode of the focused node */)
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01002003
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002004// Required for updating text input state.
2005IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
2006 ViewHostMsg_TextInputState_Params /* input state params */)
2007
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002008// Required for cancelling an ongoing input method composition.
2009IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition)
2010
2011// WebKit and JavaScript error messages to log to the console
2012// or debugger UI.
2013IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole,
2014 int32, /* log level */
2015 string16, /* msg */
2016 int32, /* line number */
2017 string16 /* source id */)
2018
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002019// Sent by the renderer process to indicate that a plugin instance has crashed.
2020// Note: |plugin_pid| should not be trusted. The corresponding process has
2021// probably died. Moreover, the ID may have been reused by a new process. Any
2022// usage other than displaying it in a prompt to the user is very likely to be
2023// wrong.
2024IPC_MESSAGE_ROUTED2(ViewHostMsg_CrashedPlugin,
2025 base::FilePath /* plugin_path */,
2026 base::ProcessId /* plugin_pid */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002027
2028// Displays a box to confirm that the user wants to navigate away from the
2029// page. Replies true if yes, false otherwise, the reply string is ignored,
2030// but is included so that we can use OnJavaScriptMessageBoxClosed.
2031IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm,
2032 GURL, /* in - originating frame URL */
2033 string16 /* in - alert message */,
2034 bool /* in - is a reload */,
2035 bool /* out - success */,
2036 string16 /* out - This is ignored.*/)
2037
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002038// Sent when a provisional load on the main frame redirects.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002039IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002040 int /* page_id */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002041 GURL /* last url */,
2042 GURL /* url redirected to */)
2043
2044// Sent when the renderer changes the zoom level for a particular url, so the
2045// browser can update its records. If remember is true, then url is used to
2046// update the zoom level for all pages in that site. Otherwise, the render
2047// view's id is used so that only the menu is updated.
2048IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL,
2049 double /* zoom_level */,
2050 bool /* remember */,
2051 GURL /* url */)
2052
2053// Updates the minimum/maximum allowed zoom percent for this tab from the
2054// default values. If |remember| is true, then the zoom setting is applied to
2055// other pages in the site and is saved, otherwise it only applies to this
2056// tab.
2057IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits,
2058 int /* minimum_percent */,
2059 int /* maximum_percent */,
2060 bool /* remember */)
2061
2062// Notify the browser that this render process can or can't be suddenly
2063// terminated.
2064IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
2065 bool /* enabled */)
2066
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002067// Informs the browser of updated frame names.
2068IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateFrameName,
2069 int /* frame_id */,
2070 bool /* is_top_level */,
2071 std::string /* name */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002072
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01002073
2074IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params)
2075 IPC_STRUCT_MEMBER(int32, surface_id)
2076 IPC_STRUCT_MEMBER(uint64, surface_handle)
2077 IPC_STRUCT_MEMBER(int32, route_id)
2078 IPC_STRUCT_MEMBER(gfx::Size, size)
2079 IPC_STRUCT_MEMBER(float, scale_factor)
2080 IPC_STRUCT_MEMBER(int32, gpu_process_host_id)
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01002081 IPC_STRUCT_MEMBER(ui::LatencyInfo, latency_info)
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01002082IPC_STRUCT_END()
2083
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002084// This message is synthesized by GpuProcessHost to pass through a swap message
2085// to the RenderWidgetHelper. This allows GetBackingStore to block for either a
2086// software or GPU frame.
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01002087IPC_MESSAGE_ROUTED1(
2088 ViewHostMsg_CompositorSurfaceBuffersSwapped,
2089 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params /* params */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002090
Ben Murdochca12bfa2013-07-23 11:17:05 +01002091IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame,
2092 uint32 /* output_surface_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002093 cc::CompositorFrame /* frame */)
2094
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +01002095// Sent by the compositor when input scroll events are dropped due to bounds
2096// restricions on the root scroll offset.
2097IPC_MESSAGE_ROUTED2(ViewHostMsg_DidOverscroll,
2098 gfx::Vector2dF /* accumulated_overscroll */,
2099 gfx::Vector2dF /* current_fling_velocity */)
2100
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01002101// Reply to a snapshot request containing whether snapshotting succeeded and the
2102// SkBitmap if it succeeded.
2103IPC_MESSAGE_ROUTED2(ViewHostMsg_Snapshot,
2104 bool, /* success */
2105 SkBitmap /* bitmap */)
2106
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002107//---------------------------------------------------------------------------
2108// Request for cryptographic operation messages:
2109// These are messages from the renderer to the browser to perform a
2110// cryptographic operation.
2111
2112// Asks the browser process to generate a keypair for grabbing a client
2113// certificate from a CA (<keygen> tag), and returns the signed public
2114// key and challenge string.
2115IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen,
2116 uint32 /* key size index */,
2117 std::string /* challenge string */,
2118 GURL /* URL of requestor */,
2119 std::string /* signed public key and challenge */)
2120
2121// Message sent from the renderer to the browser to request that the browser
2122// cache |data| associated with |url|.
2123IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata,
2124 GURL /* url */,
2125 double /* expected_response_time */,
2126 std::vector<char> /* data */)
2127
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002128// Displays a JavaScript out-of-memory message in the infobar.
2129IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory)
2130
2131// Register a new handler for URL requests with the given scheme.
2132IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler,
2133 std::string /* scheme */,
2134 GURL /* url */,
2135 string16 /* title */,
2136 bool /* user_gesture */)
2137
2138// Stores new inspector setting in the profile.
2139// TODO(jam): this should be in the chrome module
2140IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
2141 std::string, /* key */
2142 std::string /* value */)
2143
2144// Puts the browser into "tab fullscreen" mode for the sending renderer.
2145// See the comment in chrome/browser/ui/browser.h for more details.
2146IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen,
2147 bool /* enter_fullscreen */)
2148
2149// Send back a string to be recorded by UserMetrics.
2150IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
2151 std::string /* action */)
2152
2153// Notifies the browser that the page was or was not saved as MHTML.
2154IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML,
2155 int /* job_id */,
2156 int64 /* size of the MHTML file, -1 if error */)
2157
2158IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
2159 std::vector<GURL> /* all savable resource links */,
2160 std::vector<content::Referrer> /* all referrers */,
2161 std::vector<GURL> /* all frame links */)
2162
2163IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
2164 GURL /* frame's url */,
2165 std::string /* data buffer */,
2166 int32 /* complete status */)
2167
2168// Notifies the browser of an event occurring in the media pipeline.
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01002169IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents,
2170 std::vector<media::MediaLogEvent> /* events */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002171
2172// Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message
2173// being sent back.
2174// |privileged| is used by Pepper Flash. If this flag is set to true, we won't
2175// pop up a bubble to ask for user permission or take mouse lock content into
2176// account.
2177IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse,
2178 bool /* user_gesture */,
2179 bool /* last_unlocked_by_target */,
2180 bool /* privileged */)
2181
2182// Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent
2183// whenever the mouse is unlocked (which may or may not be caused by
2184// ViewHostMsg_UnlockMouse).
2185IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse)
2186
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01002187// Notifies that the initial empty document of a view has been accessed.
2188// After this, it is no longer safe to show a pending navigation's URL without
2189// making a URL spoof possible.
2190IPC_MESSAGE_ROUTED0(ViewHostMsg_DidAccessInitialDocument)
2191
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002192// Following message is used to communicate the values received by the
2193// callback binding the JS to Cpp.
2194// An instance of browser that has an automation host listening to it can
2195// have a javascript send a native value (string, number, boolean) to the
2196// listener in Cpp. (DomAutomationController)
2197IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
2198 std::string /* json_string */,
2199 int /* automation_id */)
2200
2201// Sent to the browser when the renderer detects it is blocked on a pepper
2202// plugin message for too long. This is also sent when it becomes unhung
2203// (according to the value of is_hung). The browser can give the user the
2204// option of killing the plugin.
2205IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung,
2206 int /* plugin_child_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002207 base::FilePath /* path */,
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002208 bool /* is_hung */)
2209
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002210// Notifies that multiple touch targets may have been pressed, and to show
2211// the disambiguation popup.
2212IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
2213 gfx::Rect, /* Border of touched targets */
2214 gfx::Size, /* Size of zoomed image */
2215 TransportDIB::Id /* DIB of zoomed image */)
2216
2217// Sent by the renderer process to check whether client 3D APIs
2218// (Pepper 3D, WebGL) are explicitly blocked.
2219IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked,
2220 int /* render_view_id */,
2221 GURL /* top_origin_url */,
2222 content::ThreeDAPIType /* requester */,
2223 bool /* blocked */)
2224
2225// Sent by the renderer process to indicate that a context was lost by
2226// client 3D content (Pepper 3D, WebGL) running on the page at the
2227// given URL.
2228IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext,
2229 GURL /* top_origin_url */,
2230 content::ThreeDAPIType /* context_type */,
2231 int /* arb_robustness_status_code */)
2232
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +01002233// This message is sent when a frame is added to the DOM.
2234IPC_MESSAGE_ROUTED3(ViewHostMsg_FrameAttached,
2235 int64 /* parent_frame_id*/,
2236 int64 /* frame_id */,
2237 std::string /* frame_name */)
2238
2239// Notifies the browser that the frame with the given id was detached. The
2240// |parent_frame_id| is -1 for the top level frame, otherwise the id of the
2241// immediate parent of the detached frame.
2242IPC_MESSAGE_ROUTED2(ViewHostMsg_FrameDetached,
2243 int64 /* parent_frame_id */,
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002244 int64 /* frame_id */)
2245
2246// Notifies the browser that document has parsed the body. This is used by the
2247// ResourceScheduler as an indication that bandwidth contention won't block
2248// first paint.
2249IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody)
2250
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01002251// Notification that the urls for the favicon of a site has been determined.
2252IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
2253 int32 /* page_id */,
2254 std::vector<content::FaviconURL> /* candidates */)
2255
2256// Sent once a paint happens after the first non empty layout. In other words
2257// after the page has painted something.
2258IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFirstVisuallyNonEmptyPaint,
2259 int /* page_id */)
2260
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002261#if defined(OS_ANDROID)
2262// Response to ViewMsg_FindMatchRects.
2263//
2264// |version| will contain the current version number of the renderer's find
2265// match list (incremented whenever they change), which should be passed in the
2266// next call to ViewMsg_FindMatchRects.
2267//
2268// |rects| will either contain a list of the enclosing rects of all matches
2269// found by the most recent Find operation, or will be empty if |version| is not
2270// greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
2271// your locally cached rects should still be valid). The rect coords will be
2272// custom normalized fractions of the document size. The rects will be sorted by
2273// frame traversal order starting in the main frame, then by dom order.
2274//
2275// |active_rect| will contain the bounding box of the active find-in-page match
2276// marker, in similarly normalized coords (or an empty rect if there isn't one).
2277IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
2278 int /* version */,
2279 std::vector<gfx::RectF> /* rects */,
2280 gfx::RectF /* active_rect */)
2281
2282// Start an android intent with the given URI.
2283IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
2284 GURL /* content_url */)
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002285
2286// Message sent when the renderer changed the background color for the view.
2287IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor,
2288 uint32 /* bg_color */)
2289
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002290// This message is an ACK that the batch state change has been received by
2291// the renderer and all IME related messages should be processed accordingly.
2292IPC_MESSAGE_ROUTED1(ViewHostMsg_ImeBatchStateChanged_ACK,
2293 bool /* is_begin */)
2294
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01002295// This message runs the MediaCodec for decoding audio for webaudio.
2296IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec,
2297 base::SharedMemoryHandle /* encoded_data_handle */,
2298 base::FileDescriptor /* pcm_output */,
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01002299 uint32_t /* data_size*/)
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01002300
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01002301// Sent by renderer to request a ViewMsg_BeginFrame message for upcoming
2302// display events. If |enabled| is true, the BeginFrame message will continue
2303// to be be delivered until the notification is disabled.
2304IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame,
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01002305 bool /* enabled */)
2306
Ben Murdochca12bfa2013-07-23 11:17:05 +01002307// Sent by the renderer to the browser to start a vibration with the given
2308// duration.
2309IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate,
2310 int64 /* milliseconds */)
2311
2312// Sent by the renderer to the browser to cancel the currently running
2313// vibration, if there is one.
2314IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration)
2315
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002316#elif defined(OS_MACOSX)
2317// Request that the browser load a font into shared memory for us.
2318IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont,
2319 FontDescriptor /* font to load */,
2320 uint32 /* buffer size */,
2321 base::SharedMemoryHandle /* font data */,
2322 uint32 /* font id */)
2323
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +01002324// Informs the browser that a plugin has gained or lost focus.
2325IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged,
2326 bool, /* focused */
2327 int /* plugin_id */)
2328
2329// Instructs the browser to start plugin IME.
2330IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
2331
2332#elif defined(OS_WIN)
2333// Request that the given font characters be loaded by the browser so it's
2334// cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
2335// for details.
2336IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
2337 LOGFONT /* font_data */,
2338 string16 /* characters */)
2339#endif
2340
2341#if defined(OS_POSIX)
2342// On POSIX, we cannot allocated shared memory from within the sandbox, so
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002343// this call exists for the renderer to ask the browser to allocate memory
2344// on its behalf. We return a file descriptor to the POSIX shared memory.
2345// If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept
2346// by the browser, and it is the caller's repsonsibility to send a
2347// ViewHostMsg_FreeTransportDIB message in order to release the cached shmem.
2348// In all cases, the caller is responsible for deleting the resulting
2349// TransportDIB.
2350IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB,
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01002351 uint32_t, /* bytes requested */
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002352 bool, /* cache in the browser */
2353 TransportDIB::Handle /* DIB */)
2354
2355// Since the browser keeps handles to the allocated transport DIBs, this
2356// message is sent to tell the browser that it may release them when the
2357// renderer is finished with them.
2358IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
2359 TransportDIB::Id /* DIB id */)
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002360#endif
2361
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01002362#if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
2363// On MACOSX, WIN and AURA IME can request composition character bounds
2364// synchronously (see crbug.com/120597). This IPC message sends the character
2365// bounds after every composition change to always have correct bound info.
2366IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged,
2367 ui::Range /* composition range */,
2368 std::vector<gfx::Rect> /* character bounds */)
2369#endif
2370
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00002371// Adding a new message? Stick to the sort order above: first platform
2372// independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
2373// independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.