Index: ppapi/api/private/ppb_flash_clipboard.idl |
diff --git a/ppapi/api/private/ppb_flash_clipboard.idl b/ppapi/api/private/ppb_flash_clipboard.idl |
index 890a7d481c818042997c409db96bb9db684c43ca..5dde74eaf630c49b5d6c99ecc599e5ed0401c577 100644 |
--- a/ppapi/api/private/ppb_flash_clipboard.idl |
+++ b/ppapi/api/private/ppb_flash_clipboard.idl |
@@ -9,7 +9,8 @@ |
*/ |
label Chrome { |
- M17 = 3.0 |
+ M17 = 3.0, |
+ M19 = 4.0 |
}; |
#inline c |
@@ -45,13 +46,16 @@ enum PP_Flash_Clipboard_Format { |
PP_FLASH_CLIPBOARD_FORMAT_HTML = 2 |
}; |
+struct PP_Flash_Clipboard_Data_Item { |
+ PP_Flash_Clipboard_Format format; |
+ PP_Var data; |
+}; |
+ |
/** |
* The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions |
* used by Pepper Flash to access the clipboard. |
* |
- * TODO(viettrungluu): Support more formats (e.g., HTML).... |
*/ |
-[version=3.0] |
interface PPB_Flash_Clipboard { |
/** |
* Checks whether a given data format is available from the given clipboard. |
@@ -63,19 +67,49 @@ interface PPB_Flash_Clipboard { |
[in] PP_Flash_Clipboard_Format format); |
/** |
- * Reads plain text data from the clipboard. |
+ * Deprecated in 4.0. |
*/ |
+ [version=3.0, deprecate=4.0] |
PP_Var ReadPlainText( |
[in] PP_Instance instance_id, |
[in] PP_Flash_Clipboard_Type clipboard_type); |
/** |
- * Writes plain text data to the clipboard. If <code>text</code> is too large, |
- * it will return <code>PP_ERROR_NOSPACE</code> and not write to the |
- * clipboard. |
+ * Deprecated in 4.0. |
*/ |
+ [version=3.0, deprecate=4.0] |
int32_t WritePlainText( |
[in] PP_Instance instance_id, |
[in] PP_Flash_Clipboard_Type clipboard_type, |
[in] PP_Var text); |
+ |
+ /** |
+ * Reads data in the given <code>format</code> from the clipboard. A null |
+ * <code>PP_Var</code> is returned if there is an error in reading the |
+ * clipboard data. |
+ */ |
+ [version=4.0] |
+ PP_Var ReadData([in] PP_Instance instance_id, |
+ [in] PP_Flash_Clipboard_Type clipboard_type, |
+ [in] PP_Flash_Clipboard_Format 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, |
+ * passing an array of size 0 has the effect of clearing the clipboard without |
+ * writing any data. Each data item in the array should have a different |
+ * <code>PP_Flash_Clipboard_Format</code>. If multiple data items have the |
+ * same format, only the last item with that format will be written. |
+ * If there is an error writing any of the items in the array to the |
+ * clipboard, none will be written and an error code is returned. |
+ * The error code will be <code>PP_ERROR_NOSPACE</code> if the value is |
+ * too large to be written, <code>PP_ERROR_BADARGUMENT</code> if a PP_Var |
+ * cannot be converted into the format supplied or <code>PP_FAILED</code> |
+ * if the format is not supported. |
+ */ |
+ [version=4.0] |
+ int32_t WriteData([in] PP_Instance instance_id, |
+ [in] PP_Flash_Clipboard_Type clipboard_type, |
+ [in] uint32_t data_item_count, |
+ [in, size_is(data_item_count)] PP_Flash_Clipboard_Data_Item[] data_items); |
}; |