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