Home | History | Annotate | Download | only in proxy
      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 // Multiply-included message header, no traditional include guard.
      6 #include <map>
      7 #include <string>
      8 #include <vector>
      9 
     10 #include "base/basictypes.h"
     11 #include "base/files/file_path.h"
     12 #include "base/memory/shared_memory.h"
     13 #include "base/process/process.h"
     14 #include "base/strings/string16.h"
     15 #include "base/sync_socket.h"
     16 #include "gpu/command_buffer/common/command_buffer.h"
     17 #include "gpu/command_buffer/common/mailbox.h"
     18 #include "gpu/ipc/gpu_command_buffer_traits.h"
     19 #include "ipc/ipc_channel_handle.h"
     20 #include "ipc/ipc_message_macros.h"
     21 #include "ipc/ipc_message_utils.h"
     22 #include "ipc/ipc_platform_file.h"
     23 #include "ppapi/c/dev/pp_video_capture_dev.h"
     24 #include "ppapi/c/dev/pp_video_dev.h"
     25 #include "ppapi/c/dev/ppb_truetype_font_dev.h"
     26 #include "ppapi/c/dev/ppb_url_util_dev.h"
     27 #include "ppapi/c/dev/ppp_printing_dev.h"
     28 #include "ppapi/c/pp_bool.h"
     29 #include "ppapi/c/pp_codecs.h"
     30 #include "ppapi/c/pp_file_info.h"
     31 #include "ppapi/c/pp_instance.h"
     32 #include "ppapi/c/pp_module.h"
     33 #include "ppapi/c/pp_point.h"
     34 #include "ppapi/c/pp_rect.h"
     35 #include "ppapi/c/pp_resource.h"
     36 #include "ppapi/c/pp_size.h"
     37 #include "ppapi/c/pp_time.h"
     38 #include "ppapi/c/ppb_audio_config.h"
     39 #include "ppapi/c/ppb_compositor_layer.h"
     40 #include "ppapi/c/ppb_image_data.h"
     41 #include "ppapi/c/ppb_tcp_socket.h"
     42 #include "ppapi/c/ppb_text_input_controller.h"
     43 #include "ppapi/c/ppb_udp_socket.h"
     44 #include "ppapi/c/private/pp_content_decryptor.h"
     45 #include "ppapi/c/private/pp_private_font_charset.h"
     46 #include "ppapi/c/private/ppb_flash.h"
     47 #include "ppapi/c/private/ppb_host_resolver_private.h"
     48 #include "ppapi/c/private/ppb_isolated_file_system_private.h"
     49 #include "ppapi/c/private/ppb_net_address_private.h"
     50 #include "ppapi/c/private/ppb_pdf.h"
     51 #include "ppapi/c/private/ppb_talk_private.h"
     52 #include "ppapi/c/private/ppp_flash_browser_operations.h"
     53 #include "ppapi/proxy/host_resolver_private_resource.h"
     54 #include "ppapi/proxy/network_list_resource.h"
     55 #include "ppapi/proxy/ppapi_param_traits.h"
     56 #include "ppapi/proxy/ppapi_proxy_export.h"
     57 #include "ppapi/proxy/resource_message_params.h"
     58 #include "ppapi/proxy/serialized_flash_menu.h"
     59 #include "ppapi/proxy/serialized_handle.h"
     60 #include "ppapi/proxy/serialized_structs.h"
     61 #include "ppapi/proxy/serialized_var.h"
     62 #include "ppapi/shared_impl/compositor_layer_data.h"
     63 #include "ppapi/shared_impl/dir_contents.h"
     64 #include "ppapi/shared_impl/file_growth.h"
     65 #include "ppapi/shared_impl/file_path.h"
     66 #include "ppapi/shared_impl/file_ref_create_info.h"
     67 #include "ppapi/shared_impl/media_stream_audio_track_shared.h"
     68 #include "ppapi/shared_impl/media_stream_video_track_shared.h"
     69 #include "ppapi/shared_impl/ppapi_nacl_plugin_args.h"
     70 #include "ppapi/shared_impl/ppapi_preferences.h"
     71 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
     72 #include "ppapi/shared_impl/ppb_input_event_shared.h"
     73 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h"
     74 #include "ppapi/shared_impl/ppb_view_shared.h"
     75 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h"
     76 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h"
     77 #include "ppapi/shared_impl/socket_option_data.h"
     78 #include "ppapi/shared_impl/url_request_info_data.h"
     79 #include "ppapi/shared_impl/url_response_info_data.h"
     80 #include "ui/events/ipc/latency_info_param_traits.h"
     81 
     82 #undef IPC_MESSAGE_EXPORT
     83 #define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT
     84 
     85 #define IPC_MESSAGE_START PpapiMsgStart
     86 
     87 IPC_ENUM_TRAITS_MAX_VALUE(ppapi::TCPSocketVersion,
     88                           ppapi::TCP_SOCKET_VERSION_1_1_OR_ABOVE)
     89 IPC_ENUM_TRAITS(PP_AudioSampleRate)
     90 IPC_ENUM_TRAITS_MAX_VALUE(PP_BlendMode, PP_BLENDMODE_LAST)
     91 IPC_ENUM_TRAITS(PP_DeviceType_Dev)
     92 IPC_ENUM_TRAITS(PP_DecryptorStreamType)
     93 IPC_ENUM_TRAITS(PP_SessionType)
     94 IPC_ENUM_TRAITS(PP_CdmExceptionCode)
     95 IPC_ENUM_TRAITS_MAX_VALUE(PP_FileSystemType, PP_FILESYSTEMTYPE_ISOLATED)
     96 IPC_ENUM_TRAITS_MAX_VALUE(PP_FileType, PP_FILETYPE_OTHER)
     97 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission)
     98 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType)
     99 IPC_ENUM_TRAITS(PP_FlashSetting)
    100 IPC_ENUM_TRAITS(PP_ImageDataFormat)
    101 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton)
    102 IPC_ENUM_TRAITS(PP_InputEvent_Type)
    103 IPC_ENUM_TRAITS_MAX_VALUE(PP_IsolatedFileSystemType_Private,
    104                           PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE)
    105 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetAddressFamily_Private,
    106                           PP_NETADDRESSFAMILY_PRIVATE_IPV6)
    107 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetworkList_State, PP_NETWORKLIST_STATE_UP)
    108 IPC_ENUM_TRAITS_MAX_VALUE(PP_NetworkList_Type, PP_NETWORKLIST_TYPE_CELLULAR)
    109 IPC_ENUM_TRAITS(PP_PrintOrientation_Dev)
    110 IPC_ENUM_TRAITS(PP_PrintOutputFormat_Dev)
    111 IPC_ENUM_TRAITS(PP_PrintScalingOption_Dev)
    112 IPC_ENUM_TRAITS(PP_PrivateFontCharset)
    113 IPC_ENUM_TRAITS(PP_ResourceImage)
    114 IPC_ENUM_TRAITS(PP_ResourceString)
    115 IPC_ENUM_TRAITS_MAX_VALUE(PP_TalkEvent, PP_TALKEVENT_NUM_EVENTS - 1)
    116 IPC_ENUM_TRAITS_MAX_VALUE(PP_TalkPermission,
    117                           PP_TALKPERMISSION_NUM_PERMISSIONS - 1)
    118 IPC_ENUM_TRAITS_MAX_VALUE(PP_TCPSocket_Option,
    119                           PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE)
    120 IPC_ENUM_TRAITS(PP_TextInput_Type)
    121 IPC_ENUM_TRAITS(PP_TrueTypeFontFamily_Dev)
    122 IPC_ENUM_TRAITS(PP_TrueTypeFontStyle_Dev)
    123 IPC_ENUM_TRAITS(PP_TrueTypeFontWeight_Dev)
    124 IPC_ENUM_TRAITS(PP_TrueTypeFontWidth_Dev)
    125 IPC_ENUM_TRAITS(PP_TrueTypeFontCharset_Dev)
    126 IPC_ENUM_TRAITS_MAX_VALUE(PP_UDPSocket_Option,
    127                           PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE)
    128 IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev)
    129 IPC_ENUM_TRAITS(PP_VideoDecoder_Profile)
    130 IPC_ENUM_TRAITS_MAX_VALUE(PP_VideoFrame_Format, PP_VIDEOFRAME_FORMAT_LAST)
    131 IPC_ENUM_TRAITS_MAX_VALUE(PP_VideoProfile, PP_VIDEOPROFILE_MAX)
    132 
    133 IPC_STRUCT_TRAITS_BEGIN(PP_Point)
    134   IPC_STRUCT_TRAITS_MEMBER(x)
    135   IPC_STRUCT_TRAITS_MEMBER(y)
    136 IPC_STRUCT_TRAITS_END()
    137 
    138 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint)
    139   IPC_STRUCT_TRAITS_MEMBER(x)
    140   IPC_STRUCT_TRAITS_MEMBER(y)
    141 IPC_STRUCT_TRAITS_END()
    142 
    143 IPC_STRUCT_TRAITS_BEGIN(PP_Size)
    144   IPC_STRUCT_TRAITS_MEMBER(height)
    145   IPC_STRUCT_TRAITS_MEMBER(width)
    146 IPC_STRUCT_TRAITS_END()
    147 
    148 IPC_STRUCT_TRAITS_BEGIN(PP_FloatSize)
    149   IPC_STRUCT_TRAITS_MEMBER(height)
    150   IPC_STRUCT_TRAITS_MEMBER(width)
    151 IPC_STRUCT_TRAITS_END()
    152 
    153 IPC_STRUCT_TRAITS_BEGIN(PP_Rect)
    154   IPC_STRUCT_TRAITS_MEMBER(point)
    155   IPC_STRUCT_TRAITS_MEMBER(size)
    156 IPC_STRUCT_TRAITS_END()
    157 
    158 IPC_STRUCT_TRAITS_BEGIN(PP_FloatRect)
    159   IPC_STRUCT_TRAITS_MEMBER(point)
    160   IPC_STRUCT_TRAITS_MEMBER(size)
    161 IPC_STRUCT_TRAITS_END()
    162 
    163 IPC_STRUCT_TRAITS_BEGIN(PP_ImageDataDesc)
    164   IPC_STRUCT_TRAITS_MEMBER(format)
    165   IPC_STRUCT_TRAITS_MEMBER(size)
    166   IPC_STRUCT_TRAITS_MEMBER(stride)
    167 IPC_STRUCT_TRAITS_END()
    168 
    169 IPC_STRUCT_TRAITS_BEGIN(PP_PictureBuffer_Dev)
    170   IPC_STRUCT_TRAITS_MEMBER(id)
    171   IPC_STRUCT_TRAITS_MEMBER(size)
    172   IPC_STRUCT_TRAITS_MEMBER(texture_id)
    173 IPC_STRUCT_TRAITS_END()
    174 
    175 IPC_STRUCT_TRAITS_BEGIN(PP_Picture_Dev)
    176   IPC_STRUCT_TRAITS_MEMBER(picture_buffer_id)
    177   IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id)
    178 IPC_STRUCT_TRAITS_END()
    179 
    180 IPC_STRUCT_TRAITS_BEGIN(PP_PrintPageNumberRange_Dev)
    181   IPC_STRUCT_TRAITS_MEMBER(first_page_number)
    182   IPC_STRUCT_TRAITS_MEMBER(last_page_number)
    183 IPC_STRUCT_TRAITS_END()
    184 
    185 IPC_STRUCT_TRAITS_BEGIN(PP_VideoCaptureDeviceInfo_Dev)
    186   IPC_STRUCT_TRAITS_MEMBER(width)
    187   IPC_STRUCT_TRAITS_MEMBER(height)
    188   IPC_STRUCT_TRAITS_MEMBER(frames_per_second)
    189 IPC_STRUCT_TRAITS_END()
    190 
    191 IPC_STRUCT_TRAITS_BEGIN(PP_HostResolver_Private_Hint)
    192   IPC_STRUCT_TRAITS_MEMBER(family)
    193   IPC_STRUCT_TRAITS_MEMBER(flags)
    194 IPC_STRUCT_TRAITS_END()
    195 
    196 IPC_STRUCT_TRAITS_BEGIN(PP_PrintSettings_Dev)
    197   IPC_STRUCT_TRAITS_MEMBER(printable_area)
    198   IPC_STRUCT_TRAITS_MEMBER(content_area)
    199   IPC_STRUCT_TRAITS_MEMBER(paper_size)
    200   IPC_STRUCT_TRAITS_MEMBER(dpi)
    201   IPC_STRUCT_TRAITS_MEMBER(orientation)
    202   IPC_STRUCT_TRAITS_MEMBER(print_scaling_option)
    203   IPC_STRUCT_TRAITS_MEMBER(grayscale)
    204   IPC_STRUCT_TRAITS_MEMBER(format)
    205 IPC_STRUCT_TRAITS_END()
    206 
    207 IPC_STRUCT_TRAITS_BEGIN(PP_URLComponent_Dev)
    208   IPC_STRUCT_TRAITS_MEMBER(begin)
    209   IPC_STRUCT_TRAITS_MEMBER(len)
    210 IPC_STRUCT_TRAITS_END()
    211 
    212 IPC_STRUCT_TRAITS_BEGIN(PP_URLComponents_Dev)
    213   IPC_STRUCT_TRAITS_MEMBER(scheme)
    214   IPC_STRUCT_TRAITS_MEMBER(username)
    215   IPC_STRUCT_TRAITS_MEMBER(password)
    216   IPC_STRUCT_TRAITS_MEMBER(host)
    217   IPC_STRUCT_TRAITS_MEMBER(port)
    218   IPC_STRUCT_TRAITS_MEMBER(path)
    219   IPC_STRUCT_TRAITS_MEMBER(query)
    220   IPC_STRUCT_TRAITS_MEMBER(ref)
    221 IPC_STRUCT_TRAITS_END()
    222 
    223 IPC_STRUCT_TRAITS_BEGIN(PP_FileInfo)
    224   IPC_STRUCT_TRAITS_MEMBER(size)
    225   IPC_STRUCT_TRAITS_MEMBER(type)
    226   IPC_STRUCT_TRAITS_MEMBER(system_type)
    227   IPC_STRUCT_TRAITS_MEMBER(creation_time)
    228   IPC_STRUCT_TRAITS_MEMBER(last_access_time)
    229   IPC_STRUCT_TRAITS_MEMBER(last_modified_time)
    230 IPC_STRUCT_TRAITS_END()
    231 
    232 IPC_STRUCT_TRAITS_BEGIN(ppapi::FileGrowth)
    233   IPC_STRUCT_TRAITS_MEMBER(max_written_offset)
    234   IPC_STRUCT_TRAITS_MEMBER(append_mode_write_amount)
    235 IPC_STRUCT_TRAITS_END()
    236 
    237 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData)
    238   IPC_STRUCT_TRAITS_MEMBER(common)
    239   IPC_STRUCT_TRAITS_MEMBER(color)
    240   IPC_STRUCT_TRAITS_MEMBER(texture)
    241   IPC_STRUCT_TRAITS_MEMBER(image)
    242 IPC_STRUCT_TRAITS_END()
    243 
    244 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::LayerCommon)
    245   IPC_STRUCT_TRAITS_MEMBER(size)
    246   IPC_STRUCT_TRAITS_MEMBER(clip_rect)
    247   IPC_STRUCT_TRAITS_MEMBER(transform)
    248   IPC_STRUCT_TRAITS_MEMBER(blend_mode)
    249   IPC_STRUCT_TRAITS_MEMBER(opacity)
    250   IPC_STRUCT_TRAITS_MEMBER(resource_id)
    251 IPC_STRUCT_TRAITS_END()
    252 
    253 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::ColorLayer)
    254   IPC_STRUCT_TRAITS_MEMBER(red)
    255   IPC_STRUCT_TRAITS_MEMBER(green)
    256   IPC_STRUCT_TRAITS_MEMBER(blue)
    257   IPC_STRUCT_TRAITS_MEMBER(alpha)
    258 IPC_STRUCT_TRAITS_END()
    259 
    260 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::ImageLayer)
    261   IPC_STRUCT_TRAITS_MEMBER(resource)
    262   IPC_STRUCT_TRAITS_MEMBER(source_rect)
    263 IPC_STRUCT_TRAITS_END()
    264 
    265 IPC_STRUCT_TRAITS_BEGIN(ppapi::CompositorLayerData::TextureLayer)
    266   IPC_STRUCT_TRAITS_MEMBER(mailbox)
    267   IPC_STRUCT_TRAITS_MEMBER(sync_point)
    268   IPC_STRUCT_TRAITS_MEMBER(source_rect)
    269   IPC_STRUCT_TRAITS_MEMBER(premult_alpha)
    270 IPC_STRUCT_TRAITS_END()
    271 
    272 IPC_STRUCT_TRAITS_BEGIN(ppapi::DeviceRefData)
    273   IPC_STRUCT_TRAITS_MEMBER(type)
    274   IPC_STRUCT_TRAITS_MEMBER(name)
    275   IPC_STRUCT_TRAITS_MEMBER(id)
    276 IPC_STRUCT_TRAITS_END()
    277 
    278 IPC_STRUCT_TRAITS_BEGIN(ppapi::DirEntry)
    279   IPC_STRUCT_TRAITS_MEMBER(name)
    280   IPC_STRUCT_TRAITS_MEMBER(is_dir)
    281 IPC_STRUCT_TRAITS_END()
    282 
    283 IPC_STRUCT_TRAITS_BEGIN(ppapi::FileRefCreateInfo)
    284   IPC_STRUCT_TRAITS_MEMBER(file_system_type)
    285   IPC_STRUCT_TRAITS_MEMBER(internal_path)
    286   IPC_STRUCT_TRAITS_MEMBER(display_name)
    287   IPC_STRUCT_TRAITS_MEMBER(browser_pending_host_resource_id)
    288   IPC_STRUCT_TRAITS_MEMBER(renderer_pending_host_resource_id)
    289   IPC_STRUCT_TRAITS_MEMBER(file_system_plugin_resource)
    290 IPC_STRUCT_TRAITS_END()
    291 
    292 IPC_STRUCT_TRAITS_BEGIN(ppapi::FlashSiteSetting)
    293   IPC_STRUCT_TRAITS_MEMBER(site)
    294   IPC_STRUCT_TRAITS_MEMBER(permission)
    295 IPC_STRUCT_TRAITS_END()
    296 
    297 IPC_STRUCT_TRAITS_BEGIN(ppapi::MediaStreamAudioTrackShared::Attributes)
    298   IPC_STRUCT_TRAITS_MEMBER(buffers)
    299 IPC_STRUCT_TRAITS_END()
    300 
    301 IPC_STRUCT_TRAITS_BEGIN(ppapi::MediaStreamVideoTrackShared::Attributes)
    302   IPC_STRUCT_TRAITS_MEMBER(buffers)
    303   IPC_STRUCT_TRAITS_MEMBER(width)
    304   IPC_STRUCT_TRAITS_MEMBER(height)
    305   IPC_STRUCT_TRAITS_MEMBER(format)
    306 IPC_STRUCT_TRAITS_END()
    307 
    308 IPC_STRUCT_TRAITS_BEGIN(ppapi::ViewData)
    309   IPC_STRUCT_TRAITS_MEMBER(rect)
    310   IPC_STRUCT_TRAITS_MEMBER(is_fullscreen)
    311   IPC_STRUCT_TRAITS_MEMBER(is_page_visible)
    312   IPC_STRUCT_TRAITS_MEMBER(clip_rect)
    313   IPC_STRUCT_TRAITS_MEMBER(device_scale)
    314   IPC_STRUCT_TRAITS_MEMBER(css_scale)
    315   IPC_STRUCT_TRAITS_MEMBER(scroll_offset)
    316 IPC_STRUCT_TRAITS_END()
    317 
    318 IPC_STRUCT_TRAITS_BEGIN(PP_TouchPoint)
    319   IPC_STRUCT_TRAITS_MEMBER(id)
    320   IPC_STRUCT_TRAITS_MEMBER(position)
    321   IPC_STRUCT_TRAITS_MEMBER(radius)
    322   IPC_STRUCT_TRAITS_MEMBER(rotation_angle)
    323   IPC_STRUCT_TRAITS_MEMBER(pressure)
    324 IPC_STRUCT_TRAITS_END()
    325 
    326 IPC_STRUCT_TRAITS_BEGIN(ppapi::Preferences)
    327   IPC_STRUCT_TRAITS_MEMBER(standard_font_family_map)
    328   IPC_STRUCT_TRAITS_MEMBER(fixed_font_family_map)
    329   IPC_STRUCT_TRAITS_MEMBER(serif_font_family_map)
    330   IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family_map)
    331   IPC_STRUCT_TRAITS_MEMBER(default_font_size)
    332   IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size)
    333   IPC_STRUCT_TRAITS_MEMBER(number_of_cpu_cores)
    334   IPC_STRUCT_TRAITS_MEMBER(is_3d_supported)
    335   IPC_STRUCT_TRAITS_MEMBER(is_stage3d_supported)
    336   IPC_STRUCT_TRAITS_MEMBER(is_stage3d_baseline_supported)
    337   IPC_STRUCT_TRAITS_MEMBER(is_accelerated_video_decode_enabled)
    338 IPC_STRUCT_TRAITS_END()
    339 
    340 IPC_STRUCT_TRAITS_BEGIN(ppapi::InputEventData)
    341   IPC_STRUCT_TRAITS_MEMBER(is_filtered)
    342   IPC_STRUCT_TRAITS_MEMBER(event_type)
    343   IPC_STRUCT_TRAITS_MEMBER(event_time_stamp)
    344   IPC_STRUCT_TRAITS_MEMBER(event_modifiers)
    345   IPC_STRUCT_TRAITS_MEMBER(mouse_button)
    346   IPC_STRUCT_TRAITS_MEMBER(mouse_position)
    347   IPC_STRUCT_TRAITS_MEMBER(mouse_click_count)
    348   IPC_STRUCT_TRAITS_MEMBER(mouse_movement)
    349   IPC_STRUCT_TRAITS_MEMBER(wheel_delta)
    350   IPC_STRUCT_TRAITS_MEMBER(wheel_ticks)
    351   IPC_STRUCT_TRAITS_MEMBER(wheel_scroll_by_page)
    352   IPC_STRUCT_TRAITS_MEMBER(key_code)
    353   IPC_STRUCT_TRAITS_MEMBER(code)
    354   IPC_STRUCT_TRAITS_MEMBER(character_text)
    355   IPC_STRUCT_TRAITS_MEMBER(composition_segment_offsets)
    356   IPC_STRUCT_TRAITS_MEMBER(composition_target_segment)
    357   IPC_STRUCT_TRAITS_MEMBER(composition_selection_start)
    358   IPC_STRUCT_TRAITS_MEMBER(composition_selection_end)
    359   IPC_STRUCT_TRAITS_MEMBER(touches)
    360   IPC_STRUCT_TRAITS_MEMBER(changed_touches)
    361   IPC_STRUCT_TRAITS_MEMBER(target_touches)
    362   IPC_STRUCT_TRAITS_MEMBER(latency_info)
    363 IPC_STRUCT_TRAITS_END()
    364 
    365 IPC_STRUCT_TRAITS_BEGIN(ppapi::HostPortPair)
    366   IPC_STRUCT_TRAITS_MEMBER(host)
    367   IPC_STRUCT_TRAITS_MEMBER(port)
    368 IPC_STRUCT_TRAITS_END()
    369 
    370 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLRequestInfoData)
    371   IPC_STRUCT_TRAITS_MEMBER(url)
    372   IPC_STRUCT_TRAITS_MEMBER(method)
    373   IPC_STRUCT_TRAITS_MEMBER(headers)
    374   IPC_STRUCT_TRAITS_MEMBER(stream_to_file)
    375   IPC_STRUCT_TRAITS_MEMBER(follow_redirects)
    376   IPC_STRUCT_TRAITS_MEMBER(record_download_progress)
    377   IPC_STRUCT_TRAITS_MEMBER(record_upload_progress)
    378   IPC_STRUCT_TRAITS_MEMBER(has_custom_referrer_url)
    379   IPC_STRUCT_TRAITS_MEMBER(custom_referrer_url)
    380   IPC_STRUCT_TRAITS_MEMBER(allow_cross_origin_requests)
    381   IPC_STRUCT_TRAITS_MEMBER(allow_credentials)
    382   IPC_STRUCT_TRAITS_MEMBER(has_custom_content_transfer_encoding)
    383   IPC_STRUCT_TRAITS_MEMBER(custom_content_transfer_encoding)
    384   IPC_STRUCT_TRAITS_MEMBER(prefetch_buffer_upper_threshold)
    385   IPC_STRUCT_TRAITS_MEMBER(prefetch_buffer_lower_threshold)
    386   IPC_STRUCT_TRAITS_MEMBER(has_custom_user_agent)
    387   IPC_STRUCT_TRAITS_MEMBER(custom_user_agent)
    388   IPC_STRUCT_TRAITS_MEMBER(body)
    389 IPC_STRUCT_TRAITS_END()
    390 
    391 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLRequestInfoData::BodyItem)
    392   IPC_STRUCT_TRAITS_MEMBER(is_file)
    393   IPC_STRUCT_TRAITS_MEMBER(data)
    394   IPC_STRUCT_TRAITS_MEMBER(file_ref_pp_resource)
    395   IPC_STRUCT_TRAITS_MEMBER(start_offset)
    396   IPC_STRUCT_TRAITS_MEMBER(number_of_bytes)
    397   IPC_STRUCT_TRAITS_MEMBER(expected_last_modified_time)
    398 IPC_STRUCT_TRAITS_END()
    399 
    400 IPC_STRUCT_TRAITS_BEGIN(ppapi::URLResponseInfoData)
    401   IPC_STRUCT_TRAITS_MEMBER(url)
    402   IPC_STRUCT_TRAITS_MEMBER(headers)
    403   IPC_STRUCT_TRAITS_MEMBER(status_code)
    404   IPC_STRUCT_TRAITS_MEMBER(status_text)
    405   IPC_STRUCT_TRAITS_MEMBER(redirect_url)
    406   IPC_STRUCT_TRAITS_MEMBER(body_as_file_ref)
    407 IPC_STRUCT_TRAITS_END()
    408 
    409 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::SerializedNetworkInfo)
    410   IPC_STRUCT_TRAITS_MEMBER(name)
    411   IPC_STRUCT_TRAITS_MEMBER(type)
    412   IPC_STRUCT_TRAITS_MEMBER(state)
    413   IPC_STRUCT_TRAITS_MEMBER(addresses)
    414   IPC_STRUCT_TRAITS_MEMBER(display_name)
    415   IPC_STRUCT_TRAITS_MEMBER(mtu)
    416 IPC_STRUCT_TRAITS_END()
    417 
    418 // Only whitelisted switches passed through PpapiNaClPluginArgs.
    419 // The list of switches can be found in:
    420 //   components/nacl/browser/nacl_process_host.cc
    421 IPC_STRUCT_TRAITS_BEGIN(ppapi::PpapiNaClPluginArgs)
    422   IPC_STRUCT_TRAITS_MEMBER(off_the_record)
    423   IPC_STRUCT_TRAITS_MEMBER(permissions)
    424   IPC_STRUCT_TRAITS_MEMBER(keepalive_throttle_interval_milliseconds)
    425   IPC_STRUCT_TRAITS_MEMBER(switch_names)
    426   IPC_STRUCT_TRAITS_MEMBER(switch_values)
    427 IPC_STRUCT_TRAITS_END()
    428 
    429 #if !defined(OS_NACL) && !defined(NACL_WIN64)
    430 
    431 IPC_STRUCT_TRAITS_BEGIN(ppapi::proxy::PPPDecryptor_Buffer)
    432   IPC_STRUCT_TRAITS_MEMBER(resource)
    433   IPC_STRUCT_TRAITS_MEMBER(handle)
    434   IPC_STRUCT_TRAITS_MEMBER(size)
    435 IPC_STRUCT_TRAITS_END()
    436 
    437 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
    438 
    439 // These are from the browser to the plugin.
    440 // Loads the given plugin.
    441 IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin,
    442                      base::FilePath /* path */,
    443                      ppapi::PpapiPermissions /* permissions */)
    444 
    445 // Creates a channel to talk to a renderer. The plugin will respond with
    446 // PpapiHostMsg_ChannelCreated.
    447 IPC_MESSAGE_CONTROL3(PpapiMsg_CreateChannel,
    448                      base::ProcessId /* renderer_pid */,
    449                      int /* renderer_child_id */,
    450                      bool /* incognito */)
    451 
    452 // Initializes the IPC dispatchers in the NaCl plugin.
    453 IPC_MESSAGE_CONTROL1(PpapiMsg_InitializeNaClDispatcher,
    454                      ppapi::PpapiNaClPluginArgs /* args */)
    455 
    456 // Instructs the plugin process to crash.
    457 IPC_MESSAGE_CONTROL0(PpapiMsg_Crash)
    458 
    459 // Instructs the plugin process to hang.
    460 IPC_MESSAGE_CONTROL0(PpapiMsg_Hang)
    461 
    462 // Each plugin may be referenced by multiple renderers. We need the instance
    463 // IDs to be unique within a plugin, despite coming from different renderers,
    464 // and unique within a renderer, despite going to different plugins. This means
    465 // that neither the renderer nor the plugin can generate instance IDs without
    466 // consulting the other.
    467 //
    468 // We resolve this by having the renderer generate a unique instance ID inside
    469 // its process. It then asks the plugin to reserve that ID by sending this sync
    470 // message. If the plugin has not yet seen this ID, it will remember it as used
    471 // (to prevent a race condition if another renderer tries to then use the same
    472 // instance), and set usable as true.
    473 //
    474 // If the plugin has already seen the instance ID, it will set usable as false
    475 // and the renderer must retry a new instance ID.
    476 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_ReserveInstanceId,
    477                             PP_Instance /* instance */,
    478                             bool /* usable */)
    479 
    480 // Passes the WebKit preferences to the plugin.
    481 IPC_MESSAGE_CONTROL1(PpapiMsg_SetPreferences,
    482                      ppapi::Preferences)
    483 
    484 // Sent in both directions to see if the other side supports the given
    485 // interface.
    486 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_SupportsInterface,
    487                             std::string /* interface_name */,
    488                             bool /* result */)
    489 
    490 IPC_MESSAGE_CONTROL1(PpapiHostMsg_LogInterfaceUsage,
    491                      int /* interface_hash */)
    492 
    493 #if !defined(OS_NACL) && !defined(NACL_WIN64)
    494 // Network state notification from the browser for implementing
    495 // PPP_NetworkState_Dev.
    496 IPC_MESSAGE_CONTROL1(PpapiMsg_SetNetworkState,
    497                      bool /* online */)
    498 
    499 // Requests a list of sites that have data stored from the plugin. The plugin
    500 // process will respond with PpapiHostMsg_GetSitesWithDataResult. This is used
    501 // for Flash.
    502 IPC_MESSAGE_CONTROL2(PpapiMsg_GetSitesWithData,
    503                      uint32 /* request_id */,
    504                      base::FilePath /* plugin_data_path */)
    505 IPC_MESSAGE_CONTROL2(PpapiHostMsg_GetSitesWithDataResult,
    506                      uint32 /* request_id */,
    507                      std::vector<std::string> /* sites */)
    508 
    509 // Instructs the plugin to clear data for the given site & time. The plugin
    510 // process will respond with PpapiHostMsg_ClearSiteDataResult. This is used
    511 // for Flash.
    512 IPC_MESSAGE_CONTROL5(PpapiMsg_ClearSiteData,
    513                      uint32 /* request_id */,
    514                      base::FilePath /* plugin_data_path */,
    515                      std::string /* site */,
    516                      uint64 /* flags */,
    517                      uint64 /* max_age */)
    518 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ClearSiteDataResult,
    519                      uint32 /* request_id */,
    520                      bool /* success */)
    521 
    522 IPC_MESSAGE_CONTROL2(PpapiMsg_DeauthorizeContentLicenses,
    523                      uint32 /* request_id */,
    524                      base::FilePath /* plugin_data_path */)
    525 IPC_MESSAGE_CONTROL2(PpapiHostMsg_DeauthorizeContentLicensesResult,
    526                      uint32 /* request_id */,
    527                      bool /* success */)
    528 
    529 IPC_MESSAGE_CONTROL3(PpapiMsg_GetPermissionSettings,
    530                      uint32 /* request_id */,
    531                      base::FilePath /* plugin_data_path */,
    532                      PP_Flash_BrowserOperations_SettingType /* setting_type */)
    533 IPC_MESSAGE_CONTROL4(
    534     PpapiHostMsg_GetPermissionSettingsResult,
    535     uint32 /* request_id */,
    536     bool /* success */,
    537     PP_Flash_BrowserOperations_Permission /* default_permission */,
    538     ppapi::FlashSiteSettings /* sites */)
    539 
    540 IPC_MESSAGE_CONTROL5(PpapiMsg_SetDefaultPermission,
    541                      uint32 /* request_id */,
    542                      base::FilePath /* plugin_data_path */,
    543                      PP_Flash_BrowserOperations_SettingType /* setting_type */,
    544                      PP_Flash_BrowserOperations_Permission /* permission */,
    545                      bool /* clear_site_specific */)
    546 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetDefaultPermissionResult,
    547                      uint32 /* request_id */,
    548                      bool /* success */)
    549 
    550 IPC_MESSAGE_CONTROL4(PpapiMsg_SetSitePermission,
    551                      uint32 /* request_id */,
    552                      base::FilePath /* plugin_data_path */,
    553                      PP_Flash_BrowserOperations_SettingType /* setting_type */,
    554                      ppapi::FlashSiteSettings /* sites */)
    555 IPC_MESSAGE_CONTROL2(PpapiHostMsg_SetSitePermissionResult,
    556                      uint32 /* request_id */,
    557                      bool /* success */)
    558 
    559 // Broker Process.
    560 IPC_SYNC_MESSAGE_CONTROL2_1(PpapiMsg_ConnectToPlugin,
    561                             PP_Instance /* instance */,
    562                             IPC::PlatformFileForTransit /* handle */,
    563                             int32_t /* result */)
    564 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
    565 
    566 // PPB_Audio.
    567 
    568 // Notifies the result of the audio stream create call. This is called in
    569 // both error cases and in the normal success case. These cases are
    570 // differentiated by the result code, which is one of the standard PPAPI
    571 // result codes.
    572 //
    573 // The handler of this message should always close all of the handles passed
    574 // in, since some could be valid even in the error case.
    575 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudio_NotifyAudioStreamCreated,
    576                     ppapi::HostResource /* audio_id */,
    577                     int32_t /* result_code (will be != PP_OK on failure) */,
    578                     ppapi::proxy::SerializedHandle /* socket_handle */,
    579                     ppapi::proxy::SerializedHandle /* handle */)
    580 
    581 // PPB_Graphics3D.
    582 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBGraphics3D_SwapBuffersACK,
    583                     ppapi::HostResource /* graphics_3d */,
    584                     int32_t /* pp_error */)
    585 
    586 // PPB_ImageData.
    587 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBImageData_NotifyUnusedImageData,
    588                     ppapi::HostResource /* old_image_data */)
    589 
    590 // PPB_Instance.
    591 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBInstance_MouseLockComplete,
    592                     PP_Instance /* instance */,
    593                     int32_t /* result */)
    594 
    595 // PPP_Class.
    596 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty,
    597                            int64 /* ppp_class */,
    598                            int64 /* object */,
    599                            ppapi::proxy::SerializedVar /* property */,
    600                            ppapi::proxy::SerializedVar /* out_exception */,
    601                            bool /* result */)
    602 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod,
    603                            int64 /* ppp_class */,
    604                            int64 /* object */,
    605                            ppapi::proxy::SerializedVar /* method */,
    606                            ppapi::proxy::SerializedVar /* out_exception */,
    607                            bool /* result */)
    608 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty,
    609                            int64 /* ppp_class */,
    610                            int64 /* object */,
    611                            ppapi::proxy::SerializedVar /* property */,
    612                            ppapi::proxy::SerializedVar /* out_exception */,
    613                            ppapi::proxy::SerializedVar /* result */)
    614 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties,
    615                            int64 /* ppp_class */,
    616                            int64 /* object */,
    617                            std::vector<ppapi::proxy::SerializedVar> /* props */,
    618                            ppapi::proxy::SerializedVar /* out_exception */)
    619 IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty,
    620                            int64 /* ppp_class */,
    621                            int64 /* object */,
    622                            ppapi::proxy::SerializedVar /* name */,
    623                            ppapi::proxy::SerializedVar /* value */,
    624                            ppapi::proxy::SerializedVar /* out_exception */)
    625 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty,
    626                            int64 /* ppp_class */,
    627                            int64 /* object */,
    628                            ppapi::proxy::SerializedVar /* property */,
    629                            ppapi::proxy::SerializedVar /* out_exception */)
    630 IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call,
    631                            int64 /* ppp_class */,
    632                            int64 /* object */,
    633                            ppapi::proxy::SerializedVar /* method_name */,
    634                            std::vector<ppapi::proxy::SerializedVar> /* args */,
    635                            ppapi::proxy::SerializedVar /* out_exception */,
    636                            ppapi::proxy::SerializedVar /* result */)
    637 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct,
    638                            int64 /* ppp_class */,
    639                            int64 /* object */,
    640                            std::vector<ppapi::proxy::SerializedVar> /* args */,
    641                            ppapi::proxy::SerializedVar /* out_exception */,
    642                            ppapi::proxy::SerializedVar /* result */)
    643 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate,
    644                     int64 /* ppp_class */,
    645                     int64 /* object */)
    646 
    647 // PPP_Graphics3D_Dev.
    648 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPGraphics3D_ContextLost,
    649                     PP_Instance /* instance */)
    650 
    651 // PPP_InputEvent.
    652 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInputEvent_HandleInputEvent,
    653                     PP_Instance /* instance */,
    654                     ppapi::InputEventData /* data */)
    655 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInputEvent_HandleFilteredInputEvent,
    656                            PP_Instance /* instance */,
    657                            ppapi::InputEventData /* data */,
    658                            PP_Bool /* result */)
    659 
    660 // PPP_Instance.
    661 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPInstance_DidCreate,
    662                            PP_Instance /* instance */,
    663                            std::vector<std::string> /* argn */,
    664                            std::vector<std::string> /* argv */,
    665                            PP_Bool /* result */)
    666 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy,
    667                            PP_Instance /* instance */)
    668 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView,
    669                     PP_Instance /* instance */,
    670                     ppapi::ViewData /* new_data */,
    671                     PP_Bool /* flash_fullscreen */)
    672 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus,
    673                     PP_Instance /* instance */,
    674                     PP_Bool /* has_focus */)
    675 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_HandleDocumentLoad,
    676     PP_Instance /* instance */,
    677     int /* pending_loader_host_id */,
    678     ppapi::URLResponseInfoData /* response */)
    679 
    680 // PPP_Messaging and PPP_MessageHandler.
    681 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage,
    682                     PP_Instance /* instance */,
    683                     ppapi::proxy::SerializedVar /* message */)
    684 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPMessageHandler_HandleBlockingMessage,
    685                            PP_Instance /* instance */,
    686                            ppapi::proxy::SerializedVar /* message */,
    687                            ppapi::proxy::SerializedVar /* result */,
    688                            bool /* was_handled */);
    689 
    690 // PPP_MouseLock.
    691 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost,
    692                     PP_Instance /* instance */)
    693 
    694 // PPP_Pdf
    695 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPPdf_Rotate,
    696                     PP_Instance /* instance */,
    697                     bool /* clockwise */)
    698 
    699 // Find
    700 IPC_MESSAGE_ROUTED2(PpapiPluginMsg_PPPFind_StartFind,
    701                     PP_Instance /* instance */,
    702                     std::string /* text */)
    703 IPC_MESSAGE_ROUTED2(PpapiPluginMsg_PPPFind_SelectFindResult,
    704                     PP_Instance /* instance */,
    705                     PP_Bool /* forward */)
    706 IPC_MESSAGE_ROUTED1(PpapiPluginMsg_PPPFind_StopFind,
    707                     PP_Instance /* instance */)
    708 
    709 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_SetPluginToHandleFindRequests,
    710                     PP_Instance /* instance */)
    711 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_NumberOfFindResultsChanged,
    712                     PP_Instance /* instance */,
    713                     int32_t /* total */,
    714                     PP_Bool /* final_result */)
    715 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SelectFindResultChanged,
    716                     PP_Instance /* instance */,
    717                     int32_t /* index */)
    718 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SetTickmarks,
    719                     PP_Instance /* instance */,
    720                     std::vector<PP_Rect> /* tickmarks */)
    721 
    722 // PPP_Printing
    723 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_QuerySupportedFormats,
    724                            PP_Instance /* instance */,
    725                            uint32_t /* result */)
    726 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_Begin,
    727                            PP_Instance /* instance */,
    728                            std::string /* settings_string */,
    729                            int32_t /* result */)
    730 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_PrintPages,
    731                            PP_Instance /* instance */,
    732                            std::vector<PP_PrintPageNumberRange_Dev> /* pages */,
    733                            ppapi::HostResource /* result */)
    734 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPPrinting_End,
    735                     PP_Instance /* instance */)
    736 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled,
    737                            PP_Instance /* instance */,
    738                            bool /* result */)
    739 
    740 // PPP_TextInput.
    741 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText,
    742                    PP_Instance /* instance */,
    743                    uint32_t /* desired_number_of_characters */)
    744 
    745 #if !defined(OS_NACL) && !defined(NACL_WIN64)
    746 // PPB_Broker.
    747 IPC_MESSAGE_ROUTED3(
    748     PpapiMsg_PPBBroker_ConnectComplete,
    749     ppapi::HostResource /* broker */,
    750     IPC::PlatformFileForTransit /* handle */,
    751     int32_t /* result */)
    752 
    753 // PPP_ContentDecryptor_Dev
    754 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPContentDecryptor_Initialize,
    755                     PP_Instance /* instance */,
    756                     ppapi::proxy::SerializedVar /* key_system, String */)
    757 IPC_MESSAGE_ROUTED5(PpapiMsg_PPPContentDecryptor_CreateSession,
    758                     PP_Instance /* instance */,
    759                     uint32_t /* promise_id */,
    760                     ppapi::proxy::SerializedVar /* init_data_type, String */,
    761                     ppapi::proxy::SerializedVar /* init_data, ArrayBuffer */,
    762                     PP_SessionType /* session_type */)
    763 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_LoadSession,
    764                     PP_Instance /* instance */,
    765                     uint32_t /* promise_id */,
    766                     ppapi::proxy::SerializedVar /* web_session_id, String */)
    767 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_UpdateSession,
    768                     PP_Instance /* instance */,
    769                     uint32_t /* promise_id */,
    770                     ppapi::proxy::SerializedVar /* web_session_id, String */,
    771                     ppapi::proxy::SerializedVar /* response, ArrayBuffer */)
    772 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_ReleaseSession,
    773                     PP_Instance /* instance */,
    774                     uint32_t /* promise_id */,
    775                     ppapi::proxy::SerializedVar /* web_session_id, String */)
    776 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_Decrypt,
    777                     PP_Instance /* instance */,
    778                     ppapi::proxy::PPPDecryptor_Buffer /* buffer */,
    779                     std::string /* serialized_block_info */)
    780 IPC_MESSAGE_ROUTED3(
    781     PpapiMsg_PPPContentDecryptor_InitializeAudioDecoder,
    782     PP_Instance /* instance */,
    783     std::string /* serialized_decoder_config */,
    784     ppapi::proxy::PPPDecryptor_Buffer /* extra_data_buffer */)
    785 IPC_MESSAGE_ROUTED3(
    786     PpapiMsg_PPPContentDecryptor_InitializeVideoDecoder,
    787     PP_Instance /* instance */,
    788     std::string /* serialized_decoder_config */,
    789     ppapi::proxy::PPPDecryptor_Buffer /* extra_data_buffer. */)
    790 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_DeinitializeDecoder,
    791                     PP_Instance /* instance */,
    792                     PP_DecryptorStreamType /* decoder_type */,
    793                     uint32_t /* request_id */)
    794 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPContentDecryptor_ResetDecoder,
    795                     PP_Instance /* instance */,
    796                     PP_DecryptorStreamType /* decoder_type */,
    797                     uint32_t /* request_id */)
    798 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPContentDecryptor_DecryptAndDecode,
    799                     PP_Instance /* instance */,
    800                     PP_DecryptorStreamType /* decoder_type */,
    801                     ppapi::proxy::PPPDecryptor_Buffer /* buffer */,
    802                     std::string /* serialized_block_info */)
    803 
    804 // PPP_Instance_Private.
    805 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPInstancePrivate_GetInstanceObject,
    806                            PP_Instance /* instance */,
    807                            ppapi::proxy::SerializedVar /* result */)
    808 
    809 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
    810 
    811 // Reports to the browser that a plugin has been active.
    812 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Keepalive)
    813 
    814 // -----------------------------------------------------------------------------
    815 // These are from the plugin to the renderer.
    816 
    817 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel
    818 // could not be established. This could be because the IPC could not be created
    819 // for some weird reason, but more likely that the plugin failed to load or
    820 // initialize properly.
    821 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated,
    822                      IPC::ChannelHandle /* handle */)
    823 
    824 // Notify the renderer that the PPAPI channel gets ready in the plugin.
    825 IPC_MESSAGE_CONTROL0(PpapiHostMsg_StartupInitializationComplete);
    826 
    827 // Calls renderer to open a resource file for nacl_irt_open_resource().
    828 IPC_SYNC_MESSAGE_CONTROL1_1(PpapiHostMsg_OpenResource,
    829                             std::string /* key */,
    830                             ppapi::proxy::SerializedHandle /* fd */)
    831 
    832 // Logs the given message to the console of all instances.
    833 IPC_MESSAGE_CONTROL4(PpapiHostMsg_LogWithSource,
    834                      PP_Instance /* instance */,
    835                      int /* log_level */,
    836                      std::string /* source */,
    837                      std::string /* value */)
    838 
    839 // PPB_Audio.
    840 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create,
    841                            PP_Instance /* instance_id */,
    842                            int32_t /* sample_rate */,
    843                            uint32_t /* sample_frame_count */,
    844                            ppapi::HostResource /* result */)
    845 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop,
    846                     ppapi::HostResource /* audio_id */,
    847                     bool /* play */)
    848 
    849 // PPB_Core.
    850 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource,
    851                     ppapi::HostResource)
    852 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource,
    853                     ppapi::HostResource)
    854 
    855 // PPB_Graphics3D.
    856 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBGraphics3D_Create,
    857                            PP_Instance /* instance */,
    858                            ppapi::HostResource /* share_context */,
    859                            std::vector<int32_t> /* attrib_list */,
    860                            ppapi::HostResource /* result */)
    861 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer,
    862                            ppapi::HostResource /* context */,
    863                            int32 /* transfer_buffer_id */)
    864 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForTokenInRange,
    865                            ppapi::HostResource /* context */,
    866                            int32 /* start */,
    867                            int32 /* end */,
    868                            gpu::CommandBuffer::State /* state */,
    869                            bool /* success */)
    870 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForGetOffsetInRange,
    871                            ppapi::HostResource /* context */,
    872                            int32 /* start */,
    873                            int32 /* end */,
    874                            gpu::CommandBuffer::State /* state */,
    875                            bool /* success */)
    876 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_AsyncFlush,
    877                     ppapi::HostResource /* context */,
    878                     int32 /* put_offset */)
    879 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer,
    880                            ppapi::HostResource /* context */,
    881                            uint32 /* size */,
    882                            int32 /* id */,
    883                            ppapi::proxy::SerializedHandle /* transfer_buffer */)
    884 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer,
    885                            ppapi::HostResource /* context */,
    886                            int32 /* id */)
    887 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
    888                     ppapi::HostResource /* graphics_3d */)
    889 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
    890                            ppapi::HostResource /* context */,
    891                            uint32 /* sync_point */)
    892 
    893 // PPB_ImageData.
    894 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreatePlatform,
    895                            PP_Instance /* instance */,
    896                            int32 /* format */,
    897                            PP_Size /* size */,
    898                            PP_Bool /* init_to_zero */,
    899                            ppapi::HostResource /* result_resource */,
    900                            PP_ImageDataDesc /* image_data_desc */,
    901                            ppapi::proxy::ImageHandle /* result */)
    902 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreateSimple,
    903                            PP_Instance /* instance */,
    904                            int32 /* format */,
    905                            PP_Size /* size */,
    906                            PP_Bool /* init_to_zero */,
    907                            ppapi::HostResource /* result_resource */,
    908                            PP_ImageDataDesc /* image_data_desc */,
    909                            ppapi::proxy::SerializedHandle /* result */)
    910 
    911 // PPB_Instance.
    912 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetWindowObject,
    913                            PP_Instance /* instance */,
    914                            ppapi::proxy::SerializedVar /* result */)
    915 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetOwnerElementObject,
    916                            PP_Instance /* instance */,
    917                            ppapi::proxy::SerializedVar /* result */)
    918 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_BindGraphics,
    919                     PP_Instance /* instance */,
    920                     PP_Resource /* device */)
    921 IPC_SYNC_MESSAGE_ROUTED1_1(
    922     PpapiHostMsg_PPBInstance_GetAudioHardwareOutputSampleRate,
    923                            PP_Instance /* instance */,
    924                            uint32_t /* result */)
    925 IPC_SYNC_MESSAGE_ROUTED1_1(
    926     PpapiHostMsg_PPBInstance_GetAudioHardwareOutputBufferSize,
    927                            PP_Instance /* instance */,
    928                            uint32_t /* result */)
    929 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_IsFullFrame,
    930                            PP_Instance /* instance */,
    931                            PP_Bool /* result */)
    932 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript,
    933                            PP_Instance /* instance */,
    934                            ppapi::proxy::SerializedVar /* script */,
    935                            ppapi::proxy::SerializedVar /* out_exception */,
    936                            ppapi::proxy::SerializedVar /* result */)
    937 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetDefaultCharSet,
    938                            PP_Instance /* instance */,
    939                            ppapi::proxy::SerializedVar /* result */)
    940 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_SetFullscreen,
    941                            PP_Instance /* instance */,
    942                            PP_Bool /* fullscreen */,
    943                            PP_Bool /* result */)
    944 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetScreenSize,
    945                            PP_Instance /* instance */,
    946                            PP_Bool /* result */,
    947                            PP_Size /* size */)
    948 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_RequestInputEvents,
    949                     PP_Instance /* instance */,
    950                     bool /* is_filtering */,
    951                     uint32_t /* event_classes */)
    952 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_ClearInputEvents,
    953                     PP_Instance /* instance */,
    954                     uint32_t /* event_classes */)
    955 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_StartTrackingLatency,
    956                     PP_Instance /* instance */)
    957 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PostMessage,
    958                     PP_Instance /* instance */,
    959                     ppapi::proxy::SerializedVar /* message */)
    960 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_LockMouse,
    961                     PP_Instance /* instance */)
    962 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_UnlockMouse,
    963                     PP_Instance /* instance */)
    964 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_ResolveRelativeToDocument,
    965                            PP_Instance /* instance */,
    966                            ppapi::proxy::SerializedVar /* relative */,
    967                            ppapi::proxy::SerializedVar /* result */)
    968 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanRequest,
    969                            PP_Instance /* instance */,
    970                            ppapi::proxy::SerializedVar /* relative */,
    971                            PP_Bool /* result */)
    972 IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanAccessDocument,
    973                            PP_Instance /* active */,
    974                            PP_Instance /* target */,
    975                            PP_Bool /* result */)
    976 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetDocumentURL,
    977                            PP_Instance /* active */,
    978                            PP_URLComponents_Dev /* components */,
    979                            ppapi::proxy::SerializedVar /* result */)
    980 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginInstanceURL,
    981                            PP_Instance /* active */,
    982                            ppapi::proxy::SerializedVar /* result */)
    983 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginReferrerURL,
    984                            PP_Instance /* instance */,
    985                            ppapi::proxy::SerializedVar /* result */)
    986 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_SetCursor,
    987                     PP_Instance /* instance */,
    988                     int32_t /* type */,
    989                     ppapi::HostResource /* custom_image */,
    990                     PP_Point /* hot_spot */)
    991 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SetTextInputType,
    992                     PP_Instance /* instance */,
    993                     PP_TextInput_Type /* type */)
    994 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_UpdateCaretPosition,
    995                     PP_Instance /* instance */,
    996                     PP_Rect /* caret */,
    997                     PP_Rect /* bounding_box */)
    998 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText,
    999                     PP_Instance /* instance */)
   1000 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText,
   1001                     PP_Instance /* instance */,
   1002                     std::string /* text */,
   1003                     uint32_t /* caret */,
   1004                     uint32_t /* anchor */)
   1005 
   1006 // PPB_Var.
   1007 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBVar_AddRefObject,
   1008                            int64 /* object_id */,
   1009                            int /* unused - need a return value for sync msgs */)
   1010 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject,
   1011                     int64 /* object_id */)
   1012 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty,
   1013                            ppapi::proxy::SerializedVar /* object */,
   1014                            ppapi::proxy::SerializedVar /* property */,
   1015                            ppapi::proxy::SerializedVar /* out_exception */,
   1016                            PP_Bool /* result */)
   1017 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasMethodDeprecated,
   1018                            ppapi::proxy::SerializedVar /* object */,
   1019                            ppapi::proxy::SerializedVar /* method */,
   1020                            ppapi::proxy::SerializedVar /* out_exception */,
   1021                            PP_Bool /* result */)
   1022 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_GetProperty,
   1023                            ppapi::proxy::SerializedVar /* object */,
   1024                            ppapi::proxy::SerializedVar /* property */,
   1025                            ppapi::proxy::SerializedVar /* out_exception */,
   1026                            ppapi::proxy::SerializedVar /* result */)
   1027 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_DeleteProperty,
   1028                            ppapi::proxy::SerializedVar /* object */,
   1029                            ppapi::proxy::SerializedVar /* property */,
   1030                            ppapi::proxy::SerializedVar /* out_exception */,
   1031                            PP_Bool /* result */)
   1032 IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBVar_EnumerateProperties,
   1033                            ppapi::proxy::SerializedVar /* object */,
   1034                            std::vector<ppapi::proxy::SerializedVar> /* props */,
   1035                            ppapi::proxy::SerializedVar /* out_exception */)
   1036 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_SetPropertyDeprecated,
   1037                            ppapi::proxy::SerializedVar /* object */,
   1038                            ppapi::proxy::SerializedVar /* name */,
   1039                            ppapi::proxy::SerializedVar /* value */,
   1040                            ppapi::proxy::SerializedVar /* out_exception */)
   1041 IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_CallDeprecated,
   1042                            ppapi::proxy::SerializedVar /* object */,
   1043                            ppapi::proxy::SerializedVar /* method_name */,
   1044                            std::vector<ppapi::proxy::SerializedVar> /* args */,
   1045                            ppapi::proxy::SerializedVar /* out_exception */,
   1046                            ppapi::proxy::SerializedVar /* result */)
   1047 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_Construct,
   1048                            ppapi::proxy::SerializedVar /* object */,
   1049                            std::vector<ppapi::proxy::SerializedVar> /* args */,
   1050                            ppapi::proxy::SerializedVar /* out_exception */,
   1051                            ppapi::proxy::SerializedVar /* result */)
   1052 IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated,
   1053                            ppapi::proxy::SerializedVar /* var */,
   1054                            int64 /* object_class */,
   1055                            int64 /* object-data */,
   1056                            PP_Bool /* result */)
   1057 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated,
   1058                            PP_Instance /* instance */,
   1059                            int64 /* object_class */,
   1060                            int64 /* object_data */,
   1061                            ppapi::proxy::SerializedVar /* result */)
   1062 
   1063 #if !defined(OS_NACL) && !defined(NACL_WIN64)
   1064 // PPB_Broker.
   1065 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBBroker_Create,
   1066                            PP_Instance /* instance */,
   1067                            ppapi::HostResource /* result_resource */)
   1068 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBBroker_Connect,
   1069                     ppapi::HostResource /* broker */)
   1070 
   1071 // PPB_Buffer.
   1072 IPC_SYNC_MESSAGE_ROUTED2_2(
   1073     PpapiHostMsg_PPBBuffer_Create,
   1074     PP_Instance /* instance */,
   1075     uint32_t /* size */,
   1076     ppapi::HostResource /* result_resource */,
   1077     ppapi::proxy::SerializedHandle /* result_shm_handle */)
   1078 
   1079 // PPB_ContentDecryptor_Dev messages handled in PPB_Instance_Proxy.
   1080 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PromiseResolved,
   1081                     PP_Instance /* instance */,
   1082                     uint32_t /* promise_id */)
   1083 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_PromiseResolvedWithSession,
   1084                     PP_Instance /* instance */,
   1085                     uint32_t /* promise_id */,
   1086                     ppapi::proxy::SerializedVar /* web_session_id, String */)
   1087 IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_PromiseRejected,
   1088                     PP_Instance /* instance */,
   1089                     uint32_t /* promise_id */,
   1090                     PP_CdmExceptionCode /* exception_code */,
   1091                     int32_t /* system_code */,
   1092                     ppapi::proxy::SerializedVar /* error_description, String */)
   1093 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_SessionMessage,
   1094                     PP_Instance /* instance */,
   1095                     ppapi::proxy::SerializedVar /* web_session_id, String */,
   1096                     ppapi::proxy::SerializedVar /* message, ArrayBuffer */,
   1097                     ppapi::proxy::SerializedVar /* destination_url, String */)
   1098 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SessionReady,
   1099                     PP_Instance /* instance */,
   1100                     ppapi::proxy::SerializedVar /* web_session_id, String */)
   1101 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SessionClosed,
   1102                     PP_Instance /* instance */,
   1103                     ppapi::proxy::SerializedVar /* web_session_id, String */)
   1104 IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_SessionError,
   1105                     PP_Instance /* instance */,
   1106                     ppapi::proxy::SerializedVar /* web_session_id, String */,
   1107                     PP_CdmExceptionCode /* exception_code */,
   1108                     int32_t /* system_code */,
   1109                     ppapi::proxy::SerializedVar /* error_description, String */)
   1110 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverBlock,
   1111                     PP_Instance /* instance */,
   1112                     PP_Resource /* decrypted_block, PPB_Buffer_Dev */,
   1113                     std::string /* serialized_block_info */)
   1114 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_DecoderInitializeDone,
   1115                     PP_Instance /* instance */,
   1116                     PP_DecryptorStreamType /* decoder_type */,
   1117                     uint32_t /* request_id */,
   1118                     PP_Bool /* success */)
   1119 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DecoderDeinitializeDone,
   1120                     PP_Instance /* instance */,
   1121                     PP_DecryptorStreamType /* decoder_type */,
   1122                     uint32_t /* request_id */)
   1123 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DecoderResetDone,
   1124                     PP_Instance /* instance */,
   1125                     PP_DecryptorStreamType /* decoder_type */,
   1126                     uint32_t /* request_id */)
   1127 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverFrame,
   1128                     PP_Instance /* instance */,
   1129                     PP_Resource /* decrypted_frame, PPB_Buffer_Dev */,
   1130                     std::string /* serialized_block_info */)
   1131 IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_DeliverSamples,
   1132                     PP_Instance /* instance */,
   1133                     PP_Resource /* audio_frames, PPB_Buffer_Dev */,
   1134                     std::string /* serialized_block_info */)
   1135 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
   1136 
   1137 // PPB_Testing.
   1138 IPC_SYNC_MESSAGE_ROUTED3_1(
   1139     PpapiHostMsg_PPBTesting_ReadImageData,
   1140     ppapi::HostResource /* device_context_2d */,
   1141     ppapi::HostResource /* image */,
   1142     PP_Point /* top_left */,
   1143     PP_Bool /* result */)
   1144 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance,
   1145                            PP_Instance /* instance */,
   1146                            uint32 /* result */)
   1147 IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBTesting_SimulateInputEvent,
   1148                            PP_Instance /* instance */,
   1149                            ppapi::InputEventData /* input_event */)
   1150 IPC_SYNC_MESSAGE_ROUTED1_0(
   1151     PpapiHostMsg_PPBTesting_SetMinimumArrayBufferSizeForShmem,
   1152     uint32_t /* threshold */)
   1153 
   1154 #if !defined(OS_NACL) && !defined(NACL_WIN64)
   1155 
   1156 // PPB_VideoDecoder_Dev.
   1157 // (Messages from plugin to renderer.)
   1158 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVideoDecoder_Create,
   1159                            PP_Instance /* instance */,
   1160                            ppapi::HostResource /* context */,
   1161                            PP_VideoDecoder_Profile /* profile */,
   1162                            ppapi::HostResource /* result */)
   1163 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode,
   1164                     ppapi::HostResource /* video_decoder */,
   1165                     ppapi::HostResource /* bitstream buffer */,
   1166                     int32 /* bitstream buffer id */,
   1167                     uint32 /* size of buffer */)
   1168 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers,
   1169                     ppapi::HostResource /* video_decoder */,
   1170                     std::vector<PP_PictureBuffer_Dev> /* picture buffers */)
   1171 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer,
   1172                     ppapi::HostResource /* video_decoder */,
   1173                     int32_t /* picture buffer id */)
   1174 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Flush,
   1175                     ppapi::HostResource /* video_decoder */)
   1176 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Reset,
   1177                     ppapi::HostResource /* video_decoder */)
   1178 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy,
   1179                            ppapi::HostResource /* video_decoder */)
   1180 
   1181 // PPB_VideoDecoder_Dev.
   1182 // (Messages from renderer to plugin to notify it to run callbacks.)
   1183 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK,
   1184                     ppapi::HostResource /* video_decoder */,
   1185                     int32_t /* bitstream buffer id */,
   1186                     int32_t /* PP_CompletionCallback result */)
   1187 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_FlushACK,
   1188                     ppapi::HostResource /* video_decoder */,
   1189                     int32_t /* PP_CompletionCallback result  */)
   1190 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_ResetACK,
   1191                     ppapi::HostResource /* video_decoder */,
   1192                     int32_t /* PP_CompletionCallback result */)
   1193 
   1194 // PPP_VideoDecoder_Dev.
   1195 IPC_MESSAGE_ROUTED4(PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers,
   1196                     ppapi::HostResource /* video_decoder */,
   1197                     uint32_t /* requested number of buffers */,
   1198                     PP_Size /* dimensions of buffers */,
   1199                     uint32_t /* texture_target */)
   1200 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer,
   1201                     ppapi::HostResource /* video_decoder */,
   1202                     int32_t /* picture buffer id */)
   1203 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady,
   1204                     ppapi::HostResource /* video_decoder */,
   1205                     PP_Picture_Dev /* output picture */)
   1206 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError,
   1207                     ppapi::HostResource /* video_decoder */,
   1208                     PP_VideoDecodeError_Dev /* error */)
   1209 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
   1210 
   1211 // PPB_X509Certificate_Private
   1212 IPC_SYNC_MESSAGE_CONTROL1_2(PpapiHostMsg_PPBX509Certificate_ParseDER,
   1213                             std::vector<char> /* der */,
   1214                             bool /* succeeded */,
   1215                             ppapi::PPB_X509Certificate_Fields /* result */)
   1216 
   1217 //-----------------------------------------------------------------------------
   1218 // Resource call/reply messages.
   1219 //
   1220 // These are the new-style resource implementations where the resource is only
   1221 // implemented in the proxy and "resource messages" are sent between this and a
   1222 // host object. Resource messages are a wrapper around some general routing
   1223 // information and a separate message of a type defined by the specific resource
   1224 // sending/receiving it. The extra paremeters allow the nested message to be
   1225 // routed automatically to the correct resource.
   1226 
   1227 // Notification that a resource has been created in the plugin. The nested
   1228 // message will be resource-type-specific.
   1229 IPC_MESSAGE_CONTROL3(PpapiHostMsg_ResourceCreated,
   1230                      ppapi::proxy::ResourceMessageCallParams /* call_params */,
   1231                      PP_Instance  /* instance */,
   1232                      IPC::Message /* nested_msg */)
   1233 
   1234 // Notification that a resource has been destroyed in the plugin.
   1235 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ResourceDestroyed,
   1236                      PP_Resource /* resource */)
   1237 
   1238 // Most resources are created by the plugin, which then sends a ResourceCreated
   1239 // message to create a corresponding ResourceHost in the renderer or browser
   1240 // host process. However, some resources are first created in the host and
   1241 // "pushed" or returned to the plugin.
   1242 //
   1243 // In this case, the host will create a "pending" ResourceHost object which
   1244 // is identified by an ID. The ID is sent to the plugin process and the
   1245 // PluginResource object is created. This message is sent from the plugin to
   1246 // the host process to connect the PluginResource and the pending ResourceHost
   1247 // (at which point, it's no longer pending).
   1248 IPC_MESSAGE_CONTROL2(PpapiHostMsg_AttachToPendingHost,
   1249                      PP_Resource /* resource */,
   1250                      int /* pending_host_id */)
   1251 
   1252 // A resource call is a request from the plugin to the host. It may or may not
   1253 // require a reply, depending on the params. The nested message will be
   1254 // resource-type-specific.
   1255 IPC_MESSAGE_CONTROL2(PpapiHostMsg_ResourceCall,
   1256                      ppapi::proxy::ResourceMessageCallParams /* call_params */,
   1257                      IPC::Message /* nested_msg */)
   1258 IPC_MESSAGE_CONTROL3(PpapiHostMsg_InProcessResourceCall,
   1259                      int /* routing_id */,
   1260                      ppapi::proxy::ResourceMessageCallParams /* call_params */,
   1261                      IPC::Message /* nested_msg */)
   1262 
   1263 // A resource reply is a response to a ResourceCall from a host to the
   1264 // plugin. The resource ID + sequence number in the params will correspond to
   1265 // that of the previous ResourceCall.
   1266 IPC_MESSAGE_CONTROL2(
   1267     PpapiPluginMsg_ResourceReply,
   1268     ppapi::proxy::ResourceMessageReplyParams /* reply_params */,
   1269     IPC::Message /* nested_msg */)
   1270 IPC_MESSAGE_ROUTED2(
   1271     PpapiHostMsg_InProcessResourceReply,
   1272     ppapi::proxy::ResourceMessageReplyParams /* reply_params */,
   1273     IPC::Message /* nested_msg */)
   1274 
   1275 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_ResourceSyncCall,
   1276     ppapi::proxy::ResourceMessageCallParams /* call_params */,
   1277     IPC::Message /* nested_msg */,
   1278     ppapi::proxy::ResourceMessageReplyParams /* reply_params */,
   1279     IPC::Message /* reply_msg */)
   1280 
   1281 // This message is sent from the renderer to the browser when it wants to create
   1282 // ResourceHosts in the browser. It contains the process ID of the plugin and
   1283 // the instance of the plugin for which to create the resource for. params
   1284 // contains the sequence number for the message to track the response.
   1285 // The nested messages are ResourceHost creation messages.
   1286 IPC_MESSAGE_CONTROL5(
   1287     PpapiHostMsg_CreateResourceHostsFromHost,
   1288     int /* routing_id */,
   1289     int /* child_process_id */,
   1290     ppapi::proxy::ResourceMessageCallParams /* params */,
   1291     PP_Instance /* instance */,
   1292     std::vector<IPC::Message> /* nested_msgs */)
   1293 
   1294 // This message is sent from the browser to the renderer when it has created
   1295 // ResourceHosts for the renderer. It contains the sequence number that was sent
   1296 // in the request and the IDs of the pending ResourceHosts which were created in
   1297 // the browser. These IDs are only useful for the plugin which can attach to the
   1298 // ResourceHosts in the browser.
   1299 IPC_MESSAGE_ROUTED2(
   1300     PpapiHostMsg_CreateResourceHostsFromHostReply,
   1301     int32_t /* sequence */,
   1302     std::vector<int> /* pending_host_ids */)
   1303 
   1304 //-----------------------------------------------------------------------------
   1305 // Messages for resources using call/reply above.
   1306 
   1307 // Broker ----------------------------------------------------------------------
   1308 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Broker_Create)
   1309 
   1310 // Queries whether the plugin has permission to connect to the Pepper broker.
   1311 // The response is contained in the error value of the
   1312 // ResourceMessageReplyParams in the reply message.
   1313 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Broker_IsAllowed)
   1314 
   1315 // UMA
   1316 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UMA_Create)
   1317 IPC_MESSAGE_CONTROL5(PpapiHostMsg_UMA_HistogramCustomTimes,
   1318                      std::string /* name */,
   1319                      int64_t /* sample */,
   1320                      int64_t /* min */,
   1321                      int64_t /* max */,
   1322                      uint32_t /* bucket_count */)
   1323 IPC_MESSAGE_CONTROL5(PpapiHostMsg_UMA_HistogramCustomCounts,
   1324                      std::string /* name */,
   1325                      int32_t /* sample */,
   1326                      int32_t /* min */,
   1327                      int32_t /* max */,
   1328                      uint32_t /* bucket_count */)
   1329 IPC_MESSAGE_CONTROL3(PpapiHostMsg_UMA_HistogramEnumeration,
   1330                      std::string /* name */,
   1331                      int32_t /* sample */,
   1332                      int32_t /* boundary_value */)
   1333 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UMA_IsCrashReportingEnabled);
   1334 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UMA_IsCrashReportingEnabledReply);
   1335 
   1336 // Compositor
   1337 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Compositor_Create)
   1338 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Compositor_CommitLayers,
   1339                      std::vector<ppapi::CompositorLayerData> /* layers */,
   1340                      bool /* reset */)
   1341 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Compositor_CommitLayersReply)
   1342 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_Compositor_ReleaseResource,
   1343                      int32_t /* id */,
   1344                      uint32_t /* sync_point */,
   1345                      bool /* is_lost */)
   1346 
   1347 // File chooser.
   1348 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileChooser_Create)
   1349 IPC_MESSAGE_CONTROL4(PpapiHostMsg_FileChooser_Show,
   1350                      bool /* save_as */,
   1351                      bool /* open_multiple */,
   1352                      std::string /* suggested_file_name */,
   1353                      std::vector<std::string> /* accept_mime_types */)
   1354 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileChooser_ShowReply,
   1355                      std::vector<ppapi::FileRefCreateInfo> /* files */)
   1356 
   1357 // FileIO
   1358 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Create)
   1359 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Open,
   1360                      PP_Resource /* file_ref_resource */,
   1361                      int32_t /* open_flags */)
   1362 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileIO_OpenReply,
   1363                      PP_Resource /* quota_file_system */,
   1364                      int64_t /* file_size */)
   1365 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_Close,
   1366                      ppapi::FileGrowth /* file_growth */)
   1367 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Touch,
   1368                      PP_Time /* last_access_time */,
   1369                      PP_Time /* last_modified_time */)
   1370 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_SetLength,
   1371                      int64_t /* length */)
   1372 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Flush)
   1373 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle)
   1374 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply)
   1375 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply)
   1376 
   1377 // FileRef
   1378 // Creates a FileRef to a path on an external file system. This message may
   1379 // only be sent from the renderer.
   1380 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_CreateForRawFS,
   1381                      base::FilePath /* external_path */)
   1382 
   1383 // Creates a FileRef to a path on a file system that uses fileapi.
   1384 // This message may be sent from the renderer or the plugin.
   1385 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_CreateForFileAPI,
   1386                      PP_Resource /* file_system */,
   1387                      std::string /* internal_path */)
   1388 
   1389 // Requests that the browser create a directory at the location indicated by
   1390 // the FileRef.
   1391 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_MakeDirectory,
   1392                      int32_t /* make_directory_flags */)
   1393 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_MakeDirectoryReply)
   1394 
   1395 // Requests that the browser update the last accessed and last modified times
   1396 // at the location indicated by the FileRef.
   1397 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_Touch,
   1398                      PP_Time /* last_accessed */,
   1399                      PP_Time /* last_modified */)
   1400 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_TouchReply)
   1401 
   1402 // Requests that the browser delete a file or directory at the location
   1403 // indicated by the FileRef.
   1404 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Delete)
   1405 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_DeleteReply)
   1406 
   1407 // Requests that the browser rename a file or directory at the location
   1408 // indicated by the FileRef.
   1409 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_Rename,
   1410                      PP_Resource /* new_file_ref */)
   1411 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_RenameReply)
   1412 
   1413 // Requests that the browser retrieve metadata information for a file or
   1414 // directory at the location indicated by the FileRef.
   1415 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Query)
   1416 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_QueryReply,
   1417                      PP_FileInfo /* file_info */)
   1418 
   1419 // Requests that the browser retrieve then entries in a directory at the
   1420 // location indicated by the FileRef.
   1421 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_ReadDirectoryEntries)
   1422 
   1423 // FileRefCreateInfo does not provide file type information, so two
   1424 // corresponding vectors are returned.
   1425 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileRef_ReadDirectoryEntriesReply,
   1426                      std::vector<ppapi::FileRefCreateInfo> /* files */,
   1427                      std::vector<PP_FileType> /* file_types */)
   1428 
   1429 // Requests that the browser reply with the absolute path to the indicated
   1430 // file.
   1431 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_GetAbsolutePath)
   1432 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_GetAbsolutePathReply,
   1433                      std::string /* absolute_path */)
   1434 
   1435 // FileSystem
   1436 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Create,
   1437                      PP_FileSystemType /* type */)
   1438 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Open,
   1439                      int64_t /* expected_size */)
   1440 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_OpenReply)
   1441 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_InitIsolatedFileSystem,
   1442                      std::string /* fsid */,
   1443                      PP_IsolatedFileSystemType_Private /* type */)
   1444 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_InitIsolatedFileSystemReply)
   1445 // Passed from renderer to browser. Creates an already-open file system with a
   1446 // given |root_url| and |file_system_type|.
   1447 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_CreateFromRenderer,
   1448                      std::string /* root_url */,
   1449                      PP_FileSystemType /* file_system_type */)
   1450 // Nested within a ResourceVar for file systems being passed from the renderer
   1451 // to the plugin. Creates an already-open file system resource on the plugin,
   1452 // linked to the existing resource host given in the ResourceVar.
   1453 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileSystem_CreateFromPendingHost,
   1454                      PP_FileSystemType /* file_system_type */)
   1455 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_ReserveQuota,
   1456                      int64_t /* amount */,
   1457                      ppapi::FileGrowthMap /* file_growths */)
   1458 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileSystem_ReserveQuotaReply,
   1459                      int64_t /* amount */,
   1460                      ppapi::FileSizeMap /* file_sizes */)
   1461 
   1462 // Gamepad.
   1463 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_Create)
   1464 
   1465 // Requests that the gamepad host send the shared memory handle to the plugin
   1466 // process.
   1467 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_RequestMemory)
   1468 
   1469 // Reply to a RequestMemory call. This supplies the shared memory handle. The
   1470 // actual handle is passed in the ReplyParams struct.
   1471 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory)
   1472 
   1473 
   1474 // Graphics2D, plugin -> host
   1475 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_Create,
   1476                      PP_Size /* size */,
   1477                      PP_Bool /* is_always_opaque */)
   1478 IPC_MESSAGE_CONTROL4(PpapiHostMsg_Graphics2D_PaintImageData,
   1479                      ppapi::HostResource /* image_data */,
   1480                      PP_Point /* top_left */,
   1481                      bool /* src_rect_specified */,
   1482                      PP_Rect /* src_rect */)
   1483 IPC_MESSAGE_CONTROL3(PpapiHostMsg_Graphics2D_Scroll,
   1484                      bool /* clip_specified */,
   1485                      PP_Rect /* clip */,
   1486                      PP_Point /* amount */)
   1487 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_ReplaceContents,
   1488                      ppapi::HostResource /* image_data */)
   1489 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_SetScale,
   1490                      float /* scale */)
   1491 
   1492 // Graphics2D, plugin -> host -> plugin
   1493 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_Flush,
   1494                      std::vector<ui::LatencyInfo> /* latency_info */)
   1495 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_FlushAck)
   1496 
   1497 IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_ReadImageData,
   1498                      PP_Resource /* image */,
   1499                      PP_Point /* top_left */)
   1500 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_ReadImageDataAck)
   1501 
   1502 // IsolatedFileSystem
   1503 IPC_MESSAGE_CONTROL0(PpapiHostMsg_IsolatedFileSystem_Create)
   1504 IPC_MESSAGE_CONTROL1(PpapiHostMsg_IsolatedFileSystem_BrowserOpen,
   1505                      PP_IsolatedFileSystemType_Private /* type */)
   1506 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_IsolatedFileSystem_BrowserOpenReply,
   1507                      std::string /* fsid */)
   1508 
   1509 // MediaStream -----------------------------------------------------------------
   1510 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamAudioTrack_CreateFromPendingHost,
   1511                      std::string /* track_id */)
   1512 IPC_MESSAGE_CONTROL1(
   1513     PpapiHostMsg_MediaStreamAudioTrack_Configure,
   1514     ppapi::MediaStreamAudioTrackShared::Attributes /* attributes */)
   1515 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_MediaStreamAudioTrack_ConfigureReply)
   1516 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamVideoTrack_CreateFromPendingHost,
   1517                      std::string /* track_id */)
   1518 IPC_MESSAGE_CONTROL0(PpapiHostMsg_MediaStreamVideoTrack_Create)
   1519 IPC_MESSAGE_CONTROL1(
   1520     PpapiHostMsg_MediaStreamVideoTrack_Configure,
   1521     ppapi::MediaStreamVideoTrackShared::Attributes /* attributes */)
   1522 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamVideoTrack_ConfigureReply,
   1523                      std::string /* track_id */)
   1524 
   1525 // Message for init buffers. It also takes a shared memory handle which is put
   1526 // in the outer ResourceReplyMessage.
   1527 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_MediaStreamTrack_InitBuffers,
   1528                      int32_t /* number_of_buffers */,
   1529                      int32_t /* buffer_size */,
   1530                      bool /* readonly */)
   1531 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamTrack_EnqueueBuffer,
   1532                      int32_t /* index */);
   1533 IPC_MESSAGE_CONTROL1(PpapiHostMsg_MediaStreamTrack_EnqueueBuffer,
   1534                      int32_t /* index */);
   1535 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamTrack_EnqueueBuffers,
   1536                      std::vector<int32_t> /* indices */);
   1537 IPC_MESSAGE_CONTROL0(PpapiHostMsg_MediaStreamTrack_Close)
   1538 
   1539 // NetworkMonitor.
   1540 IPC_MESSAGE_CONTROL0(PpapiHostMsg_NetworkMonitor_Create)
   1541 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_NetworkMonitor_NetworkList,
   1542                      ppapi::proxy::SerializedNetworkList /* network_list */)
   1543 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_NetworkMonitor_Forbidden)
   1544 
   1545 // NetworkProxy ----------------------------------------------------------------
   1546 IPC_MESSAGE_CONTROL0(PpapiHostMsg_NetworkProxy_Create)
   1547 
   1548 // Query the browser for the proxy server to use for the given URL.
   1549 IPC_MESSAGE_CONTROL1(PpapiHostMsg_NetworkProxy_GetProxyForURL,
   1550                      std::string /* url */)
   1551 
   1552 // Reply message for GetProxyForURL containing the proxy server.
   1553 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_NetworkProxy_GetProxyForURLReply,
   1554                      std::string /* proxy */)
   1555 
   1556 // TrueTypeFont.
   1557 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFontSingleton_Create)
   1558 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFontSingleton_GetFontFamilies)
   1559 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFontSingleton_GetFontFamiliesReply,
   1560                      std::vector<std::string> /* font_families */)
   1561 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TrueTypeFontSingleton_GetFontsInFamily,
   1562                      std::string /* family */)
   1563 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFontSingleton_GetFontsInFamilyReply,
   1564                      std::vector<ppapi::proxy::SerializedTrueTypeFontDesc>
   1565                          /* fonts */)
   1566 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TrueTypeFont_Create,
   1567                      ppapi::proxy::SerializedTrueTypeFontDesc /* desc */)
   1568 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFont_Describe)
   1569 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_DescribeReply,
   1570                      ppapi::proxy::SerializedTrueTypeFontDesc /* desc */)
   1571 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TrueTypeFont_GetTableTags)
   1572 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_GetTableTagsReply,
   1573                      std::vector<uint32_t> /* tags */)
   1574 IPC_MESSAGE_CONTROL3(PpapiHostMsg_TrueTypeFont_GetTable,
   1575                      uint32_t /* table */,
   1576                      int32_t /* offset */,
   1577                      int32_t /* max_data_length */)
   1578 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TrueTypeFont_GetTableReply,
   1579                      std::string /* data */)
   1580 
   1581 // Host Resolver ---------------------------------------------------------------
   1582 // Creates a PPB_HostResolver resource.
   1583 IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_Create)
   1584 
   1585 // Creates a PPB_HostResolver_Private resource.
   1586 IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_CreatePrivate)
   1587 
   1588 // Resolves the given hostname.
   1589 IPC_MESSAGE_CONTROL2(PpapiHostMsg_HostResolver_Resolve,
   1590                      ppapi::HostPortPair /* host_port */,
   1591                      PP_HostResolver_Private_Hint /* hint */)
   1592 
   1593 // This message is a reply to HostResolver_Resolve. On success,
   1594 // |canonical_name| contains the canonical name of the host; |net_address_list|
   1595 // is a list of network addresses. On failure, both fields are set to empty.
   1596 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolver_ResolveReply,
   1597                      std::string /* canonical_name */,
   1598                      std::vector<PP_NetAddress_Private> /* net_address_list */)
   1599 
   1600 // Platform Verification -------------------------------------------------------
   1601 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PlatformVerification_Create)
   1602 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PlatformVerification_ChallengePlatform,
   1603                      std::string /* service_id  */,
   1604                      std::vector<uint8_t> /* challenge */)
   1605 IPC_MESSAGE_CONTROL3(PpapiHostMsg_PlatformVerification_ChallengePlatformReply,
   1606                      std::vector<uint8_t> /* signed_data */,
   1607                      std::vector<uint8_t> /* signed_data_signature */,
   1608                      std::string /* platform_key_certificate */)
   1609 
   1610 // Printing.
   1611 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create)
   1612 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings)
   1613 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply,
   1614                      PP_PrintSettings_Dev /* print_settings */)
   1615 
   1616 // TCP Socket ------------------------------------------------------------------
   1617 // Creates a PPB_TCPSocket resource.
   1618 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Create,
   1619                      ppapi::TCPSocketVersion /* version */)
   1620 
   1621 // Creates a PPB_TCPSocket_Private resource.
   1622 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_CreatePrivate)
   1623 
   1624 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Bind,
   1625                      PP_NetAddress_Private /* net_addr */)
   1626 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_BindReply,
   1627                      PP_NetAddress_Private /* local_addr */)
   1628 IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPSocket_Connect,
   1629                      std::string /* host */,
   1630                      uint16_t /* port */)
   1631 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_ConnectWithNetAddress,
   1632                      PP_NetAddress_Private /* net_addr */)
   1633 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_TCPSocket_ConnectReply,
   1634                      PP_NetAddress_Private /* local_addr */,
   1635                      PP_NetAddress_Private /* remote_addr */)
   1636 IPC_MESSAGE_CONTROL4(PpapiHostMsg_TCPSocket_SSLHandshake,
   1637                      std::string /* server_name */,
   1638                      uint16_t /* server_port */,
   1639                      std::vector<std::vector<char> > /* trusted_certs */,
   1640                      std::vector<std::vector<char> > /* untrusted_certs */)
   1641 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_SSLHandshakeReply,
   1642                      ppapi::PPB_X509Certificate_Fields /* certificate_fields */)
   1643 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Read,
   1644                      int32_t /* bytes_to_read */)
   1645 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_ReadReply,
   1646                      std::string /* data */)
   1647 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Write,
   1648                      std::string /* data */)
   1649 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_WriteReply)
   1650 IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Listen,
   1651                      int32_t /* backlog */)
   1652 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_ListenReply)
   1653 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_Accept)
   1654 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_TCPSocket_AcceptReply,
   1655                      int /* pending_host_id*/,
   1656                      PP_NetAddress_Private /* local_addr */,
   1657                      PP_NetAddress_Private /* remote_addr */)
   1658 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_Close)
   1659 IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPSocket_SetOption,
   1660                      PP_TCPSocket_Option /* name */,
   1661                      ppapi::SocketOptionData /* value */)
   1662 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_SetOptionReply)
   1663 
   1664 // TCP Server Socket -----------------------------------------------------------
   1665 // Creates a PPB_TCPServerSocket_Private resource.
   1666 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_CreatePrivate)
   1667 
   1668 IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPServerSocket_Listen,
   1669                      PP_NetAddress_Private /* addr */,
   1670                      int32_t /* backlog */)
   1671 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPServerSocket_ListenReply,
   1672                      PP_NetAddress_Private /* local_addr */)
   1673 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_Accept)
   1674 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_TCPServerSocket_AcceptReply,
   1675                      int /* pending_resource_id */,
   1676                      PP_NetAddress_Private /* local_addr */,
   1677                      PP_NetAddress_Private /* remote_addr */)
   1678 IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_StopListening)
   1679 
   1680 // UDP Socket ------------------------------------------------------------------
   1681 // Creates a PPB_UDPSocket resource.
   1682 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Create)
   1683 
   1684 // Creates a PPB_UDPSocket_Private resource.
   1685 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_CreatePrivate)
   1686 
   1687 IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SetOption,
   1688                      PP_UDPSocket_Option /* name */,
   1689                      ppapi::SocketOptionData /* value */)
   1690 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UDPSocket_SetOptionReply)
   1691 IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_Bind,
   1692                      PP_NetAddress_Private /* net_addr */)
   1693 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_BindReply,
   1694                      PP_NetAddress_Private /* bound_addr */)
   1695 IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_RecvFrom,
   1696                      int32_t /* num_bytes */)
   1697 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_UDPSocket_RecvFromReply,
   1698                      std::string /* data */,
   1699                      PP_NetAddress_Private /* remote_addr */)
   1700 IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SendTo,
   1701                      std::string /* data */,
   1702                      PP_NetAddress_Private /* net_addr */)
   1703 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_SendToReply,
   1704                      int32_t /* bytes_written */)
   1705 IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Close)
   1706 
   1707 // URLLoader ------------------------------------------------------------------
   1708 
   1709 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Create)
   1710 
   1711 // These messages correspond to PPAPI calls and all should get a
   1712 // CallbackComplete message.
   1713 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_Open,
   1714                      ppapi::URLRequestInfoData /* request_data */)
   1715 
   1716 // The plugin can tell the host to defer a load to hold off on sending more
   1717 // data because the buffer in the plugin is full. When defers_loading is set to
   1718 // false, data streaming will resume.
   1719 //
   1720 // When auditing redirects (no auto follow) the load will be automatically
   1721 // deferred each time we get a redirect. The plugin will reset this to false
   1722 // by sending this message when it wants to continue following the redirect.
   1723 //
   1724 // When streaming data, the host may still send more data after this call (for
   1725 // example, it could already be in-flight at the time of this request).
   1726 IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_SetDeferLoading,
   1727                      bool /* defers_loading */)
   1728 
   1729 // Closes the URLLoader. There is no reply.
   1730 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Close)
   1731 
   1732 // Requests that cross-site restrictions be ignored. The plugin must have
   1733 // the private permission set. Otherwise this message will be ignored by the
   1734 // renderer. There is no reply.
   1735 IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_GrantUniversalAccess)
   1736 
   1737 // Push notification that a response is available.
   1738 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_ReceivedResponse,
   1739                      ppapi::URLResponseInfoData /* response */)
   1740 
   1741 // Push notification with load data from the renderer. It is a custom generated
   1742 // message with the response data (array of bytes stored via WriteData)
   1743 // appended.
   1744 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_URLLoader_SendData)
   1745 
   1746 // Push notification indicating that all data has been sent, either via
   1747 // SendData or by streaming it to a file. Note that since this is a push
   1748 // notification, we don't use the result field of the ResourceMessageReply.
   1749 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_FinishedLoading,
   1750                      int32_t /* result */)
   1751 
   1752 // Push notification from the renderer to the plugin to tell it about download
   1753 // and upload progress. This will only be sent if the plugin has requested
   1754 // progress updates, and only the fields requested by the plugin will be
   1755 // valid.
   1756 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_URLLoader_UpdateProgress,
   1757                      int64_t /* bytes_sent */,
   1758                      int64_t /* total_bytes_to_be_sent */,
   1759                      int64_t /* bytes_received */,
   1760                      int64_t /* total_bytes_to_be_received */)
   1761 
   1762 // Shared memory ---------------------------------------------------------------
   1763 
   1764 // Creates shared memory on the host side, returning a handle to the shared
   1765 // memory on the plugin and keeping the memory mapped in on the host.
   1766 // We return a "host handle_id" that can be mapped back to the
   1767 // handle on the host side by PpapiGlobals::UntrackSharedMemoryHandle().
   1768 IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory,
   1769                             PP_Instance /* instance */,
   1770                             uint32_t /* size */,
   1771                             int /* host_handle_id */,
   1772                             ppapi::proxy::SerializedHandle /* plugin_handle */)
   1773 
   1774 // MediaStream -----------------------------------------------------------------
   1775 
   1776 // VideoDestination Private.
   1777 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Create)
   1778 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDestination_Open,
   1779                      std::string /* stream_url */)
   1780 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDestination_OpenReply)
   1781 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDestination_PutFrame,
   1782                      ppapi::HostResource /* image_data */,
   1783                      PP_TimeTicks /* timestamp */)
   1784 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Close)
   1785 
   1786 // VideoSource Private.
   1787 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Create)
   1788 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoSource_Open,
   1789                      std::string /* stream_url */)
   1790 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply)
   1791 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame)
   1792 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoSource_GetFrameReply,
   1793                      ppapi::HostResource /* resource_id */,
   1794                      PP_ImageDataDesc /* image_data_desc */,
   1795                      PP_TimeTicks /* timestamp */)
   1796 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close)
   1797 
   1798 // WebSocket -------------------------------------------------------------------
   1799 
   1800 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create)
   1801 
   1802 // Establishes the connection to a server. This message requires
   1803 // WebSocket_ConnectReply as a reply message.
   1804 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect,
   1805                      std::string /* url */,
   1806                      std::vector<std::string> /* protocols */)
   1807 
   1808 // Closes established connection with graceful closing handshake. This message
   1809 // requires WebSocket_CloseReply as a reply message.
   1810 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Close,
   1811                      int32_t /* code */,
   1812                      std::string /* reason */)
   1813 
   1814 // Sends a text frame to the server. No reply is defined.
   1815 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendText,
   1816                      std::string /* message */)
   1817 
   1818 // Sends a binary frame to the server. No reply is defined.
   1819 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendBinary,
   1820                      std::vector<uint8_t> /* message */)
   1821 
   1822 // Fails the connection. This message invokes RFC6455 defined
   1823 // _Fail the WebSocket Connection_ operation. No reply is defined.
   1824 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_Fail,
   1825                      std::string /* message */)
   1826 
   1827 // This message is a reply to WebSocket_Connect. If the |url| and |protocols|
   1828 // are invalid, WebSocket_ConnectReply is issued immediately and it contains
   1829 // proper error code in its result. Otherwise, WebSocket_ConnectReply is sent
   1830 // with valid |url|, |protocol|, and result PP_OK. |protocol| is not a passed
   1831 // |protocols|, but a result of opening handshake negotiation. If the
   1832 // connection can not be established successfully, WebSocket_ConnectReply is
   1833 // not issued, but WebSocket_ClosedReply is sent instead.
   1834 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_WebSocket_ConnectReply,
   1835                      std::string /* url */,
   1836                      std::string /* protocol */)
   1837 
   1838 // This message is a reply to WebSocket_Close. If the operation fails,
   1839 // WebSocket_CloseReply is issued immediately and it contains PP_ERROR_FAILED.
   1840 // Otherwise, CloseReply will be issued after the closing handshake is
   1841 // finished. All arguments will be valid iff the result is PP_OK and it means
   1842 // that the client initiated closing handshake is finished gracefully.
   1843 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_CloseReply,
   1844                      uint64_t /* buffered_amount */,
   1845                      bool /* was_clean */,
   1846                      uint16_t /* code */,
   1847                      std::string /* reason */)
   1848 
   1849 // Unsolicited reply message to transmit a receiving text frame.
   1850 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveTextReply,
   1851                      std::string /* message */)
   1852 
   1853 // Unsolicited reply message to transmit a receiving binary frame.
   1854 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveBinaryReply,
   1855                      std::vector<uint8_t> /* message */)
   1856 
   1857 // Unsolicited reply message to notify a error on underlying network connetion.
   1858 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_WebSocket_ErrorReply)
   1859 
   1860 // Unsolicited reply message to update the buffered amount value.
   1861 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_BufferedAmountReply,
   1862                      uint64_t /* buffered_amount */)
   1863 
   1864 // Unsolicited reply message to update |state| because of incoming external
   1865 // events, e.g., protocol error, or unexpected network closure.
   1866 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_StateReply,
   1867                      int32_t /* state */)
   1868 
   1869 // Unsolicited reply message to notify that the connection is closed without
   1870 // any WebSocket_Close request. Server initiated closing handshake or
   1871 // unexpected network errors will invoke this message.
   1872 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply,
   1873                      uint64_t /* buffered_amount */,
   1874                      bool /* was_clean */,
   1875                      uint16_t /* code */,
   1876                      std::string /* reason */)
   1877 
   1878 // OutputProtection -----------------------------------------------------------
   1879 
   1880 IPC_MESSAGE_CONTROL0(PpapiHostMsg_OutputProtection_Create)
   1881 IPC_MESSAGE_CONTROL1(PpapiHostMsg_OutputProtection_EnableProtection,
   1882                      uint32_t /* desired_method_mask */)
   1883 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_OutputProtection_EnableProtectionReply)
   1884 IPC_MESSAGE_CONTROL0(PpapiHostMsg_OutputProtection_QueryStatus)
   1885 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_OutputProtection_QueryStatusReply,
   1886                      uint32_t /* link_mask */,
   1887                      uint32_t /* protection_mask */)
   1888 
   1889 // VideoDecoder ------------------------------------------------------
   1890 
   1891 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Create)
   1892 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoDecoder_Initialize,
   1893                      ppapi::HostResource /* graphics_context */,
   1894                      PP_VideoProfile /* profile */,
   1895                      bool /* allow_software_fallback */)
   1896 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_InitializeReply)
   1897 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDecoder_GetShm,
   1898                      uint32_t /* shm_id */,
   1899                      uint32_t /* shm_size */)
   1900 // On success, a shm handle is passed in the ReplyParams struct.
   1901 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_GetShmReply,
   1902                      uint32_t /* shm_size */)
   1903 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoDecoder_Decode,
   1904                      uint32_t /* shm_id */,
   1905                      uint32_t /* size */,
   1906                      int32_t /* decode_id */)
   1907 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_DecodeReply,
   1908                      uint32_t /* shm_id */)
   1909 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_VideoDecoder_RequestTextures,
   1910                      uint32_t /* num_textures */,
   1911                      PP_Size /* size */,
   1912                      uint32_t /* texture_target */,
   1913                      std::vector<gpu::Mailbox> /* mailboxes*/)
   1914 IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDecoder_AssignTextures,
   1915                      PP_Size /* size */,
   1916                      std::vector<uint32_t> /* texture_ids */)
   1917 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_VideoDecoder_PictureReady,
   1918                      int32_t /* decode_id */,
   1919                      uint32_t /* texture_id */)
   1920 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDecoder_RecyclePicture,
   1921                      uint32_t /* texture_id */)
   1922 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_DismissPicture,
   1923                      uint32_t /* texture_id */)
   1924 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Flush)
   1925 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_FlushReply)
   1926 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Reset)
   1927 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_ResetReply)
   1928 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_NotifyError,
   1929                      int32_t /* error */)
   1930 
   1931 #if !defined(OS_NACL) && !defined(NACL_WIN64)
   1932 
   1933 // Audio input.
   1934 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Create)
   1935 IPC_MESSAGE_CONTROL3(PpapiHostMsg_AudioInput_Open,
   1936                      std::string /* device_id */,
   1937                      PP_AudioSampleRate /* sample_rate */,
   1938                      uint32_t /* sample_frame_count */)
   1939 // Reply to an Open call. This supplies a socket handle and a shared memory
   1940 // handle. Both handles are passed in the ReplyParams struct.
   1941 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_AudioInput_OpenReply)
   1942 IPC_MESSAGE_CONTROL1(PpapiHostMsg_AudioInput_StartOrStop, bool /* capture */)
   1943 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Close)
   1944 
   1945 // BrowserFont -----------------------------------------------------------------
   1946 
   1947 IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_Create)
   1948 
   1949 // Requests that the browser reply with the list of font families via
   1950 // PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply.
   1951 IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_GetFontFamilies)
   1952 
   1953 // Reply to PpapiHostMsg_BrowserFontSingleton_GetFontFamilies with the font
   1954 // family list. The |families| result is encoded by separating each family name
   1955 // by a null character.
   1956 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply,
   1957                      std::string /* families */)
   1958 
   1959 // Flash -----------------------------------------------------------------------
   1960 
   1961 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_Create)
   1962 
   1963 // Message to notify the browser to register an update in system activity.
   1964 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_UpdateActivity)
   1965 
   1966 // Query the browser for the proxy server to use for the given URL.
   1967 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_GetProxyForURL, std::string /* url */)
   1968 // Reply message for GetProxyForURL containing the proxy server.
   1969 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetProxyForURLReply,
   1970                      std::string /* proxy */)
   1971 
   1972 // Queries the browser for the local time zone offset for a given time.
   1973 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_GetLocalTimeZoneOffset,
   1974                      base::Time /* time */)
   1975 // Reply to GetLocalTimeZoneOffset containing the time zone offset as a double.
   1976 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetLocalTimeZoneOffsetReply,
   1977                      double /* offset */)
   1978 
   1979 // Query the browser for the restrictions on storing Flash LSOs.
   1980 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_GetLocalDataRestrictions)
   1981 // Reply message for GetLocalDataRestrictions containing the restrictions to
   1982 // use. These are PP_FlashLSORestrictions cast to an int32_t.
   1983 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply,
   1984                      int32_t /* restrictions */)
   1985 
   1986 // Notifies the renderer whether the Flash instance is in windowed mode. No
   1987 // reply is sent.
   1988 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_SetInstanceAlwaysOnTop,
   1989                      bool /* on_top */)
   1990 
   1991 // Notifies the renderer to draw text to the given PP_ImageData resource. All
   1992 // parmeters for drawing (including the resource to draw to) are contianed in
   1993 // the PPBFlash_DrawGlyphs_Params structure. An error code is sent in a reply
   1994 // message indicating success.
   1995 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_DrawGlyphs,
   1996                      ppapi::proxy::PPBFlash_DrawGlyphs_Params /* params */)
   1997 
   1998 // Notifies the renderer to navigate to the given URL contained in the
   1999 // URLRequestInfoData. An error code is sent in a reply message indicating
   2000 // success.
   2001 IPC_MESSAGE_CONTROL3(PpapiHostMsg_Flash_Navigate,
   2002                      ppapi::URLRequestInfoData /* data */,
   2003                      std::string /* target */,
   2004                      bool /* from_user_action */)
   2005 
   2006 // Queries the renderer on whether the plugin instance is the topmost element
   2007 // in the area of the instance specified by the given PP_Rect. PP_OK is sent as
   2008 // the error code in a reply message if the rect is topmost otherwise
   2009 // PP_ERROR_FAILED is sent.
   2010 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_IsRectTopmost,
   2011                      PP_Rect /* rect */)
   2012 
   2013 // Notifies the renderer to invoke printing for the given plugin instance. No
   2014 // reply is sent.
   2015 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_InvokePrinting)
   2016 
   2017 // DeviceEnumeration -----------------------------------------------------------
   2018 // Device enumeration messages used by audio input and video capture.
   2019 IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_EnumerateDevices)
   2020 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_DeviceEnumeration_EnumerateDevicesReply,
   2021                      std::vector<ppapi::DeviceRefData> /* devices */)
   2022 IPC_MESSAGE_CONTROL1(PpapiHostMsg_DeviceEnumeration_MonitorDeviceChange,
   2023                      uint32_t /* callback_id */)
   2024 IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange)
   2025 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange,
   2026                      uint32_t /* callback_id */,
   2027                      std::vector<ppapi::DeviceRefData> /* devices */)
   2028 
   2029 // Flash clipboard.
   2030 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashClipboard_Create)
   2031 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_RegisterCustomFormat,
   2032                      std::string /* format_name */)
   2033 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply,
   2034                      uint32_t /* format */)
   2035 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_IsFormatAvailable,
   2036                      uint32_t /* clipboard_type */,
   2037                      uint32_t /* format */)
   2038 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_ReadData,
   2039                      uint32_t /* clipboard_type */,
   2040                      uint32_t /* format */)
   2041 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_ReadDataReply,
   2042                      std::string /* result */)
   2043 IPC_MESSAGE_CONTROL3(PpapiHostMsg_FlashClipboard_WriteData,
   2044                      uint32_t /* clipboard_type */,
   2045                      std::vector<uint32_t> /* formats */,
   2046                      std::vector<std::string> /* data */)
   2047 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_GetSequenceNumber,
   2048                      uint32_t /* clipboard_type */)
   2049 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_GetSequenceNumberReply,
   2050                      uint64_t /* sequence_number */)
   2051 
   2052 // Flash DRM.
   2053 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_Create)
   2054 
   2055 // Requests the device ID.
   2056 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetDeviceID)
   2057 // Reply for GetDeviceID which includes the device ID as a string.
   2058 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetDeviceIDReply,
   2059                      std::string /* id */)
   2060 
   2061 // Requests the HMONITOR corresponding to the monitor on which the instance is
   2062 // displayed.
   2063 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetHmonitor)
   2064 // Reply message for GetHmonitor which contains the HMONITOR as an int64_t.
   2065 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetHmonitorReply,
   2066                      int64_t /* hmonitor */)
   2067 
   2068 // Requests the voucher file which is used to verify the integrity of the Flash
   2069 // module. A PPB_FileRef resource will be created.
   2070 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_GetVoucherFile)
   2071 // Reply message for GetVoucherFile which contains the CreateInfo for a
   2072 // PPB_FileRef which points to the voucher file.
   2073 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_GetVoucherFileReply,
   2074                      ppapi::FileRefCreateInfo /* file_info */)
   2075 
   2076 // Requests a value indicating whether the monitor on which the instance is
   2077 // displayed is external.
   2078 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashDRM_MonitorIsExternal)
   2079 // Reply message for MonitorIsExternal which contains the value indicating if
   2080 // the monitor is external.
   2081 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashDRM_MonitorIsExternalReply,
   2082                      PP_Bool /* is_external */)
   2083 
   2084 // Flash file.
   2085 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFile_Create)
   2086 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_OpenFile,
   2087                      ppapi::PepperFilePath /* path */,
   2088                      int /* pp_open_flags */)
   2089 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_RenameFile,
   2090                      ppapi::PepperFilePath /* from_path */,
   2091                      ppapi::PepperFilePath /* to_path */)
   2092 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFile_DeleteFileOrDir,
   2093                      ppapi::PepperFilePath /* path */,
   2094                      bool /* recursive */)
   2095 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_CreateDir,
   2096                      ppapi::PepperFilePath /* path */)
   2097 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_QueryFile,
   2098                      ppapi::PepperFilePath /* path */)
   2099 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFile_QueryFileReply,
   2100                      base::File::Info /* file_info */)
   2101 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFile_GetDirContents,
   2102                      ppapi::PepperFilePath /* path */)
   2103 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFile_GetDirContentsReply,
   2104                      ppapi::DirContents /* entries */)
   2105 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFile_CreateTemporaryFile)
   2106 
   2107 // Flash font file.
   2108 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFontFile_Create,
   2109                      ppapi::proxy::SerializedFontDescription /* description */,
   2110                      PP_PrivateFontCharset /* charset */)
   2111 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFontFile_GetFontTable,
   2112                      uint32_t /* table */)
   2113 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFontFile_GetFontTableReply,
   2114                      std::string /* output */)
   2115 
   2116 // Flash fullscreen.
   2117 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashFullscreen_Create)
   2118 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFullscreen_SetFullscreen,
   2119                      bool /* fullscreen */)
   2120 
   2121 // FlashMenu.
   2122 
   2123 // Creates the flash menu with the given data.
   2124 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashMenu_Create,
   2125                      ppapi::proxy::SerializedFlashMenu /* menu_data */)
   2126 
   2127 // Shows the menu at the given location relative to the plugin instance.
   2128 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashMenu_Show,
   2129                      PP_Point /* location */)
   2130 
   2131 // Reply to a show command. If the resource reply is PP_OK, the selected_id
   2132 // will be the menu item ID chosen by the user.
   2133 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashMenu_ShowReply,
   2134                      int32_t /* selected_id */)
   2135 
   2136 // PPB_Flash_MessageLoop.
   2137 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Create,
   2138                            PP_Instance /* instance */,
   2139                            ppapi::HostResource /* result */)
   2140 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Run,
   2141                            ppapi::HostResource /* flash_message_loop */,
   2142                            int32_t /* result */)
   2143 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBFlashMessageLoop_Quit,
   2144                            ppapi::HostResource /* flash_message_loop */)
   2145 
   2146 // PDF ------------------------------------------------------------------------
   2147 
   2148 // Creates the PDF resource.
   2149 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_Create)
   2150 
   2151 // Requests the localized string for the given ID.
   2152 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_GetLocalizedString,
   2153                      PP_ResourceString /* string_id */)
   2154 // Reply for PpapiHostMsg_PDF_GetLocalizedString containing the localized
   2155 // string.
   2156 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_PDF_GetLocalizedStringReply,
   2157                      std::string /* localized_string*/)
   2158 
   2159 // Notifies the renderer that the PDF started loading.
   2160 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_DidStartLoading)
   2161 
   2162 // Notifies the renderer that the PDF stopped loading.
   2163 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_DidStopLoading)
   2164 
   2165 // Sets any restrictions on the PDF content.
   2166 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetContentRestriction,
   2167                      int /* restrictions */)
   2168 
   2169 // Requests that the specified action be recorded with UMA.
   2170 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_UserMetricsRecordAction,
   2171                      std::string /* action */)
   2172 
   2173 // Notifies the renderer that the current PDF uses an unsupported feature.
   2174 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_HasUnsupportedFeature)
   2175 
   2176 // Notifies the renderer to print the current PDF.
   2177 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_Print)
   2178 
   2179 // Notifies the renderer to save the current PDF.
   2180 IPC_MESSAGE_CONTROL0(PpapiHostMsg_PDF_SaveAs)
   2181 
   2182 // Requests a resource image for the plugin at a particular scale.
   2183 IPC_MESSAGE_CONTROL2(PpapiHostMsg_PDF_GetResourceImage,
   2184                      PP_ResourceImage /* image_id */,
   2185                      float /* scale */)
   2186 
   2187 // Reply for PpapiHostMsg_PDF_GetResourceImage containing the host resource id
   2188 // of the image and a PP_ImageDataDesc which describes the image. Also carries
   2189 // a shared memory handle pointing to the memory containg the image.
   2190 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_PDF_GetResourceImageReply,
   2191                      ppapi::HostResource /* resource_id */,
   2192                      PP_ImageDataDesc /* image_data_desc */)
   2193 
   2194 // Called by the plugin when its selection changes.
   2195 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetSelectedText,
   2196                      base::string16 /* selected_text */)
   2197 
   2198 // Called by the plugin to set the link under the cursor.
   2199 IPC_MESSAGE_CONTROL1(PpapiHostMsg_PDF_SetLinkUnderCursor,
   2200                      std::string /* url */)
   2201 
   2202 // VideoCapture_Dev, plugin -> host
   2203 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Create)
   2204 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StartCapture)
   2205 IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoCapture_ReuseBuffer,
   2206                      uint32_t /* buffer */)
   2207 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StopCapture)
   2208 IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Close)
   2209 
   2210 // VideoCapture_Dev, plugin -> host -> plugin
   2211 IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoCapture_Open,
   2212                      std::string /* device_id */,
   2213                      PP_VideoCaptureDeviceInfo_Dev /* requested_info */,
   2214                      uint32_t /* buffer_count */)
   2215 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoCapture_OpenReply)
   2216 
   2217 // VideoCapture_Dev, host -> plugin
   2218 IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoCapture_OnDeviceInfo,
   2219                      PP_VideoCaptureDeviceInfo_Dev /* info */,
   2220                      std::vector<ppapi::HostResource> /* buffers */,
   2221                      uint32_t /* buffer_size */)
   2222 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnStatus,
   2223                      uint32_t /* status */)
   2224 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnError,
   2225                      uint32_t /* error */)
   2226 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnBufferReady,
   2227                      uint32_t /* buffer */)
   2228 
   2229 // Talk ------------------------------------------------------------------------
   2230 
   2231 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_Create)
   2232 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Talk_RequestPermission,
   2233                      PP_TalkPermission /* permission */)
   2234 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_RequestPermissionReply)
   2235 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StartRemoting)
   2236 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StartRemotingReply)
   2237 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Talk_StopRemoting)
   2238 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Talk_StopRemotingReply)
   2239 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Talk_NotifyEvent, PP_TalkEvent /* event */)
   2240 
   2241 #endif  // !defined(OS_NACL) && !defined(NACL_WIN64)
   2242