tabs.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. // Copyright 2020 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.tabs.FooType'.
  8. // Please run the closure compiler before committing changes.
  9. // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
  10. // IMPORTANT NOTE: Work-around for crbug.com/543822
  11. // s/chrome.tabs.extensionTypes.ImageDetails/chrome.extensionTypes.ImageDetails/
  12. // s/chrome.tabs.extensionTypes.InjectDetails/chrome.extensionTypes.InjectDetails/
  13. // s/chrome.tabs.runtime.Port/chrome.runtime.Port/
  14. // s/chrome.tabs.windows.Window/chrome.windows.Window/
  15. /** @fileoverview Externs generated from namespace: tabs */
  16. /** @const */
  17. chrome.tabs = {};
  18. /**
  19. * @enum {string}
  20. * @see https://developer.chrome.com/extensions/tabs#type-TabStatus
  21. */
  22. chrome.tabs.TabStatus = {
  23. UNLOADED: 'unloaded',
  24. LOADING: 'loading',
  25. COMPLETE: 'complete',
  26. };
  27. /**
  28. * @enum {string}
  29. * @see https://developer.chrome.com/extensions/tabs#type-MutedInfoReason
  30. */
  31. chrome.tabs.MutedInfoReason = {
  32. USER: 'user',
  33. CAPTURE: 'capture',
  34. EXTENSION: 'extension',
  35. };
  36. /**
  37. * The tab's muted state and the reason for the last state change.
  38. * @typedef {{
  39. * muted: boolean,
  40. * reason: (!chrome.tabs.MutedInfoReason|undefined),
  41. * extensionId: (string|undefined)
  42. * }}
  43. * @see https://developer.chrome.com/extensions/tabs#type-MutedInfo
  44. */
  45. chrome.tabs.MutedInfo;
  46. /**
  47. * @typedef {{
  48. * id: (number|undefined),
  49. * index: number,
  50. * groupId: number,
  51. * windowId: number,
  52. * openerTabId: (number|undefined),
  53. * selected: boolean,
  54. * highlighted: boolean,
  55. * active: boolean,
  56. * pinned: boolean,
  57. * audible: (boolean|undefined),
  58. * discarded: boolean,
  59. * autoDiscardable: boolean,
  60. * mutedInfo: (!chrome.tabs.MutedInfo|undefined),
  61. * url: (string|undefined),
  62. * pendingUrl: (string|undefined),
  63. * title: (string|undefined),
  64. * favIconUrl: (string|undefined),
  65. * status: (!chrome.tabs.TabStatus|undefined),
  66. * incognito: boolean,
  67. * width: (number|undefined),
  68. * height: (number|undefined),
  69. * sessionId: (string|undefined)
  70. * }}
  71. * @see https://developer.chrome.com/extensions/tabs#type-Tab
  72. */
  73. chrome.tabs.Tab;
  74. /**
  75. * @enum {string}
  76. * @see https://developer.chrome.com/extensions/tabs#type-ZoomSettingsMode
  77. */
  78. chrome.tabs.ZoomSettingsMode = {
  79. AUTOMATIC: 'automatic',
  80. MANUAL: 'manual',
  81. DISABLED: 'disabled',
  82. };
  83. /**
  84. * @enum {string}
  85. * @see https://developer.chrome.com/extensions/tabs#type-ZoomSettingsScope
  86. */
  87. chrome.tabs.ZoomSettingsScope = {
  88. PER_ORIGIN: 'per-origin',
  89. PER_TAB: 'per-tab',
  90. };
  91. /**
  92. * Defines how zoom changes in a tab are handled and at what scope.
  93. * @typedef {{
  94. * mode: (!chrome.tabs.ZoomSettingsMode|undefined),
  95. * scope: (!chrome.tabs.ZoomSettingsScope|undefined),
  96. * defaultZoomFactor: (number|undefined)
  97. * }}
  98. * @see https://developer.chrome.com/extensions/tabs#type-ZoomSettings
  99. */
  100. chrome.tabs.ZoomSettings;
  101. /**
  102. * @enum {string}
  103. * @see https://developer.chrome.com/extensions/tabs#type-WindowType
  104. */
  105. chrome.tabs.WindowType = {
  106. NORMAL: 'normal',
  107. POPUP: 'popup',
  108. PANEL: 'panel',
  109. APP: 'app',
  110. DEVTOOLS: 'devtools',
  111. };
  112. /**
  113. * An ID that represents the absence of a browser tab.
  114. * @type {number}
  115. * @see https://developer.chrome.com/extensions/tabs#type-TAB_ID_NONE
  116. */
  117. chrome.tabs.TAB_ID_NONE;
  118. /**
  119. * Retrieves details about the specified tab.
  120. * @param {number} tabId
  121. * @param {function(!chrome.tabs.Tab): void} callback
  122. * @see https://developer.chrome.com/extensions/tabs#method-get
  123. */
  124. chrome.tabs.get = function(tabId, callback) {};
  125. /**
  126. * Gets the tab that this script call is being made from. May be undefined if
  127. * called from a non-tab context (for example, a background page or popup view).
  128. * @param {function((!chrome.tabs.Tab|undefined)): void} callback
  129. * @see https://developer.chrome.com/extensions/tabs#method-getCurrent
  130. */
  131. chrome.tabs.getCurrent = function(callback) {};
  132. /**
  133. * Connects to the content script(s) in the specified tab. The
  134. * $(ref:runtime.onConnect) event is fired in each content script running in the
  135. * specified tab for the current extension. For more details, see <a
  136. * href='messaging'>Content Script Messaging</a>.
  137. * @param {number} tabId
  138. * @param {{
  139. * name: (string|undefined),
  140. * frameId: (number|undefined)
  141. * }=} connectInfo
  142. * @return {!chrome.runtime.Port} A port that can be used to communicate
  143. * with the content scripts running in the specified tab. The port's
  144. * $(ref:runtime.Port) event is fired if the tab closes or does not exist.
  145. * @see https://developer.chrome.com/extensions/tabs#method-connect
  146. */
  147. chrome.tabs.connect = function(tabId, connectInfo) {};
  148. /**
  149. * Sends a single request to the content script(s) in the specified tab, with an
  150. * optional callback to run when a response is sent back. The
  151. * $(ref:extension.onRequest) event is fired in each content script running in
  152. * the specified tab for the current extension.
  153. * @param {number} tabId
  154. * @param {*} request
  155. * @param {function(*): void=} responseCallback
  156. * @deprecated Please use $(ref:runtime.sendMessage).
  157. * @see https://developer.chrome.com/extensions/tabs#method-sendRequest
  158. */
  159. chrome.tabs.sendRequest = function(tabId, request, responseCallback) {};
  160. /**
  161. * Sends a single message to the content script(s) in the specified tab, with an
  162. * optional callback to run when a response is sent back. The
  163. * $(ref:runtime.onMessage) event is fired in each content script running in the
  164. * specified tab for the current extension.
  165. * @param {number} tabId
  166. * @param {*} message The message to send. This message should be a JSON-ifiable
  167. * object.
  168. * @param {{
  169. * frameId: (number|undefined)
  170. * }=} options
  171. * @param {function(*): void=} responseCallback
  172. * @see https://developer.chrome.com/extensions/tabs#method-sendMessage
  173. */
  174. chrome.tabs.sendMessage = function(tabId, message, options, responseCallback) {};
  175. /**
  176. * Gets the tab that is selected in the specified window.
  177. * @param {?number|undefined} windowId Defaults to the <a
  178. * href='windows#current-window'>current window</a>.
  179. * @param {function(!chrome.tabs.Tab): void} callback
  180. * @deprecated Please use $(ref:tabs.query) <code>{active: true}</code>.
  181. * @see https://developer.chrome.com/extensions/tabs#method-getSelected
  182. */
  183. chrome.tabs.getSelected = function(windowId, callback) {};
  184. /**
  185. * Gets details about all tabs in the specified window.
  186. * @param {?number|undefined} windowId Defaults to the <a
  187. * href='windows#current-window'>current window</a>.
  188. * @param {function(!Array<!chrome.tabs.Tab>): void} callback
  189. * @deprecated Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.
  190. * @see https://developer.chrome.com/extensions/tabs#method-getAllInWindow
  191. */
  192. chrome.tabs.getAllInWindow = function(windowId, callback) {};
  193. /**
  194. * Creates a new tab.
  195. * @param {{
  196. * windowId: (number|undefined),
  197. * index: (number|undefined),
  198. * url: (string|undefined),
  199. * active: (boolean|undefined),
  200. * selected: (boolean|undefined),
  201. * pinned: (boolean|undefined),
  202. * openerTabId: (number|undefined)
  203. * }} createProperties
  204. * @param {function(!chrome.tabs.Tab): void=} callback
  205. * @see https://developer.chrome.com/extensions/tabs#method-create
  206. */
  207. chrome.tabs.create = function(createProperties, callback) {};
  208. /**
  209. * Duplicates a tab.
  210. * @param {number} tabId The ID of the tab to duplicate.
  211. * @param {function((!chrome.tabs.Tab|undefined)): void=} callback
  212. * @see https://developer.chrome.com/extensions/tabs#method-duplicate
  213. */
  214. chrome.tabs.duplicate = function(tabId, callback) {};
  215. /**
  216. * Gets all tabs that have the specified properties, or all tabs if no
  217. * properties are specified.
  218. * @param {{
  219. * active: (boolean|undefined),
  220. * pinned: (boolean|undefined),
  221. * audible: (boolean|undefined),
  222. * muted: (boolean|undefined),
  223. * highlighted: (boolean|undefined),
  224. * discarded: (boolean|undefined),
  225. * autoDiscardable: (boolean|undefined),
  226. * currentWindow: (boolean|undefined),
  227. * lastFocusedWindow: (boolean|undefined),
  228. * status: (!chrome.tabs.TabStatus|undefined),
  229. * title: (string|undefined),
  230. * url: ((string|!Array<string>)|undefined),
  231. * groupId: (number|undefined),
  232. * windowId: (number|undefined),
  233. * windowType: (!chrome.tabs.WindowType|undefined),
  234. * index: (number|undefined)
  235. * }} queryInfo
  236. * @param {function(!Array<!chrome.tabs.Tab>): void} callback
  237. * @see https://developer.chrome.com/extensions/tabs#method-query
  238. */
  239. chrome.tabs.query = function(queryInfo, callback) {};
  240. /**
  241. * Highlights the given tabs and focuses on the first of group. Will appear to
  242. * do nothing if the specified tab is currently active.
  243. * @param {{
  244. * windowId: (number|undefined),
  245. * tabs: (!Array<number>|number)
  246. * }} highlightInfo
  247. * @param {function(!chrome.windows.Window): void=} callback
  248. * @see https://developer.chrome.com/extensions/tabs#method-highlight
  249. */
  250. chrome.tabs.highlight = function(highlightInfo, callback) {};
  251. /**
  252. * Modifies the properties of a tab. Properties that are not specified in
  253. * <var>updateProperties</var> are not modified.
  254. * @param {?number|undefined} tabId Defaults to the selected tab of the <a
  255. * href='windows#current-window'>current window</a>.
  256. * @param {{
  257. * url: (string|undefined),
  258. * active: (boolean|undefined),
  259. * highlighted: (boolean|undefined),
  260. * selected: (boolean|undefined),
  261. * pinned: (boolean|undefined),
  262. * muted: (boolean|undefined),
  263. * openerTabId: (number|undefined),
  264. * autoDiscardable: (boolean|undefined)
  265. * }} updateProperties
  266. * @param {function((!chrome.tabs.Tab|undefined)): void=} callback
  267. * @see https://developer.chrome.com/extensions/tabs#method-update
  268. */
  269. chrome.tabs.update = function(tabId, updateProperties, callback) {};
  270. /**
  271. * Moves one or more tabs to a new position within its window, or to a new
  272. * window. Note that tabs can only be moved to and from normal (window.type ===
  273. * "normal") windows.
  274. * @param {(number|!Array<number>)} tabIds The tab ID or list of tab IDs to
  275. * move.
  276. * @param {{
  277. * windowId: (number|undefined),
  278. * index: number
  279. * }} moveProperties
  280. * @param {function((!chrome.tabs.Tab|!Array<!chrome.tabs.Tab>)): void=}
  281. * callback
  282. * @see https://developer.chrome.com/extensions/tabs#method-move
  283. */
  284. chrome.tabs.move = function(tabIds, moveProperties, callback) {};
  285. /**
  286. * Reload a tab.
  287. * @param {number=} tabId The ID of the tab to reload; defaults to the selected
  288. * tab of the current window.
  289. * @param {{
  290. * bypassCache: (boolean|undefined)
  291. * }=} reloadProperties
  292. * @param {function(): void=} callback
  293. * @see https://developer.chrome.com/extensions/tabs#method-reload
  294. */
  295. chrome.tabs.reload = function(tabId, reloadProperties, callback) {};
  296. /**
  297. * Closes one or more tabs.
  298. * @param {(number|!Array<number>)} tabIds The tab ID or list of tab IDs to
  299. * close.
  300. * @param {function(): void=} callback
  301. * @see https://developer.chrome.com/extensions/tabs#method-remove
  302. */
  303. chrome.tabs.remove = function(tabIds, callback) {};
  304. /**
  305. * Adds one or more tabs to a specified group, or if no group is specified, adds
  306. * the given tabs to a newly created group.
  307. * @param {{
  308. * tabIds: (number|!Array<number>),
  309. * groupId: (number|undefined),
  310. * createProperties: ({
  311. * windowId: (number|undefined)
  312. * }|undefined)
  313. * }} options
  314. * @param {function(number): void=} callback
  315. * @see https://developer.chrome.com/extensions/tabs#method-group
  316. */
  317. chrome.tabs.group = function(options, callback) {};
  318. /**
  319. * Removes one or more tabs from their respective groups. If any groups become
  320. * empty, they are deleted.
  321. * @param {(number|!Array<number>)} tabIds The tab ID or list of tab IDs to
  322. * remove from their respective groups.
  323. * @param {function(): void=} callback
  324. * @see https://developer.chrome.com/extensions/tabs#method-ungroup
  325. */
  326. chrome.tabs.ungroup = function(tabIds, callback) {};
  327. /**
  328. * Detects the primary language of the content in a tab.
  329. * @param {?number|undefined} tabId Defaults to the active tab of the <a
  330. * href='windows#current-window'>current window</a>.
  331. * @param {function(string): void} callback
  332. * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
  333. */
  334. chrome.tabs.detectLanguage = function(tabId, callback) {};
  335. /**
  336. * Captures the visible area of the currently active tab in the specified
  337. * window. In order to call this method, the extension must have either the <a
  338. * href='declare_permissions'>&lt;all_urls&gt;</a> permission or the <a
  339. * href='activeTab'>activeTab</a> permission. In addition to sites that
  340. * extensions can normally access, this method allows extensions to capture
  341. * sensitive sites that are otherwise restricted, including chrome:-scheme
  342. * pages, other extensions' pages, and data: URLs. These sensitive sites can
  343. * only be captured with the activeTab permission. File URLs may be captured
  344. * only if the extension has been granted file access.
  345. * @param {?number|undefined} windowId The target window. Defaults to the <a
  346. * href='windows#current-window'>current window</a>.
  347. * @param {?chrome.extensionTypes.ImageDetails|undefined} options
  348. * @param {function(string): void} callback
  349. * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
  350. */
  351. chrome.tabs.captureVisibleTab = function(windowId, options, callback) {};
  352. /**
  353. * Injects JavaScript code into a page. For details, see the <a
  354. * href='content_scripts#pi'>programmatic injection</a> section of the content
  355. * scripts doc.
  356. * @param {?number|undefined} tabId The ID of the tab in which to run the
  357. * script; defaults to the active tab of the current window.
  358. * @param {!chrome.extensionTypes.InjectDetails} details Details of the
  359. * script to run. Either the code or the file property must be set, but both
  360. * may not be set at the same time.
  361. * @param {function((!Array<*>|undefined)): void=} callback Called after all the
  362. * JavaScript has been executed.
  363. * @see https://developer.chrome.com/extensions/tabs#method-executeScript
  364. */
  365. chrome.tabs.executeScript = function(tabId, details, callback) {};
  366. /**
  367. * Injects CSS into a page. For details, see the <a
  368. * href='content_scripts#pi'>programmatic injection</a> section of the content
  369. * scripts doc.
  370. * @param {?number|undefined} tabId The ID of the tab in which to insert the
  371. * CSS; defaults to the active tab of the current window.
  372. * @param {!chrome.extensionTypes.InjectDetails} details Details of the CSS
  373. * text to insert. Either the code or the file property must be set, but
  374. * both may not be set at the same time.
  375. * @param {function(): void=} callback Called when all the CSS has been
  376. * inserted.
  377. * @see https://developer.chrome.com/extensions/tabs#method-insertCSS
  378. */
  379. chrome.tabs.insertCSS = function(tabId, details, callback) {};
  380. /**
  381. * Zooms a specified tab.
  382. * @param {?number|undefined} tabId The ID of the tab to zoom; defaults to the
  383. * active tab of the current window.
  384. * @param {number} zoomFactor The new zoom factor. A value of <code>0</code>
  385. * sets the tab to its current default zoom factor. Values greater than
  386. * <code>0</code> specify a (possibly non-default) zoom factor for the tab.
  387. * @param {function(): void=} callback Called after the zoom factor has been
  388. * changed.
  389. * @see https://developer.chrome.com/extensions/tabs#method-setZoom
  390. */
  391. chrome.tabs.setZoom = function(tabId, zoomFactor, callback) {};
  392. /**
  393. * Gets the current zoom factor of a specified tab.
  394. * @param {?number|undefined} tabId The ID of the tab to get the current zoom
  395. * factor from; defaults to the active tab of the current window.
  396. * @param {function(number): void} callback Called with the tab's current zoom
  397. * factor after it has been fetched.
  398. * @see https://developer.chrome.com/extensions/tabs#method-getZoom
  399. */
  400. chrome.tabs.getZoom = function(tabId, callback) {};
  401. /**
  402. * Sets the zoom settings for a specified tab, which define how zoom changes are
  403. * handled. These settings are reset to defaults upon navigating the tab.
  404. * @param {?number|undefined} tabId The ID of the tab to change the zoom
  405. * settings for; defaults to the active tab of the current window.
  406. * @param {!chrome.tabs.ZoomSettings} zoomSettings Defines how zoom changes are
  407. * handled and at what scope.
  408. * @param {function(): void=} callback Called after the zoom settings are
  409. * changed.
  410. * @see https://developer.chrome.com/extensions/tabs#method-setZoomSettings
  411. */
  412. chrome.tabs.setZoomSettings = function(tabId, zoomSettings, callback) {};
  413. /**
  414. * Gets the current zoom settings of a specified tab.
  415. * @param {?number|undefined} tabId The ID of the tab to get the current zoom
  416. * settings from; defaults to the active tab of the current window.
  417. * @param {function(!chrome.tabs.ZoomSettings): void} callback Called with the
  418. * tab's current zoom settings.
  419. * @see https://developer.chrome.com/extensions/tabs#method-getZoomSettings
  420. */
  421. chrome.tabs.getZoomSettings = function(tabId, callback) {};
  422. /**
  423. * Discards a tab from memory. Discarded tabs are still visible on the tab strip
  424. * and are reloaded when activated.
  425. * @param {number=} tabId The ID of the tab to be discarded. If specified, the
  426. * tab is discarded unless it is active or already discarded. If omitted,
  427. * the browser discards the least important tab. This can fail if no
  428. * discardable tabs exist.
  429. * @param {function((!chrome.tabs.Tab|undefined)): void=} callback Called after
  430. * the operation is completed.
  431. * @see https://developer.chrome.com/extensions/tabs#method-discard
  432. */
  433. chrome.tabs.discard = function(tabId, callback) {};
  434. /**
  435. * Go foward to the next page, if one is available.
  436. * @param {number=} tabId The ID of the tab to navigate forward; defaults to the
  437. * selected tab of the current window.
  438. * @param {function(): void=} callback
  439. * @see https://developer.chrome.com/extensions/tabs#method-goForward
  440. */
  441. chrome.tabs.goForward = function(tabId, callback) {};
  442. /**
  443. * Go back to the previous page, if one is available.
  444. * @param {number=} tabId The ID of the tab to navigate back; defaults to the
  445. * selected tab of the current window.
  446. * @param {function(): void=} callback
  447. * @see https://developer.chrome.com/extensions/tabs#method-goBack
  448. */
  449. chrome.tabs.goBack = function(tabId, callback) {};
  450. /**
  451. * Fired when a tab is created. Note that the tab's URL may not be set at the
  452. * time this event is fired, but you can listen to onUpdated events so as to be
  453. * notified when a URL is set.
  454. * @type {!ChromeEvent}
  455. * @see https://developer.chrome.com/extensions/tabs#event-onCreated
  456. */
  457. chrome.tabs.onCreated;
  458. /**
  459. * Fired when a tab is updated.
  460. * @type {!ChromeEvent}
  461. * @see https://developer.chrome.com/extensions/tabs#event-onUpdated
  462. */
  463. chrome.tabs.onUpdated;
  464. /**
  465. * Fired when a tab is moved within a window. Only one move event is fired,
  466. * representing the tab the user directly moved. Move events are not fired for
  467. * the other tabs that must move in response to the manually-moved tab. This
  468. * event is not fired when a tab is moved between windows; for details, see
  469. * $(ref:tabs.onDetached).
  470. * @type {!ChromeEvent}
  471. * @see https://developer.chrome.com/extensions/tabs#event-onMoved
  472. */
  473. chrome.tabs.onMoved;
  474. /**
  475. * Fires when the selected tab in a window changes.
  476. * @type {!ChromeEvent}
  477. * @see https://developer.chrome.com/extensions/tabs#event-onSelectionChanged
  478. */
  479. chrome.tabs.onSelectionChanged;
  480. /**
  481. * Fires when the selected tab in a window changes. Note that the tab's URL may
  482. * not be set at the time this event fired, but you can listen to
  483. * $(ref:tabs.onUpdated) events so as to be notified when a URL is set.
  484. * @type {!ChromeEvent}
  485. * @see https://developer.chrome.com/extensions/tabs#event-onActiveChanged
  486. */
  487. chrome.tabs.onActiveChanged;
  488. /**
  489. * Fires when the active tab in a window changes. Note that the tab's URL may
  490. * not be set at the time this event fired, but you can listen to onUpdated
  491. * events so as to be notified when a URL is set.
  492. * @type {!ChromeEvent}
  493. * @see https://developer.chrome.com/extensions/tabs#event-onActivated
  494. */
  495. chrome.tabs.onActivated;
  496. /**
  497. * Fired when the highlighted or selected tabs in a window changes.
  498. * @type {!ChromeEvent}
  499. * @see https://developer.chrome.com/extensions/tabs#event-onHighlightChanged
  500. */
  501. chrome.tabs.onHighlightChanged;
  502. /**
  503. * Fired when the highlighted or selected tabs in a window changes.
  504. * @type {!ChromeEvent}
  505. * @see https://developer.chrome.com/extensions/tabs#event-onHighlighted
  506. */
  507. chrome.tabs.onHighlighted;
  508. /**
  509. * Fired when a tab is detached from a window; for example, because it was moved
  510. * between windows.
  511. * @type {!ChromeEvent}
  512. * @see https://developer.chrome.com/extensions/tabs#event-onDetached
  513. */
  514. chrome.tabs.onDetached;
  515. /**
  516. * Fired when a tab is attached to a window; for example, because it was moved
  517. * between windows.
  518. * @type {!ChromeEvent}
  519. * @see https://developer.chrome.com/extensions/tabs#event-onAttached
  520. */
  521. chrome.tabs.onAttached;
  522. /**
  523. * Fired when a tab is closed.
  524. * @type {!ChromeEvent}
  525. * @see https://developer.chrome.com/extensions/tabs#event-onRemoved
  526. */
  527. chrome.tabs.onRemoved;
  528. /**
  529. * Fired when a tab is replaced with another tab due to prerendering or instant.
  530. * @type {!ChromeEvent}
  531. * @see https://developer.chrome.com/extensions/tabs#event-onReplaced
  532. */
  533. chrome.tabs.onReplaced;
  534. /**
  535. * Fired when a tab is zoomed.
  536. * @type {!ChromeEvent}
  537. * @see https://developer.chrome.com/extensions/tabs#event-onZoomChange
  538. */
  539. chrome.tabs.onZoomChange;