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/_all.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:51 GMT+0000 (Coordinated Universal Time)
18
- // Built at 456fefca54e809142055dbd8348d8d51eaaef2e8
17
+ // Generated on Tue Jan 06 2026 22:34:29 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 6e48d4846be29f4a9aaed3eb462a776dde83c792
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -818,7 +818,7 @@ declare namespace chrome {
818
818
  *
819
819
  * @param name Optional name to identify this alarm. Defaults to the empty string.
820
820
  * @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`.
821
- * @param callback Invoked when the alarm has been created.
821
+ * @param callback Promise that resolves when the alarm has been created.
822
822
  */
823
823
  export function create(
824
824
 
@@ -840,7 +840,7 @@ declare namespace chrome {
840
840
  * 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.
841
841
  *
842
842
  * @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`.
843
- * @param callback Invoked when the alarm has been created.
843
+ * @param callback Promise that resolves when the alarm has been created.
844
844
  */
845
845
  export function create(
846
846
 
@@ -2011,7 +2011,7 @@ declare namespace chrome {
2011
2011
  * Gets the system-wide mute state for the specified stream type.
2012
2012
  *
2013
2013
  * @param streamType Stream type for which mute state should be fetched.
2014
- * @param callback Callback reporting whether mute is set or not for specified stream type.
2014
+ * @param callback Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
2015
2015
  */
2016
2016
  export function getMute(
2017
2017
 
@@ -5777,7 +5777,7 @@ declare namespace chrome {
5777
5777
  * 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.
5778
5778
  *
5779
5779
  * @param details Contains the details about the requested dialog.
5780
- * @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).
5780
+ * @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).
5781
5781
  * @since Chrome 57
5782
5782
  */
5783
5783
  export function requestPin(
@@ -5805,7 +5805,7 @@ declare namespace chrome {
5805
5805
  * Stops the pin request started by the {@link requestPin} function.
5806
5806
  *
5807
5807
  * @param details Contains the details about the reason for stopping the request flow.
5808
- * @param callback To be used by Chrome to send to the extension the status from their request to close PIN dialog for user.
5808
+ * @param callback Returns a Promise which resolves when the request to close the PIN dialog is complete.
5809
5809
  * @since Chrome 57
5810
5810
  */
5811
5811
  export function stopPinRequest(
@@ -5835,7 +5835,7 @@ declare namespace chrome {
5835
5835
  * 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.
5836
5836
  *
5837
5837
  * @param details The certificates to set. Invalid certificates will be ignored.
5838
- * @param callback Called upon completion.
5838
+ * @param callback Returns a Promise which resolves upon completion.
5839
5839
  * @since Chrome 86
5840
5840
  */
5841
5841
  export function setCertificates(
@@ -8817,7 +8817,7 @@ declare namespace chrome {
8817
8817
  * * Static rules specified as part of the extension package can not be removed using this function.
8818
8818
  * * {@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}.
8819
8819
  *
8820
- * @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.
8820
+ * @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.
8821
8821
  */
8822
8822
  export function updateDynamicRules(
8823
8823
 
@@ -8847,7 +8847,7 @@ declare namespace chrome {
8847
8847
  * Returns the current set of dynamic rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
8848
8848
  *
8849
8849
  * @param filter An object to filter the list of fetched rules.
8850
- * @param callback Called with the set of dynamic rules. An error might be raised in case of transient internal errors.
8850
+ * @param callback Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
8851
8851
  */
8852
8852
  export function getDynamicRules(
8853
8853
 
@@ -8883,7 +8883,7 @@ declare namespace chrome {
8883
8883
  * * These rules are not persisted across sessions and are backed in memory.
8884
8884
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
8885
8885
  *
8886
- * @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.
8886
+ * @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.
8887
8887
  * @since Chrome 90
8888
8888
  */
8889
8889
  export function updateSessionRules(
@@ -8912,7 +8912,7 @@ declare namespace chrome {
8912
8912
  * Returns the current set of session scoped rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
8913
8913
  *
8914
8914
  * @param filter An object to filter the list of fetched rules.
8915
- * @param callback Called with the set of session scoped rules.
8915
+ * @param callback Promise that resolves with the set of session scoped rules.
8916
8916
  * @since Chrome 90
8917
8917
  */
8918
8918
  export function getSessionRules(
@@ -8945,7 +8945,7 @@ declare namespace chrome {
8945
8945
  * 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.
8946
8946
  * 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.
8947
8947
  *
8948
- * @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.
8948
+ * @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.
8949
8949
  */
8950
8950
  export function updateEnabledRulesets(
8951
8951
 
@@ -8967,7 +8967,7 @@ declare namespace chrome {
8967
8967
  /**
8968
8968
  * Returns the ids for the current set of enabled static rulesets.
8969
8969
  *
8970
- * @param callback Called with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
8970
+ * @param callback Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
8971
8971
  */
8972
8972
  export function getEnabledRulesets(
8973
8973
 
@@ -8989,7 +8989,7 @@ declare namespace chrome {
8989
8989
  /**
8990
8990
  * 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.
8991
8991
  *
8992
- * @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.
8992
+ * @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.
8993
8993
  * @since Chrome 111
8994
8994
  */
8995
8995
  export function updateStaticRules(
@@ -9014,7 +9014,7 @@ declare namespace chrome {
9014
9014
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
9015
9015
  *
9016
9016
  * @param options Specifies the ruleset to query.
9017
- * @param callback Called with a list of ids that correspond to the disabled rules in that ruleset.
9017
+ * @param callback Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
9018
9018
  * @since Chrome 111
9019
9019
  */
9020
9020
  export function getDisabledRuleIds(
@@ -9041,7 +9041,7 @@ declare namespace chrome {
9041
9041
  * 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.
9042
9042
  *
9043
9043
  * @param filter An object to filter the list of matched rules.
9044
- * @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.
9044
+ * @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.
9045
9045
  */
9046
9046
  export function getMatchedRules(
9047
9047
 
@@ -9094,7 +9094,7 @@ declare namespace chrome {
9094
9094
  * Checks if the given regular expression will be supported as a `regexFilter` rule condition.
9095
9095
  *
9096
9096
  * @param regexOptions The regular expression to check.
9097
- * @param callback Called with details consisting of whether the regular expression is supported and the reason if not.
9097
+ * @param callback Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
9098
9098
  * @since Chrome 87
9099
9099
  */
9100
9100
  export function isRegexSupported(
@@ -9139,7 +9139,7 @@ declare namespace chrome {
9139
9139
  /**
9140
9140
  * 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.
9141
9141
  *
9142
- * @param callback Called with the details of matched rules.
9142
+ * @param callback Promise that resolves with the details of matched rules.
9143
9143
  * @since Chrome 103
9144
9144
  */
9145
9145
  export function testMatchOutcome(
@@ -10596,7 +10596,7 @@ declare namespace chrome {
10596
10596
  * Resolves the given hostname or IP address literal.
10597
10597
  *
10598
10598
  * @param hostname The hostname to resolve.
10599
- * @param callback Called when the resolution operation completes.
10599
+ * @param callback Promise that resolves when the resolution operation completes.
10600
10600
  */
10601
10601
  export function resolve(
10602
10602
 
@@ -11127,7 +11127,7 @@ declare namespace chrome {
11127
11127
  * 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.
11128
11128
  *
11129
11129
  * @param options An object containing scan parameters.
11130
- * @param callback Called with the result and data from the scan.
11130
+ * @param callback Returns a Promise which resolves with the scan results.
11131
11131
  */
11132
11132
  export function scan(
11133
11133
 
@@ -11153,7 +11153,7 @@ declare namespace chrome {
11153
11153
  * 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.
11154
11154
  *
11155
11155
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
11156
- * @param callback Called with the result and list of scanners.
11156
+ * @param callback Returns a Promise which resolves with the result and list of scanners.
11157
11157
  * @since Chrome 125
11158
11158
  */
11159
11159
  export function getScannerList(
@@ -11180,7 +11180,7 @@ declare namespace chrome {
11180
11180
  * 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.
11181
11181
  *
11182
11182
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
11183
- * @param callback Called with the result.
11183
+ * @param callback Returns a Promise which resolves with the result.
11184
11184
  * @since Chrome 125
11185
11185
  */
11186
11186
  export function openScanner(
@@ -11207,7 +11207,7 @@ declare namespace chrome {
11207
11207
  * 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.
11208
11208
  *
11209
11209
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
11210
- * @param callback Called with the result.
11210
+ * @param callback Returns a Promise which resolves with the result.
11211
11211
  * @since Chrome 125
11212
11212
  */
11213
11213
  export function getOptionGroups(
@@ -11234,7 +11234,7 @@ declare namespace chrome {
11234
11234
  * 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.
11235
11235
  *
11236
11236
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
11237
- * @param callback Called with the result.
11237
+ * @param callback Returns a Promise which resolves with the result.
11238
11238
  * @since Chrome 125
11239
11239
  */
11240
11240
  export function closeScanner(
@@ -11265,7 +11265,7 @@ declare namespace chrome {
11265
11265
  *
11266
11266
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
11267
11267
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
11268
- * @param callback Called with the result.
11268
+ * @param callback Returns a Promise which resolves with the result.
11269
11269
  * @since Chrome 125
11270
11270
  */
11271
11271
  export function setOptions(
@@ -11298,7 +11298,7 @@ declare namespace chrome {
11298
11298
  *
11299
11299
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
11300
11300
  * @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`.
11301
- * @param callback Called with the result.
11301
+ * @param callback Returns a Promise which resolves with the result.
11302
11302
  * @since Chrome 125
11303
11303
  */
11304
11304
  export function startScan(
@@ -11327,7 +11327,7 @@ declare namespace chrome {
11327
11327
  * 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.
11328
11328
  *
11329
11329
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
11330
- * @param callback Called with the result.
11330
+ * @param callback Returns a Promise which resolves with the result.
11331
11331
  * @since Chrome 125
11332
11332
  */
11333
11333
  export function cancelScan(
@@ -11362,7 +11362,7 @@ declare namespace chrome {
11362
11362
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
11363
11363
  *
11364
11364
  * @param job Active job handle previously returned from {@link startScan}.
11365
- * @param callback Called with the result.
11365
+ * @param callback Returns a Promise which resolves with the result.
11366
11366
  * @since Chrome 125
11367
11367
  */
11368
11368
  export function readScanData(
@@ -11930,7 +11930,7 @@ declare namespace chrome {
11930
11930
  * 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.
11931
11931
  *
11932
11932
  * @param options What to download and how.
11933
- * @param callback Called with the id of the new {@link DownloadItem}.
11933
+ * @param callback Returns a Promise which resolves with the id of the new {@link DownloadItem}.
11934
11934
  */
11935
11935
  export function download(
11936
11936
 
@@ -11978,7 +11978,7 @@ declare namespace chrome {
11978
11978
  * 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.
11979
11979
  *
11980
11980
  * @param downloadId The id of the download to pause.
11981
- * @param callback Called when the pause request is completed.
11981
+ * @param callback Returns a Promise which resolves when the pause request is completed.
11982
11982
  */
11983
11983
  export function pause(
11984
11984
 
@@ -12002,7 +12002,7 @@ declare namespace chrome {
12002
12002
  * 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.
12003
12003
  *
12004
12004
  * @param downloadId The id of the download to resume.
12005
- * @param callback Called when the resume request is completed.
12005
+ * @param callback Returns a Promise which resolves when the resume request is completed.
12006
12006
  */
12007
12007
  export function resume(
12008
12008
 
@@ -12026,7 +12026,7 @@ declare namespace chrome {
12026
12026
  * Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
12027
12027
  *
12028
12028
  * @param downloadId The id of the download to cancel.
12029
- * @param callback Called when the cancel request is completed.
12029
+ * @param callback Returns a Promise which resolves when the cancel request is completed.
12030
12030
  */
12031
12031
  export function cancel(
12032
12032
 
@@ -12052,7 +12052,7 @@ declare namespace chrome {
12052
12052
  * 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.
12053
12053
  *
12054
12054
  * @param downloadId The identifier for the download.
12055
- * @param callback A URL to an image that represents the download.
12055
+ * @param callback Returns a Promise which resolves with a URL to an image that represents the download.
12056
12056
  */
12057
12057
  export function getFileIcon(
12058
12058
 
@@ -12163,7 +12163,7 @@ declare namespace chrome {
12163
12163
  * 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.
12164
12164
  *
12165
12165
  * @param downloadId The identifier for the {@link DownloadItem}.
12166
- * @param callback Called when the danger prompt dialog closes.
12166
+ * @param callback Returns a Promise which resolves when the danger prompt dialog closes.
12167
12167
  */
12168
12168
  export function acceptDanger(
12169
12169
 
@@ -12198,7 +12198,7 @@ declare namespace chrome {
12198
12198
  * 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.
12199
12199
  *
12200
12200
  * @param options Encapsulate a change to the download UI.
12201
- * @param callback Called when the UI update is completed.
12201
+ * @param callback Returns a Promise which resolves when the UI update is completed.
12202
12202
  * @since Chrome 105
12203
12203
  */
12204
12204
  export function setUiOptions(
@@ -12229,7 +12229,7 @@ declare namespace chrome {
12229
12229
  /**
12230
12230
  * 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.
12231
12231
  *
12232
- * @param callback Called with the device identifier of the directory API when received.
12232
+ * @param callback Returns a Promise which resolves with the device identifier of the directory API.
12233
12233
  */
12234
12234
  export function getDirectoryDeviceId(
12235
12235
 
@@ -12249,7 +12249,7 @@ declare namespace chrome {
12249
12249
  /**
12250
12250
  * 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.
12251
12251
  *
12252
- * @param callback Called with the serial number of the device.
12252
+ * @param callback Returns a Promise which resolves with the serial number of the device.
12253
12253
  * @since Chrome 66
12254
12254
  */
12255
12255
  export function getDeviceSerialNumber(
@@ -12270,7 +12270,7 @@ declare namespace chrome {
12270
12270
  /**
12271
12271
  * 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.
12272
12272
  *
12273
- * @param callback Called with the Asset ID of the device.
12273
+ * @param callback Returns a Promise which resolves with the Asset ID of the device.
12274
12274
  * @since Chrome 66
12275
12275
  */
12276
12276
  export function getDeviceAssetId(
@@ -12291,7 +12291,7 @@ declare namespace chrome {
12291
12291
  /**
12292
12292
  * 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.
12293
12293
  *
12294
- * @param callback Called with the Annotated Location of the device.
12294
+ * @param callback Returns a Promise which resolves with the Annotated Location of the device.
12295
12295
  * @since Chrome 66
12296
12296
  */
12297
12297
  export function getDeviceAnnotatedLocation(
@@ -12312,7 +12312,7 @@ declare namespace chrome {
12312
12312
  /**
12313
12313
  * 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.
12314
12314
  *
12315
- * @param callback Called with hostname of the device.
12315
+ * @param callback Returns a Promise which resolves with the hostname of the device.
12316
12316
  * @since Chrome 82
12317
12317
  */
12318
12318
  export function getDeviceHostname(
@@ -12349,7 +12349,7 @@ declare namespace chrome {
12349
12349
  /**
12350
12350
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
12351
12351
  *
12352
- * @param callback Called with the hardware platform info.
12352
+ * @param callback Returns a Promise which resolves with the hardware platform info.
12353
12353
  */
12354
12354
  export function getHardwarePlatformInfo(
12355
12355
 
@@ -12391,7 +12391,7 @@ declare namespace chrome {
12391
12391
  * 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.
12392
12392
  *
12393
12393
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
12394
- * @param callback Called when the input method is changed or if there is an error.
12394
+ * @param callback Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
12395
12395
  */
12396
12396
  export function setCurrentInputMethod(
12397
12397
 
@@ -12463,7 +12463,7 @@ declare namespace chrome {
12463
12463
  /**
12464
12464
  * 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.
12465
12465
  *
12466
- * @param callback Called with the device's default network's {@link NetworkDetails}.
12466
+ * @param callback Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
12467
12467
  */
12468
12468
  export function getNetworkDetails(
12469
12469
 
@@ -12595,7 +12595,7 @@ declare namespace chrome {
12595
12595
  * 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.
12596
12596
  *
12597
12597
  * @param tokenId The id of a Token returned by `getTokens`.
12598
- * @param callback Called back with the list of the available certificates.
12598
+ * @param callback Returns a Promise which resolves with the list of the available certificates.
12599
12599
  */
12600
12600
  export function getCertificates(
12601
12601
 
@@ -12628,7 +12628,7 @@ declare namespace chrome {
12628
12628
  *
12629
12629
  * @param tokenId The id of a Token returned by `getTokens`.
12630
12630
  * @param certificate The DER encoding of a X.509 certificate.
12631
- * @param callback Called back when this operation is finished.
12631
+ * @param callback Returns a Promise which resolves when this operation is finished.
12632
12632
  */
12633
12633
  export function importCertificate(
12634
12634
 
@@ -12658,7 +12658,7 @@ declare namespace chrome {
12658
12658
  *
12659
12659
  * @param tokenId The id of a Token returned by `getTokens`.
12660
12660
  * @param certificate The DER encoding of a X.509 certificate.
12661
- * @param callback Called back when this operation is finished.
12661
+ * @param callback Returns a Promise which resolves when this operation is finished.
12662
12662
  */
12663
12663
  export function removeCertificate(
12664
12664
 
@@ -12693,7 +12693,7 @@ declare namespace chrome {
12693
12693
  * 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.
12694
12694
  *
12695
12695
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
12696
- * @param callback Called back with the challenge response.
12696
+ * @param callback Returns a Promise which resolves with the challenge response.
12697
12697
  * @since Chrome 110
12698
12698
  */
12699
12699
  export function challengeKey(
@@ -12733,7 +12733,7 @@ declare namespace chrome {
12733
12733
  *
12734
12734
  * @param challenge A challenge as emitted by the Verified Access Web API.
12735
12735
  * @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.
12736
- * @param callback Called back with the challenge response.
12736
+ * @param callback Returns a Promise which resolves with the challenge response.
12737
12737
  * @deprecated Use {@link challengeKey} instead.
12738
12738
  * @since Chrome 50
12739
12739
  * @chrome-deprecated-since Chrome 110
@@ -12777,7 +12777,7 @@ declare namespace chrome {
12777
12777
  *
12778
12778
  * @param challenge A challenge as emitted by the Verified Access Web API.
12779
12779
  * @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.
12780
- * @param callback Called back with the challenge response.
12780
+ * @param callback Returns a Promise which resolves with the challenge response.
12781
12781
  * @deprecated Use {@link challengeKey} instead.
12782
12782
  * @since Chrome 50
12783
12783
  * @chrome-deprecated-since Chrome 110
@@ -17018,7 +17018,7 @@ declare namespace chrome {
17018
17018
  * 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.
17019
17019
  *
17020
17020
  * @param details Token options.
17021
- * @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.
17021
+ * @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.
17022
17022
  */
17023
17023
  export function getAuthToken(
17024
17024
 
@@ -17058,7 +17058,7 @@ declare namespace chrome {
17058
17058
  * 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.
17059
17059
  *
17060
17060
  * @param details Profile options.
17061
- * @param callback Called with the `ProfileUserInfo` of the primary Chrome account, of an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
17061
+ * @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.
17062
17062
  */
17063
17063
  export function getProfileUserInfo(
17064
17064
 
@@ -17091,7 +17091,7 @@ declare namespace chrome {
17091
17091
  * 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`.
17092
17092
  *
17093
17093
  * @param details Token information.
17094
- * @param callback Called when the token has been removed from the cache.
17094
+ * @param callback Returns a Promise which resolves when the token has been removed from the cache.
17095
17095
  */
17096
17096
  export function removeCachedAuthToken(
17097
17097
 
@@ -17119,7 +17119,7 @@ declare namespace chrome {
17119
17119
  * * Removes user's account preferences
17120
17120
  * * De-authorizes the user from all auth flows
17121
17121
  *
17122
- * @param callback Called when the state has been cleared.
17122
+ * @param callback Returns a Promise which resolves when the state has been cleared.
17123
17123
  * @since Chrome 87
17124
17124
  */
17125
17125
  export function clearAllCachedAuthTokens(
@@ -17150,7 +17150,7 @@ declare namespace chrome {
17150
17150
  * 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.
17151
17151
  *
17152
17152
  * @param details WebAuth flow options.
17153
- * @param callback Called with the URL redirected back to your application.
17153
+ * @param callback Returns a Promise which resolves with the URL redirected back to your application.
17154
17154
  */
17155
17155
  export function launchWebAuthFlow(
17156
17156
 
@@ -21988,11 +21988,7 @@ declare namespace chrome {
21988
21988
 
21989
21989
  The `notificationId` parameter is required before Chrome 42.
21990
21990
  * @param options Contents of the notification.
21991
- * @param callback
21992
-
21993
- Returns the notification id (either supplied or generated) that represents the created notification.
21994
-
21995
- The callback is required before Chrome 42.
21991
+ * @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
21996
21992
  */
21997
21993
  export function create(
21998
21994
 
@@ -22009,11 +22005,7 @@ declare namespace chrome {
22009
22005
  * Creates and displays a notification.
22010
22006
  *
22011
22007
  * @param options Contents of the notification.
22012
- * @param callback
22013
-
22014
- Returns the notification id (either supplied or generated) that represents the created notification.
22015
-
22016
- The callback is required before Chrome 42.
22008
+ * @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
22017
22009
  */
22018
22010
  export function create(
22019
22011
 
@@ -22043,11 +22035,7 @@ declare namespace chrome {
22043
22035
  *
22044
22036
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
22045
22037
  * @param options Contents of the notification to update to.
22046
- * @param callback
22047
-
22048
- Called to indicate whether a matching notification existed.
22049
-
22050
- The callback is required before Chrome 42.
22038
+ * @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
22051
22039
  */
22052
22040
  export function update(
22053
22041
 
@@ -22075,11 +22063,7 @@ declare namespace chrome {
22075
22063
  * Clears the specified notification.
22076
22064
  *
22077
22065
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
22078
- * @param callback
22079
-
22080
- Called to indicate whether a matching notification existed.
22081
-
22082
- The callback is required before Chrome 42.
22066
+ * @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
22083
22067
  */
22084
22068
  export function clear(
22085
22069
 
@@ -22100,7 +22084,7 @@ declare namespace chrome {
22100
22084
  /**
22101
22085
  * Retrieves all the notifications of this app or extension.
22102
22086
  *
22103
- * @param callback Returns the set of notification\_ids currently in the system.
22087
+ * @param callback Returns a Promise which resolves with the set of notification\_ids currently in the system.
22104
22088
  */
22105
22089
  export function getAll(
22106
22090
 
@@ -22119,7 +22103,7 @@ declare namespace chrome {
22119
22103
  /**
22120
22104
  * Retrieves whether the user has enabled notifications from this app or extension.
22121
22105
  *
22122
- * @param callback Returns the current permission level.
22106
+ * @param callback Returns a Promise which resolves with the current permission level.
22123
22107
  */
22124
22108
  export function getPermissionLevel(
22125
22109
 
@@ -22210,7 +22194,7 @@ declare namespace chrome {
22210
22194
  * Creates a new offscreen document for the extension.
22211
22195
  *
22212
22196
  * @param parameters The parameters describing the offscreen document to create.
22213
- * @param callback Invoked when the offscreen document is created and has completed its initial page load.
22197
+ * @param callback Promise that resolves when the offscreen document is created and has completed its initial page load.
22214
22198
  */
22215
22199
  export function createDocument(
22216
22200
 
@@ -22227,7 +22211,7 @@ declare namespace chrome {
22227
22211
  /**
22228
22212
  * Closes the currently-open offscreen document for the extension.
22229
22213
  *
22230
- * @param callback Invoked when the offscreen document has been closed.
22214
+ * @param callback Promise that resolves when the offscreen document has been closed.
22231
22215
  */
22232
22216
  export function closeDocument(
22233
22217
 
@@ -24437,7 +24421,7 @@ declare namespace chrome {
24437
24421
  * Adds an entry to the reading list if it does not exist.
24438
24422
  *
24439
24423
  * @param entry The entry to add to the reading list.
24440
- * @param callback Invoked once the entry has been added.
24424
+ * @param callback Resolves once the entry has been added.
24441
24425
  */
24442
24426
  export function addEntry(
24443
24427
 
@@ -24460,7 +24444,7 @@ declare namespace chrome {
24460
24444
  * Removes an entry from the reading list if it exists.
24461
24445
  *
24462
24446
  * @param info The entry to remove from the reading list.
24463
- * @param callback Invoked once the entry has been removed.
24447
+ * @param callback Resolves once the entry has been removed.
24464
24448
  */
24465
24449
  export function removeEntry(
24466
24450
 
@@ -24483,7 +24467,7 @@ declare namespace chrome {
24483
24467
  * Updates a reading list entry if it exists.
24484
24468
  *
24485
24469
  * @param info The entry to update.
24486
- * @param callback Invoked once the matched entries have been updated.
24470
+ * @param callback Resolves once the matched entries have been updated.
24487
24471
  */
24488
24472
  export function updateEntry(
24489
24473
 
@@ -24506,7 +24490,7 @@ declare namespace chrome {
24506
24490
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
24507
24491
  *
24508
24492
  * @param info The properties to search for.
24509
- * @param callback Invoked once the entries have been matched.
24493
+ * @param callback Resolves once the entries have been matched.
24510
24494
  */
24511
24495
  export function query(
24512
24496
 
@@ -25638,7 +25622,7 @@ declare namespace chrome {
25638
25622
  * 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.
25639
25623
  *
25640
25624
  * @param injection The details of the script which to inject.
25641
- * @param callback Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
25625
+ * @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.
25642
25626
  */
25643
25627
  export function executeScript(
25644
25628
 
@@ -25664,7 +25648,7 @@ declare namespace chrome {
25664
25648
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
25665
25649
  *
25666
25650
  * @param injection The details of the styles to insert.
25667
- * @param callback Invoked upon completion of the insertion.
25651
+ * @param callback Returns a Promise which resolves upon completion of the insertion.
25668
25652
  */
25669
25653
  export function insertCSS(
25670
25654
 
@@ -25688,7 +25672,7 @@ declare namespace chrome {
25688
25672
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
25689
25673
  *
25690
25674
  * @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.
25691
- * @param callback A callback to be invoked upon the completion of the removal.
25675
+ * @param callback Returns a Promise which resolves upon the completion of the removal.
25692
25676
  * @since Chrome 90
25693
25677
  */
25694
25678
  export function removeCSS(
@@ -25713,7 +25697,7 @@ declare namespace chrome {
25713
25697
  * Registers one or more content scripts for this extension.
25714
25698
  *
25715
25699
  * @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.
25716
- * @param callback A callback to be invoked once scripts have been fully registered or if an error has occurred.
25700
+ * @param callback Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
25717
25701
  * @since Chrome 96
25718
25702
  */
25719
25703
  export function registerContentScripts(
@@ -25764,7 +25748,7 @@ declare namespace chrome {
25764
25748
  * Unregisters content scripts for this extension.
25765
25749
  *
25766
25750
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
25767
- * @param callback A callback to be invoked once scripts have been unregistered or if an error has occurred.
25751
+ * @param callback Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
25768
25752
  * @since Chrome 96
25769
25753
  */
25770
25754
  export function unregisterContentScripts(
@@ -25789,7 +25773,7 @@ declare namespace chrome {
25789
25773
  * Updates one or more content scripts for this extension.
25790
25774
  *
25791
25775
  * @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.
25792
- * @param callback A callback to be invoked once scripts have been updated or if an error has occurred.
25776
+ * @param callback Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
25793
25777
  * @since Chrome 96
25794
25778
  */
25795
25779
  export function updateContentScripts(
@@ -26812,7 +26796,7 @@ declare namespace chrome {
26812
26796
  * Configures the side panel.
26813
26797
  *
26814
26798
  * @param options The configuration options to apply to the panel.
26815
- * @param callback Invoked when the options have been set.
26799
+ * @param callback Returns a Promise which resolves when the options have been set.
26816
26800
  */
26817
26801
  export function setOptions(
26818
26802
 
@@ -26835,7 +26819,7 @@ declare namespace chrome {
26835
26819
  * Returns the active panel configuration.
26836
26820
  *
26837
26821
  * @param options Specifies the context to return the configuration for.
26838
- * @param callback Called with the active panel configuration.
26822
+ * @param callback Returns a Promise which resolves with the active panel configuration.
26839
26823
  */
26840
26824
  export function getOptions(
26841
26825
 
@@ -26860,7 +26844,7 @@ declare namespace chrome {
26860
26844
  * Configures the extension's side panel behavior. This is an upsert operation.
26861
26845
  *
26862
26846
  * @param behavior The new behavior to be set.
26863
- * @param callback Called when the new behavior has been set.
26847
+ * @param callback Returns a Promise which resolves when the new behavior has been set.
26864
26848
  */
26865
26849
  export function setPanelBehavior(
26866
26850
 
@@ -26877,7 +26861,7 @@ declare namespace chrome {
26877
26861
  /**
26878
26862
  * Returns the extension's current side panel behavior.
26879
26863
  *
26880
- * @param callback Called with the extension's side panel behavior.
26864
+ * @param callback Returns a Promise which resolves with the extension's side panel behavior.
26881
26865
  */
26882
26866
  export function getPanelBehavior(
26883
26867
 
@@ -26901,7 +26885,7 @@ declare namespace chrome {
26901
26885
  * Opens the side panel for the extension. This may only be called in response to a user action.
26902
26886
  *
26903
26887
  * @param options Specifies the context in which to open the side panel.
26904
- * @param callback Called when the side panel has been opened.
26888
+ * @param callback Returns a Promise which resolves when the side panel has been opened.
26905
26889
  * @since Chrome 116
26906
26890
  */
26907
26891
  export function open(
@@ -26921,7 +26905,7 @@ declare namespace chrome {
26921
26905
  /**
26922
26906
  * Returns the side panel's current layout.
26923
26907
  *
26924
- * @param callback Called with a {@link PanelLayout} containing the side value.
26908
+ * @param callback Returns a Promise which resolves with a {@link PanelLayout}.
26925
26909
  * @since Chrome 140
26926
26910
  */
26927
26911
  export function getLayout(
@@ -30110,7 +30094,7 @@ declare namespace chrome {
30110
30094
  * Requests the information for all attached display devices.
30111
30095
  *
30112
30096
  * @param flags Options affecting how the information is returned.
30113
- * @param callback The callback to invoke with the results.
30097
+ * @param callback Promise that resolves with the results.
30114
30098
  */
30115
30099
  export function getInfo(
30116
30100
 
@@ -30135,7 +30119,7 @@ declare namespace chrome {
30135
30119
  /**
30136
30120
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
30137
30121
  *
30138
- * @param callback The callback to invoke with the results.
30122
+ * @param callback Promise that resolves with the results.
30139
30123
  * @since Chrome 53
30140
30124
  */
30141
30125
  export function getDisplayLayout(
@@ -30164,7 +30148,7 @@ declare namespace chrome {
30164
30148
  *
30165
30149
  * @param id The display's unique identifier.
30166
30150
  * @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`.
30167
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
30151
+ * @param callback Promise that resolves when the function finishes.
30168
30152
  */
30169
30153
  export function setDisplayProperties(
30170
30154
 
@@ -30191,7 +30175,7 @@ declare namespace chrome {
30191
30175
  * 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.
30192
30176
  *
30193
30177
  * @param layouts The layout information, required for all displays except the primary display.
30194
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
30178
+ * @param callback Promise that resolves when the function finishes.
30195
30179
  * @since Chrome 53
30196
30180
  */
30197
30181
  export function setDisplayLayout(
@@ -30275,7 +30259,7 @@ declare namespace chrome {
30275
30259
  * 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.
30276
30260
  *
30277
30261
  * @param id The display's unique identifier.
30278
- * @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.
30262
+ * @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.
30279
30263
  * @since Chrome 57
30280
30264
  */
30281
30265
  export function showNativeTouchCalibration(
@@ -30339,7 +30323,7 @@ declare namespace chrome {
30339
30323
  * 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.
30340
30324
  *
30341
30325
  * @param info The information of the mirror mode that should be applied to the display mode.
30342
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
30326
+ * @param callback Promise that resolves when the function finishes.
30343
30327
  * @since Chrome 65
30344
30328
  */
30345
30329
  export function setMirrorMode(
@@ -30608,7 +30592,7 @@ declare namespace chrome {
30608
30592
  * Adds a new log record.
30609
30593
  *
30610
30594
  * @param options The logging options.
30611
- * @param callback A callback to invoke once the log has been added.
30595
+ * @param callback Returns a Promise which resolves once the log has been added.
30612
30596
  */
30613
30597
  export function add(
30614
30598
 
@@ -30712,7 +30696,7 @@ declare namespace chrome {
30712
30696
  /**
30713
30697
  * 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).
30714
30698
  *
30715
- * @param callback Callback invoked with CaptureInfo\[\] for captured tabs.
30699
+ * @param callback Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
30716
30700
  */
30717
30701
  export function getCapturedTabs(
30718
30702
 
@@ -30735,7 +30719,7 @@ declare namespace chrome {
30735
30719
  /**
30736
30720
  * 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.
30737
30721
  *
30738
- * @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.
30722
+ * @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.
30739
30723
  * @since Chrome 71
30740
30724
  */
30741
30725
  export function getMediaStreamId(
@@ -35132,7 +35116,7 @@ declare namespace chrome {
35132
35116
  * Registers one or more user scripts for this extension.
35133
35117
  *
35134
35118
  * @param scripts Contains a list of user scripts to be registered.
35135
- * @param callback Called once scripts have been fully registered or if an error has ocurred.
35119
+ * @param callback Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
35136
35120
  */
35137
35121
  export function register(
35138
35122
 
@@ -35155,7 +35139,7 @@ declare namespace chrome {
35155
35139
  * Returns all dynamically-registered user scripts for this extension.
35156
35140
  *
35157
35141
  * @param filter If specified, this method returns only the user scripts that match it.
35158
- * @param callback Called once scripts have been fully registered or if an error occurs.
35142
+ * @param callback Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
35159
35143
  */
35160
35144
  export function getScripts(
35161
35145
 
@@ -35180,7 +35164,7 @@ declare namespace chrome {
35180
35164
  * Unregisters all dynamically-registered user scripts for this extension.
35181
35165
  *
35182
35166
  * @param filter If specified, this method unregisters only the user scripts that match it.
35183
- * @param callback Called once scripts have been fully unregistered or if an error ocurs
35167
+ * @param callback Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
35184
35168
  */
35185
35169
  export function unregister(
35186
35170
 
@@ -35203,7 +35187,7 @@ declare namespace chrome {
35203
35187
  * Updates one or more user scripts for this extension.
35204
35188
  *
35205
35189
  * @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.
35206
- * @param callback Called once scripts have been fully updated or if an error occurs.
35190
+ * @param callback Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
35207
35191
  */
35208
35192
  export function update(
35209
35193
 
@@ -35250,7 +35234,7 @@ declare namespace chrome {
35250
35234
  * Configures the `` `USER_SCRIPT` `` execution environment.
35251
35235
  *
35252
35236
  * @param properties Contains the user script world configuration.
35253
- * @param callback Called once world hase been configured.
35237
+ * @param callback Promise that resolves once the world has been configured.
35254
35238
  */
35255
35239
  export function configureWorld(
35256
35240
 
@@ -35269,7 +35253,7 @@ declare namespace chrome {
35269
35253
  /**
35270
35254
  * Retrieves all registered world configurations.
35271
35255
  *
35272
- * @param callback Called with the registered world configurations.
35256
+ * @param callback Promise that resolves with the registered world configurations.
35273
35257
  * @since Chrome 133
35274
35258
  */
35275
35259
  export function getWorldConfigurations(
@@ -35294,7 +35278,7 @@ declare namespace chrome {
35294
35278
  * 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.
35295
35279
  *
35296
35280
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
35297
- * @param callback Called when the configuration is reset.
35281
+ * @param callback Promise that resolves when the configuration is reset.
35298
35282
  * @since Chrome 133
35299
35283
  */
35300
35284
  export function resetWorldConfiguration(
@@ -35516,7 +35500,7 @@ declare namespace chrome {
35516
35500
  * Creates a new VPN configuration that persists across multiple login sessions of the user.
35517
35501
  *
35518
35502
  * @param name The name of the VPN configuration.
35519
- * @param callback Called when the configuration is created or if there is an error.
35503
+ * @param callback Returns a Promise which resolves when the configuration is created or rejects if there is an error.
35520
35504
  */
35521
35505
  export function createConfig(
35522
35506
 
@@ -35545,7 +35529,7 @@ declare namespace chrome {
35545
35529
  * Destroys a VPN configuration created by the extension.
35546
35530
  *
35547
35531
  * @param id ID of the VPN configuration to destroy.
35548
- * @param callback Called when the configuration is destroyed or if there is an error.
35532
+ * @param callback Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
35549
35533
  */
35550
35534
  export function destroyConfig(
35551
35535
 
@@ -35569,7 +35553,7 @@ declare namespace chrome {
35569
35553
  * 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.
35570
35554
  *
35571
35555
  * @param parameters The parameters for the VPN session.
35572
- * @param callback Called when the parameters are set or if there is an error.
35556
+ * @param callback Returns a Promise which resolves when the parameters are set or rejects if there is an error.
35573
35557
  */
35574
35558
  export function setParameters(
35575
35559
 
@@ -35593,7 +35577,7 @@ declare namespace chrome {
35593
35577
  * 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.
35594
35578
  *
35595
35579
  * @param data The IP packet to be sent to the platform.
35596
- * @param callback Called when the packet is sent or if there is an error.
35580
+ * @param callback Returns a Promise which resolves when the packet is sent or rejects if there is an error.
35597
35581
  */
35598
35582
  export function sendPacket(
35599
35583
 
@@ -35617,7 +35601,7 @@ declare namespace chrome {
35617
35601
  * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
35618
35602
  *
35619
35603
  * @param state The VPN session state of the VPN client.
35620
- * @param callback Called when the notification is complete or if there is an error.
35604
+ * @param callback Returns a Promise which resolves when the notification is complete or rejects if there is an error.
35621
35605
  */
35622
35606
  export function notifyConnectionStateChanged(
35623
35607