summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authortbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 18:28:16 +0000
committertbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 18:28:16 +0000
commit6a16dc9bb9f21da5215029d73f28b670f6b64473 (patch)
treefa674e5ecb93870651cc0c18f18f80c7070aed9a /chrome/common
parent9e28db0f6546b96a01519870682673b2b79ac5f0 (diff)
downloadchromium_src-6a16dc9bb9f21da5215029d73f28b670f6b64473.zip
chromium_src-6a16dc9bb9f21da5215029d73f28b670f6b64473.tar.gz
chromium_src-6a16dc9bb9f21da5215029d73f28b670f6b64473.tar.bz2
Revert 105759 - Revert 105755 - Fails on XP and Vista
Fixed win tests. Adding experimental extension clipboard api. The api will give extensions that use it access to system clipboard. design doc: https://docs.google.com/a/google.com/document/d/1my6Ifb86y0M9WMNNUqkE1LSXe8WLwfRtY3ZUetqNKt0/edit?hl=en_US TEST=ExtensionClipboardApiTest.* BUG=chromium-os:20492 Review URL: http://codereview.chromium.org/8258007 TBR=tbarzic@chromium.org Review URL: http://codereview.chromium.org/8306020 TBR=tbarzic@chromium.org Review URL: http://codereview.chromium.org/8294014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/api/extension_api.json112
1 files changed, 112 insertions, 0 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 1337fc5..c0af639 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -8998,5 +8998,117 @@
]
}
]
+ },
+ {
+ "namespace": "experimental.clipboard",
+ "nodoc": true,
+ "types": [
+ {
+ "id": "mimeTypeEnum",
+ "type": "string",
+ "description": "MIME type of the data on the clipboard.",
+ "enum": ["text/plain", "text/html"]
+ },
+ {
+ "id": "bufferEnum",
+ "type": "string",
+ "description": "Buffers available on the clipboard.",
+ "enum": ["standard", "selection"]
+ }
+ ],
+ "functions": [
+ {
+ "name": "writeData",
+ "description": "Writes some plain text data to web clipboard.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "mimeType",
+ "$ref": "mimeTypeEnum",
+ "description": "Type of data that will be written to the clipboard."
+ },
+ {
+ "name": "buffer",
+ "$ref": "bufferEnum",
+ "description": "Clipboard to which data will be written. Currently only standard clipboard is supported."
+ },
+ {
+ "name": "data",
+ "type": "string",
+ "description": "Data that will be writen to the clipboard."
+ },
+ {
+ "name": "url",
+ "type": "string",
+ "description": "Type of data that will be written to the clipboard.",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "readData",
+ "description": "Reads data that is currently on clipboard.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "mimeType",
+ "$ref": "mimeTypeEnum",
+ "description": "Type of data that will be read from the clipboard."
+ },
+ {
+ "name": "buffer",
+ "$ref": "bufferEnum",
+ "description": "Clipboard buffer from which data will be read."
+ },
+ {
+ "name": "callback",
+ "description": "Callback that will be called when data is read from the clipboard.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "callbackData",
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "string",
+ "description": "Data read from the clipboard."
+ },
+ "url": {
+ "type": "string",
+ "description": "Url read from the clipboard.",
+ "optional": true
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "getAvailableTypes",
+ "description": "Retrieves list of MIME types that support data currently on the clipboard buffer.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "buffer",
+ "$ref": "bufferEnum",
+ "description": "Clipboard buffer whose available MIME types will be retrieved."
+ },
+ {
+ "name": "callback",
+ "description": "Callback that will be called when the result is determined.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "avaliableMimeTypes",
+ "description": "List of available MIME types.",
+ "type": "array",
+ "items": { "$ref": "mimeTypeEnum" }
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
]