Chromium Code Reviews| Index: extensions/common/api/clipboard.idl |
| diff --git a/extensions/common/api/clipboard.idl b/extensions/common/api/clipboard.idl |
| index 0b841b09b4a6191b7dba7ec1ede10969b74042f8..a0b72f8e4bedc92eff46d7f247fe99551fa18a82 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,18 @@ namespace clipboard { |
| // document.execCommand('paste'). |
| static void onClipboardDataChanged(); |
| }; |
| + |
| + callback SetImageDataCallback = void(); |
| + |
| + interface Functions { |
| + // Sets image data to clipboard. |
|
Devlin
2016/12/09 15:23:54
Doesn't it also return the result?
jennyz
2016/12/14 01:15:36
Now I used chrome.runtime.lastError to pass the er
|
| + // |
| + // |image_data|: The encoded image data. |
| + // |type|: The image type, the supported types are: "png", "jpeg". |
|
Devlin
2016/12/09 15:23:54
The documentation will include a link (or inlining
jennyz
2016/12/14 01:15:36
I update the comment here, but I am not exactly su
|
| + // The callback is called with <code>chrome.runtime.lastError</code> |
| + // set to error code if there is an error. |
| + static void setImageData(ArrayBuffer image_data, |
| + ImageType type, |
| + SetImageDataCallback callback); |
| + }; |
| }; |