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.
5 /** @fileoverview Externs generated from namespace: bookmarkManagerPrivate */
9 * id: (string|undefined),
10 * parentId: (string|undefined),
12 * url: (string|undefined),
16 var BookmarkNodeDataElement;
19 * Information about the drag and drop data for use with drag and drop events.
21 * sameProfile: boolean,
28 * Collection of meta info fields.
36 chrome.bookmarkManagerPrivate = {};
39 * Copies the given bookmarks into the clipboard
40 * @param {Array} idList An array of string-valued ids
41 * @param {Function=} callback
43 chrome.bookmarkManagerPrivate.copy = function(idList, callback) {};
46 * Cuts the given bookmarks into the clipboard
47 * @param {Array} idList An array of string-valued ids
48 * @param {Function=} callback
50 chrome.bookmarkManagerPrivate.cut = function(idList, callback) {};
53 * Pastes bookmarks from the clipboard into the parent folder after the last
55 * @param {string} parentId
56 * @param {Array=} selectedIdList An array of string-valued ids for selected
58 * @param {Function=} callback
60 chrome.bookmarkManagerPrivate.paste = function(parentId, selectedIdList, callback) {};
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
67 chrome.bookmarkManagerPrivate.canPaste = function(parentId, callback) {};
70 * Sorts the children of a given folder
71 * @param {string} parentId The ID of the folder to sort the children of
73 chrome.bookmarkManagerPrivate.sortChildren = function(parentId) {};
76 * Gets the i18n strings for the bookmark manager
77 * @param {Function} callback
79 chrome.bookmarkManagerPrivate.getStrings = function(callback) {};
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
86 chrome.bookmarkManagerPrivate.startDrag = function(idList, isFromTouch) {};
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
94 chrome.bookmarkManagerPrivate.drop = function(parentId, index) {};
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
105 chrome.bookmarkManagerPrivate.getSubtree = function(id, foldersOnly, callback) {};
108 * Whether bookmarks can be modified
109 * @param {Function} callback
111 chrome.bookmarkManagerPrivate.canEdit = function(callback) {};
114 * Whether bookmarks can be opened in new windows
115 * @param {Function} callback
117 chrome.bookmarkManagerPrivate.canOpenNewWindows = function(callback) {};
120 * Recursively removes list of bookmarks nodes.
121 * @param {Array} idList An array of string-valued ids
122 * @param {Function=} callback
124 chrome.bookmarkManagerPrivate.removeTrees = function(idList, callback) {};
128 chrome.bookmarkManagerPrivate.recordLaunch = function() {};
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
137 chrome.bookmarkManagerPrivate.createWithMetaInfo = function(bookmark, metaInfo, callback) {};
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
147 chrome.bookmarkManagerPrivate.getMetaInfo = function(id, key, callback) {};
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
156 chrome.bookmarkManagerPrivate.setMetaInfo = function(id, key, value, callback) {};
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
163 * @param {Function=} callback
165 chrome.bookmarkManagerPrivate.updateMetaInfo = function(id, metaInfoChanges, callback) {};
168 * Performs an undo of the last change to the bookmark model
170 chrome.bookmarkManagerPrivate.undo = function() {};
173 * Performs a redo of last undone change to the bookmark model
175 chrome.bookmarkManagerPrivate.redo = function() {};
178 * Gets the information for the undo if available
179 * @param {Function} callback
181 chrome.bookmarkManagerPrivate.getUndoInfo = function(callback) {};
184 * Gets the information for the redo if available
185 * @param {Function} callback
187 chrome.bookmarkManagerPrivate.getRedoInfo = function(callback) {};
189 /** @type {!ChromeEvent} */
190 chrome.bookmarkManagerPrivate.onDragEnter;
192 /** @type {!ChromeEvent} */
193 chrome.bookmarkManagerPrivate.onDragLeave;
195 /** @type {!ChromeEvent} */
196 chrome.bookmarkManagerPrivate.onDrop;
198 /** @type {!ChromeEvent} */
199 chrome.bookmarkManagerPrivate.onMetaInfoChanged;