bookmark_manager_private.js 5.1 KB

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