1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace": "bookmarks",
8 "description": "Use the <code>chrome.bookmarks</code> API to create, organize, and otherwise manipulate bookmarks. Also see <a href='override'>Override Pages</a>, which you can use to create a custom Bookmark Manager page.",
10 "MAX_WRITE_OPERATIONS_PER_HOUR": {
12 "deprecated": "Bookmark write operations are no longer limited by Chrome.",
15 "MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE": {
17 "deprecated": "Bookmark write operations are no longer limited by Chrome.",
23 "id": "BookmarkTreeNode",
25 "description": "A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.",
30 "description": "The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted."
36 "description": "The <code>id</code> of the parent folder. Omitted for the root node."
41 "description": "The 0-based position of this node within its parent folder."
46 "description": "The URL navigated to when a user clicks the bookmark. Omitted for folders."
50 "description": "The text displayed for the node."
55 "description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>)."
57 "dateGroupModified": {
60 "description": "When the contents of this folder last changed, in milliseconds since the epoch."
66 "description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator. Omitted if the node can be modified by the user and the extension (default)."
71 "items": { "$ref": "BookmarkTreeNode" },
72 "description": "An ordered list of children of this node."
77 "id": "CreateDetails",
78 "description": "Object passed to the create() function.",
84 "serialized_type": "int64",
86 "description": "Defaults to the Other Bookmarks folder."
108 "description": "Retrieves the specified BookmarkTreeNode(s).",
111 "name": "idOrIdList",
112 "description": "A single string-valued id, or an array of string-valued ids",
116 "serialized_type": "int64"
122 "serialized_type": "int64"
135 "items": { "$ref": "BookmarkTreeNode" }
142 "name": "getChildren",
144 "description": "Retrieves the children of the specified BookmarkTreeNode id.",
148 "serialized_type": "int64",
158 "items": { "$ref": "BookmarkTreeNode"}
167 "description": "Retrieves the recently added bookmarks.",
172 "name": "numberOfItems",
173 "description": "The maximum number of items to return."
182 "items": { "$ref": "BookmarkTreeNode" }
191 "description": "Retrieves the entire Bookmarks hierarchy.",
200 "items": { "$ref": "BookmarkTreeNode" }
207 "name": "getSubTree",
209 "description": "Retrieves part of the Bookmarks hierarchy, starting at the specified node.",
213 "serialized_type": "int64",
215 "description": "The ID of the root of the subtree to retrieve."
224 "items": { "$ref": "BookmarkTreeNode" }
233 "description": "Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.",
237 "description": "Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties <code>query</code>, <code>url</code>, and <code>title</code> may be specified and bookmarks matching all specified properties will be produced.",
241 "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
245 "description": "An object specifying properties and values to match when searching. Produces bookmarks matching all properties.",
250 "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
255 "description": "The URL of the bookmark; matches verbatim. Note that folders have no URL."
260 "description": "The title of the bookmark; matches verbatim."
273 "items": { "$ref": "BookmarkTreeNode" }
282 "description": "Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.",
285 "$ref": "CreateDetails",
295 "$ref": "BookmarkTreeNode"
304 "description": "Moves the specified BookmarkTreeNode to the provided location.",
308 "serialized_type": "int64",
313 "name": "destination",
333 "$ref": "BookmarkTreeNode"
342 "description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.",
346 "serialized_type": "int64",
370 "$ref": "BookmarkTreeNode"
379 "description": "Removes a bookmark or an empty bookmark folder.",
383 "serialized_type": "int64",
395 "name": "removeTree",
397 "description": "Recursively removes a bookmark folder.",
401 "serialized_type": "int64",
415 "description": "Imports bookmarks from a chrome html bookmark file",
429 "description": "Exports bookmarks to a chrome html bookmark file",
445 "description": "Fired when a bookmark or folder is created.",
452 "$ref": "BookmarkTreeNode",
460 "description": "Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.",
468 "name": "removeInfo",
470 "parentId": { "type": "string" },
471 "index": { "type": "integer" }
479 "description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.",
487 "name": "changeInfo",
489 "title": { "type": "string" },
501 "description": "Fired when a bookmark or folder is moved to a different parent folder.",
511 "parentId": { "type": "string" },
512 "index": { "type": "integer" },
513 "oldParentId": { "type": "string" },
514 "oldIndex": { "type": "integer" }
520 "name": "onChildrenReordered",
522 "description": "Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move().",
530 "name": "reorderInfo",
534 "items": { "type": "string" }
541 "name": "onImportBegan",
543 "description": "Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately.",
547 "name": "onImportEnded",
549 "description": "Fired when a bookmark import session is ended.",