diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-20 02:06:16 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-20 02:06:16 +0000 |
commit | ced90ae1159e8967837cd13b9155956467a811f9 (patch) | |
tree | b052ff281b583fdcc12f6bea883f83db663ae92f /chrome/common/extensions | |
parent | ddf796cffe2f905a36764bc2e46cc8325a560c51 (diff) | |
download | chromium_src-ced90ae1159e8967837cd13b9155956467a811f9.zip chromium_src-ced90ae1159e8967837cd13b9155956467a811f9.tar.gz chromium_src-ced90ae1159e8967837cd13b9155956467a811f9.tar.bz2 |
Bookmark Manager Drag and Drop backend.
This adds the following methods to chrome.experimental.bookmarkManager:
startDrag(idList)
drop(parentId, opt_index)
as well as the following events:
onDragEnter(function(BookmarkDragData))
onDragLeave(function(BookmarkDragData))
onDrop(function(BookmarkDragData))
BUG=32194
TEST=None
Review URL: http://codereview.chromium.org/596105
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rwxr-xr-x | chrome/common/extensions/api/extension_api.json | 102 |
1 files changed, 100 insertions, 2 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 3962f7a..3d6f734 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -1955,7 +1955,47 @@ { "namespace": "experimental.bookmarkManager", "nodoc": true, - "types": [], + "types": [ + { + "id": "BookmarkDragDataElement", + "nodoc": true, + "type": "object", + "properties": { + "id": { + "type": "string", + "optional": true, + "description": "The ID of the bookmark. This is only provided if the data is from the same profile." + }, + "parentId": { + "type": "string", + "optional": true, + "description": "The ID of the parent of the bookmark. This is only provided if the data is from the same profile." + }, + "title": {"type": "string"}, + "url": { + "type": "string", + "optional": true + }, + "children": { + "type": "array", + "items": {"$ref": "BookmarkDragDataElement"} + } + } + }, + { + "id": "BookmarkDragData", + "nodoc": true, + "type": "object", + "description": "Information about the drag and drop data for use with drag and drop events.", + "properties": { + "sameProfile": {"type": "boolean"}, + "elements": { + "type": "array", + "items": {"$ref": "BookmarkDragDataElement"} + } + } + } + ], "functions": [ { "name": "copy", @@ -2056,6 +2096,41 @@ ] } ] + }, + { + "name": "startDrag", + "type": "function", + "description": "Begins dragging a set of bookmarks", + "nodoc": "true", + "parameters": [ + { + "name": "idList", + "description": "An array of string-valued ids", + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + } + ] + }, + { + "name": "drop", + "type": "function", + "description": "Performs the drop action of the drag and drop session", + "nodoc": "true", + "parameters": [ + { + "name": "parentId", + "description": "The ID of the folder that the drop was made", + "type": "string" + }, + { + "name": "index", + "description": "The index of the position to drop at. If left out the dropped items will be placed at the end of the existing children", + "type": "integer", + "minimum": 0, + "optional": true + } + ] } ], "events": [ @@ -2074,8 +2149,31 @@ "parameters": [ {} ] + }, + { + "name": "onDragEnter", + "type": "function", + "description": "Fired when dragging bookmarks over the document", + "parameters": [ + {"$ref": "BookmarkDragData"} + ] + }, + { + "name": "onDragLeave", + "type": "function", + "description": "Fired when the drag and drop leaves the document", + "parameters": [ + {"$ref": "BookmarkDragData"} + ] + }, + { + "name": "onDrop", + "type": "function", + "description": "Fired when the user drops bookmarks on the document", + "parameters": [ + {"$ref": "BookmarkDragData"} + ] } - ] }, { |