OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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. |
| 4 |
| 5 /** @fileoverview Externs generated from namespace: bookmarkManagerPrivate */ |
| 6 |
| 7 /** |
| 8 * @typedef {{ |
| 9 * id: (string|undefined), |
| 10 * parentId: (string|undefined), |
| 11 * title: string, |
| 12 * url: (string|undefined), |
| 13 * children: Array |
| 14 * }} |
| 15 */ |
| 16 var BookmarkNodeDataElement; |
| 17 |
| 18 /** |
| 19 * Information about the drag and drop data for use with drag and drop events. |
| 20 * @typedef {{ |
| 21 * sameProfile: boolean, |
| 22 * elements: Array |
| 23 * }} |
| 24 */ |
| 25 var BookmarkNodeData; |
| 26 |
| 27 /** |
| 28 * Collection of meta info fields. |
| 29 * @typedef {Object} |
| 30 */ |
| 31 var MetaInfoFields; |
| 32 |
| 33 /** |
| 34 * @const |
| 35 */ |
| 36 chrome.bookmarkManagerPrivate = {}; |
| 37 |
| 38 /** |
| 39 * Copies the given bookmarks into the clipboard |
| 40 * @param {Array} idList An array of string-valued ids |
| 41 * @param {Function=} callback |
| 42 */ |
| 43 chrome.bookmarkManagerPrivate.copy = function(idList, callback) {}; |
| 44 |
| 45 /** |
| 46 * Cuts the given bookmarks into the clipboard |
| 47 * @param {Array} idList An array of string-valued ids |
| 48 * @param {Function=} callback |
| 49 */ |
| 50 chrome.bookmarkManagerPrivate.cut = function(idList, callback) {}; |
| 51 |
| 52 /** |
| 53 * Pastes bookmarks from the clipboard into the parent folder after the last |
| 54 * selected node |
| 55 * @param {string} parentId |
| 56 * @param {Array=} selectedIdList An array of string-valued ids for selected |
| 57 * bookmarks |
| 58 * @param {Function=} callback |
| 59 */ |
| 60 chrome.bookmarkManagerPrivate.paste = function(parentId, selectedIdList, callbac
k) {}; |
| 61 |
| 62 /** |
| 63 * Whether there are any bookmarks that can be pasted |
| 64 * @param {string} parentId The ID of the folder to paste into |
| 65 * @param {Function} callback |
| 66 */ |
| 67 chrome.bookmarkManagerPrivate.canPaste = function(parentId, callback) {}; |
| 68 |
| 69 /** |
| 70 * Sorts the children of a given folder |
| 71 * @param {string} parentId The ID of the folder to sort the children of |
| 72 */ |
| 73 chrome.bookmarkManagerPrivate.sortChildren = function(parentId) {}; |
| 74 |
| 75 /** |
| 76 * Gets the i18n strings for the bookmark manager |
| 77 * @param {Function} callback |
| 78 */ |
| 79 chrome.bookmarkManagerPrivate.getStrings = function(callback) {}; |
| 80 |
| 81 /** |
| 82 * Begins dragging a set of bookmarks |
| 83 * @param {Array} idList An array of string-valued ids |
| 84 * @param {boolean} isFromTouch True if the drag was initiated from touch |
| 85 */ |
| 86 chrome.bookmarkManagerPrivate.startDrag = function(idList, isFromTouch) {}; |
| 87 |
| 88 /** |
| 89 * Performs the drop action of the drag and drop session |
| 90 * @param {string} parentId The ID of the folder that the drop was made |
| 91 * @param {number=} index The index of the position to drop at. If left out the |
| 92 * dropped items will be placed at the end of the existing children |
| 93 */ |
| 94 chrome.bookmarkManagerPrivate.drop = function(parentId, index) {}; |
| 95 |
| 96 /** |
| 97 * Retrieves a bookmark hierarchy from the given node. If the node id is |
| 98 * empty, it is the full tree. If foldersOnly is true, it will only return |
| 99 * folders, not actual bookmarks. |
| 100 * @param {string} id ID of the root of the tree to pull. If empty, the entire |
| 101 * tree will be returned. |
| 102 * @param {boolean} foldersOnly Pass true to only return folders. |
| 103 * @param {Function} callback |
| 104 */ |
| 105 chrome.bookmarkManagerPrivate.getSubtree = function(id, foldersOnly, callback) {
}; |
| 106 |
| 107 /** |
| 108 * Whether bookmarks can be modified |
| 109 * @param {Function} callback |
| 110 */ |
| 111 chrome.bookmarkManagerPrivate.canEdit = function(callback) {}; |
| 112 |
| 113 /** |
| 114 * Whether bookmarks can be opened in new windows |
| 115 * @param {Function} callback |
| 116 */ |
| 117 chrome.bookmarkManagerPrivate.canOpenNewWindows = function(callback) {}; |
| 118 |
| 119 /** |
| 120 * Recursively removes list of bookmarks nodes. |
| 121 * @param {Array} idList An array of string-valued ids |
| 122 * @param {Function=} callback |
| 123 */ |
| 124 chrome.bookmarkManagerPrivate.removeTrees = function(idList, callback) {}; |
| 125 |
| 126 /** |
| 127 */ |
| 128 chrome.bookmarkManagerPrivate.recordLaunch = function() {}; |
| 129 |
| 130 /** |
| 131 * Mimics the functionality of bookmarks.create, but will additionally set the |
| 132 * given meta info fields. |
| 133 * @param {chrome.bookmarks.CreateDetails} bookmark |
| 134 * @param {MetaInfoFields} metaInfo |
| 135 * @param {Function=} callback |
| 136 */ |
| 137 chrome.bookmarkManagerPrivate.createWithMetaInfo = function(bookmark, metaInfo,
callback) {}; |
| 138 |
| 139 /** |
| 140 * Gets meta info from a bookmark node |
| 141 * @param {string=} id The id of the bookmark to retrieve meta info from. If |
| 142 * omitted meta info for all nodes is returned. |
| 143 * @param {string=} key The key for the meta info to retrieve. If omitted, all |
| 144 * fields are returned |
| 145 * @param {Function=} callback |
| 146 */ |
| 147 chrome.bookmarkManagerPrivate.getMetaInfo = function(id, key, callback) {}; |
| 148 |
| 149 /** |
| 150 * Sets a meta info value for a bookmark node |
| 151 * @param {string} id The id of the bookmark node to set the meta info on |
| 152 * @param {string} key The key of the meta info to set |
| 153 * @param {string} value The meta info to set |
| 154 * @param {Function=} callback |
| 155 */ |
| 156 chrome.bookmarkManagerPrivate.setMetaInfo = function(id, key, value, callback) {
}; |
| 157 |
| 158 /** |
| 159 * Updates a set of meta info values for a bookmark node. |
| 160 * @param {string} id The id of the bookmark node to update the meta info of. |
| 161 * @param {MetaInfoFields} metaInfoChanges A set of meta info key/value pairs |
| 162 * to update. |
| 163 * @param {Function=} callback |
| 164 */ |
| 165 chrome.bookmarkManagerPrivate.updateMetaInfo = function(id, metaInfoChanges, cal
lback) {}; |
| 166 |
| 167 /** |
| 168 * Performs an undo of the last change to the bookmark model |
| 169 */ |
| 170 chrome.bookmarkManagerPrivate.undo = function() {}; |
| 171 |
| 172 /** |
| 173 * Performs a redo of last undone change to the bookmark model |
| 174 */ |
| 175 chrome.bookmarkManagerPrivate.redo = function() {}; |
| 176 |
| 177 /** |
| 178 * Gets the information for the undo if available |
| 179 * @param {Function} callback |
| 180 */ |
| 181 chrome.bookmarkManagerPrivate.getUndoInfo = function(callback) {}; |
| 182 |
| 183 /** |
| 184 * Gets the information for the redo if available |
| 185 * @param {Function} callback |
| 186 */ |
| 187 chrome.bookmarkManagerPrivate.getRedoInfo = function(callback) {}; |
| 188 |
| 189 /** @type {!ChromeEvent} */ |
| 190 chrome.bookmarkManagerPrivate.onDragEnter; |
| 191 |
| 192 /** @type {!ChromeEvent} */ |
| 193 chrome.bookmarkManagerPrivate.onDragLeave; |
| 194 |
| 195 /** @type {!ChromeEvent} */ |
| 196 chrome.bookmarkManagerPrivate.onDrop; |
| 197 |
| 198 /** @type {!ChromeEvent} */ |
| 199 chrome.bookmarkManagerPrivate.onMetaInfoChanged; |
OLD | NEW |