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

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

Issue 2379573008: Add SetImageData api to chrome.clipboard. (Closed)
Patch Set: Add a warning in clipboard.idl about the future deprecation plan. Created 4 years 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..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);
+ };
};

Powered by Google App Engine
This is Rietveld 408576698