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