forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookmark_manager_private.js
141 lines (121 loc) · 4.75 KB
/
bookmark_manager_private.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file was generated by:
// tools/json_schema_compiler/compiler.py.
// NOTE: The format of types has changed. 'FooType' is now
// 'chrome.bookmarkManagerPrivate.FooType'.
// Please run the closure compiler before committing changes.
// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
// IMPORTANT NOTE: Work-around for crbug.com/543822
// s/chrome.bookmarkManagerPrivate.bookmarks.BookmarkTreeNode/chrome.bookmarks.BookmarkTreeNode/
/** @fileoverview Externs generated from namespace: bookmarkManagerPrivate */
/** @const */
chrome.bookmarkManagerPrivate = {};
/**
* @typedef {{
* id: (string|undefined),
* parentId: (string|undefined),
* title: string,
* url: (string|undefined),
* children: !Array<!chrome.bookmarkManagerPrivate.BookmarkNodeDataElement>
* }}
*/
chrome.bookmarkManagerPrivate.BookmarkNodeDataElement;
/**
* Information about the drag and drop data for use with drag and drop events.
* @typedef {{
* sameProfile: boolean,
* elements: !Array<!chrome.bookmarkManagerPrivate.BookmarkNodeDataElement>
* }}
*/
chrome.bookmarkManagerPrivate.BookmarkNodeData;
/**
* Copies the given bookmarks into the clipboard.
* @param {!Array<string>} idList An array of string-valued ids
* @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.copy = function(idList, callback) {};
/**
* Cuts the given bookmarks into the clipboard.
* @param {!Array<string>} idList An array of string-valued ids
* @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.cut = function(idList, callback) {};
/**
* Pastes bookmarks from the clipboard into the parent folder after the last
* selected node.
* @param {string} parentId
* @param {!Array<string>=} selectedIdList An array of string-valued ids for
* selected bookmarks.
* @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.paste = function(parentId, selectedIdList, callback) {};
/**
* Whether there are any bookmarks that can be pasted.
* @param {string} parentId The ID of the folder to paste into.
* @param {function(boolean): void} callback
*/
chrome.bookmarkManagerPrivate.canPaste = function(parentId, callback) {};
/**
* Sorts the children of a given folder.
* @param {string} parentId The ID of the folder to sort the children of.
*/
chrome.bookmarkManagerPrivate.sortChildren = function(parentId) {};
/**
* Begins dragging a set of bookmarks.
* @param {!Array<string>} idList An array of string-valued ids.
* @param {number} dragNodeIndex The index of the dragged node in |idList|
* @param {boolean} isFromTouch True if the drag was initiated from touch.
* @param {number} x The clientX of the dragStart event
* @param {number} y The clientY of the dragStart event
*/
chrome.bookmarkManagerPrivate.startDrag = function(idList, dragNodeIndex, isFromTouch, x, y) {};
/**
* Performs the drop action of the drag and drop session.
* @param {string} parentId The ID of the folder that the drop was made.
* @param {number=} index The index of the position to drop at. If left out the
* dropped items will be placed at the end of the existing children.
* @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.drop = function(parentId, index, callback) {};
/**
* 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.
* @param {string} id ID of the root of the tree to pull. If empty, the entire
* tree will be returned.
* @param {boolean} foldersOnly Pass true to only return folders.
* @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>): void}
* callback
*/
chrome.bookmarkManagerPrivate.getSubtree = function(id, foldersOnly, callback) {};
/**
* Recursively removes list of bookmarks nodes.
* @param {!Array<string>} idList An array of string-valued ids.
* @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.removeTrees = function(idList, callback) {};
/**
* Performs an undo of the last change to the bookmark model.
*/
chrome.bookmarkManagerPrivate.undo = function() {};
/**
* Performs a redo of last undone change to the bookmark model.
*/
chrome.bookmarkManagerPrivate.redo = function() {};
/**
* Fired when dragging bookmarks over the document.
* @type {!ChromeEvent}
*/
chrome.bookmarkManagerPrivate.onDragEnter;
/**
* Fired when the drag and drop leaves the document.
* @type {!ChromeEvent}
*/
chrome.bookmarkManagerPrivate.onDragLeave;
/**
* Fired when the user drops bookmarks on the document.
* @type {!ChromeEvent}
*/
chrome.bookmarkManagerPrivate.onDrop;