Index: extensions/common/api/clipboard.idl |
diff --git a/extensions/common/api/clipboard.idl b/extensions/common/api/clipboard.idl |
index 0b841b09b4a6191b7dba7ec1ede10969b74042f8..b0b92943cd1768790c571dc2639329744c429d82 100644 |
--- a/extensions/common/api/clipboard.idl |
+++ b/extensions/common/api/clipboard.idl |
@@ -3,9 +3,15 @@ |
// found in the LICENSE file. |
// The <code>chrome.clipboard</code> API is provided to allow users to |
-// access data of the clipboard. This API is currently only implemented for |
-// ChromeOS. |
+// access data of the clipboard. This is a temporary solution for |
+// chromeos platform apps until open-web alternative is available. It will be |
Devlin
2016/12/16 02:26:16
links to the open web alternative planning stage?
jennyz
2016/12/19 07:01:36
I am asking dcheng to help me find the document ab
jennyz
2016/12/20 19:24:08
According to chrome team(Gary), they are going to
|
+// deprecated once open-web solution is available. |
+[platforms=("chromeos"), |
+ implemented_in="extensions/browser/api/clipboard/clipboard_api.h"] |
namespace clipboard { |
+ // Supported image types. |
+ enum ImageType {png, jpeg}; |
+ |
interface Events { |
// Fired when clipboard data changes. |
// Requires clipboard and clipboardRead permissions for adding listener to |
@@ -14,4 +20,18 @@ namespace clipboard { |
// document.execCommand('paste'). |
static void onClipboardDataChanged(); |
}; |
+ |
+ callback SetImageDataCallback = void(); |
+ |
+ interface Functions { |
+ // Sets image data to clipboard. |
+ // |
+ // |image_data|: The encoded image data. |
+ // |type|: Type of |image_data|. |
Devlin
2016/12/16 02:26:16
instead of saying "Type of |image_data|", let's sa
jennyz
2016/12/19 07:01:36
Done.
|
+ // 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); |
+ }; |
}; |