diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 01:45:33 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 01:45:33 +0000 |
commit | 3391ebb097b95feb8587b1ae43ee1cc47e601f79 (patch) | |
tree | e2a0c9cef329b7801548f81232cc8e488158dfb5 /ppapi/native_client | |
parent | 4e7b8920056148dc43d0af4f45b6498890ea2979 (diff) | |
download | chromium_src-3391ebb097b95feb8587b1ae43ee1cc47e601f79.zip chromium_src-3391ebb097b95feb8587b1ae43ee1cc47e601f79.tar.gz chromium_src-3391ebb097b95feb8587b1ae43ee1cc47e601f79.tar.bz2 |
Add GetSequenceNumber function to PPB_Flash_Clipboard
This provides access to a sequence number which identifies the clipboard state.
BUG=333094
Review URL: https://codereview.chromium.org/136183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r-- | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 16567e4..9e7a8b6 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -208,6 +208,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_12_6; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_13_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_4_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_0; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DeviceID_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DRM_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DRM_1_1; @@ -2900,6 +2901,35 @@ static int32_t Pnacl_M24_PPB_Flash_Clipboard_WriteData(PP_Instance instance_id, /* End wrapper methods for PPB_Flash_Clipboard_5_0 */ +/* Begin wrapper methods for PPB_Flash_Clipboard_5_1 */ + +static uint32_t Pnacl_M34_PPB_Flash_Clipboard_RegisterCustomFormat(PP_Instance instance_id, const char* format_name) { + const struct PPB_Flash_Clipboard_5_1 *iface = Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1.real_iface; + return iface->RegisterCustomFormat(instance_id, format_name); +} + +static PP_Bool Pnacl_M34_PPB_Flash_Clipboard_IsFormatAvailable(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format) { + const struct PPB_Flash_Clipboard_5_1 *iface = Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1.real_iface; + return iface->IsFormatAvailable(instance_id, clipboard_type, format); +} + +static void Pnacl_M34_PPB_Flash_Clipboard_ReadData(struct PP_Var* _struct_result, PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format) { + const struct PPB_Flash_Clipboard_5_1 *iface = Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1.real_iface; + *_struct_result = iface->ReadData(instance_id, clipboard_type, format); +} + +static int32_t Pnacl_M34_PPB_Flash_Clipboard_WriteData(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t data_item_count, const uint32_t formats[], const struct PP_Var data_items[]) { + const struct PPB_Flash_Clipboard_5_1 *iface = Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1.real_iface; + return iface->WriteData(instance_id, clipboard_type, data_item_count, formats, data_items); +} + +static PP_Bool Pnacl_M34_PPB_Flash_Clipboard_GetSequenceNumber(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint64_t* sequence_number) { + const struct PPB_Flash_Clipboard_5_1 *iface = Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1.real_iface; + return iface->GetSequenceNumber(instance_id, clipboard_type, sequence_number); +} + +/* End wrapper methods for PPB_Flash_Clipboard_5_1 */ + /* Begin wrapper methods for PPB_Flash_DeviceID_1_0 */ static PP_Resource Pnacl_M21_PPB_Flash_DeviceID_Create(PP_Instance instance) { @@ -4914,6 +4944,14 @@ static struct PPB_Flash_Clipboard_5_0 Pnacl_Wrappers_PPB_Flash_Clipboard_5_0 = { .WriteData = (int32_t (*)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t data_item_count, const uint32_t formats[], const struct PP_Var data_items[]))&Pnacl_M24_PPB_Flash_Clipboard_WriteData }; +static struct PPB_Flash_Clipboard_5_1 Pnacl_Wrappers_PPB_Flash_Clipboard_5_1 = { + .RegisterCustomFormat = (uint32_t (*)(PP_Instance instance_id, const char* format_name))&Pnacl_M34_PPB_Flash_Clipboard_RegisterCustomFormat, + .IsFormatAvailable = (PP_Bool (*)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format))&Pnacl_M34_PPB_Flash_Clipboard_IsFormatAvailable, + .ReadData = (struct PP_Var (*)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format))&Pnacl_M34_PPB_Flash_Clipboard_ReadData, + .WriteData = (int32_t (*)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t data_item_count, const uint32_t formats[], const struct PP_Var data_items[]))&Pnacl_M34_PPB_Flash_Clipboard_WriteData, + .GetSequenceNumber = (PP_Bool (*)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint64_t* sequence_number))&Pnacl_M34_PPB_Flash_Clipboard_GetSequenceNumber +}; + static struct PPB_Flash_DeviceID_1_0 Pnacl_Wrappers_PPB_Flash_DeviceID_1_0 = { .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M21_PPB_Flash_DeviceID_Create, .GetDeviceID = (int32_t (*)(PP_Resource device_id, struct PP_Var* id, struct PP_CompletionCallback callback))&Pnacl_M21_PPB_Flash_DeviceID_GetDeviceID @@ -5662,6 +5700,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_0 = { .real_iface = NULL }; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1 = { + .iface_macro = PPB_FLASH_CLIPBOARD_INTERFACE_5_1, + .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Flash_Clipboard_5_1, + .real_iface = NULL +}; + static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_DeviceID_1_0 = { .iface_macro = PPB_FLASH_DEVICEID_INTERFACE_1_0, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Flash_DeviceID_1_0, @@ -5923,6 +5967,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_Flash_13_0, &Pnacl_WrapperInfo_PPB_Flash_Clipboard_4_0, &Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_0, + &Pnacl_WrapperInfo_PPB_Flash_Clipboard_5_1, &Pnacl_WrapperInfo_PPB_Flash_DeviceID_1_0, &Pnacl_WrapperInfo_PPB_Flash_DRM_1_0, &Pnacl_WrapperInfo_PPB_Flash_DRM_1_1, |