summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorfeldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 06:45:31 +0000
committerfeldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 06:45:31 +0000
commit9b0718510886b13ee0ff6a2248285cbba2f08d1c (patch)
tree83295ada4204fd086a76ba869868b957214fac20 /chrome/common
parent4b6bcfac8cd147db4650b7a88f6bc1fe17342e5b (diff)
downloadchromium_src-9b0718510886b13ee0ff6a2248285cbba2f08d1c.zip
chromium_src-9b0718510886b13ee0ff6a2248285cbba2f08d1c.tar.gz
chromium_src-9b0718510886b13ee0ff6a2248285cbba2f08d1c.tar.bz2
Add a folders_only and subtree api to bookmark manager
Adds a new API to the experimental.bookmarkManager namespace getSubtree(id, foldersOnly, callback) Which returns any subtree, and if foldersOnly is true, only returns the folders. At this point, only the bookmark tree is using the new call. BUG=39877 TEST=ExtensionBookmarksTest.* Review URL: http://codereview.chromium.org/1611001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rwxr-xr-xchrome/common/extensions/api/extension_api.json25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index f9a8b3b..b554298 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -2285,6 +2285,31 @@
"optional": true
}
]
+ },
+ {
+ "name": "getSubtree",
+ "type": "function",
+ "description": "Retrieves a bookmark hierarchy from the given node. If the node id is empty, it is the full tree. If foldersOnly is true, it will only return folders, not actual bookmarks.",
+ "nodoc": "true",
+ "parameters": [
+ {
+ "name": "id",
+ "type": "string",
+ "description": "ID of the root of the tree to pull. If empty, the entire tree will be returned."
+ },
+ {
+ "name": "foldersOnly",
+ "type": "boolean",
+ "description": "Pass true to only return folders."
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
+ ]
+ }
+ ]
}
],
"events": [