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