| Index: ppapi/c/private/ppb_flash_clipboard.h
|
| diff --git a/ppapi/c/private/ppb_flash_clipboard.h b/ppapi/c/private/ppb_flash_clipboard.h
|
| index 3498d6104ace4bc7cffa70a20059ca7de69e52e8..5da06cc6e68047b17137d5f3c5458f0a09cb5642 100644
|
| --- a/ppapi/c/private/ppb_flash_clipboard.h
|
| +++ b/ppapi/c/private/ppb_flash_clipboard.h
|
| @@ -3,7 +3,7 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -/* From private/ppb_flash_clipboard.idl modified Wed Mar 28 16:49:38 2012. */
|
| +/* From private/ppb_flash_clipboard.idl modified Mon Oct 29 12:51:16 2012. */
|
|
|
| #ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
|
| #define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
|
| @@ -14,9 +14,9 @@
|
| #include "ppapi/c/pp_stdint.h"
|
| #include "ppapi/c/pp_var.h"
|
|
|
| -#define PPB_FLASH_CLIPBOARD_INTERFACE_3_0 "PPB_Flash_Clipboard;3.0"
|
| #define PPB_FLASH_CLIPBOARD_INTERFACE_4_0 "PPB_Flash_Clipboard;4.0"
|
| -#define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_4_0
|
| +#define PPB_FLASH_CLIPBOARD_INTERFACE_5_0 "PPB_Flash_Clipboard;5.0"
|
| +#define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_5_0
|
|
|
| /**
|
| * @file
|
| @@ -26,12 +26,6 @@
|
|
|
|
|
| /**
|
| - * The old version string for this interface, equivalent to version 3.0.
|
| - * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184
|
| - */
|
| -#define PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY "PPB_Flash_Clipboard;3"
|
| -
|
| -/**
|
| * @addtogroup Enums
|
| * @{
|
| */
|
| @@ -48,7 +42,7 @@ typedef enum {
|
| PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Type, 4);
|
|
|
| /**
|
| - * This enumeration contains the supported clipboard data formats.
|
| + * This enumeration contains the predfined clipboard data formats.
|
| */
|
| typedef enum {
|
| /** Indicates an invalid or unsupported clipboard data format. */
|
| @@ -83,14 +77,30 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Format, 4);
|
| * used by Pepper Flash to access the clipboard.
|
| *
|
| */
|
| -struct PPB_Flash_Clipboard_4_0 {
|
| +struct PPB_Flash_Clipboard_5_0 {
|
| + /**
|
| + * Registers a custom clipboard format. The format is identified by a
|
| + * string. An id identifying the format will be returned if the format is
|
| + * successfully registered, which can be used to read/write data of that
|
| + * format. If the format has already been registered, the id associated with
|
| + * that format will be returned. If the format fails to be registered
|
| + * <code>PP_FLASH_CLIPBOARD_FORMAT_INVALID</code> will be returned.
|
| + *
|
| + * All custom data should be read/written as <code>PP_Var</code> array
|
| + * buffers. The clipboard format is pepper-specific meaning that although the
|
| + * data will be stored on the system clipboard, it can only be accessed in a
|
| + * sensible way by using the pepper API. Data stored in custom formats can
|
| + * be safely shared between different applications that use pepper.
|
| + */
|
| + uint32_t (*RegisterCustomFormat)(PP_Instance instance_id,
|
| + const char* format_name);
|
| /**
|
| * Checks whether a given data format is available from the given clipboard.
|
| * Returns true if the given format is available from the given clipboard.
|
| */
|
| PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
|
| PP_Flash_Clipboard_Type clipboard_type,
|
| - PP_Flash_Clipboard_Format format);
|
| + uint32_t format);
|
| /**
|
| * Reads data in the given <code>format</code> from the clipboard. An
|
| * undefined <code>PP_Var</code> is returned if there is an error in reading
|
| @@ -99,7 +109,7 @@ struct PPB_Flash_Clipboard_4_0 {
|
| */
|
| struct PP_Var (*ReadData)(PP_Instance instance_id,
|
| PP_Flash_Clipboard_Type clipboard_type,
|
| - PP_Flash_Clipboard_Format format);
|
| + uint32_t format);
|
| /**
|
| * Writes the given array of data items to the clipboard. All existing
|
| * clipboard data in any format is erased before writing this data. Thus,
|
| @@ -117,21 +127,24 @@ struct PPB_Flash_Clipboard_4_0 {
|
| int32_t (*WriteData)(PP_Instance instance_id,
|
| PP_Flash_Clipboard_Type clipboard_type,
|
| uint32_t data_item_count,
|
| - const PP_Flash_Clipboard_Format formats[],
|
| + const uint32_t formats[],
|
| const struct PP_Var data_items[]);
|
| };
|
|
|
| -typedef struct PPB_Flash_Clipboard_4_0 PPB_Flash_Clipboard;
|
| +typedef struct PPB_Flash_Clipboard_5_0 PPB_Flash_Clipboard;
|
|
|
| -struct PPB_Flash_Clipboard_3_0 {
|
| +struct PPB_Flash_Clipboard_4_0 {
|
| PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
|
| PP_Flash_Clipboard_Type clipboard_type,
|
| PP_Flash_Clipboard_Format format);
|
| - struct PP_Var (*ReadPlainText)(PP_Instance instance_id,
|
| - PP_Flash_Clipboard_Type clipboard_type);
|
| - int32_t (*WritePlainText)(PP_Instance instance_id,
|
| + struct PP_Var (*ReadData)(PP_Instance instance_id,
|
| PP_Flash_Clipboard_Type clipboard_type,
|
| - struct PP_Var text);
|
| + PP_Flash_Clipboard_Format format);
|
| + int32_t (*WriteData)(PP_Instance instance_id,
|
| + PP_Flash_Clipboard_Type clipboard_type,
|
| + uint32_t data_item_count,
|
| + const PP_Flash_Clipboard_Format formats[],
|
| + const struct PP_Var data_items[]);
|
| };
|
| /**
|
| * @}
|
|
|