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