Index: extensions/common/api/clipboard.idl |
diff --git a/extensions/common/api/clipboard.idl b/extensions/common/api/clipboard.idl |
index 0b841b09b4a6191b7dba7ec1ede10969b74042f8..1eeac18235a80896355274c6acd3cde3832b2833 100644 |
--- a/extensions/common/api/clipboard.idl |
+++ b/extensions/common/api/clipboard.idl |
@@ -6,6 +6,9 @@ |
// access data of the clipboard. This API is currently only implemented for |
// ChromeOS. |
namespace clipboard { |
+ // Image data types: |
+ enum ImageType {png, jpeg}; |
+ |
interface Events { |
// Fired when clipboard data changes. |
// Requires clipboard and clipboardRead permissions for adding listener to |
@@ -14,4 +17,16 @@ namespace clipboard { |
// document.execCommand('paste'). |
static void onClipboardDataChanged(); |
}; |
+ |
+ callback SetImageDataCallback = void(boolean success); |
+ |
+ interface Functions { |
+ // Sets image data to clipboard. |
+ // |
+ // |image_data|: The encoded image data. |
+ // |type|: The image type, the supported types are: "png", "jpeg". |
+ static void setImageData(ArrayBuffer image_data, |
+ ImageType type, |
+ SetImageDataCallback callback); |
Devlin
2016/11/16 02:34:33
Why a boolean success callback? In which circumst
jennyz
2016/12/07 01:21:48
Removed the boolean argument and pass error with c
|
+ }; |
}; |