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