Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: extensions/common/api/clipboard.idl

Issue 2379573008: Add SetImageData api to chrome.clipboard. (Closed)
Patch Set: Fix interactive_ui_tests issue. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+ };
};

Powered by Google App Engine
This is Rietveld 408576698