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

Side by Side Diff: extensions/common/api/clipboard.idl

Issue 2379573008: Add SetImageData api to chrome.clipboard. (Closed)
Patch Set: Add a string for prompting clipboard write permission for installing chrome.clipboard. Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The <code>chrome.clipboard</code> API is provided to allow users to 5 // The <code>chrome.clipboard</code> API is provided to allow users to
6 // access data of the clipboard. This API is currently only implemented for 6 // access data of the clipboard. This API is currently only implemented for
7 // ChromeOS. 7 // ChromeOS.
8 namespace clipboard { 8 namespace clipboard {
9 interface Events { 9 interface Events {
10 // Fired when clipboard data changes. 10 // Fired when clipboard data changes.
11 // Requires clipboard and clipboardRead permissions for adding listener to 11 // Requires clipboard and clipboardRead permissions for adding listener to
12 // chrome.clipboard.onClipboardDataChanged event. 12 // chrome.clipboard.onClipboardDataChanged event.
13 // After this event fires, the clipboard data is available by calling 13 // After this event fires, the clipboard data is available by calling
14 // document.execCommand('paste'). 14 // document.execCommand('paste').
15 static void onClipboardDataChanged(); 15 static void onClipboardDataChanged();
16 }; 16 };
17
18 callback SetImageDataCallback = void(boolean success);
19
20 interface Functions {
21 // Sets image data to clipboard.
22 //
23 // |image_data|: The encoded image data.
24 // |type|: The image type, the supported types are: "png", "jpeg".
25 static void setImageData(ArrayBuffer image_data,
26 DOMString type,
dcheng 2016/10/04 05:13:27 I'm not an extension IDL expert, but if we can som
jennyz 2016/10/04 23:53:54 Done.
27 SetImageDataCallback callback);
28 };
17 }; 29 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698