chrome-types 0.1.403 → 0.1.405

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/_all.d.ts +101 -117
  2. package/index.d.ts +101 -117
  3. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2025 Google LLC
2
+ * Copyright 2026 Google LLC
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed Dec 24 2025 22:33:46 GMT+0000 (Coordinated Universal Time)
18
- // Built at 456fefca54e809142055dbd8348d8d51eaaef2e8
17
+ // Generated on Tue Jan 06 2026 22:34:25 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 6e48d4846be29f4a9aaed3eb462a776dde83c792
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -876,7 +876,7 @@ declare namespace chrome {
876
876
  *
877
877
  * @param name Optional name to identify this alarm. Defaults to the empty string.
878
878
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
879
- * @param callback Invoked when the alarm has been created.
879
+ * @param callback Promise that resolves when the alarm has been created.
880
880
  */
881
881
  export function create(
882
882
 
@@ -898,7 +898,7 @@ declare namespace chrome {
898
898
  * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
899
899
  *
900
900
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
901
- * @param callback Invoked when the alarm has been created.
901
+ * @param callback Promise that resolves when the alarm has been created.
902
902
  */
903
903
  export function create(
904
904
 
@@ -1242,7 +1242,7 @@ declare namespace chrome {
1242
1242
  * Gets the system-wide mute state for the specified stream type.
1243
1243
  *
1244
1244
  * @param streamType Stream type for which mute state should be fetched.
1245
- * @param callback Callback reporting whether mute is set or not for specified stream type.
1245
+ * @param callback Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
1246
1246
  */
1247
1247
  export function getMute(
1248
1248
 
@@ -2617,7 +2617,7 @@ declare namespace chrome {
2617
2617
  * Requests the PIN from the user. Only one ongoing request at a time is allowed. The requests issued while another flow is ongoing are rejected. It's the extension's responsibility to try again later if another flow is in progress.
2618
2618
  *
2619
2619
  * @param details Contains the details about the requested dialog.
2620
- * @param callback Is called when the dialog is resolved with the user input, or when the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).
2620
+ * @param callback Returns a Promise which resolves when the PIN is provided by the user. Rejects with an error if the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).
2621
2621
  * @since Chrome 57
2622
2622
  */
2623
2623
  export function requestPin(
@@ -2645,7 +2645,7 @@ declare namespace chrome {
2645
2645
  * Stops the pin request started by the {@link requestPin} function.
2646
2646
  *
2647
2647
  * @param details Contains the details about the reason for stopping the request flow.
2648
- * @param callback To be used by Chrome to send to the extension the status from their request to close PIN dialog for user.
2648
+ * @param callback Returns a Promise which resolves when the request to close the PIN dialog is complete.
2649
2649
  * @since Chrome 57
2650
2650
  */
2651
2651
  export function stopPinRequest(
@@ -2675,7 +2675,7 @@ declare namespace chrome {
2675
2675
  * The extension should call this function after initialization and on every change in the set of currently available certificates. The extension should also call this function in response to {@link onCertificatesUpdateRequested} every time this event is received.
2676
2676
  *
2677
2677
  * @param details The certificates to set. Invalid certificates will be ignored.
2678
- * @param callback Called upon completion.
2678
+ * @param callback Returns a Promise which resolves upon completion.
2679
2679
  * @since Chrome 86
2680
2680
  */
2681
2681
  export function setCertificates(
@@ -5566,7 +5566,7 @@ declare namespace chrome {
5566
5566
  * * Static rules specified as part of the extension package can not be removed using this function.
5567
5567
  * * {@link MAX_NUMBER_OF_DYNAMIC_RULES} is the maximum number of dynamic rules an extension can add. The number of [unsafe rules](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#safe_rules) must not exceed {@link MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES}.
5568
5568
  *
5569
- * @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
5569
+ * @param callback Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
5570
5570
  */
5571
5571
  export function updateDynamicRules(
5572
5572
 
@@ -5596,7 +5596,7 @@ declare namespace chrome {
5596
5596
  * Returns the current set of dynamic rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
5597
5597
  *
5598
5598
  * @param filter An object to filter the list of fetched rules.
5599
- * @param callback Called with the set of dynamic rules. An error might be raised in case of transient internal errors.
5599
+ * @param callback Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
5600
5600
  */
5601
5601
  export function getDynamicRules(
5602
5602
 
@@ -5632,7 +5632,7 @@ declare namespace chrome {
5632
5632
  * * These rules are not persisted across sessions and are backed in memory.
5633
5633
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
5634
5634
  *
5635
- * @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
5635
+ * @param callback Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
5636
5636
  * @since Chrome 90
5637
5637
  */
5638
5638
  export function updateSessionRules(
@@ -5661,7 +5661,7 @@ declare namespace chrome {
5661
5661
  * Returns the current set of session scoped rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
5662
5662
  *
5663
5663
  * @param filter An object to filter the list of fetched rules.
5664
- * @param callback Called with the set of session scoped rules.
5664
+ * @param callback Promise that resolves with the set of session scoped rules.
5665
5665
  * @since Chrome 90
5666
5666
  */
5667
5667
  export function getSessionRules(
@@ -5694,7 +5694,7 @@ declare namespace chrome {
5694
5694
  * Updates the set of enabled static rulesets for the extension. The rulesets with IDs listed in `options.disableRulesetIds` are first removed, and then the rulesets listed in `options.enableRulesetIds` are added.
5695
5695
  * Note that the set of enabled static rulesets is persisted across sessions but not across extension updates, i.e. the `rule_resources` manifest key will determine the set of enabled static rulesets on each extension update.
5696
5696
  *
5697
- * @param callback Called once the update is complete. In case of an error, {@link runtime.lastError} will be set and no change will be made to set of enabled rulesets. This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
5697
+ * @param callback Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the set of enabled rulesets. This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
5698
5698
  */
5699
5699
  export function updateEnabledRulesets(
5700
5700
 
@@ -5716,7 +5716,7 @@ declare namespace chrome {
5716
5716
  /**
5717
5717
  * Returns the ids for the current set of enabled static rulesets.
5718
5718
  *
5719
- * @param callback Called with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
5719
+ * @param callback Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
5720
5720
  */
5721
5721
  export function getEnabledRulesets(
5722
5722
 
@@ -5738,7 +5738,7 @@ declare namespace chrome {
5738
5738
  /**
5739
5739
  * Disables and enables individual static rules in a {@link Ruleset}. Changes to rules belonging to a disabled {@link Ruleset} will take effect the next time that it becomes enabled.
5740
5740
  *
5741
- * @param callback Called once the update is complete. In case of an error, {@link runtime.lastError} will be set and no change will be made to the enabled static rules.
5741
+ * @param callback Promise that resolves when the update is complete. In case of an error, the promise will be rejected and no change will be made to the enabled static rules.
5742
5742
  * @since Chrome 111
5743
5743
  */
5744
5744
  export function updateStaticRules(
@@ -5763,7 +5763,7 @@ declare namespace chrome {
5763
5763
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
5764
5764
  *
5765
5765
  * @param options Specifies the ruleset to query.
5766
- * @param callback Called with a list of ids that correspond to the disabled rules in that ruleset.
5766
+ * @param callback Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
5767
5767
  * @since Chrome 111
5768
5768
  */
5769
5769
  export function getDisabledRuleIds(
@@ -5790,7 +5790,7 @@ declare namespace chrome {
5790
5790
  * Returns all rules matched for the extension. Callers can optionally filter the list of matched rules by specifying a `filter`. This method is only available to extensions with the `"declarativeNetRequestFeedback"` permission or having the `"activeTab"` permission granted for the `tabId` specified in `filter`. Note: Rules not associated with an active document that were matched more than five minutes ago will not be returned.
5791
5791
  *
5792
5792
  * @param filter An object to filter the list of matched rules.
5793
- * @param callback Called once the list of matched rules has been fetched. In case of an error, {@link runtime.lastError} will be set and no rules will be returned. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
5793
+ * @param callback Promise that resolves once the list of matched rules has been fetched. In case of an error, the Promise will be rejected. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
5794
5794
  */
5795
5795
  export function getMatchedRules(
5796
5796
 
@@ -5843,7 +5843,7 @@ declare namespace chrome {
5843
5843
  * Checks if the given regular expression will be supported as a `regexFilter` rule condition.
5844
5844
  *
5845
5845
  * @param regexOptions The regular expression to check.
5846
- * @param callback Called with details consisting of whether the regular expression is supported and the reason if not.
5846
+ * @param callback Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
5847
5847
  * @since Chrome 87
5848
5848
  */
5849
5849
  export function isRegexSupported(
@@ -5888,7 +5888,7 @@ declare namespace chrome {
5888
5888
  /**
5889
5889
  * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
5890
5890
  *
5891
- * @param callback Called with the details of matched rules.
5891
+ * @param callback Promise that resolves with the details of matched rules.
5892
5892
  * @since Chrome 103
5893
5893
  */
5894
5894
  export function testMatchOutcome(
@@ -6725,7 +6725,7 @@ declare namespace chrome {
6725
6725
  * Resolves the given hostname or IP address literal.
6726
6726
  *
6727
6727
  * @param hostname The hostname to resolve.
6728
- * @param callback Called when the resolution operation completes.
6728
+ * @param callback Promise that resolves when the resolution operation completes.
6729
6729
  */
6730
6730
  export function resolve(
6731
6731
 
@@ -7256,7 +7256,7 @@ declare namespace chrome {
7256
7256
  * Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
7257
7257
  *
7258
7258
  * @param options An object containing scan parameters.
7259
- * @param callback Called with the result and data from the scan.
7259
+ * @param callback Returns a Promise which resolves with the scan results.
7260
7260
  */
7261
7261
  export function scan(
7262
7262
 
@@ -7282,7 +7282,7 @@ declare namespace chrome {
7282
7282
  * Gets the list of available scanners and returns a Promise that resolves with a {@link GetScannerListResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7283
7283
  *
7284
7284
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
7285
- * @param callback Called with the result and list of scanners.
7285
+ * @param callback Returns a Promise which resolves with the result and list of scanners.
7286
7286
  * @since Chrome 125
7287
7287
  */
7288
7288
  export function getScannerList(
@@ -7309,7 +7309,7 @@ declare namespace chrome {
7309
7309
  * Opens a scanner for exclusive access and returns a Promise that resolves with an {@link OpenScannerResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7310
7310
  *
7311
7311
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
7312
- * @param callback Called with the result.
7312
+ * @param callback Returns a Promise which resolves with the result.
7313
7313
  * @since Chrome 125
7314
7314
  */
7315
7315
  export function openScanner(
@@ -7336,7 +7336,7 @@ declare namespace chrome {
7336
7336
  * Gets the group names and member options from a scanner previously opened by {@link openScanner}. This method returns a Promise that resolves with a {@link GetOptionGroupsResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7337
7337
  *
7338
7338
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
7339
- * @param callback Called with the result.
7339
+ * @param callback Returns a Promise which resolves with the result.
7340
7340
  * @since Chrome 125
7341
7341
  */
7342
7342
  export function getOptionGroups(
@@ -7363,7 +7363,7 @@ declare namespace chrome {
7363
7363
  * Closes the scanner with the passed in handle and returns a Promise that resolves with a {@link CloseScannerResponse} object. If a callback is used, the object is passed to it instead. Even if the response is not a success, the supplied handle becomes invalid and should not be used for further operations.
7364
7364
  *
7365
7365
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
7366
- * @param callback Called with the result.
7366
+ * @param callback Returns a Promise which resolves with the result.
7367
7367
  * @since Chrome 125
7368
7368
  */
7369
7369
  export function closeScanner(
@@ -7394,7 +7394,7 @@ declare namespace chrome {
7394
7394
  *
7395
7395
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
7396
7396
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
7397
- * @param callback Called with the result.
7397
+ * @param callback Returns a Promise which resolves with the result.
7398
7398
  * @since Chrome 125
7399
7399
  */
7400
7400
  export function setOptions(
@@ -7427,7 +7427,7 @@ declare namespace chrome {
7427
7427
  *
7428
7428
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
7429
7429
  * @param options A {@link StartScanOptions} object indicating the options to be used for the scan. The `StartScanOptions.format` property must match one of the entries returned in the scanner's `ScannerInfo`.
7430
- * @param callback Called with the result.
7430
+ * @param callback Returns a Promise which resolves with the result.
7431
7431
  * @since Chrome 125
7432
7432
  */
7433
7433
  export function startScan(
@@ -7456,7 +7456,7 @@ declare namespace chrome {
7456
7456
  * Cancels a started scan and returns a Promise that resolves with a {@link CancelScanResponse} object. If a callback is used, the object is passed to it instead.
7457
7457
  *
7458
7458
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
7459
- * @param callback Called with the result.
7459
+ * @param callback Returns a Promise which resolves with the result.
7460
7460
  * @since Chrome 125
7461
7461
  */
7462
7462
  export function cancelScan(
@@ -7491,7 +7491,7 @@ declare namespace chrome {
7491
7491
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
7492
7492
  *
7493
7493
  * @param job Active job handle previously returned from {@link startScan}.
7494
- * @param callback Called with the result.
7494
+ * @param callback Returns a Promise which resolves with the result.
7495
7495
  * @since Chrome 125
7496
7496
  */
7497
7497
  export function readScanData(
@@ -8059,7 +8059,7 @@ declare namespace chrome {
8059
8059
  * Download a URL. If the URL uses the HTTP\[S\] protocol, then the request will include all cookies currently set for its hostname. If both `filename` and `saveAs` are specified, then the Save As dialog will be displayed, pre-populated with the specified `filename`. If the download started successfully, `callback` will be called with the new {@link DownloadItem}'s `downloadId`. If there was an error starting the download, then `callback` will be called with `downloadId=undefined` and {@link runtime.lastError} will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
8060
8060
  *
8061
8061
  * @param options What to download and how.
8062
- * @param callback Called with the id of the new {@link DownloadItem}.
8062
+ * @param callback Returns a Promise which resolves with the id of the new {@link DownloadItem}.
8063
8063
  */
8064
8064
  export function download(
8065
8065
 
@@ -8107,7 +8107,7 @@ declare namespace chrome {
8107
8107
  * Pause the download. If the request was successful the download is in a paused state. Otherwise {@link runtime.lastError} contains an error message. The request will fail if the download is not active.
8108
8108
  *
8109
8109
  * @param downloadId The id of the download to pause.
8110
- * @param callback Called when the pause request is completed.
8110
+ * @param callback Returns a Promise which resolves when the pause request is completed.
8111
8111
  */
8112
8112
  export function pause(
8113
8113
 
@@ -8131,7 +8131,7 @@ declare namespace chrome {
8131
8131
  * Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise {@link runtime.lastError} contains an error message. The request will fail if the download is not active.
8132
8132
  *
8133
8133
  * @param downloadId The id of the download to resume.
8134
- * @param callback Called when the resume request is completed.
8134
+ * @param callback Returns a Promise which resolves when the resume request is completed.
8135
8135
  */
8136
8136
  export function resume(
8137
8137
 
@@ -8155,7 +8155,7 @@ declare namespace chrome {
8155
8155
  * Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
8156
8156
  *
8157
8157
  * @param downloadId The id of the download to cancel.
8158
- * @param callback Called when the cancel request is completed.
8158
+ * @param callback Returns a Promise which resolves when the cancel request is completed.
8159
8159
  */
8160
8160
  export function cancel(
8161
8161
 
@@ -8181,7 +8181,7 @@ declare namespace chrome {
8181
8181
  * Retrieve an icon for the specified download. For new downloads, file icons are available after the {@link onCreated} event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, {@link runtime.lastError} will contain an error message.
8182
8182
  *
8183
8183
  * @param downloadId The identifier for the download.
8184
- * @param callback A URL to an image that represents the download.
8184
+ * @param callback Returns a Promise which resolves with a URL to an image that represents the download.
8185
8185
  */
8186
8186
  export function getFileIcon(
8187
8187
 
@@ -8292,7 +8292,7 @@ declare namespace chrome {
8292
8292
  * Prompt the user to accept a dangerous download. Can only be called from a visible context (tab, window, or page/browser action popup). Does not automatically accept dangerous downloads. If the download is accepted, then an {@link onChanged} event will fire, otherwise nothing will happen. When all the data is fetched into a temporary file and either the download is not dangerous or the danger has been accepted, then the temporary file is renamed to the target filename, the `state` changes to 'complete', and {@link onChanged} fires.
8293
8293
  *
8294
8294
  * @param downloadId The identifier for the {@link DownloadItem}.
8295
- * @param callback Called when the danger prompt dialog closes.
8295
+ * @param callback Returns a Promise which resolves when the danger prompt dialog closes.
8296
8296
  */
8297
8297
  export function acceptDanger(
8298
8298
 
@@ -8327,7 +8327,7 @@ declare namespace chrome {
8327
8327
  * Change the download UI of every window associated with the current browser profile. As long as at least one extension has set {@link UiOptions.enabled} to false, the download UI will be hidden. Setting {@link UiOptions.enabled} to true while at least one other extension has disabled it will return an error through {@link runtime.lastError}. Requires the `"downloads.ui"` permission in addition to the `"downloads"` permission.
8328
8328
  *
8329
8329
  * @param options Encapsulate a change to the download UI.
8330
- * @param callback Called when the UI update is completed.
8330
+ * @param callback Returns a Promise which resolves when the UI update is completed.
8331
8331
  * @since Chrome 105
8332
8332
  */
8333
8333
  export function setUiOptions(
@@ -8358,7 +8358,7 @@ declare namespace chrome {
8358
8358
  /**
8359
8359
  * Fetches the value of [the device identifier of the directory API](https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices), that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API. If the current user is not affiliated, returns an empty string.
8360
8360
  *
8361
- * @param callback Called with the device identifier of the directory API when received.
8361
+ * @param callback Returns a Promise which resolves with the device identifier of the directory API.
8362
8362
  */
8363
8363
  export function getDirectoryDeviceId(
8364
8364
 
@@ -8378,7 +8378,7 @@ declare namespace chrome {
8378
8378
  /**
8379
8379
  * Fetches the device's serial number. Please note the purpose of this API is to administrate the device (e.g. generating Certificate Sign Requests for device-wide certificates). This API may not be used for tracking devices without the consent of the device's administrator. If the current user is not affiliated, returns an empty string.
8380
8380
  *
8381
- * @param callback Called with the serial number of the device.
8381
+ * @param callback Returns a Promise which resolves with the serial number of the device.
8382
8382
  * @since Chrome 66
8383
8383
  */
8384
8384
  export function getDeviceSerialNumber(
@@ -8399,7 +8399,7 @@ declare namespace chrome {
8399
8399
  /**
8400
8400
  * Fetches the administrator-annotated Asset Id. If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
8401
8401
  *
8402
- * @param callback Called with the Asset ID of the device.
8402
+ * @param callback Returns a Promise which resolves with the Asset ID of the device.
8403
8403
  * @since Chrome 66
8404
8404
  */
8405
8405
  export function getDeviceAssetId(
@@ -8420,7 +8420,7 @@ declare namespace chrome {
8420
8420
  /**
8421
8421
  * Fetches the administrator-annotated Location. If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
8422
8422
  *
8423
- * @param callback Called with the Annotated Location of the device.
8423
+ * @param callback Returns a Promise which resolves with the Annotated Location of the device.
8424
8424
  * @since Chrome 66
8425
8425
  */
8426
8426
  export function getDeviceAnnotatedLocation(
@@ -8441,7 +8441,7 @@ declare namespace chrome {
8441
8441
  /**
8442
8442
  * Fetches the device's hostname as set by DeviceHostnameTemplate policy. If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string.
8443
8443
  *
8444
- * @param callback Called with hostname of the device.
8444
+ * @param callback Returns a Promise which resolves with the hostname of the device.
8445
8445
  * @since Chrome 82
8446
8446
  */
8447
8447
  export function getDeviceHostname(
@@ -8478,7 +8478,7 @@ declare namespace chrome {
8478
8478
  /**
8479
8479
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
8480
8480
  *
8481
- * @param callback Called with the hardware platform info.
8481
+ * @param callback Returns a Promise which resolves with the hardware platform info.
8482
8482
  */
8483
8483
  export function getHardwarePlatformInfo(
8484
8484
 
@@ -8520,7 +8520,7 @@ declare namespace chrome {
8520
8520
  * Sets the current input method. This function only changes the current input method to an enabled input method. Input methods can be enabled by enterprise polices. If the input method ID is invalid, or not enabled, {@link runtime.lastError} will be set with a failure reason.
8521
8521
  *
8522
8522
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
8523
- * @param callback Called when the input method is changed or if there is an error.
8523
+ * @param callback Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
8524
8524
  */
8525
8525
  export function setCurrentInputMethod(
8526
8526
 
@@ -8592,7 +8592,7 @@ declare namespace chrome {
8592
8592
  /**
8593
8593
  * Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
8594
8594
  *
8595
- * @param callback Called with the device's default network's {@link NetworkDetails}.
8595
+ * @param callback Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
8596
8596
  */
8597
8597
  export function getNetworkDetails(
8598
8598
 
@@ -8724,7 +8724,7 @@ declare namespace chrome {
8724
8724
  * Returns the list of all client certificates available from the given token. Can be used to check for the existence and expiration of client certificates that are usable for a certain authentication.
8725
8725
  *
8726
8726
  * @param tokenId The id of a Token returned by `getTokens`.
8727
- * @param callback Called back with the list of the available certificates.
8727
+ * @param callback Returns a Promise which resolves with the list of the available certificates.
8728
8728
  */
8729
8729
  export function getCertificates(
8730
8730
 
@@ -8757,7 +8757,7 @@ declare namespace chrome {
8757
8757
  *
8758
8758
  * @param tokenId The id of a Token returned by `getTokens`.
8759
8759
  * @param certificate The DER encoding of a X.509 certificate.
8760
- * @param callback Called back when this operation is finished.
8760
+ * @param callback Returns a Promise which resolves when this operation is finished.
8761
8761
  */
8762
8762
  export function importCertificate(
8763
8763
 
@@ -8787,7 +8787,7 @@ declare namespace chrome {
8787
8787
  *
8788
8788
  * @param tokenId The id of a Token returned by `getTokens`.
8789
8789
  * @param certificate The DER encoding of a X.509 certificate.
8790
- * @param callback Called back when this operation is finished.
8790
+ * @param callback Returns a Promise which resolves when this operation is finished.
8791
8791
  */
8792
8792
  export function removeCertificate(
8793
8793
 
@@ -8822,7 +8822,7 @@ declare namespace chrome {
8822
8822
  * This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise device policy. The challenged key does not reside in the `"system"` or `"user"` token and is not accessible by any other API.
8823
8823
  *
8824
8824
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
8825
- * @param callback Called back with the challenge response.
8825
+ * @param callback Returns a Promise which resolves with the challenge response.
8826
8826
  * @since Chrome 110
8827
8827
  */
8828
8828
  export function challengeKey(
@@ -8862,7 +8862,7 @@ declare namespace chrome {
8862
8862
  *
8863
8863
  * @param challenge A challenge as emitted by the Verified Access Web API.
8864
8864
  * @param registerKey If set, the current Enterprise Machine Key is registered with the `"system"` token and relinquishes the Enterprise Machine Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise Machine Key.
8865
- * @param callback Called back with the challenge response.
8865
+ * @param callback Returns a Promise which resolves with the challenge response.
8866
8866
  * @deprecated Use {@link challengeKey} instead.
8867
8867
  * @since Chrome 50
8868
8868
  * @chrome-deprecated-since Chrome 110
@@ -8906,7 +8906,7 @@ declare namespace chrome {
8906
8906
  *
8907
8907
  * @param challenge A challenge as emitted by the Verified Access Web API.
8908
8908
  * @param registerKey If set, the current Enterprise User Key is registered with the `"user"` token and relinquishes the Enterprise User Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise User Key.
8909
- * @param callback Called back with the challenge response.
8909
+ * @param callback Returns a Promise which resolves with the challenge response.
8910
8910
  * @deprecated Use {@link challengeKey} instead.
8911
8911
  * @since Chrome 50
8912
8912
  * @chrome-deprecated-since Chrome 110
@@ -12380,7 +12380,7 @@ declare namespace chrome {
12380
12380
  * Note: When called with a callback, instead of returning an object this function will return the two properties as separate arguments passed to the callback.
12381
12381
  *
12382
12382
  * @param details Token options.
12383
- * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error. The `grantedScopes` parameter is populated since Chrome 87. When available, this parameter contains the list of granted scopes corresponding with the returned token.
12383
+ * @param callback Returns a Promise which resolves with an OAuth2 access token as specified by the manifest, or rejects if there was an error. The `grantedScopes` parameter is populated since Chrome 87. When available, this parameter contains the list of granted scopes corresponding with the returned token.
12384
12384
  */
12385
12385
  export function getAuthToken(
12386
12386
 
@@ -12420,7 +12420,7 @@ declare namespace chrome {
12420
12420
  * This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
12421
12421
  *
12422
12422
  * @param details Profile options.
12423
- * @param callback Called with the `ProfileUserInfo` of the primary Chrome account, of an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
12423
+ * @param callback Returns a Promise which resolves with the `ProfileUserInfo` of the primary Chrome account, or an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
12424
12424
  */
12425
12425
  export function getProfileUserInfo(
12426
12426
 
@@ -12453,7 +12453,7 @@ declare namespace chrome {
12453
12453
  * If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with `getAuthToken`.
12454
12454
  *
12455
12455
  * @param details Token information.
12456
- * @param callback Called when the token has been removed from the cache.
12456
+ * @param callback Returns a Promise which resolves when the token has been removed from the cache.
12457
12457
  */
12458
12458
  export function removeCachedAuthToken(
12459
12459
 
@@ -12481,7 +12481,7 @@ declare namespace chrome {
12481
12481
  * * Removes user's account preferences
12482
12482
  * * De-authorizes the user from all auth flows
12483
12483
  *
12484
- * @param callback Called when the state has been cleared.
12484
+ * @param callback Returns a Promise which resolves when the state has been cleared.
12485
12485
  * @since Chrome 87
12486
12486
  */
12487
12487
  export function clearAllCachedAuthTokens(
@@ -12512,7 +12512,7 @@ declare namespace chrome {
12512
12512
  * For a good user experience it is important interactive auth flows are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests with no context. In particular, do not launch an interactive auth flow when your app is first launched.
12513
12513
  *
12514
12514
  * @param details WebAuth flow options.
12515
- * @param callback Called with the URL redirected back to your application.
12515
+ * @param callback Returns a Promise which resolves with the URL redirected back to your application.
12516
12516
  */
12517
12517
  export function launchWebAuthFlow(
12518
12518
 
@@ -14989,11 +14989,7 @@ declare namespace chrome {
14989
14989
 
14990
14990
  The `notificationId` parameter is required before Chrome 42.
14991
14991
  * @param options Contents of the notification.
14992
- * @param callback
14993
-
14994
- Returns the notification id (either supplied or generated) that represents the created notification.
14995
-
14996
- The callback is required before Chrome 42.
14992
+ * @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
14997
14993
  */
14998
14994
  export function create(
14999
14995
 
@@ -15010,11 +15006,7 @@ declare namespace chrome {
15010
15006
  * Creates and displays a notification.
15011
15007
  *
15012
15008
  * @param options Contents of the notification.
15013
- * @param callback
15014
-
15015
- Returns the notification id (either supplied or generated) that represents the created notification.
15016
-
15017
- The callback is required before Chrome 42.
15009
+ * @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
15018
15010
  */
15019
15011
  export function create(
15020
15012
 
@@ -15044,11 +15036,7 @@ declare namespace chrome {
15044
15036
  *
15045
15037
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
15046
15038
  * @param options Contents of the notification to update to.
15047
- * @param callback
15048
-
15049
- Called to indicate whether a matching notification existed.
15050
-
15051
- The callback is required before Chrome 42.
15039
+ * @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
15052
15040
  */
15053
15041
  export function update(
15054
15042
 
@@ -15076,11 +15064,7 @@ declare namespace chrome {
15076
15064
  * Clears the specified notification.
15077
15065
  *
15078
15066
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
15079
- * @param callback
15080
-
15081
- Called to indicate whether a matching notification existed.
15082
-
15083
- The callback is required before Chrome 42.
15067
+ * @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
15084
15068
  */
15085
15069
  export function clear(
15086
15070
 
@@ -15101,7 +15085,7 @@ declare namespace chrome {
15101
15085
  /**
15102
15086
  * Retrieves all the notifications of this app or extension.
15103
15087
  *
15104
- * @param callback Returns the set of notification\_ids currently in the system.
15088
+ * @param callback Returns a Promise which resolves with the set of notification\_ids currently in the system.
15105
15089
  */
15106
15090
  export function getAll(
15107
15091
 
@@ -15120,7 +15104,7 @@ declare namespace chrome {
15120
15104
  /**
15121
15105
  * Retrieves whether the user has enabled notifications from this app or extension.
15122
15106
  *
15123
- * @param callback Returns the current permission level.
15107
+ * @param callback Returns a Promise which resolves with the current permission level.
15124
15108
  */
15125
15109
  export function getPermissionLevel(
15126
15110
 
@@ -15211,7 +15195,7 @@ declare namespace chrome {
15211
15195
  * Creates a new offscreen document for the extension.
15212
15196
  *
15213
15197
  * @param parameters The parameters describing the offscreen document to create.
15214
- * @param callback Invoked when the offscreen document is created and has completed its initial page load.
15198
+ * @param callback Promise that resolves when the offscreen document is created and has completed its initial page load.
15215
15199
  */
15216
15200
  export function createDocument(
15217
15201
 
@@ -15228,7 +15212,7 @@ declare namespace chrome {
15228
15212
  /**
15229
15213
  * Closes the currently-open offscreen document for the extension.
15230
15214
  *
15231
- * @param callback Invoked when the offscreen document has been closed.
15215
+ * @param callback Promise that resolves when the offscreen document has been closed.
15232
15216
  */
15233
15217
  export function closeDocument(
15234
15218
 
@@ -17158,7 +17142,7 @@ declare namespace chrome {
17158
17142
  * Adds an entry to the reading list if it does not exist.
17159
17143
  *
17160
17144
  * @param entry The entry to add to the reading list.
17161
- * @param callback Invoked once the entry has been added.
17145
+ * @param callback Resolves once the entry has been added.
17162
17146
  */
17163
17147
  export function addEntry(
17164
17148
 
@@ -17181,7 +17165,7 @@ declare namespace chrome {
17181
17165
  * Removes an entry from the reading list if it exists.
17182
17166
  *
17183
17167
  * @param info The entry to remove from the reading list.
17184
- * @param callback Invoked once the entry has been removed.
17168
+ * @param callback Resolves once the entry has been removed.
17185
17169
  */
17186
17170
  export function removeEntry(
17187
17171
 
@@ -17204,7 +17188,7 @@ declare namespace chrome {
17204
17188
  * Updates a reading list entry if it exists.
17205
17189
  *
17206
17190
  * @param info The entry to update.
17207
- * @param callback Invoked once the matched entries have been updated.
17191
+ * @param callback Resolves once the matched entries have been updated.
17208
17192
  */
17209
17193
  export function updateEntry(
17210
17194
 
@@ -17227,7 +17211,7 @@ declare namespace chrome {
17227
17211
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
17228
17212
  *
17229
17213
  * @param info The properties to search for.
17230
- * @param callback Invoked once the entries have been matched.
17214
+ * @param callback Resolves once the entries have been matched.
17231
17215
  */
17232
17216
  export function query(
17233
17217
 
@@ -18348,7 +18332,7 @@ declare namespace chrome {
18348
18332
  * Injects a script into a target context. By default, the script will be run at `document_idle`, or immediately if the page has already loaded. If the `injectImmediately` property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.
18349
18333
  *
18350
18334
  * @param injection The details of the script which to inject.
18351
- * @param callback Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
18335
+ * @param callback Returns a Promise which resolves upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
18352
18336
  */
18353
18337
  export function executeScript(
18354
18338
 
@@ -18374,7 +18358,7 @@ declare namespace chrome {
18374
18358
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
18375
18359
  *
18376
18360
  * @param injection The details of the styles to insert.
18377
- * @param callback Invoked upon completion of the insertion.
18361
+ * @param callback Returns a Promise which resolves upon completion of the insertion.
18378
18362
  */
18379
18363
  export function insertCSS(
18380
18364
 
@@ -18398,7 +18382,7 @@ declare namespace chrome {
18398
18382
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
18399
18383
  *
18400
18384
  * @param injection The details of the styles to remove. Note that the `css`, `files`, and `origin` properties must exactly match the stylesheet inserted through {@link insertCSS}. Attempting to remove a non-existent stylesheet is a no-op.
18401
- * @param callback A callback to be invoked upon the completion of the removal.
18385
+ * @param callback Returns a Promise which resolves upon the completion of the removal.
18402
18386
  * @since Chrome 90
18403
18387
  */
18404
18388
  export function removeCSS(
@@ -18423,7 +18407,7 @@ declare namespace chrome {
18423
18407
  * Registers one or more content scripts for this extension.
18424
18408
  *
18425
18409
  * @param scripts Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.
18426
- * @param callback A callback to be invoked once scripts have been fully registered or if an error has occurred.
18410
+ * @param callback Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
18427
18411
  * @since Chrome 96
18428
18412
  */
18429
18413
  export function registerContentScripts(
@@ -18474,7 +18458,7 @@ declare namespace chrome {
18474
18458
  * Unregisters content scripts for this extension.
18475
18459
  *
18476
18460
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
18477
- * @param callback A callback to be invoked once scripts have been unregistered or if an error has occurred.
18461
+ * @param callback Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
18478
18462
  * @since Chrome 96
18479
18463
  */
18480
18464
  export function unregisterContentScripts(
@@ -18499,7 +18483,7 @@ declare namespace chrome {
18499
18483
  * Updates one or more content scripts for this extension.
18500
18484
  *
18501
18485
  * @param scripts Contains a list of scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
18502
- * @param callback A callback to be invoked once scripts have been updated or if an error has occurred.
18486
+ * @param callback Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
18503
18487
  * @since Chrome 96
18504
18488
  */
18505
18489
  export function updateContentScripts(
@@ -18904,7 +18888,7 @@ declare namespace chrome {
18904
18888
  * Configures the side panel.
18905
18889
  *
18906
18890
  * @param options The configuration options to apply to the panel.
18907
- * @param callback Invoked when the options have been set.
18891
+ * @param callback Returns a Promise which resolves when the options have been set.
18908
18892
  */
18909
18893
  export function setOptions(
18910
18894
 
@@ -18927,7 +18911,7 @@ declare namespace chrome {
18927
18911
  * Returns the active panel configuration.
18928
18912
  *
18929
18913
  * @param options Specifies the context to return the configuration for.
18930
- * @param callback Called with the active panel configuration.
18914
+ * @param callback Returns a Promise which resolves with the active panel configuration.
18931
18915
  */
18932
18916
  export function getOptions(
18933
18917
 
@@ -18952,7 +18936,7 @@ declare namespace chrome {
18952
18936
  * Configures the extension's side panel behavior. This is an upsert operation.
18953
18937
  *
18954
18938
  * @param behavior The new behavior to be set.
18955
- * @param callback Called when the new behavior has been set.
18939
+ * @param callback Returns a Promise which resolves when the new behavior has been set.
18956
18940
  */
18957
18941
  export function setPanelBehavior(
18958
18942
 
@@ -18969,7 +18953,7 @@ declare namespace chrome {
18969
18953
  /**
18970
18954
  * Returns the extension's current side panel behavior.
18971
18955
  *
18972
- * @param callback Called with the extension's side panel behavior.
18956
+ * @param callback Returns a Promise which resolves with the extension's side panel behavior.
18973
18957
  */
18974
18958
  export function getPanelBehavior(
18975
18959
 
@@ -18993,7 +18977,7 @@ declare namespace chrome {
18993
18977
  * Opens the side panel for the extension. This may only be called in response to a user action.
18994
18978
  *
18995
18979
  * @param options Specifies the context in which to open the side panel.
18996
- * @param callback Called when the side panel has been opened.
18980
+ * @param callback Returns a Promise which resolves when the side panel has been opened.
18997
18981
  * @since Chrome 116
18998
18982
  */
18999
18983
  export function open(
@@ -19013,7 +18997,7 @@ declare namespace chrome {
19013
18997
  /**
19014
18998
  * Returns the side panel's current layout.
19015
18999
  *
19016
- * @param callback Called with a {@link PanelLayout} containing the side value.
19000
+ * @param callback Returns a Promise which resolves with a {@link PanelLayout}.
19017
19001
  * @since Chrome 140
19018
19002
  */
19019
19003
  export function getLayout(
@@ -21274,7 +21258,7 @@ declare namespace chrome {
21274
21258
  * Requests the information for all attached display devices.
21275
21259
  *
21276
21260
  * @param flags Options affecting how the information is returned.
21277
- * @param callback The callback to invoke with the results.
21261
+ * @param callback Promise that resolves with the results.
21278
21262
  */
21279
21263
  export function getInfo(
21280
21264
 
@@ -21299,7 +21283,7 @@ declare namespace chrome {
21299
21283
  /**
21300
21284
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21301
21285
  *
21302
- * @param callback The callback to invoke with the results.
21286
+ * @param callback Promise that resolves with the results.
21303
21287
  * @since Chrome 53
21304
21288
  */
21305
21289
  export function getDisplayLayout(
@@ -21328,7 +21312,7 @@ declare namespace chrome {
21328
21312
  *
21329
21313
  * @param id The display's unique identifier.
21330
21314
  * @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in `info`.
21331
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
21315
+ * @param callback Promise that resolves when the function finishes.
21332
21316
  */
21333
21317
  export function setDisplayProperties(
21334
21318
 
@@ -21355,7 +21339,7 @@ declare namespace chrome {
21355
21339
  * Set the layout for all displays. Any display not included will use the default layout. If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout. After layout is resolved, an onDisplayChanged event will be triggered. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21356
21340
  *
21357
21341
  * @param layouts The layout information, required for all displays except the primary display.
21358
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
21342
+ * @param callback Promise that resolves when the function finishes.
21359
21343
  * @since Chrome 53
21360
21344
  */
21361
21345
  export function setDisplayLayout(
@@ -21439,7 +21423,7 @@ declare namespace chrome {
21439
21423
  * Displays the native touch calibration UX for the display with `id` as display id. This will show an overlay on the screen with required instructions on how to proceed. The callback will be invoked in case of successful calibration only. If the calibration fails, this will throw an error.
21440
21424
  *
21441
21425
  * @param id The display's unique identifier.
21442
- * @param callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not.
21426
+ * @param callback Promise that resolves to inform the caller that the touch calibration has ended. The boolean value informs if the calibration was a success or not.
21443
21427
  * @since Chrome 57
21444
21428
  */
21445
21429
  export function showNativeTouchCalibration(
@@ -21503,7 +21487,7 @@ declare namespace chrome {
21503
21487
  * Sets the display mode to the specified mirror mode. Each call resets the state from previous calls. Calling setDisplayProperties() will fail for the mirroring destination displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21504
21488
  *
21505
21489
  * @param info The information of the mirror mode that should be applied to the display mode.
21506
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
21490
+ * @param callback Promise that resolves when the function finishes.
21507
21491
  * @since Chrome 65
21508
21492
  */
21509
21493
  export function setMirrorMode(
@@ -21771,7 +21755,7 @@ declare namespace chrome {
21771
21755
  * Adds a new log record.
21772
21756
  *
21773
21757
  * @param options The logging options.
21774
- * @param callback A callback to invoke once the log has been added.
21758
+ * @param callback Returns a Promise which resolves once the log has been added.
21775
21759
  */
21776
21760
  export function add(
21777
21761
 
@@ -21875,7 +21859,7 @@ declare namespace chrome {
21875
21859
  /**
21876
21860
  * Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
21877
21861
  *
21878
- * @param callback Callback invoked with CaptureInfo\[\] for captured tabs.
21862
+ * @param callback Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
21879
21863
  */
21880
21864
  export function getCapturedTabs(
21881
21865
 
@@ -21898,7 +21882,7 @@ declare namespace chrome {
21898
21882
  /**
21899
21883
  * Creates a stream ID to capture the target tab. Similar to chrome.tabCapture.capture() method, but returns a media stream ID, instead of a media stream, to the consumer tab.
21900
21884
  *
21901
- * @param callback Callback to invoke with the result. If successful, the result is an opaque string that can be passed to the `getUserMedia()` API to generate a media stream that corresponds to the target tab. The created `streamId` can only be used once and expires after a few seconds if it is not used.
21885
+ * @param callback Returns a Promise which resolves with the result. If successful, the result is an opaque string that can be passed to the `getUserMedia()` API to generate a media stream that corresponds to the target tab. The created `streamId` can only be used once and expires after a few seconds if it is not used.
21902
21886
  * @since Chrome 71
21903
21887
  */
21904
21888
  export function getMediaStreamId(
@@ -24988,7 +24972,7 @@ declare namespace chrome {
24988
24972
  * Registers one or more user scripts for this extension.
24989
24973
  *
24990
24974
  * @param scripts Contains a list of user scripts to be registered.
24991
- * @param callback Called once scripts have been fully registered or if an error has ocurred.
24975
+ * @param callback Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
24992
24976
  */
24993
24977
  export function register(
24994
24978
 
@@ -25011,7 +24995,7 @@ declare namespace chrome {
25011
24995
  * Returns all dynamically-registered user scripts for this extension.
25012
24996
  *
25013
24997
  * @param filter If specified, this method returns only the user scripts that match it.
25014
- * @param callback Called once scripts have been fully registered or if an error occurs.
24998
+ * @param callback Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
25015
24999
  */
25016
25000
  export function getScripts(
25017
25001
 
@@ -25036,7 +25020,7 @@ declare namespace chrome {
25036
25020
  * Unregisters all dynamically-registered user scripts for this extension.
25037
25021
  *
25038
25022
  * @param filter If specified, this method unregisters only the user scripts that match it.
25039
- * @param callback Called once scripts have been fully unregistered or if an error ocurs
25023
+ * @param callback Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
25040
25024
  */
25041
25025
  export function unregister(
25042
25026
 
@@ -25059,7 +25043,7 @@ declare namespace chrome {
25059
25043
  * Updates one or more user scripts for this extension.
25060
25044
  *
25061
25045
  * @param scripts Contains a list of user scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
25062
- * @param callback Called once scripts have been fully updated or if an error occurs.
25046
+ * @param callback Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
25063
25047
  */
25064
25048
  export function update(
25065
25049
 
@@ -25106,7 +25090,7 @@ declare namespace chrome {
25106
25090
  * Configures the `` `USER_SCRIPT` `` execution environment.
25107
25091
  *
25108
25092
  * @param properties Contains the user script world configuration.
25109
- * @param callback Called once world hase been configured.
25093
+ * @param callback Promise that resolves once the world has been configured.
25110
25094
  */
25111
25095
  export function configureWorld(
25112
25096
 
@@ -25125,7 +25109,7 @@ declare namespace chrome {
25125
25109
  /**
25126
25110
  * Retrieves all registered world configurations.
25127
25111
  *
25128
- * @param callback Called with the registered world configurations.
25112
+ * @param callback Promise that resolves with the registered world configurations.
25129
25113
  * @since Chrome 133
25130
25114
  */
25131
25115
  export function getWorldConfigurations(
@@ -25150,7 +25134,7 @@ declare namespace chrome {
25150
25134
  * Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
25151
25135
  *
25152
25136
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
25153
- * @param callback Called when the configuration is reset.
25137
+ * @param callback Promise that resolves when the configuration is reset.
25154
25138
  * @since Chrome 133
25155
25139
  */
25156
25140
  export function resetWorldConfiguration(
@@ -25304,7 +25288,7 @@ declare namespace chrome {
25304
25288
  * Creates a new VPN configuration that persists across multiple login sessions of the user.
25305
25289
  *
25306
25290
  * @param name The name of the VPN configuration.
25307
- * @param callback Called when the configuration is created or if there is an error.
25291
+ * @param callback Returns a Promise which resolves when the configuration is created or rejects if there is an error.
25308
25292
  */
25309
25293
  export function createConfig(
25310
25294
 
@@ -25333,7 +25317,7 @@ declare namespace chrome {
25333
25317
  * Destroys a VPN configuration created by the extension.
25334
25318
  *
25335
25319
  * @param id ID of the VPN configuration to destroy.
25336
- * @param callback Called when the configuration is destroyed or if there is an error.
25320
+ * @param callback Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
25337
25321
  */
25338
25322
  export function destroyConfig(
25339
25323
 
@@ -25357,7 +25341,7 @@ declare namespace chrome {
25357
25341
  * Sets the parameters for the VPN session. This should be called immediately after `"connected"` is received from the platform. This will succeed only when the VPN session is owned by the extension.
25358
25342
  *
25359
25343
  * @param parameters The parameters for the VPN session.
25360
- * @param callback Called when the parameters are set or if there is an error.
25344
+ * @param callback Returns a Promise which resolves when the parameters are set or rejects if there is an error.
25361
25345
  */
25362
25346
  export function setParameters(
25363
25347
 
@@ -25381,7 +25365,7 @@ declare namespace chrome {
25381
25365
  * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
25382
25366
  *
25383
25367
  * @param data The IP packet to be sent to the platform.
25384
- * @param callback Called when the packet is sent or if there is an error.
25368
+ * @param callback Returns a Promise which resolves when the packet is sent or rejects if there is an error.
25385
25369
  */
25386
25370
  export function sendPacket(
25387
25371
 
@@ -25405,7 +25389,7 @@ declare namespace chrome {
25405
25389
  * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
25406
25390
  *
25407
25391
  * @param state The VPN session state of the VPN client.
25408
- * @param callback Called when the notification is complete or if there is an error.
25392
+ * @param callback Returns a Promise which resolves when the notification is complete or rejects if there is an error.
25409
25393
  */
25410
25394
  export function notifyConnectionStateChanged(
25411
25395