OLD | NEW |
---|---|
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 }; |
OLD | NEW |