| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Multiply-included message header, no traditional include guard. | 5 // Multiply-included message header, no traditional include guard. |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "ppapi/c/dev/ppp_printing_dev.h" | 25 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 26 #include "ppapi/c/pp_bool.h" | 26 #include "ppapi/c/pp_bool.h" |
| 27 #include "ppapi/c/pp_file_info.h" | 27 #include "ppapi/c/pp_file_info.h" |
| 28 #include "ppapi/c/pp_instance.h" | 28 #include "ppapi/c/pp_instance.h" |
| 29 #include "ppapi/c/pp_module.h" | 29 #include "ppapi/c/pp_module.h" |
| 30 #include "ppapi/c/pp_point.h" | 30 #include "ppapi/c/pp_point.h" |
| 31 #include "ppapi/c/pp_rect.h" | 31 #include "ppapi/c/pp_rect.h" |
| 32 #include "ppapi/c/pp_resource.h" | 32 #include "ppapi/c/pp_resource.h" |
| 33 #include "ppapi/c/pp_size.h" | 33 #include "ppapi/c/pp_size.h" |
| 34 #include "ppapi/c/pp_time.h" | 34 #include "ppapi/c/pp_time.h" |
| 35 #include "ppapi/c/ppb_audio_config.h" |
| 35 #include "ppapi/c/private/pp_content_decryptor.h" | 36 #include "ppapi/c/private/pp_content_decryptor.h" |
| 36 #include "ppapi/c/private/pp_private_font_charset.h" | 37 #include "ppapi/c/private/pp_private_font_charset.h" |
| 37 #include "ppapi/c/private/ppb_flash.h" | 38 #include "ppapi/c/private/ppb_flash.h" |
| 38 #include "ppapi/c/private/ppb_host_resolver_private.h" | 39 #include "ppapi/c/private/ppb_host_resolver_private.h" |
| 39 #include "ppapi/c/private/ppb_net_address_private.h" | 40 #include "ppapi/c/private/ppb_net_address_private.h" |
| 40 #include "ppapi/c/private/ppb_tcp_socket_private.h" | 41 #include "ppapi/c/private/ppb_tcp_socket_private.h" |
| 41 #include "ppapi/c/private/ppb_udp_socket_private.h" | 42 #include "ppapi/c/private/ppb_udp_socket_private.h" |
| 42 #include "ppapi/c/private/ppp_flash_browser_operations.h" | 43 #include "ppapi/c/private/ppp_flash_browser_operations.h" |
| 43 #include "ppapi/proxy/ppapi_param_traits.h" | 44 #include "ppapi/proxy/ppapi_param_traits.h" |
| 44 #include "ppapi/proxy/ppapi_proxy_export.h" | 45 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 45 #include "ppapi/proxy/resource_message_params.h" | 46 #include "ppapi/proxy/resource_message_params.h" |
| 46 #include "ppapi/proxy/serialized_flash_menu.h" | 47 #include "ppapi/proxy/serialized_flash_menu.h" |
| 47 #include "ppapi/proxy/serialized_structs.h" | 48 #include "ppapi/proxy/serialized_structs.h" |
| 48 #include "ppapi/proxy/serialized_var.h" | 49 #include "ppapi/proxy/serialized_var.h" |
| 49 #include "ppapi/shared_impl/ppapi_preferences.h" | 50 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 50 #include "ppapi/shared_impl/ppb_device_ref_shared.h" | 51 #include "ppapi/shared_impl/ppb_device_ref_shared.h" |
| 51 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 52 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 52 #include "ppapi/shared_impl/ppb_network_list_private_shared.h" | 53 #include "ppapi/shared_impl/ppb_network_list_private_shared.h" |
| 53 #include "ppapi/shared_impl/ppb_view_shared.h" | 54 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 54 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" | 55 #include "ppapi/shared_impl/ppp_flash_browser_operations_shared.h" |
| 55 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" | 56 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" |
| 56 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" | 57 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" |
| 57 #include "ppapi/shared_impl/url_request_info_data.h" | 58 #include "ppapi/shared_impl/url_request_info_data.h" |
| 58 | 59 |
| 59 #undef IPC_MESSAGE_EXPORT | 60 #undef IPC_MESSAGE_EXPORT |
| 60 #define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT | 61 #define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT |
| 61 | 62 |
| 62 #define IPC_MESSAGE_START PpapiMsgStart | 63 #define IPC_MESSAGE_START PpapiMsgStart |
| 63 | 64 |
| 65 IPC_ENUM_TRAITS(PP_AudioSampleRate) |
| 64 IPC_ENUM_TRAITS(PP_DeviceType_Dev) | 66 IPC_ENUM_TRAITS(PP_DeviceType_Dev) |
| 65 IPC_ENUM_TRAITS(PP_DecryptorStreamType) | 67 IPC_ENUM_TRAITS(PP_DecryptorStreamType) |
| 66 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission) | 68 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission) |
| 67 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType) | 69 IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType) |
| 68 IPC_ENUM_TRAITS(PP_FlashSetting) | 70 IPC_ENUM_TRAITS(PP_FlashSetting) |
| 69 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton) | 71 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton) |
| 70 IPC_ENUM_TRAITS(PP_InputEvent_Type) | 72 IPC_ENUM_TRAITS(PP_InputEvent_Type) |
| 71 IPC_ENUM_TRAITS(PP_NetAddressFamily_Private) | 73 IPC_ENUM_TRAITS(PP_NetAddressFamily_Private) |
| 72 IPC_ENUM_TRAITS(PP_NetworkListState_Private) | 74 IPC_ENUM_TRAITS(PP_NetworkListState_Private) |
| 73 IPC_ENUM_TRAITS(PP_NetworkListType_Private) | 75 IPC_ENUM_TRAITS(PP_NetworkListType_Private) |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 // result codes. | 411 // result codes. |
| 410 // | 412 // |
| 411 // The handler of this message should always close all of the handles passed | 413 // The handler of this message should always close all of the handles passed |
| 412 // in, since some could be valid even in the error case. | 414 // in, since some could be valid even in the error case. |
| 413 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudio_NotifyAudioStreamCreated, | 415 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudio_NotifyAudioStreamCreated, |
| 414 ppapi::HostResource /* audio_id */, | 416 ppapi::HostResource /* audio_id */, |
| 415 int32_t /* result_code (will be != PP_OK on failure) */, | 417 int32_t /* result_code (will be != PP_OK on failure) */, |
| 416 ppapi::proxy::SerializedHandle /* socket_handle */, | 418 ppapi::proxy::SerializedHandle /* socket_handle */, |
| 417 ppapi::proxy::SerializedHandle /* handle */) | 419 ppapi::proxy::SerializedHandle /* handle */) |
| 418 | 420 |
| 419 // PPB_AudioInput_Dev. | |
| 420 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBAudioInput_EnumerateDevicesACK, | |
| 421 ppapi::HostResource /* audio_input */, | |
| 422 int32_t /* result */, | |
| 423 std::vector<ppapi::DeviceRefData> /* devices */) | |
| 424 IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudioInput_OpenACK, | |
| 425 ppapi::HostResource /* audio_input */, | |
| 426 int32_t /* result_code (will be != PP_OK on failure) */, | |
| 427 ppapi::proxy::SerializedHandle /* socket_handle */, | |
| 428 ppapi::proxy::SerializedHandle /* handle */) | |
| 429 | |
| 430 // PPB_FileIO. | 421 // PPB_FileIO. |
| 431 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBFileIO_GeneralComplete, | 422 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBFileIO_GeneralComplete, |
| 432 ppapi::HostResource /* file_io */, | 423 ppapi::HostResource /* file_io */, |
| 433 int32_t /* result */) | 424 int32_t /* result */) |
| 434 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBFileIO_OpenFileComplete, | 425 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBFileIO_OpenFileComplete, |
| 435 ppapi::HostResource /* file_io */, | 426 ppapi::HostResource /* file_io */, |
| 436 int32_t /* result */) | 427 int32_t /* result */) |
| 437 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBFileIO_QueryComplete, | 428 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBFileIO_QueryComplete, |
| 438 ppapi::HostResource /* file_io */, | 429 ppapi::HostResource /* file_io */, |
| 439 int32_t /* result */, | 430 int32_t /* result */, |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 // PPB_Audio. | 827 // PPB_Audio. |
| 837 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create, | 828 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create, |
| 838 PP_Instance /* instance_id */, | 829 PP_Instance /* instance_id */, |
| 839 int32_t /* sample_rate */, | 830 int32_t /* sample_rate */, |
| 840 uint32_t /* sample_frame_count */, | 831 uint32_t /* sample_frame_count */, |
| 841 ppapi::HostResource /* result */) | 832 ppapi::HostResource /* result */) |
| 842 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop, | 833 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop, |
| 843 ppapi::HostResource /* audio_id */, | 834 ppapi::HostResource /* audio_id */, |
| 844 bool /* play */) | 835 bool /* play */) |
| 845 | 836 |
| 846 // PPB_AudioInput. | |
| 847 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBAudioInput_Create, | |
| 848 PP_Instance /* instance */, | |
| 849 ppapi::HostResource /* result */) | |
| 850 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBAudioInput_EnumerateDevices, | |
| 851 ppapi::HostResource /* audio_input */) | |
| 852 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBAudioInput_Open, | |
| 853 ppapi::HostResource /* audio_input */, | |
| 854 std::string /* device_id */, | |
| 855 int32_t /* sample_rate */, | |
| 856 uint32_t /* sample_frame_count */) | |
| 857 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudioInput_StartOrStop, | |
| 858 ppapi::HostResource /* audio_input */, | |
| 859 bool /* capture */) | |
| 860 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBAudioInput_Close, | |
| 861 ppapi::HostResource /* audio_input */) | |
| 862 | |
| 863 // PPB_Core. | 837 // PPB_Core. |
| 864 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource, | 838 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource, |
| 865 ppapi::HostResource) | 839 ppapi::HostResource) |
| 866 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, | 840 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, |
| 867 ppapi::HostResource) | 841 ppapi::HostResource) |
| 868 | 842 |
| 869 // PPB_FileIO. | 843 // PPB_FileIO. |
| 870 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFileIO_Create, | 844 IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFileIO_Create, |
| 871 PP_Instance /* instance */, | 845 PP_Instance /* instance */, |
| 872 ppapi::HostResource /* result */) | 846 ppapi::HostResource /* result */) |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 // actual handle is passed in the ReplyParams struct. | 1593 // actual handle is passed in the ReplyParams struct. |
| 1620 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory) | 1594 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory) |
| 1621 | 1595 |
| 1622 // Printing. | 1596 // Printing. |
| 1623 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) | 1597 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) |
| 1624 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) | 1598 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) |
| 1625 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, | 1599 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, |
| 1626 PP_PrintSettings_Dev /* print_settings */) | 1600 PP_PrintSettings_Dev /* print_settings */) |
| 1627 | 1601 |
| 1628 // WebSocket ------------------------------------------------------------------ | 1602 // WebSocket ------------------------------------------------------------------ |
| 1629 | |
| 1630 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) | 1603 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) |
| 1631 | 1604 |
| 1632 // Establishes the connection to a server. This message requires | 1605 // Establishes the connection to a server. This message requires |
| 1633 // WebSocket_ConnectReply as a reply message. | 1606 // WebSocket_ConnectReply as a reply message. |
| 1634 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, | 1607 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, |
| 1635 std::string /* url */, | 1608 std::string /* url */, |
| 1636 std::vector<std::string> /* protocols */) | 1609 std::vector<std::string> /* protocols */) |
| 1637 | 1610 |
| 1638 // Closes established connection with graceful closing handshake. This message | 1611 // Closes established connection with graceful closing handshake. This message |
| 1639 // requires WebSocket_CloseReply as a reply message. | 1612 // requires WebSocket_CloseReply as a reply message. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 // any WebSocket_Close request. Server initiated closing handshake or | 1673 // any WebSocket_Close request. Server initiated closing handshake or |
| 1701 // unexpected network errors will invoke this message. | 1674 // unexpected network errors will invoke this message. |
| 1702 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply, | 1675 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply, |
| 1703 unsigned long /* buffered_amount */, | 1676 unsigned long /* buffered_amount */, |
| 1704 bool /* was_clean */, | 1677 bool /* was_clean */, |
| 1705 unsigned short /* code */, | 1678 unsigned short /* code */, |
| 1706 std::string /* reason */) | 1679 std::string /* reason */) |
| 1707 | 1680 |
| 1708 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 1681 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
| 1709 | 1682 |
| 1683 // Audio input. |
| 1684 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Create) |
| 1685 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_EnumerateDevices) |
| 1686 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_AudioInput_EnumerateDevicesReply, |
| 1687 std::vector<ppapi::DeviceRefData> /* devices */) |
| 1688 IPC_MESSAGE_CONTROL3(PpapiHostMsg_AudioInput_Open, |
| 1689 std::string /* device_id */, |
| 1690 PP_AudioSampleRate /* sample_rate */, |
| 1691 uint32_t /* sample_frame_count */) |
| 1692 // Reply to an Open call. This supplies a socket handle and a shared memory |
| 1693 // handle. Both handles are passed in the ReplyParams struct. |
| 1694 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_AudioInput_OpenReply) |
| 1695 IPC_MESSAGE_CONTROL1(PpapiHostMsg_AudioInput_StartOrStop, bool /* capture */) |
| 1696 IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Close) |
| 1697 |
| 1710 // Flash clipboard. | 1698 // Flash clipboard. |
| 1711 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashClipboard_Create) | 1699 IPC_MESSAGE_CONTROL0(PpapiHostMsg_FlashClipboard_Create) |
| 1712 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_RegisterCustomFormat, | 1700 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashClipboard_RegisterCustomFormat, |
| 1713 std::string /* format_name */) | 1701 std::string /* format_name */) |
| 1714 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply, | 1702 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply, |
| 1715 uint32_t /* format */) | 1703 uint32_t /* format */) |
| 1716 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_IsFormatAvailable, | 1704 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_IsFormatAvailable, |
| 1717 uint32_t /* clipboard_type */, | 1705 uint32_t /* clipboard_type */, |
| 1718 uint32_t /* format */) | 1706 uint32_t /* format */) |
| 1719 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_ReadData, | 1707 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashClipboard_ReadData, |
| 1720 uint32_t /* clipboard_type */, | 1708 uint32_t /* clipboard_type */, |
| 1721 uint32_t /* format */) | 1709 uint32_t /* format */) |
| 1722 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_ReadDataReply, | 1710 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashClipboard_ReadDataReply, |
| 1723 std::string /* result */) | 1711 std::string /* result */) |
| 1724 IPC_MESSAGE_CONTROL3(PpapiHostMsg_FlashClipboard_WriteData, | 1712 IPC_MESSAGE_CONTROL3(PpapiHostMsg_FlashClipboard_WriteData, |
| 1725 uint32_t /* clipboard_type */, | 1713 uint32_t /* clipboard_type */, |
| 1726 std::vector<uint32_t> /* formats */, | 1714 std::vector<uint32_t> /* formats */, |
| 1727 std::vector<std::string> /* data */) | 1715 std::vector<std::string> /* data */) |
| 1716 |
| 1728 // Flash font file. | 1717 // Flash font file. |
| 1729 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFontFile_Create, | 1718 IPC_MESSAGE_CONTROL2(PpapiHostMsg_FlashFontFile_Create, |
| 1730 ppapi::proxy::SerializedFontDescription /* description */, | 1719 ppapi::proxy::SerializedFontDescription /* description */, |
| 1731 PP_PrivateFontCharset /* charset */) | 1720 PP_PrivateFontCharset /* charset */) |
| 1732 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFontFile_GetFontTable, | 1721 IPC_MESSAGE_CONTROL1(PpapiHostMsg_FlashFontFile_GetFontTable, |
| 1733 uint32_t /* table */) | 1722 uint32_t /* table */) |
| 1734 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFontFile_GetFontTableReply, | 1723 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FlashFontFile_GetFontTableReply, |
| 1735 std::string /* output */) | 1724 std::string /* output */) |
| 1736 | 1725 |
| 1737 // Flash functions. | 1726 // Flash functions. |
| 1738 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_Create) | 1727 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Flash_Create) |
| 1739 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_EnumerateVideoCaptureDevices, | 1728 IPC_MESSAGE_CONTROL1(PpapiHostMsg_Flash_EnumerateVideoCaptureDevices, |
| 1740 ppapi::HostResource /* video_capture */) | 1729 ppapi::HostResource /* video_capture */) |
| 1741 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply, | 1730 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Flash_EnumerateVideoCaptureDevicesReply, |
| 1742 std::vector<ppapi::DeviceRefData> /* devices */) | 1731 std::vector<ppapi::DeviceRefData> /* devices */) |
| 1743 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) | 1732 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
| OLD | NEW |