chrome-types 0.1.405 → 0.1.406
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.
- package/_all.d.ts +290 -357
- package/index.d.ts +205 -247
- package/package.json +2 -2
package/_all.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Wed Jan 07 2026 11:21:45 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 63430eaeb62bb0431b4e1b9cd67c91c51556da8e
|
|
19
19
|
|
|
20
20
|
// Includes all types, including MV2 + Platform Apps APIs.
|
|
21
21
|
|
|
@@ -786,6 +786,7 @@ declare namespace chrome {
|
|
|
786
786
|
* @chrome-returns-extra since Chrome 111
|
|
787
787
|
* @param name Optional name to identify this alarm. Defaults to the empty string.
|
|
788
788
|
* @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`.
|
|
789
|
+
* @returns Promise that resolves when the alarm has been created.
|
|
789
790
|
*/
|
|
790
791
|
export function create(
|
|
791
792
|
|
|
@@ -803,6 +804,7 @@ declare namespace chrome {
|
|
|
803
804
|
*
|
|
804
805
|
* @chrome-returns-extra since Chrome 111
|
|
805
806
|
* @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`.
|
|
807
|
+
* @returns Promise that resolves when the alarm has been created.
|
|
806
808
|
*/
|
|
807
809
|
export function create(
|
|
808
810
|
|
|
@@ -818,7 +820,6 @@ declare namespace chrome {
|
|
|
818
820
|
*
|
|
819
821
|
* @param name Optional name to identify this alarm. Defaults to the empty string.
|
|
820
822
|
* @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 Promise that resolves when the alarm has been created.
|
|
822
823
|
*/
|
|
823
824
|
export function create(
|
|
824
825
|
|
|
@@ -840,7 +841,6 @@ declare namespace chrome {
|
|
|
840
841
|
* 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
842
|
*
|
|
842
843
|
* @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 Promise that resolves when the alarm has been created.
|
|
844
844
|
*/
|
|
845
845
|
export function create(
|
|
846
846
|
|
|
@@ -1627,6 +1627,13 @@ declare namespace chrome {
|
|
|
1627
1627
|
* To automatically remember the positions of windows you can give them ids. If a window has an id, This id is used to remember the size and position of the window whenever it is moved or resized. This size and position is then used instead of the specified bounds on subsequent opening of a window with the same id. If you need to open a window with an id at a location other than the remembered default, you can create it hidden, move it to the desired location, then show it.
|
|
1628
1628
|
*
|
|
1629
1629
|
* @chrome-returns-extra since Chrome 117
|
|
1630
|
+
* @returns Called in the creating window (parent) before the load event is called in the created window (child). The parent can set fields or functions on the child usable from onload. E.g. background.js:
|
|
1631
|
+
|
|
1632
|
+
`function(createdWindow) { createdWindow.contentWindow.foo = function () { }; };`
|
|
1633
|
+
|
|
1634
|
+
window.js:
|
|
1635
|
+
|
|
1636
|
+
`window.onload = function () { foo(); }`
|
|
1630
1637
|
*/
|
|
1631
1638
|
export function create(
|
|
1632
1639
|
|
|
@@ -1641,16 +1648,6 @@ declare namespace chrome {
|
|
|
1641
1648
|
* To set the position, size and constraints of the window, use the `innerBounds` or `outerBounds` properties. Inner bounds do not include window decorations. Outer bounds include the window's title bar and frame. Note that the padding between the inner and outer bounds is determined by the OS. Therefore setting the same property for both inner and outer bounds is considered an error (for example, setting both `innerBounds.left` and `outerBounds.left`).
|
|
1642
1649
|
*
|
|
1643
1650
|
* To automatically remember the positions of windows you can give them ids. If a window has an id, This id is used to remember the size and position of the window whenever it is moved or resized. This size and position is then used instead of the specified bounds on subsequent opening of a window with the same id. If you need to open a window with an id at a location other than the remembered default, you can create it hidden, move it to the desired location, then show it.
|
|
1644
|
-
*
|
|
1645
|
-
* @param callback
|
|
1646
|
-
|
|
1647
|
-
Called in the creating window (parent) before the load event is called in the created window (child). The parent can set fields or functions on the child usable from onload. E.g. background.js:
|
|
1648
|
-
|
|
1649
|
-
`function(createdWindow) { createdWindow.contentWindow.foo = function () { }; };`
|
|
1650
|
-
|
|
1651
|
-
window.js:
|
|
1652
|
-
|
|
1653
|
-
`window.onload = function () { foo(); }`
|
|
1654
1651
|
*/
|
|
1655
1652
|
export function create(
|
|
1656
1653
|
|
|
@@ -1734,6 +1731,7 @@ declare namespace chrome {
|
|
|
1734
1731
|
* @chrome-returns-extra since Chrome 132
|
|
1735
1732
|
* @param app The extension id of the app to be embedded.
|
|
1736
1733
|
* @param data Optional developer specified data that the app to be embedded can use when making an embedding decision.
|
|
1734
|
+
* @returns An optional function that's called after the embedding request is completed.
|
|
1737
1735
|
*/
|
|
1738
1736
|
export function connect(
|
|
1739
1737
|
|
|
@@ -1747,7 +1745,6 @@ declare namespace chrome {
|
|
|
1747
1745
|
*
|
|
1748
1746
|
* @param app The extension id of the app to be embedded.
|
|
1749
1747
|
* @param data Optional developer specified data that the app to be embedded can use when making an embedding decision.
|
|
1750
|
-
* @param callback An optional function that's called after the embedding request is completed.
|
|
1751
1748
|
*/
|
|
1752
1749
|
export function connect(
|
|
1753
1750
|
|
|
@@ -1920,6 +1917,7 @@ declare namespace chrome {
|
|
|
1920
1917
|
*
|
|
1921
1918
|
* @chrome-returns-extra since Chrome 116
|
|
1922
1919
|
* @param filter Device properties by which to filter the list of returned audio devices. If the filter is not set or set to `{}`, returned device list will contain all available audio devices.
|
|
1920
|
+
* @returns Reports the requested list of audio devices.
|
|
1923
1921
|
*/
|
|
1924
1922
|
export function getDevices(
|
|
1925
1923
|
|
|
@@ -1930,7 +1928,6 @@ declare namespace chrome {
|
|
|
1930
1928
|
* Gets a list of audio devices filtered based on `filter`.
|
|
1931
1929
|
*
|
|
1932
1930
|
* @param filter Device properties by which to filter the list of returned audio devices. If the filter is not set or set to `{}`, returned device list will contain all available audio devices.
|
|
1933
|
-
* @param callback Reports the requested list of audio devices.
|
|
1934
1931
|
*/
|
|
1935
1932
|
export function getDevices(
|
|
1936
1933
|
|
|
@@ -2001,6 +1998,7 @@ declare namespace chrome {
|
|
|
2001
1998
|
*
|
|
2002
1999
|
* @chrome-returns-extra since Chrome 116
|
|
2003
2000
|
* @param streamType Stream type for which mute state should be fetched.
|
|
2001
|
+
* @returns Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
|
|
2004
2002
|
*/
|
|
2005
2003
|
export function getMute(
|
|
2006
2004
|
|
|
@@ -2011,7 +2009,6 @@ declare namespace chrome {
|
|
|
2011
2009
|
* Gets the system-wide mute state for the specified stream type.
|
|
2012
2010
|
*
|
|
2013
2011
|
* @param streamType Stream type for which mute state should be fetched.
|
|
2014
|
-
* @param callback Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
|
|
2015
2012
|
*/
|
|
2016
2013
|
export function getMute(
|
|
2017
2014
|
|
|
@@ -2255,13 +2252,12 @@ declare namespace chrome {
|
|
|
2255
2252
|
* Get information about the Bluetooth adapter.
|
|
2256
2253
|
*
|
|
2257
2254
|
* @chrome-returns-extra since Chrome 91
|
|
2255
|
+
* @returns Called with an AdapterState object describing the adapter state.
|
|
2258
2256
|
*/
|
|
2259
2257
|
export function getAdapterState(): Promise<AdapterState>;
|
|
2260
2258
|
|
|
2261
2259
|
/**
|
|
2262
2260
|
* Get information about the Bluetooth adapter.
|
|
2263
|
-
*
|
|
2264
|
-
* @param callback Called with an AdapterState object describing the adapter state.
|
|
2265
2261
|
*/
|
|
2266
2262
|
export function getAdapterState(
|
|
2267
2263
|
|
|
@@ -2278,6 +2274,7 @@ declare namespace chrome {
|
|
|
2278
2274
|
*
|
|
2279
2275
|
* @chrome-returns-extra since Chrome 91
|
|
2280
2276
|
* @param deviceAddress Address of device to get.
|
|
2277
|
+
* @returns Called with the Device object describing the device.
|
|
2281
2278
|
*/
|
|
2282
2279
|
export function getDevice(
|
|
2283
2280
|
|
|
@@ -2288,7 +2285,6 @@ declare namespace chrome {
|
|
|
2288
2285
|
* Get information about a Bluetooth device known to the system.
|
|
2289
2286
|
*
|
|
2290
2287
|
* @param deviceAddress Address of device to get.
|
|
2291
|
-
* @param callback Called with the Device object describing the device.
|
|
2292
2288
|
*/
|
|
2293
2289
|
export function getDevice(
|
|
2294
2290
|
|
|
@@ -2307,6 +2303,7 @@ declare namespace chrome {
|
|
|
2307
2303
|
*
|
|
2308
2304
|
* @chrome-returns-extra since Chrome 91
|
|
2309
2305
|
* @param filter Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to `{}`, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.
|
|
2306
|
+
* @returns Called when the search is completed.
|
|
2310
2307
|
*/
|
|
2311
2308
|
export function getDevices(
|
|
2312
2309
|
|
|
@@ -2320,7 +2317,6 @@ declare namespace chrome {
|
|
|
2320
2317
|
* Get a list of Bluetooth devices known to the system, including paired and recently discovered devices.
|
|
2321
2318
|
*
|
|
2322
2319
|
* @param filter Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to `{}`, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.
|
|
2323
|
-
* @param callback Called when the search is completed.
|
|
2324
2320
|
*/
|
|
2325
2321
|
export function getDevices(
|
|
2326
2322
|
|
|
@@ -2343,6 +2339,7 @@ declare namespace chrome {
|
|
|
2343
2339
|
* Discovery will fail to start if this application has already called startDiscovery. Discovery can be resource intensive: stopDiscovery should be called as soon as possible.
|
|
2344
2340
|
*
|
|
2345
2341
|
* @chrome-returns-extra since Chrome 91
|
|
2342
|
+
* @returns Called to indicate success or failure.
|
|
2346
2343
|
*/
|
|
2347
2344
|
export function startDiscovery(): Promise<void>;
|
|
2348
2345
|
|
|
@@ -2350,8 +2347,6 @@ declare namespace chrome {
|
|
|
2350
2347
|
* Start discovery. Newly discovered devices will be returned via the onDeviceAdded event. Previously discovered devices already known to the adapter must be obtained using getDevices and will only be updated using the `onDeviceChanged` event if information about them changes.
|
|
2351
2348
|
*
|
|
2352
2349
|
* Discovery will fail to start if this application has already called startDiscovery. Discovery can be resource intensive: stopDiscovery should be called as soon as possible.
|
|
2353
|
-
*
|
|
2354
|
-
* @param callback Called to indicate success or failure.
|
|
2355
2350
|
*/
|
|
2356
2351
|
export function startDiscovery(
|
|
2357
2352
|
|
|
@@ -2362,13 +2357,12 @@ declare namespace chrome {
|
|
|
2362
2357
|
* Stop discovery.
|
|
2363
2358
|
*
|
|
2364
2359
|
* @chrome-returns-extra since Chrome 91
|
|
2360
|
+
* @returns Called to indicate success or failure.
|
|
2365
2361
|
*/
|
|
2366
2362
|
export function stopDiscovery(): Promise<void>;
|
|
2367
2363
|
|
|
2368
2364
|
/**
|
|
2369
2365
|
* Stop discovery.
|
|
2370
|
-
*
|
|
2371
|
-
* @param callback Called to indicate success or failure.
|
|
2372
2366
|
*/
|
|
2373
2367
|
export function stopDiscovery(
|
|
2374
2368
|
|
|
@@ -2715,6 +2709,7 @@ declare namespace chrome {
|
|
|
2715
2709
|
* @chrome-returns-extra since Chrome 91
|
|
2716
2710
|
* @param deviceAddress The Bluetooth address of the remote device to which a GATT connection should be opened.
|
|
2717
2711
|
* @param properties Connection properties (optional).
|
|
2712
|
+
* @returns Called when the connect request has completed.
|
|
2718
2713
|
*/
|
|
2719
2714
|
export function connect(
|
|
2720
2715
|
|
|
@@ -2728,7 +2723,6 @@ declare namespace chrome {
|
|
|
2728
2723
|
*
|
|
2729
2724
|
* @param deviceAddress The Bluetooth address of the remote device to which a GATT connection should be opened.
|
|
2730
2725
|
* @param properties Connection properties (optional).
|
|
2731
|
-
* @param callback Called when the connect request has completed.
|
|
2732
2726
|
*/
|
|
2733
2727
|
export function connect(
|
|
2734
2728
|
|
|
@@ -2744,6 +2738,7 @@ declare namespace chrome {
|
|
|
2744
2738
|
*
|
|
2745
2739
|
* @chrome-returns-extra since Chrome 91
|
|
2746
2740
|
* @param deviceAddress The Bluetooth address of the remote device.
|
|
2741
|
+
* @returns Called when the disconnect request has completed.
|
|
2747
2742
|
*/
|
|
2748
2743
|
export function disconnect(
|
|
2749
2744
|
|
|
@@ -2754,7 +2749,6 @@ declare namespace chrome {
|
|
|
2754
2749
|
* Closes the app's connection to the device with the given address. Note that this will not always destroy the physical link itself, since there may be other apps with open connections.
|
|
2755
2750
|
*
|
|
2756
2751
|
* @param deviceAddress The Bluetooth address of the remote device.
|
|
2757
|
-
* @param callback Called when the disconnect request has completed.
|
|
2758
2752
|
*/
|
|
2759
2753
|
export function disconnect(
|
|
2760
2754
|
|
|
@@ -2768,6 +2762,7 @@ declare namespace chrome {
|
|
|
2768
2762
|
*
|
|
2769
2763
|
* @chrome-returns-extra since Chrome 91
|
|
2770
2764
|
* @param serviceId The instance ID of the requested GATT service.
|
|
2765
|
+
* @returns Called with the requested Service object.
|
|
2771
2766
|
*/
|
|
2772
2767
|
export function getService(
|
|
2773
2768
|
|
|
@@ -2778,7 +2773,6 @@ declare namespace chrome {
|
|
|
2778
2773
|
* Get the GATT service with the given instance ID.
|
|
2779
2774
|
*
|
|
2780
2775
|
* @param serviceId The instance ID of the requested GATT service.
|
|
2781
|
-
* @param callback Called with the requested Service object.
|
|
2782
2776
|
*/
|
|
2783
2777
|
export function getService(
|
|
2784
2778
|
|
|
@@ -2794,6 +2788,7 @@ declare namespace chrome {
|
|
|
2794
2788
|
*
|
|
2795
2789
|
* @chrome-returns-extra since Chrome 91
|
|
2796
2790
|
* @param service The service to create.
|
|
2791
|
+
* @returns Called with the created services's unique ID.
|
|
2797
2792
|
* @since Chrome 52
|
|
2798
2793
|
*/
|
|
2799
2794
|
export function createService(
|
|
@@ -2805,7 +2800,6 @@ declare namespace chrome {
|
|
|
2805
2800
|
* Create a locally hosted GATT service. This service can be registered to be available on a local GATT server. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
|
|
2806
2801
|
*
|
|
2807
2802
|
* @param service The service to create.
|
|
2808
|
-
* @param callback Called with the created services's unique ID.
|
|
2809
2803
|
* @since Chrome 52
|
|
2810
2804
|
*/
|
|
2811
2805
|
export function createService(
|
|
@@ -2824,6 +2818,7 @@ declare namespace chrome {
|
|
|
2824
2818
|
*
|
|
2825
2819
|
* @chrome-returns-extra since Chrome 91
|
|
2826
2820
|
* @param deviceAddress The Bluetooth address of the remote device whose GATT services should be returned.
|
|
2821
|
+
* @returns Called with the list of requested Service objects.
|
|
2827
2822
|
*/
|
|
2828
2823
|
export function getServices(
|
|
2829
2824
|
|
|
@@ -2836,7 +2831,6 @@ declare namespace chrome {
|
|
|
2836
2831
|
* _Note:_ If service discovery is not yet complete on the device, this API will return a subset (possibly empty) of services. A work around is to add a time based delay and/or call repeatedly until the expected number of services is returned.
|
|
2837
2832
|
*
|
|
2838
2833
|
* @param deviceAddress The Bluetooth address of the remote device whose GATT services should be returned.
|
|
2839
|
-
* @param callback Called with the list of requested Service objects.
|
|
2840
2834
|
*/
|
|
2841
2835
|
export function getServices(
|
|
2842
2836
|
|
|
@@ -2852,6 +2846,7 @@ declare namespace chrome {
|
|
|
2852
2846
|
*
|
|
2853
2847
|
* @chrome-returns-extra since Chrome 91
|
|
2854
2848
|
* @param characteristicId The instance ID of the requested GATT characteristic.
|
|
2849
|
+
* @returns Called with the requested Characteristic object.
|
|
2855
2850
|
*/
|
|
2856
2851
|
export function getCharacteristic(
|
|
2857
2852
|
|
|
@@ -2862,7 +2857,6 @@ declare namespace chrome {
|
|
|
2862
2857
|
* Get the GATT characteristic with the given instance ID that belongs to the given GATT service, if the characteristic exists.
|
|
2863
2858
|
*
|
|
2864
2859
|
* @param characteristicId The instance ID of the requested GATT characteristic.
|
|
2865
|
-
* @param callback Called with the requested Characteristic object.
|
|
2866
2860
|
*/
|
|
2867
2861
|
export function getCharacteristic(
|
|
2868
2862
|
|
|
@@ -2879,6 +2873,7 @@ declare namespace chrome {
|
|
|
2879
2873
|
* @chrome-returns-extra since Chrome 91
|
|
2880
2874
|
* @param characteristic The characteristic to create.
|
|
2881
2875
|
* @param serviceId ID of the service to create this characteristic for.
|
|
2876
|
+
* @returns Called with the created characteristic's unique ID.
|
|
2882
2877
|
* @since Chrome 52
|
|
2883
2878
|
*/
|
|
2884
2879
|
export function createCharacteristic(
|
|
@@ -2893,7 +2888,6 @@ declare namespace chrome {
|
|
|
2893
2888
|
*
|
|
2894
2889
|
* @param characteristic The characteristic to create.
|
|
2895
2890
|
* @param serviceId ID of the service to create this characteristic for.
|
|
2896
|
-
* @param callback Called with the created characteristic's unique ID.
|
|
2897
2891
|
* @since Chrome 52
|
|
2898
2892
|
*/
|
|
2899
2893
|
export function createCharacteristic(
|
|
@@ -2912,6 +2906,7 @@ declare namespace chrome {
|
|
|
2912
2906
|
*
|
|
2913
2907
|
* @chrome-returns-extra since Chrome 91
|
|
2914
2908
|
* @param serviceId The instance ID of the GATT service whose characteristics should be returned.
|
|
2909
|
+
* @returns Called with the list of characteristics that belong to the given service.
|
|
2915
2910
|
*/
|
|
2916
2911
|
export function getCharacteristics(
|
|
2917
2912
|
|
|
@@ -2922,7 +2917,6 @@ declare namespace chrome {
|
|
|
2922
2917
|
* Get a list of all discovered GATT characteristics that belong to the given service.
|
|
2923
2918
|
*
|
|
2924
2919
|
* @param serviceId The instance ID of the GATT service whose characteristics should be returned.
|
|
2925
|
-
* @param callback Called with the list of characteristics that belong to the given service.
|
|
2926
2920
|
*/
|
|
2927
2921
|
export function getCharacteristics(
|
|
2928
2922
|
|
|
@@ -2938,6 +2932,7 @@ declare namespace chrome {
|
|
|
2938
2932
|
*
|
|
2939
2933
|
* @chrome-returns-extra since Chrome 91
|
|
2940
2934
|
* @param serviceId The instance ID of the GATT service whose included services should be returned.
|
|
2935
|
+
* @returns Called with the list of GATT services included from the given service.
|
|
2941
2936
|
*/
|
|
2942
2937
|
export function getIncludedServices(
|
|
2943
2938
|
|
|
@@ -2948,7 +2943,6 @@ declare namespace chrome {
|
|
|
2948
2943
|
* Get a list of GATT services that are included by the given service.
|
|
2949
2944
|
*
|
|
2950
2945
|
* @param serviceId The instance ID of the GATT service whose included services should be returned.
|
|
2951
|
-
* @param callback Called with the list of GATT services included from the given service.
|
|
2952
2946
|
*/
|
|
2953
2947
|
export function getIncludedServices(
|
|
2954
2948
|
|
|
@@ -2964,6 +2958,7 @@ declare namespace chrome {
|
|
|
2964
2958
|
*
|
|
2965
2959
|
* @chrome-returns-extra since Chrome 91
|
|
2966
2960
|
* @param descriptorId The instance ID of the requested GATT characteristic descriptor.
|
|
2961
|
+
* @returns Called with the requested Descriptor object.
|
|
2967
2962
|
*/
|
|
2968
2963
|
export function getDescriptor(
|
|
2969
2964
|
|
|
@@ -2974,7 +2969,6 @@ declare namespace chrome {
|
|
|
2974
2969
|
* Get the GATT characteristic descriptor with the given instance ID.
|
|
2975
2970
|
*
|
|
2976
2971
|
* @param descriptorId The instance ID of the requested GATT characteristic descriptor.
|
|
2977
|
-
* @param callback Called with the requested Descriptor object.
|
|
2978
2972
|
*/
|
|
2979
2973
|
export function getDescriptor(
|
|
2980
2974
|
|
|
@@ -2991,6 +2985,7 @@ declare namespace chrome {
|
|
|
2991
2985
|
* @chrome-returns-extra since Chrome 91
|
|
2992
2986
|
* @param descriptor The descriptor to create.
|
|
2993
2987
|
* @param characteristicId ID of the characteristic to create this descriptor for.
|
|
2988
|
+
* @returns Called with the created descriptor's unique ID.
|
|
2994
2989
|
* @since Chrome 52
|
|
2995
2990
|
*/
|
|
2996
2991
|
export function createDescriptor(
|
|
@@ -3005,7 +3000,6 @@ declare namespace chrome {
|
|
|
3005
3000
|
*
|
|
3006
3001
|
* @param descriptor The descriptor to create.
|
|
3007
3002
|
* @param characteristicId ID of the characteristic to create this descriptor for.
|
|
3008
|
-
* @param callback Called with the created descriptor's unique ID.
|
|
3009
3003
|
* @since Chrome 52
|
|
3010
3004
|
*/
|
|
3011
3005
|
export function createDescriptor(
|
|
@@ -3024,6 +3018,7 @@ declare namespace chrome {
|
|
|
3024
3018
|
*
|
|
3025
3019
|
* @chrome-returns-extra since Chrome 91
|
|
3026
3020
|
* @param characteristicId The instance ID of the GATT characteristic whose descriptors should be returned.
|
|
3021
|
+
* @returns Called with the list of descriptors that belong to the given characteristic.
|
|
3027
3022
|
*/
|
|
3028
3023
|
export function getDescriptors(
|
|
3029
3024
|
|
|
@@ -3034,7 +3029,6 @@ declare namespace chrome {
|
|
|
3034
3029
|
* Get a list of GATT characteristic descriptors that belong to the given characteristic.
|
|
3035
3030
|
*
|
|
3036
3031
|
* @param characteristicId The instance ID of the GATT characteristic whose descriptors should be returned.
|
|
3037
|
-
* @param callback Called with the list of descriptors that belong to the given characteristic.
|
|
3038
3032
|
*/
|
|
3039
3033
|
export function getDescriptors(
|
|
3040
3034
|
|
|
@@ -3050,6 +3044,7 @@ declare namespace chrome {
|
|
|
3050
3044
|
*
|
|
3051
3045
|
* @chrome-returns-extra since Chrome 91
|
|
3052
3046
|
* @param characteristicId The instance ID of the GATT characteristic whose value should be read from the remote device.
|
|
3047
|
+
* @returns Called with the Characteristic object whose value was requested. The `value` field of the returned Characteristic object contains the result of the read request.
|
|
3053
3048
|
*/
|
|
3054
3049
|
export function readCharacteristicValue(
|
|
3055
3050
|
|
|
@@ -3060,7 +3055,6 @@ declare namespace chrome {
|
|
|
3060
3055
|
* Retrieve the value of a specified characteristic from a remote peripheral.
|
|
3061
3056
|
*
|
|
3062
3057
|
* @param characteristicId The instance ID of the GATT characteristic whose value should be read from the remote device.
|
|
3063
|
-
* @param callback Called with the Characteristic object whose value was requested. The `value` field of the returned Characteristic object contains the result of the read request.
|
|
3064
3058
|
*/
|
|
3065
3059
|
export function readCharacteristicValue(
|
|
3066
3060
|
|
|
@@ -3077,6 +3071,7 @@ declare namespace chrome {
|
|
|
3077
3071
|
* @chrome-returns-extra since Chrome 91
|
|
3078
3072
|
* @param characteristicId The instance ID of the GATT characteristic whose value should be written to.
|
|
3079
3073
|
* @param value The value that should be sent to the remote characteristic as part of the write request.
|
|
3074
|
+
* @returns Called when the write request has completed.
|
|
3080
3075
|
*/
|
|
3081
3076
|
export function writeCharacteristicValue(
|
|
3082
3077
|
|
|
@@ -3090,7 +3085,6 @@ declare namespace chrome {
|
|
|
3090
3085
|
*
|
|
3091
3086
|
* @param characteristicId The instance ID of the GATT characteristic whose value should be written to.
|
|
3092
3087
|
* @param value The value that should be sent to the remote characteristic as part of the write request.
|
|
3093
|
-
* @param callback Called when the write request has completed.
|
|
3094
3088
|
*/
|
|
3095
3089
|
export function writeCharacteristicValue(
|
|
3096
3090
|
|
|
@@ -3107,6 +3101,7 @@ declare namespace chrome {
|
|
|
3107
3101
|
* @chrome-returns-extra since Chrome 91
|
|
3108
3102
|
* @param characteristicId The instance ID of the GATT characteristic that notifications should be enabled on.
|
|
3109
3103
|
* @param properties Notification session properties (optional).
|
|
3104
|
+
* @returns Called when the request has completed.
|
|
3110
3105
|
*/
|
|
3111
3106
|
export function startCharacteristicNotifications(
|
|
3112
3107
|
|
|
@@ -3120,7 +3115,6 @@ declare namespace chrome {
|
|
|
3120
3115
|
*
|
|
3121
3116
|
* @param characteristicId The instance ID of the GATT characteristic that notifications should be enabled on.
|
|
3122
3117
|
* @param properties Notification session properties (optional).
|
|
3123
|
-
* @param callback Called when the request has completed.
|
|
3124
3118
|
*/
|
|
3125
3119
|
export function startCharacteristicNotifications(
|
|
3126
3120
|
|
|
@@ -3136,6 +3130,7 @@ declare namespace chrome {
|
|
|
3136
3130
|
*
|
|
3137
3131
|
* @chrome-returns-extra since Chrome 91
|
|
3138
3132
|
* @param characteristicId The instance ID of the GATT characteristic on which this app's notification session should be stopped.
|
|
3133
|
+
* @returns Called when the request has completed (optional).
|
|
3139
3134
|
*/
|
|
3140
3135
|
export function stopCharacteristicNotifications(
|
|
3141
3136
|
|
|
@@ -3146,7 +3141,6 @@ declare namespace chrome {
|
|
|
3146
3141
|
* Disable value notifications/indications from the specified characteristic. After a successful call, the application will stop receiving notifications/indications from this characteristic.
|
|
3147
3142
|
*
|
|
3148
3143
|
* @param characteristicId The instance ID of the GATT characteristic on which this app's notification session should be stopped.
|
|
3149
|
-
* @param callback Called when the request has completed (optional).
|
|
3150
3144
|
*/
|
|
3151
3145
|
export function stopCharacteristicNotifications(
|
|
3152
3146
|
|
|
@@ -3160,6 +3154,7 @@ declare namespace chrome {
|
|
|
3160
3154
|
*
|
|
3161
3155
|
* @chrome-returns-extra since Chrome 91
|
|
3162
3156
|
* @param characteristicId The characteristic to send the notication for.
|
|
3157
|
+
* @returns Callback called once the notification or indication has been sent successfully.
|
|
3163
3158
|
* @since Chrome 52
|
|
3164
3159
|
*/
|
|
3165
3160
|
export function notifyCharacteristicValueChanged(
|
|
@@ -3173,7 +3168,6 @@ declare namespace chrome {
|
|
|
3173
3168
|
* Notify a remote device of a new value for a characteristic. If the shouldIndicate flag in the notification object is true, an indication will be sent instead of a notification. Note, the characteristic needs to correctly set the 'notify' or 'indicate' property during creation for this call to succeed. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
|
|
3174
3169
|
*
|
|
3175
3170
|
* @param characteristicId The characteristic to send the notication for.
|
|
3176
|
-
* @param callback Callback called once the notification or indication has been sent successfully.
|
|
3177
3171
|
* @since Chrome 52
|
|
3178
3172
|
*/
|
|
3179
3173
|
export function notifyCharacteristicValueChanged(
|
|
@@ -3190,6 +3184,7 @@ declare namespace chrome {
|
|
|
3190
3184
|
*
|
|
3191
3185
|
* @chrome-returns-extra since Chrome 91
|
|
3192
3186
|
* @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be read from the remote device.
|
|
3187
|
+
* @returns Called with the Descriptor object whose value was requested. The `value` field of the returned Descriptor object contains the result of the read request.
|
|
3193
3188
|
*/
|
|
3194
3189
|
export function readDescriptorValue(
|
|
3195
3190
|
|
|
@@ -3200,7 +3195,6 @@ declare namespace chrome {
|
|
|
3200
3195
|
* Retrieve the value of a specified characteristic descriptor from a remote peripheral.
|
|
3201
3196
|
*
|
|
3202
3197
|
* @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be read from the remote device.
|
|
3203
|
-
* @param callback Called with the Descriptor object whose value was requested. The `value` field of the returned Descriptor object contains the result of the read request.
|
|
3204
3198
|
*/
|
|
3205
3199
|
export function readDescriptorValue(
|
|
3206
3200
|
|
|
@@ -3217,6 +3211,7 @@ declare namespace chrome {
|
|
|
3217
3211
|
* @chrome-returns-extra since Chrome 91
|
|
3218
3212
|
* @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be written to.
|
|
3219
3213
|
* @param value The value that should be sent to the remote descriptor as part of the write request.
|
|
3214
|
+
* @returns Called when the write request has completed.
|
|
3220
3215
|
*/
|
|
3221
3216
|
export function writeDescriptorValue(
|
|
3222
3217
|
|
|
@@ -3230,7 +3225,6 @@ declare namespace chrome {
|
|
|
3230
3225
|
*
|
|
3231
3226
|
* @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be written to.
|
|
3232
3227
|
* @param value The value that should be sent to the remote descriptor as part of the write request.
|
|
3233
|
-
* @param callback Called when the write request has completed.
|
|
3234
3228
|
*/
|
|
3235
3229
|
export function writeDescriptorValue(
|
|
3236
3230
|
|
|
@@ -3246,6 +3240,7 @@ declare namespace chrome {
|
|
|
3246
3240
|
*
|
|
3247
3241
|
* @chrome-returns-extra since Chrome 91
|
|
3248
3242
|
* @param serviceId Unique ID of a created service.
|
|
3243
|
+
* @returns Callback with the result of the register operation.
|
|
3249
3244
|
* @since Chrome 52
|
|
3250
3245
|
*/
|
|
3251
3246
|
export function registerService(
|
|
@@ -3257,7 +3252,6 @@ declare namespace chrome {
|
|
|
3257
3252
|
* Register the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
|
|
3258
3253
|
*
|
|
3259
3254
|
* @param serviceId Unique ID of a created service.
|
|
3260
|
-
* @param callback Callback with the result of the register operation.
|
|
3261
3255
|
* @since Chrome 52
|
|
3262
3256
|
*/
|
|
3263
3257
|
export function registerService(
|
|
@@ -3272,6 +3266,7 @@ declare namespace chrome {
|
|
|
3272
3266
|
*
|
|
3273
3267
|
* @chrome-returns-extra since Chrome 91
|
|
3274
3268
|
* @param serviceId Unique ID of a current registered service.
|
|
3269
|
+
* @returns Callback with the result of the register operation.
|
|
3275
3270
|
* @since Chrome 52
|
|
3276
3271
|
*/
|
|
3277
3272
|
export function unregisterService(
|
|
@@ -3283,7 +3278,6 @@ declare namespace chrome {
|
|
|
3283
3278
|
* Unregister the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
|
|
3284
3279
|
*
|
|
3285
3280
|
* @param serviceId Unique ID of a current registered service.
|
|
3286
|
-
* @param callback Callback with the result of the register operation.
|
|
3287
3281
|
* @since Chrome 52
|
|
3288
3282
|
*/
|
|
3289
3283
|
export function unregisterService(
|
|
@@ -3298,6 +3292,7 @@ declare namespace chrome {
|
|
|
3298
3292
|
*
|
|
3299
3293
|
* @chrome-returns-extra since Chrome 91
|
|
3300
3294
|
* @param serviceId Unique ID of a current registered service.
|
|
3295
|
+
* @returns Callback called once the service is removed.
|
|
3301
3296
|
* @since Chrome 52
|
|
3302
3297
|
*/
|
|
3303
3298
|
export function removeService(
|
|
@@ -3309,7 +3304,6 @@ declare namespace chrome {
|
|
|
3309
3304
|
* Remove the specified service, unregistering it if it was registered. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
|
|
3310
3305
|
*
|
|
3311
3306
|
* @param serviceId Unique ID of a current registered service.
|
|
3312
|
-
* @param callback Callback called once the service is removed.
|
|
3313
3307
|
* @since Chrome 52
|
|
3314
3308
|
*/
|
|
3315
3309
|
export function removeService(
|
|
@@ -3324,6 +3318,7 @@ declare namespace chrome {
|
|
|
3324
3318
|
*
|
|
3325
3319
|
* @chrome-returns-extra since Chrome 91
|
|
3326
3320
|
* @param advertisement The advertisement to advertise.
|
|
3321
|
+
* @returns Called once the registeration is done and we've started advertising. Returns the id of the created advertisement.
|
|
3327
3322
|
* @since Chrome 47
|
|
3328
3323
|
*/
|
|
3329
3324
|
export function registerAdvertisement(
|
|
@@ -3335,7 +3330,6 @@ declare namespace chrome {
|
|
|
3335
3330
|
* Create an advertisement and register it for advertising. To call this function, the app must have the bluetooth:low\_energy and bluetooth:peripheral permissions set to true. Additionally this API is only available to auto launched apps in Kiosk Mode or by setting the '--enable-ble-advertising-in-apps' command-line switch. See https://developer.chrome.com/apps/manifest/bluetooth Note: On some hardware, central and peripheral modes at the same time is supported but on hardware that doesn't support this, making this call will switch the device to peripheral mode. In the case of hardware which does not support both central and peripheral mode, attempting to use the device in both modes will lead to undefined behavior or prevent other central-role applications from behaving correctly (including the discovery of Bluetooth Low Energy devices).
|
|
3336
3331
|
*
|
|
3337
3332
|
* @param advertisement The advertisement to advertise.
|
|
3338
|
-
* @param callback Called once the registeration is done and we've started advertising. Returns the id of the created advertisement.
|
|
3339
3333
|
* @since Chrome 47
|
|
3340
3334
|
*/
|
|
3341
3335
|
export function registerAdvertisement(
|
|
@@ -3352,6 +3346,7 @@ declare namespace chrome {
|
|
|
3352
3346
|
*
|
|
3353
3347
|
* @chrome-returns-extra since Chrome 91
|
|
3354
3348
|
* @param advertisementId Id of the advertisement to unregister.
|
|
3349
|
+
* @returns Called once the advertisement is unregistered and is no longer being advertised.
|
|
3355
3350
|
* @since Chrome 47
|
|
3356
3351
|
*/
|
|
3357
3352
|
export function unregisterAdvertisement(
|
|
@@ -3363,7 +3358,6 @@ declare namespace chrome {
|
|
|
3363
3358
|
* Unregisters an advertisement and stops its advertising. If the advertisement fails to unregister the only way to stop advertising might be to restart the device.
|
|
3364
3359
|
*
|
|
3365
3360
|
* @param advertisementId Id of the advertisement to unregister.
|
|
3366
|
-
* @param callback Called once the advertisement is unregistered and is no longer being advertised.
|
|
3367
3361
|
* @since Chrome 47
|
|
3368
3362
|
*/
|
|
3369
3363
|
export function unregisterAdvertisement(
|
|
@@ -3377,6 +3371,7 @@ declare namespace chrome {
|
|
|
3377
3371
|
* Resets advertising on the current device. It will unregister and stop all existing advertisements.
|
|
3378
3372
|
*
|
|
3379
3373
|
* @chrome-returns-extra since Chrome 91
|
|
3374
|
+
* @returns Called once the advertisements are reset.
|
|
3380
3375
|
* @since Chrome 61
|
|
3381
3376
|
*/
|
|
3382
3377
|
export function resetAdvertising(): Promise<void>;
|
|
@@ -3384,7 +3379,6 @@ declare namespace chrome {
|
|
|
3384
3379
|
/**
|
|
3385
3380
|
* Resets advertising on the current device. It will unregister and stop all existing advertisements.
|
|
3386
3381
|
*
|
|
3387
|
-
* @param callback Called once the advertisements are reset.
|
|
3388
3382
|
* @since Chrome 61
|
|
3389
3383
|
*/
|
|
3390
3384
|
export function resetAdvertising(
|
|
@@ -3398,6 +3392,7 @@ declare namespace chrome {
|
|
|
3398
3392
|
* @chrome-returns-extra since Chrome 91
|
|
3399
3393
|
* @param minInterval Minimum interval between advertisments (in milliseconds). This cannot be lower than 20ms (as per the spec).
|
|
3400
3394
|
* @param maxInterval Maximum interval between advertisments (in milliseconds). This cannot be more than 10240ms (as per the spec).
|
|
3395
|
+
* @returns Called once the interval has been set.
|
|
3401
3396
|
* @since Chrome 55
|
|
3402
3397
|
*/
|
|
3403
3398
|
export function setAdvertisingInterval(
|
|
@@ -3412,7 +3407,6 @@ declare namespace chrome {
|
|
|
3412
3407
|
*
|
|
3413
3408
|
* @param minInterval Minimum interval between advertisments (in milliseconds). This cannot be lower than 20ms (as per the spec).
|
|
3414
3409
|
* @param maxInterval Maximum interval between advertisments (in milliseconds). This cannot be more than 10240ms (as per the spec).
|
|
3415
|
-
* @param callback Called once the interval has been set.
|
|
3416
3410
|
* @since Chrome 55
|
|
3417
3411
|
*/
|
|
3418
3412
|
export function setAdvertisingInterval(
|
|
@@ -3643,6 +3637,7 @@ declare namespace chrome {
|
|
|
3643
3637
|
*
|
|
3644
3638
|
* @chrome-returns-extra since Chrome 91
|
|
3645
3639
|
* @param properties The socket properties (optional).
|
|
3640
|
+
* @returns Called when the socket has been created.
|
|
3646
3641
|
*/
|
|
3647
3642
|
export function create(
|
|
3648
3643
|
|
|
@@ -3653,7 +3648,6 @@ declare namespace chrome {
|
|
|
3653
3648
|
* Creates a Bluetooth socket.
|
|
3654
3649
|
*
|
|
3655
3650
|
* @param properties The socket properties (optional).
|
|
3656
|
-
* @param callback Called when the socket has been created.
|
|
3657
3651
|
*/
|
|
3658
3652
|
export function create(
|
|
3659
3653
|
|
|
@@ -3673,6 +3667,7 @@ declare namespace chrome {
|
|
|
3673
3667
|
* @chrome-returns-extra since Chrome 91
|
|
3674
3668
|
* @param socketId The socket identifier.
|
|
3675
3669
|
* @param properties The properties to update.
|
|
3670
|
+
* @returns Called when the properties are updated.
|
|
3676
3671
|
*/
|
|
3677
3672
|
export function update(
|
|
3678
3673
|
|
|
@@ -3686,7 +3681,6 @@ declare namespace chrome {
|
|
|
3686
3681
|
*
|
|
3687
3682
|
* @param socketId The socket identifier.
|
|
3688
3683
|
* @param properties The properties to update.
|
|
3689
|
-
* @param callback Called when the properties are updated.
|
|
3690
3684
|
*/
|
|
3691
3685
|
export function update(
|
|
3692
3686
|
|
|
@@ -3701,6 +3695,7 @@ declare namespace chrome {
|
|
|
3701
3695
|
* Enables or disables a connected socket from receiving messages from its peer, or a listening socket from accepting new connections. The default value is "false". Pausing a connected socket is typically used by an application to throttle data sent by its peer. When a connected socket is paused, no `onReceive`event is raised. When a socket is connected and un-paused, `onReceive` events are raised again when messages are received. When a listening socket is paused, new connections are accepted until its backlog is full then additional connection requests are refused. `onAccept` events are raised only when the socket is un-paused.
|
|
3702
3696
|
*
|
|
3703
3697
|
* @chrome-returns-extra since Chrome 91
|
|
3698
|
+
* @returns Callback from the `setPaused` method.
|
|
3704
3699
|
*/
|
|
3705
3700
|
export function setPaused(
|
|
3706
3701
|
|
|
@@ -3711,8 +3706,6 @@ declare namespace chrome {
|
|
|
3711
3706
|
|
|
3712
3707
|
/**
|
|
3713
3708
|
* Enables or disables a connected socket from receiving messages from its peer, or a listening socket from accepting new connections. The default value is "false". Pausing a connected socket is typically used by an application to throttle data sent by its peer. When a connected socket is paused, no `onReceive`event is raised. When a socket is connected and un-paused, `onReceive` events are raised again when messages are received. When a listening socket is paused, new connections are accepted until its backlog is full then additional connection requests are refused. `onAccept` events are raised only when the socket is un-paused.
|
|
3714
|
-
*
|
|
3715
|
-
* @param callback Callback from the `setPaused` method.
|
|
3716
3709
|
*/
|
|
3717
3710
|
export function setPaused(
|
|
3718
3711
|
|
|
@@ -3730,6 +3723,7 @@ declare namespace chrome {
|
|
|
3730
3723
|
* @param socketId The socket identifier.
|
|
3731
3724
|
* @param uuid Service UUID to listen on.
|
|
3732
3725
|
* @param options Optional additional options for the service.
|
|
3726
|
+
* @returns Called when listen operation completes.
|
|
3733
3727
|
*/
|
|
3734
3728
|
export function listenUsingRfcomm(
|
|
3735
3729
|
|
|
@@ -3746,7 +3740,6 @@ declare namespace chrome {
|
|
|
3746
3740
|
* @param socketId The socket identifier.
|
|
3747
3741
|
* @param uuid Service UUID to listen on.
|
|
3748
3742
|
* @param options Optional additional options for the service.
|
|
3749
|
-
* @param callback Called when listen operation completes.
|
|
3750
3743
|
*/
|
|
3751
3744
|
export function listenUsingRfcomm(
|
|
3752
3745
|
|
|
@@ -3766,6 +3759,7 @@ declare namespace chrome {
|
|
|
3766
3759
|
* @param socketId The socket identifier.
|
|
3767
3760
|
* @param uuid Service UUID to listen on.
|
|
3768
3761
|
* @param options Optional additional options for the service.
|
|
3762
|
+
* @returns Called when listen operation completes.
|
|
3769
3763
|
*/
|
|
3770
3764
|
export function listenUsingL2cap(
|
|
3771
3765
|
|
|
@@ -3782,7 +3776,6 @@ declare namespace chrome {
|
|
|
3782
3776
|
* @param socketId The socket identifier.
|
|
3783
3777
|
* @param uuid Service UUID to listen on.
|
|
3784
3778
|
* @param options Optional additional options for the service.
|
|
3785
|
-
* @param callback Called when listen operation completes.
|
|
3786
3779
|
*/
|
|
3787
3780
|
export function listenUsingL2cap(
|
|
3788
3781
|
|
|
@@ -3802,6 +3795,7 @@ declare namespace chrome {
|
|
|
3802
3795
|
* @param socketId The socket identifier.
|
|
3803
3796
|
* @param address The address of the Bluetooth device.
|
|
3804
3797
|
* @param uuid The UUID of the service to connect to.
|
|
3798
|
+
* @returns Called when the connect attempt is complete.
|
|
3805
3799
|
*/
|
|
3806
3800
|
export function connect(
|
|
3807
3801
|
|
|
@@ -3818,7 +3812,6 @@ declare namespace chrome {
|
|
|
3818
3812
|
* @param socketId The socket identifier.
|
|
3819
3813
|
* @param address The address of the Bluetooth device.
|
|
3820
3814
|
* @param uuid The UUID of the service to connect to.
|
|
3821
|
-
* @param callback Called when the connect attempt is complete.
|
|
3822
3815
|
*/
|
|
3823
3816
|
export function connect(
|
|
3824
3817
|
|
|
@@ -3836,6 +3829,7 @@ declare namespace chrome {
|
|
|
3836
3829
|
*
|
|
3837
3830
|
* @chrome-returns-extra since Chrome 91
|
|
3838
3831
|
* @param socketId The socket identifier.
|
|
3832
|
+
* @returns Called when the disconnect attempt is complete.
|
|
3839
3833
|
*/
|
|
3840
3834
|
export function disconnect(
|
|
3841
3835
|
|
|
@@ -3846,7 +3840,6 @@ declare namespace chrome {
|
|
|
3846
3840
|
* Disconnects the socket. The socket identifier remains valid.
|
|
3847
3841
|
*
|
|
3848
3842
|
* @param socketId The socket identifier.
|
|
3849
|
-
* @param callback Called when the disconnect attempt is complete.
|
|
3850
3843
|
*/
|
|
3851
3844
|
export function disconnect(
|
|
3852
3845
|
|
|
@@ -3860,6 +3853,7 @@ declare namespace chrome {
|
|
|
3860
3853
|
*
|
|
3861
3854
|
* @chrome-returns-extra since Chrome 91
|
|
3862
3855
|
* @param socketId The socket identifier.
|
|
3856
|
+
* @returns Called when the `close` operation completes.
|
|
3863
3857
|
*/
|
|
3864
3858
|
export function close(
|
|
3865
3859
|
|
|
@@ -3870,7 +3864,6 @@ declare namespace chrome {
|
|
|
3870
3864
|
* Disconnects and destroys the socket. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
|
|
3871
3865
|
*
|
|
3872
3866
|
* @param socketId The socket identifier.
|
|
3873
|
-
* @param callback Called when the `close` operation completes.
|
|
3874
3867
|
*/
|
|
3875
3868
|
export function close(
|
|
3876
3869
|
|
|
@@ -3885,6 +3878,7 @@ declare namespace chrome {
|
|
|
3885
3878
|
* @chrome-returns-extra since Chrome 91
|
|
3886
3879
|
* @param socketId The socket identifier.
|
|
3887
3880
|
* @param data The data to send.
|
|
3881
|
+
* @returns Called with the number of bytes sent.
|
|
3888
3882
|
*/
|
|
3889
3883
|
export function send(
|
|
3890
3884
|
|
|
@@ -3898,7 +3892,6 @@ declare namespace chrome {
|
|
|
3898
3892
|
*
|
|
3899
3893
|
* @param socketId The socket identifier.
|
|
3900
3894
|
* @param data The data to send.
|
|
3901
|
-
* @param callback Called with the number of bytes sent.
|
|
3902
3895
|
*/
|
|
3903
3896
|
export function send(
|
|
3904
3897
|
|
|
@@ -3919,6 +3912,7 @@ declare namespace chrome {
|
|
|
3919
3912
|
*
|
|
3920
3913
|
* @chrome-returns-extra since Chrome 91
|
|
3921
3914
|
* @param socketId The socket identifier.
|
|
3915
|
+
* @returns Called when the socket state is available.
|
|
3922
3916
|
*/
|
|
3923
3917
|
export function getInfo(
|
|
3924
3918
|
|
|
@@ -3929,7 +3923,6 @@ declare namespace chrome {
|
|
|
3929
3923
|
* Retrieves the state of the given socket.
|
|
3930
3924
|
*
|
|
3931
3925
|
* @param socketId The socket identifier.
|
|
3932
|
-
* @param callback Called when the socket state is available.
|
|
3933
3926
|
*/
|
|
3934
3927
|
export function getInfo(
|
|
3935
3928
|
|
|
@@ -3947,13 +3940,12 @@ declare namespace chrome {
|
|
|
3947
3940
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
3948
3941
|
*
|
|
3949
3942
|
* @chrome-returns-extra since Chrome 91
|
|
3943
|
+
* @returns Called when the list of sockets is available.
|
|
3950
3944
|
*/
|
|
3951
3945
|
export function getSockets(): Promise<SocketInfo[]>;
|
|
3952
3946
|
|
|
3953
3947
|
/**
|
|
3954
3948
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
3955
|
-
*
|
|
3956
|
-
* @param callback Called when the list of sockets is available.
|
|
3957
3949
|
*/
|
|
3958
3950
|
export function getSockets(
|
|
3959
3951
|
|
|
@@ -4500,6 +4492,7 @@ declare namespace chrome {
|
|
|
4500
4492
|
*
|
|
4501
4493
|
* @chrome-returns-extra since Chrome 117
|
|
4502
4494
|
* @param options Configures how the tab should be opened.
|
|
4495
|
+
* @returns Called when the tab was successfully created, or failed to be created. If failed, {@link runtime.lastError} will be set.
|
|
4503
4496
|
*/
|
|
4504
4497
|
export function openTab(
|
|
4505
4498
|
|
|
@@ -4510,7 +4503,6 @@ declare namespace chrome {
|
|
|
4510
4503
|
* Opens a new tab in a browser window associated with the current application and Chrome profile. If no browser window for the Chrome profile is opened, a new one is opened prior to creating the new tab.
|
|
4511
4504
|
*
|
|
4512
4505
|
* @param options Configures how the tab should be opened.
|
|
4513
|
-
* @param callback Called when the tab was successfully created, or failed to be created. If failed, {@link runtime.lastError} will be set.
|
|
4514
4506
|
*/
|
|
4515
4507
|
export function openTab(
|
|
4516
4508
|
|
|
@@ -5111,6 +5103,7 @@ declare namespace chrome {
|
|
|
5111
5103
|
*
|
|
5112
5104
|
* @chrome-returns-extra since Chrome 96
|
|
5113
5105
|
* @param dataToRemove The set of data types to remove.
|
|
5106
|
+
* @returns Resolves when deletion has completed.
|
|
5114
5107
|
*/
|
|
5115
5108
|
export function remove(
|
|
5116
5109
|
|
|
@@ -5123,7 +5116,6 @@ declare namespace chrome {
|
|
|
5123
5116
|
* Clears various types of browsing data stored in a user's profile.
|
|
5124
5117
|
*
|
|
5125
5118
|
* @param dataToRemove The set of data types to remove.
|
|
5126
|
-
* @param callback Resolves when deletion has completed.
|
|
5127
5119
|
*/
|
|
5128
5120
|
export function remove(
|
|
5129
5121
|
|
|
@@ -5138,6 +5130,7 @@ declare namespace chrome {
|
|
|
5138
5130
|
* Clears websites' appcache data.
|
|
5139
5131
|
*
|
|
5140
5132
|
* @chrome-returns-extra since Chrome 96
|
|
5133
|
+
* @returns Resolves when websites' appcache data has been cleared.
|
|
5141
5134
|
*/
|
|
5142
5135
|
export function removeAppcache(
|
|
5143
5136
|
|
|
@@ -5146,8 +5139,6 @@ declare namespace chrome {
|
|
|
5146
5139
|
|
|
5147
5140
|
/**
|
|
5148
5141
|
* Clears websites' appcache data.
|
|
5149
|
-
*
|
|
5150
|
-
* @param callback Resolves when websites' appcache data has been cleared.
|
|
5151
5142
|
*/
|
|
5152
5143
|
export function removeAppcache(
|
|
5153
5144
|
|
|
@@ -5160,6 +5151,7 @@ declare namespace chrome {
|
|
|
5160
5151
|
* Clears the browser's cache.
|
|
5161
5152
|
*
|
|
5162
5153
|
* @chrome-returns-extra since Chrome 96
|
|
5154
|
+
* @returns Resolves when the browser's cache has been cleared.
|
|
5163
5155
|
*/
|
|
5164
5156
|
export function removeCache(
|
|
5165
5157
|
|
|
@@ -5168,8 +5160,6 @@ declare namespace chrome {
|
|
|
5168
5160
|
|
|
5169
5161
|
/**
|
|
5170
5162
|
* Clears the browser's cache.
|
|
5171
|
-
*
|
|
5172
|
-
* @param callback Resolves when the browser's cache has been cleared.
|
|
5173
5163
|
*/
|
|
5174
5164
|
export function removeCache(
|
|
5175
5165
|
|
|
@@ -5182,6 +5172,7 @@ declare namespace chrome {
|
|
|
5182
5172
|
* Clears websites' cache storage data.
|
|
5183
5173
|
*
|
|
5184
5174
|
* @chrome-returns-extra since Chrome 96
|
|
5175
|
+
* @returns Resolves when websites' cache storage has been cleared.
|
|
5185
5176
|
* @since Chrome 72
|
|
5186
5177
|
*/
|
|
5187
5178
|
export function removeCacheStorage(
|
|
@@ -5192,7 +5183,6 @@ declare namespace chrome {
|
|
|
5192
5183
|
/**
|
|
5193
5184
|
* Clears websites' cache storage data.
|
|
5194
5185
|
*
|
|
5195
|
-
* @param callback Resolves when websites' cache storage has been cleared.
|
|
5196
5186
|
* @since Chrome 72
|
|
5197
5187
|
*/
|
|
5198
5188
|
export function removeCacheStorage(
|
|
@@ -5206,6 +5196,7 @@ declare namespace chrome {
|
|
|
5206
5196
|
* Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
|
|
5207
5197
|
*
|
|
5208
5198
|
* @chrome-returns-extra since Chrome 96
|
|
5199
|
+
* @returns Resolves when the browser's cookies and server-bound certificates have been cleared.
|
|
5209
5200
|
*/
|
|
5210
5201
|
export function removeCookies(
|
|
5211
5202
|
|
|
@@ -5214,8 +5205,6 @@ declare namespace chrome {
|
|
|
5214
5205
|
|
|
5215
5206
|
/**
|
|
5216
5207
|
* Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
|
|
5217
|
-
*
|
|
5218
|
-
* @param callback Resolves when the browser's cookies and server-bound certificates have been cleared.
|
|
5219
5208
|
*/
|
|
5220
5209
|
export function removeCookies(
|
|
5221
5210
|
|
|
@@ -5228,6 +5217,7 @@ declare namespace chrome {
|
|
|
5228
5217
|
* Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
|
|
5229
5218
|
*
|
|
5230
5219
|
* @chrome-returns-extra since Chrome 96
|
|
5220
|
+
* @returns Resolves when the browser's list of downloaded files has been cleared.
|
|
5231
5221
|
*/
|
|
5232
5222
|
export function removeDownloads(
|
|
5233
5223
|
|
|
@@ -5236,8 +5226,6 @@ declare namespace chrome {
|
|
|
5236
5226
|
|
|
5237
5227
|
/**
|
|
5238
5228
|
* Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
|
|
5239
|
-
*
|
|
5240
|
-
* @param callback Resolves when the browser's list of downloaded files has been cleared.
|
|
5241
5229
|
*/
|
|
5242
5230
|
export function removeDownloads(
|
|
5243
5231
|
|
|
@@ -5250,6 +5238,7 @@ declare namespace chrome {
|
|
|
5250
5238
|
* Clears websites' file system data.
|
|
5251
5239
|
*
|
|
5252
5240
|
* @chrome-returns-extra since Chrome 96
|
|
5241
|
+
* @returns Resolves when websites' file systems have been cleared.
|
|
5253
5242
|
*/
|
|
5254
5243
|
export function removeFileSystems(
|
|
5255
5244
|
|
|
@@ -5258,8 +5247,6 @@ declare namespace chrome {
|
|
|
5258
5247
|
|
|
5259
5248
|
/**
|
|
5260
5249
|
* Clears websites' file system data.
|
|
5261
|
-
*
|
|
5262
|
-
* @param callback Resolves when websites' file systems have been cleared.
|
|
5263
5250
|
*/
|
|
5264
5251
|
export function removeFileSystems(
|
|
5265
5252
|
|
|
@@ -5272,6 +5259,7 @@ declare namespace chrome {
|
|
|
5272
5259
|
* Clears the browser's stored form data (autofill).
|
|
5273
5260
|
*
|
|
5274
5261
|
* @chrome-returns-extra since Chrome 96
|
|
5262
|
+
* @returns Resolves when the browser's form data has been cleared.
|
|
5275
5263
|
*/
|
|
5276
5264
|
export function removeFormData(
|
|
5277
5265
|
|
|
@@ -5280,8 +5268,6 @@ declare namespace chrome {
|
|
|
5280
5268
|
|
|
5281
5269
|
/**
|
|
5282
5270
|
* Clears the browser's stored form data (autofill).
|
|
5283
|
-
*
|
|
5284
|
-
* @param callback Resolves when the browser's form data has been cleared.
|
|
5285
5271
|
*/
|
|
5286
5272
|
export function removeFormData(
|
|
5287
5273
|
|
|
@@ -5294,6 +5280,7 @@ declare namespace chrome {
|
|
|
5294
5280
|
* Clears the browser's history.
|
|
5295
5281
|
*
|
|
5296
5282
|
* @chrome-returns-extra since Chrome 96
|
|
5283
|
+
* @returns Resolves when the browser's history has cleared.
|
|
5297
5284
|
*/
|
|
5298
5285
|
export function removeHistory(
|
|
5299
5286
|
|
|
@@ -5302,8 +5289,6 @@ declare namespace chrome {
|
|
|
5302
5289
|
|
|
5303
5290
|
/**
|
|
5304
5291
|
* Clears the browser's history.
|
|
5305
|
-
*
|
|
5306
|
-
* @param callback Resolves when the browser's history has cleared.
|
|
5307
5292
|
*/
|
|
5308
5293
|
export function removeHistory(
|
|
5309
5294
|
|
|
@@ -5316,6 +5301,7 @@ declare namespace chrome {
|
|
|
5316
5301
|
* Clears websites' IndexedDB data.
|
|
5317
5302
|
*
|
|
5318
5303
|
* @chrome-returns-extra since Chrome 96
|
|
5304
|
+
* @returns Resolves when websites' IndexedDB data has been cleared.
|
|
5319
5305
|
*/
|
|
5320
5306
|
export function removeIndexedDB(
|
|
5321
5307
|
|
|
@@ -5324,8 +5310,6 @@ declare namespace chrome {
|
|
|
5324
5310
|
|
|
5325
5311
|
/**
|
|
5326
5312
|
* Clears websites' IndexedDB data.
|
|
5327
|
-
*
|
|
5328
|
-
* @param callback Resolves when websites' IndexedDB data has been cleared.
|
|
5329
5313
|
*/
|
|
5330
5314
|
export function removeIndexedDB(
|
|
5331
5315
|
|
|
@@ -5338,6 +5322,7 @@ declare namespace chrome {
|
|
|
5338
5322
|
* Clears websites' local storage data.
|
|
5339
5323
|
*
|
|
5340
5324
|
* @chrome-returns-extra since Chrome 96
|
|
5325
|
+
* @returns Resolves when websites' local storage has been cleared.
|
|
5341
5326
|
*/
|
|
5342
5327
|
export function removeLocalStorage(
|
|
5343
5328
|
|
|
@@ -5346,8 +5331,6 @@ declare namespace chrome {
|
|
|
5346
5331
|
|
|
5347
5332
|
/**
|
|
5348
5333
|
* Clears websites' local storage data.
|
|
5349
|
-
*
|
|
5350
|
-
* @param callback Resolves when websites' local storage has been cleared.
|
|
5351
5334
|
*/
|
|
5352
5335
|
export function removeLocalStorage(
|
|
5353
5336
|
|
|
@@ -5360,6 +5343,7 @@ declare namespace chrome {
|
|
|
5360
5343
|
* Clears plugins' data.
|
|
5361
5344
|
*
|
|
5362
5345
|
* @chrome-returns-extra since Chrome 96
|
|
5346
|
+
* @returns Resolves when plugins' data has been cleared.
|
|
5363
5347
|
* @deprecated Support for Flash has been removed. This function has no effect.
|
|
5364
5348
|
* @chrome-deprecated-since Chrome 88
|
|
5365
5349
|
*/
|
|
@@ -5371,7 +5355,6 @@ declare namespace chrome {
|
|
|
5371
5355
|
/**
|
|
5372
5356
|
* Clears plugins' data.
|
|
5373
5357
|
*
|
|
5374
|
-
* @param callback Resolves when plugins' data has been cleared.
|
|
5375
5358
|
* @deprecated Support for Flash has been removed. This function has no effect.
|
|
5376
5359
|
* @chrome-deprecated-since Chrome 88
|
|
5377
5360
|
*/
|
|
@@ -5386,6 +5369,7 @@ declare namespace chrome {
|
|
|
5386
5369
|
* Clears the browser's stored passwords.
|
|
5387
5370
|
*
|
|
5388
5371
|
* @chrome-returns-extra since Chrome 96
|
|
5372
|
+
* @returns Resolves when the browser's passwords have been cleared.
|
|
5389
5373
|
* @deprecated Support for password deletion through extensions has been removed. This function has no effect.
|
|
5390
5374
|
*/
|
|
5391
5375
|
export function removePasswords(
|
|
@@ -5396,7 +5380,6 @@ declare namespace chrome {
|
|
|
5396
5380
|
/**
|
|
5397
5381
|
* Clears the browser's stored passwords.
|
|
5398
5382
|
*
|
|
5399
|
-
* @param callback Resolves when the browser's passwords have been cleared.
|
|
5400
5383
|
* @deprecated Support for password deletion through extensions has been removed. This function has no effect.
|
|
5401
5384
|
*/
|
|
5402
5385
|
export function removePasswords(
|
|
@@ -5410,6 +5393,7 @@ declare namespace chrome {
|
|
|
5410
5393
|
* Clears websites' service workers.
|
|
5411
5394
|
*
|
|
5412
5395
|
* @chrome-returns-extra since Chrome 96
|
|
5396
|
+
* @returns Resolves when websites' service workers have been cleared.
|
|
5413
5397
|
* @since Chrome 72
|
|
5414
5398
|
*/
|
|
5415
5399
|
export function removeServiceWorkers(
|
|
@@ -5420,7 +5404,6 @@ declare namespace chrome {
|
|
|
5420
5404
|
/**
|
|
5421
5405
|
* Clears websites' service workers.
|
|
5422
5406
|
*
|
|
5423
|
-
* @param callback Resolves when websites' service workers have been cleared.
|
|
5424
5407
|
* @since Chrome 72
|
|
5425
5408
|
*/
|
|
5426
5409
|
export function removeServiceWorkers(
|
|
@@ -5434,6 +5417,7 @@ declare namespace chrome {
|
|
|
5434
5417
|
* Clears websites' WebSQL data.
|
|
5435
5418
|
*
|
|
5436
5419
|
* @chrome-returns-extra since Chrome 96
|
|
5420
|
+
* @returns Resolves when websites' WebSQL databases have been cleared.
|
|
5437
5421
|
*/
|
|
5438
5422
|
export function removeWebSQL(
|
|
5439
5423
|
|
|
@@ -5442,8 +5426,6 @@ declare namespace chrome {
|
|
|
5442
5426
|
|
|
5443
5427
|
/**
|
|
5444
5428
|
* Clears websites' WebSQL data.
|
|
5445
|
-
*
|
|
5446
|
-
* @param callback Resolves when websites' WebSQL databases have been cleared.
|
|
5447
5429
|
*/
|
|
5448
5430
|
export function removeWebSQL(
|
|
5449
5431
|
|
|
@@ -5766,6 +5748,7 @@ declare namespace chrome {
|
|
|
5766
5748
|
*
|
|
5767
5749
|
* @chrome-returns-extra since Chrome 96
|
|
5768
5750
|
* @param details Contains the details about the requested dialog.
|
|
5751
|
+
* @returns 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).
|
|
5769
5752
|
* @since Chrome 57
|
|
5770
5753
|
*/
|
|
5771
5754
|
export function requestPin(
|
|
@@ -5777,7 +5760,6 @@ declare namespace chrome {
|
|
|
5777
5760
|
* 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
5761
|
*
|
|
5779
5762
|
* @param details Contains the details about the requested dialog.
|
|
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
5763
|
* @since Chrome 57
|
|
5782
5764
|
*/
|
|
5783
5765
|
export function requestPin(
|
|
@@ -5794,6 +5776,7 @@ declare namespace chrome {
|
|
|
5794
5776
|
*
|
|
5795
5777
|
* @chrome-returns-extra since Chrome 96
|
|
5796
5778
|
* @param details Contains the details about the reason for stopping the request flow.
|
|
5779
|
+
* @returns Returns a Promise which resolves when the request to close the PIN dialog is complete.
|
|
5797
5780
|
* @since Chrome 57
|
|
5798
5781
|
*/
|
|
5799
5782
|
export function stopPinRequest(
|
|
@@ -5805,7 +5788,6 @@ declare namespace chrome {
|
|
|
5805
5788
|
* Stops the pin request started by the {@link requestPin} function.
|
|
5806
5789
|
*
|
|
5807
5790
|
* @param details Contains the details about the reason for stopping the request flow.
|
|
5808
|
-
* @param callback Returns a Promise which resolves when the request to close the PIN dialog is complete.
|
|
5809
5791
|
* @since Chrome 57
|
|
5810
5792
|
*/
|
|
5811
5793
|
export function stopPinRequest(
|
|
@@ -5822,6 +5804,7 @@ declare namespace chrome {
|
|
|
5822
5804
|
*
|
|
5823
5805
|
* @chrome-returns-extra since Chrome 96
|
|
5824
5806
|
* @param details The certificates to set. Invalid certificates will be ignored.
|
|
5807
|
+
* @returns Returns a Promise which resolves upon completion.
|
|
5825
5808
|
* @since Chrome 86
|
|
5826
5809
|
*/
|
|
5827
5810
|
export function setCertificates(
|
|
@@ -5835,7 +5818,6 @@ declare namespace chrome {
|
|
|
5835
5818
|
* 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
5819
|
*
|
|
5837
5820
|
* @param details The certificates to set. Invalid certificates will be ignored.
|
|
5838
|
-
* @param callback Returns a Promise which resolves upon completion.
|
|
5839
5821
|
* @since Chrome 86
|
|
5840
5822
|
*/
|
|
5841
5823
|
export function setCertificates(
|
|
@@ -6030,13 +6012,12 @@ declare namespace chrome {
|
|
|
6030
6012
|
* Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
|
|
6031
6013
|
*
|
|
6032
6014
|
* @chrome-returns-extra since Chrome 96
|
|
6015
|
+
* @returns Resolves with a list of the registered commands.
|
|
6033
6016
|
*/
|
|
6034
6017
|
export function getAll(): Promise<Command[]>;
|
|
6035
6018
|
|
|
6036
6019
|
/**
|
|
6037
6020
|
* Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
|
|
6038
|
-
*
|
|
6039
|
-
* @param callback Resolves with a list of the registered commands.
|
|
6040
6021
|
*/
|
|
6041
6022
|
export function getAll(
|
|
6042
6023
|
|
|
@@ -6757,6 +6738,7 @@ declare namespace chrome {
|
|
|
6757
6738
|
* @chrome-returns-extra since Chrome 123
|
|
6758
6739
|
* @param id The ID of the item to update.
|
|
6759
6740
|
* @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
|
|
6741
|
+
* @returns Resolves when the context menu has been updated.
|
|
6760
6742
|
*/
|
|
6761
6743
|
export function update(
|
|
6762
6744
|
|
|
@@ -6811,7 +6793,6 @@ declare namespace chrome {
|
|
|
6811
6793
|
*
|
|
6812
6794
|
* @param id The ID of the item to update.
|
|
6813
6795
|
* @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
|
|
6814
|
-
* @param callback Resolves when the context menu has been updated.
|
|
6815
6796
|
*/
|
|
6816
6797
|
export function update(
|
|
6817
6798
|
|
|
@@ -6868,6 +6849,7 @@ declare namespace chrome {
|
|
|
6868
6849
|
*
|
|
6869
6850
|
* @chrome-returns-extra since Chrome 123
|
|
6870
6851
|
* @param menuItemId The ID of the context menu item to remove.
|
|
6852
|
+
* @returns Resolves when the context menu has been removed.
|
|
6871
6853
|
*/
|
|
6872
6854
|
export function remove(
|
|
6873
6855
|
|
|
@@ -6878,7 +6860,6 @@ declare namespace chrome {
|
|
|
6878
6860
|
* Removes a context menu item.
|
|
6879
6861
|
*
|
|
6880
6862
|
* @param menuItemId The ID of the context menu item to remove.
|
|
6881
|
-
* @param callback Resolves when the context menu has been removed.
|
|
6882
6863
|
*/
|
|
6883
6864
|
export function remove(
|
|
6884
6865
|
|
|
@@ -6891,13 +6872,12 @@ declare namespace chrome {
|
|
|
6891
6872
|
* Removes all context menu items added by this extension.
|
|
6892
6873
|
*
|
|
6893
6874
|
* @chrome-returns-extra since Chrome 123
|
|
6875
|
+
* @returns Resolves when removal is complete.
|
|
6894
6876
|
*/
|
|
6895
6877
|
export function removeAll(): Promise<void>;
|
|
6896
6878
|
|
|
6897
6879
|
/**
|
|
6898
6880
|
* Removes all context menu items added by this extension.
|
|
6899
|
-
*
|
|
6900
|
-
* @param callback Resolves when removal is complete.
|
|
6901
6881
|
*/
|
|
6902
6882
|
export function removeAll(
|
|
6903
6883
|
|
|
@@ -7678,6 +7658,7 @@ declare namespace chrome {
|
|
|
7678
7658
|
* @chrome-returns-extra since Chrome 96
|
|
7679
7659
|
* @param target Debugging target to which you want to attach.
|
|
7680
7660
|
* @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained [here](https://developer.chrome.com/devtools/docs/debugger-protocol).
|
|
7661
|
+
* @returns Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
|
|
7681
7662
|
*/
|
|
7682
7663
|
export function attach(
|
|
7683
7664
|
|
|
@@ -7691,7 +7672,6 @@ declare namespace chrome {
|
|
|
7691
7672
|
*
|
|
7692
7673
|
* @param target Debugging target to which you want to attach.
|
|
7693
7674
|
* @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained [here](https://developer.chrome.com/devtools/docs/debugger-protocol).
|
|
7694
|
-
* @param callback Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
|
|
7695
7675
|
*/
|
|
7696
7676
|
export function attach(
|
|
7697
7677
|
|
|
@@ -7707,6 +7687,7 @@ declare namespace chrome {
|
|
|
7707
7687
|
*
|
|
7708
7688
|
* @chrome-returns-extra since Chrome 96
|
|
7709
7689
|
* @param target Debugging target from which you want to detach.
|
|
7690
|
+
* @returns Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
|
|
7710
7691
|
*/
|
|
7711
7692
|
export function detach(
|
|
7712
7693
|
|
|
@@ -7717,7 +7698,6 @@ declare namespace chrome {
|
|
|
7717
7698
|
* Detaches debugger from the given target.
|
|
7718
7699
|
*
|
|
7719
7700
|
* @param target Debugging target from which you want to detach.
|
|
7720
|
-
* @param callback Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
|
|
7721
7701
|
*/
|
|
7722
7702
|
export function detach(
|
|
7723
7703
|
|
|
@@ -7733,6 +7713,7 @@ declare namespace chrome {
|
|
|
7733
7713
|
* @param target Debugging target to which you want to send the command.
|
|
7734
7714
|
* @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
|
|
7735
7715
|
* @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
|
|
7716
|
+
* @returns Response body. If an error occurs while posting the message, the promise will be rejected.
|
|
7736
7717
|
*/
|
|
7737
7718
|
export function sendCommand(
|
|
7738
7719
|
|
|
@@ -7749,7 +7730,6 @@ declare namespace chrome {
|
|
|
7749
7730
|
* @param target Debugging target to which you want to send the command.
|
|
7750
7731
|
* @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
|
|
7751
7732
|
* @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
|
|
7752
|
-
* @param callback Response body. If an error occurs while posting the message, the promise will be rejected.
|
|
7753
7733
|
*/
|
|
7754
7734
|
export function sendCommand(
|
|
7755
7735
|
|
|
@@ -8800,6 +8780,7 @@ declare namespace chrome {
|
|
|
8800
8780
|
* * {@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}.
|
|
8801
8781
|
*
|
|
8802
8782
|
* @chrome-returns-extra since Chrome 91
|
|
8783
|
+
* @returns 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.
|
|
8803
8784
|
*/
|
|
8804
8785
|
export function updateDynamicRules(
|
|
8805
8786
|
|
|
@@ -8816,8 +8797,6 @@ declare namespace chrome {
|
|
|
8816
8797
|
* * These rules are persisted across browser sessions and across extension updates.
|
|
8817
8798
|
* * Static rules specified as part of the extension package can not be removed using this function.
|
|
8818
8799
|
* * {@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
|
-
*
|
|
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
8800
|
*/
|
|
8822
8801
|
export function updateDynamicRules(
|
|
8823
8802
|
|
|
@@ -8834,6 +8813,7 @@ declare namespace chrome {
|
|
|
8834
8813
|
*
|
|
8835
8814
|
* @chrome-returns-extra since Chrome 91
|
|
8836
8815
|
* @param filter An object to filter the list of fetched rules.
|
|
8816
|
+
* @returns Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
|
|
8837
8817
|
*/
|
|
8838
8818
|
export function getDynamicRules(
|
|
8839
8819
|
|
|
@@ -8847,7 +8827,6 @@ declare namespace chrome {
|
|
|
8847
8827
|
* Returns the current set of dynamic rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
|
|
8848
8828
|
*
|
|
8849
8829
|
* @param filter An object to filter the list of fetched rules.
|
|
8850
|
-
* @param callback Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
|
|
8851
8830
|
*/
|
|
8852
8831
|
export function getDynamicRules(
|
|
8853
8832
|
|
|
@@ -8869,6 +8848,7 @@ declare namespace chrome {
|
|
|
8869
8848
|
* * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
|
|
8870
8849
|
*
|
|
8871
8850
|
* @chrome-returns-extra since Chrome 91
|
|
8851
|
+
* @returns 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.
|
|
8872
8852
|
* @since Chrome 90
|
|
8873
8853
|
*/
|
|
8874
8854
|
export function updateSessionRules(
|
|
@@ -8883,7 +8863,6 @@ declare namespace chrome {
|
|
|
8883
8863
|
* * These rules are not persisted across sessions and are backed in memory.
|
|
8884
8864
|
* * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
|
|
8885
8865
|
*
|
|
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
8866
|
* @since Chrome 90
|
|
8888
8867
|
*/
|
|
8889
8868
|
export function updateSessionRules(
|
|
@@ -8898,6 +8877,7 @@ declare namespace chrome {
|
|
|
8898
8877
|
*
|
|
8899
8878
|
* @chrome-returns-extra since Chrome 91
|
|
8900
8879
|
* @param filter An object to filter the list of fetched rules.
|
|
8880
|
+
* @returns Promise that resolves with the set of session scoped rules.
|
|
8901
8881
|
* @since Chrome 90
|
|
8902
8882
|
*/
|
|
8903
8883
|
export function getSessionRules(
|
|
@@ -8912,7 +8892,6 @@ declare namespace chrome {
|
|
|
8912
8892
|
* 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
8893
|
*
|
|
8914
8894
|
* @param filter An object to filter the list of fetched rules.
|
|
8915
|
-
* @param callback Promise that resolves with the set of session scoped rules.
|
|
8916
8895
|
* @since Chrome 90
|
|
8917
8896
|
*/
|
|
8918
8897
|
export function getSessionRules(
|
|
@@ -8932,6 +8911,7 @@ declare namespace chrome {
|
|
|
8932
8911
|
* 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.
|
|
8933
8912
|
*
|
|
8934
8913
|
* @chrome-returns-extra since Chrome 91
|
|
8914
|
+
* @returns 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.
|
|
8935
8915
|
*/
|
|
8936
8916
|
export function updateEnabledRulesets(
|
|
8937
8917
|
|
|
@@ -8944,8 +8924,6 @@ declare namespace chrome {
|
|
|
8944
8924
|
/**
|
|
8945
8925
|
* 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
8926
|
* 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
|
-
*
|
|
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
8927
|
*/
|
|
8950
8928
|
export function updateEnabledRulesets(
|
|
8951
8929
|
|
|
@@ -8961,13 +8939,12 @@ declare namespace chrome {
|
|
|
8961
8939
|
* Returns the ids for the current set of enabled static rulesets.
|
|
8962
8940
|
*
|
|
8963
8941
|
* @chrome-returns-extra since Chrome 91
|
|
8942
|
+
* @returns Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
|
|
8964
8943
|
*/
|
|
8965
8944
|
export function getEnabledRulesets(): Promise<string[]>;
|
|
8966
8945
|
|
|
8967
8946
|
/**
|
|
8968
8947
|
* Returns the ids for the current set of enabled static rulesets.
|
|
8969
|
-
*
|
|
8970
|
-
* @param callback Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
|
|
8971
8948
|
*/
|
|
8972
8949
|
export function getEnabledRulesets(
|
|
8973
8950
|
|
|
@@ -8979,6 +8956,7 @@ declare namespace chrome {
|
|
|
8979
8956
|
/**
|
|
8980
8957
|
* 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.
|
|
8981
8958
|
*
|
|
8959
|
+
* @returns 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.
|
|
8982
8960
|
* @since Chrome 111
|
|
8983
8961
|
*/
|
|
8984
8962
|
export function updateStaticRules(
|
|
@@ -8989,7 +8967,6 @@ declare namespace chrome {
|
|
|
8989
8967
|
/**
|
|
8990
8968
|
* 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
8969
|
*
|
|
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
8970
|
* @since Chrome 111
|
|
8994
8971
|
*/
|
|
8995
8972
|
export function updateStaticRules(
|
|
@@ -9003,6 +8980,7 @@ declare namespace chrome {
|
|
|
9003
8980
|
* Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
|
|
9004
8981
|
*
|
|
9005
8982
|
* @param options Specifies the ruleset to query.
|
|
8983
|
+
* @returns Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
|
|
9006
8984
|
* @since Chrome 111
|
|
9007
8985
|
*/
|
|
9008
8986
|
export function getDisabledRuleIds(
|
|
@@ -9014,7 +8992,6 @@ declare namespace chrome {
|
|
|
9014
8992
|
* Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
|
|
9015
8993
|
*
|
|
9016
8994
|
* @param options Specifies the ruleset to query.
|
|
9017
|
-
* @param callback Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
|
|
9018
8995
|
* @since Chrome 111
|
|
9019
8996
|
*/
|
|
9020
8997
|
export function getDisabledRuleIds(
|
|
@@ -9031,6 +9008,7 @@ declare namespace chrome {
|
|
|
9031
9008
|
*
|
|
9032
9009
|
* @chrome-returns-extra since Chrome 91
|
|
9033
9010
|
* @param filter An object to filter the list of matched rules.
|
|
9011
|
+
* @returns 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.
|
|
9034
9012
|
*/
|
|
9035
9013
|
export function getMatchedRules(
|
|
9036
9014
|
|
|
@@ -9041,7 +9019,6 @@ declare namespace chrome {
|
|
|
9041
9019
|
* 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
9020
|
*
|
|
9043
9021
|
* @param filter An object to filter the list of matched rules.
|
|
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
9022
|
*/
|
|
9046
9023
|
export function getMatchedRules(
|
|
9047
9024
|
|
|
@@ -9083,6 +9060,7 @@ declare namespace chrome {
|
|
|
9083
9060
|
*
|
|
9084
9061
|
* @chrome-returns-extra since Chrome 91
|
|
9085
9062
|
* @param regexOptions The regular expression to check.
|
|
9063
|
+
* @returns Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
|
|
9086
9064
|
* @since Chrome 87
|
|
9087
9065
|
*/
|
|
9088
9066
|
export function isRegexSupported(
|
|
@@ -9094,7 +9072,6 @@ declare namespace chrome {
|
|
|
9094
9072
|
* Checks if the given regular expression will be supported as a `regexFilter` rule condition.
|
|
9095
9073
|
*
|
|
9096
9074
|
* @param regexOptions The regular expression to check.
|
|
9097
|
-
* @param callback Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
|
|
9098
9075
|
* @since Chrome 87
|
|
9099
9076
|
*/
|
|
9100
9077
|
export function isRegexSupported(
|
|
@@ -9129,6 +9106,7 @@ declare namespace chrome {
|
|
|
9129
9106
|
/**
|
|
9130
9107
|
* 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.
|
|
9131
9108
|
*
|
|
9109
|
+
* @returns Promise that resolves with the details of matched rules.
|
|
9132
9110
|
* @since Chrome 103
|
|
9133
9111
|
*/
|
|
9134
9112
|
export function testMatchOutcome(
|
|
@@ -9139,7 +9117,6 @@ declare namespace chrome {
|
|
|
9139
9117
|
/**
|
|
9140
9118
|
* 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
9119
|
*
|
|
9142
|
-
* @param callback Promise that resolves with the details of matched rules.
|
|
9143
9120
|
* @since Chrome 103
|
|
9144
9121
|
*/
|
|
9145
9122
|
export function testMatchOutcome(
|
|
@@ -10586,6 +10563,7 @@ declare namespace chrome {
|
|
|
10586
10563
|
* Resolves the given hostname or IP address literal.
|
|
10587
10564
|
*
|
|
10588
10565
|
* @param hostname The hostname to resolve.
|
|
10566
|
+
* @returns Promise that resolves when the resolution operation completes.
|
|
10589
10567
|
*/
|
|
10590
10568
|
export function resolve(
|
|
10591
10569
|
|
|
@@ -10596,7 +10574,6 @@ declare namespace chrome {
|
|
|
10596
10574
|
* Resolves the given hostname or IP address literal.
|
|
10597
10575
|
*
|
|
10598
10576
|
* @param hostname The hostname to resolve.
|
|
10599
|
-
* @param callback Promise that resolves when the resolution operation completes.
|
|
10600
10577
|
*/
|
|
10601
10578
|
export function resolve(
|
|
10602
10579
|
|
|
@@ -11117,6 +11094,7 @@ declare namespace chrome {
|
|
|
11117
11094
|
*
|
|
11118
11095
|
* @chrome-returns-extra since Chrome 96
|
|
11119
11096
|
* @param options An object containing scan parameters.
|
|
11097
|
+
* @returns Returns a Promise which resolves with the scan results.
|
|
11120
11098
|
*/
|
|
11121
11099
|
export function scan(
|
|
11122
11100
|
|
|
@@ -11127,7 +11105,6 @@ declare namespace chrome {
|
|
|
11127
11105
|
* 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
11106
|
*
|
|
11129
11107
|
* @param options An object containing scan parameters.
|
|
11130
|
-
* @param callback Returns a Promise which resolves with the scan results.
|
|
11131
11108
|
*/
|
|
11132
11109
|
export function scan(
|
|
11133
11110
|
|
|
@@ -11142,6 +11119,7 @@ declare namespace chrome {
|
|
|
11142
11119
|
* 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.
|
|
11143
11120
|
*
|
|
11144
11121
|
* @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
|
|
11122
|
+
* @returns Returns a Promise which resolves with the result and list of scanners.
|
|
11145
11123
|
* @since Chrome 125
|
|
11146
11124
|
*/
|
|
11147
11125
|
export function getScannerList(
|
|
@@ -11153,7 +11131,6 @@ declare namespace chrome {
|
|
|
11153
11131
|
* 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
11132
|
*
|
|
11155
11133
|
* @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
|
|
11156
|
-
* @param callback Returns a Promise which resolves with the result and list of scanners.
|
|
11157
11134
|
* @since Chrome 125
|
|
11158
11135
|
*/
|
|
11159
11136
|
export function getScannerList(
|
|
@@ -11169,6 +11146,7 @@ declare namespace chrome {
|
|
|
11169
11146
|
* 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.
|
|
11170
11147
|
*
|
|
11171
11148
|
* @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
|
|
11149
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11172
11150
|
* @since Chrome 125
|
|
11173
11151
|
*/
|
|
11174
11152
|
export function openScanner(
|
|
@@ -11180,7 +11158,6 @@ declare namespace chrome {
|
|
|
11180
11158
|
* 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
11159
|
*
|
|
11182
11160
|
* @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 Returns a Promise which resolves with the result.
|
|
11184
11161
|
* @since Chrome 125
|
|
11185
11162
|
*/
|
|
11186
11163
|
export function openScanner(
|
|
@@ -11196,6 +11173,7 @@ declare namespace chrome {
|
|
|
11196
11173
|
* 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.
|
|
11197
11174
|
*
|
|
11198
11175
|
* @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
|
|
11176
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11199
11177
|
* @since Chrome 125
|
|
11200
11178
|
*/
|
|
11201
11179
|
export function getOptionGroups(
|
|
@@ -11207,7 +11185,6 @@ declare namespace chrome {
|
|
|
11207
11185
|
* 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
11186
|
*
|
|
11209
11187
|
* @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
|
|
11210
|
-
* @param callback Returns a Promise which resolves with the result.
|
|
11211
11188
|
* @since Chrome 125
|
|
11212
11189
|
*/
|
|
11213
11190
|
export function getOptionGroups(
|
|
@@ -11223,6 +11200,7 @@ declare namespace chrome {
|
|
|
11223
11200
|
* 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.
|
|
11224
11201
|
*
|
|
11225
11202
|
* @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
|
|
11203
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11226
11204
|
* @since Chrome 125
|
|
11227
11205
|
*/
|
|
11228
11206
|
export function closeScanner(
|
|
@@ -11234,7 +11212,6 @@ declare namespace chrome {
|
|
|
11234
11212
|
* 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
11213
|
*
|
|
11236
11214
|
* @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
|
|
11237
|
-
* @param callback Returns a Promise which resolves with the result.
|
|
11238
11215
|
* @since Chrome 125
|
|
11239
11216
|
*/
|
|
11240
11217
|
export function closeScanner(
|
|
@@ -11251,6 +11228,7 @@ declare namespace chrome {
|
|
|
11251
11228
|
*
|
|
11252
11229
|
* @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
|
|
11253
11230
|
* @param options A list of `OptionSetting` objects to be applied to the scanner.
|
|
11231
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11254
11232
|
* @since Chrome 125
|
|
11255
11233
|
*/
|
|
11256
11234
|
export function setOptions(
|
|
@@ -11265,7 +11243,6 @@ declare namespace chrome {
|
|
|
11265
11243
|
*
|
|
11266
11244
|
* @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
11245
|
* @param options A list of `OptionSetting` objects to be applied to the scanner.
|
|
11268
|
-
* @param callback Returns a Promise which resolves with the result.
|
|
11269
11246
|
* @since Chrome 125
|
|
11270
11247
|
*/
|
|
11271
11248
|
export function setOptions(
|
|
@@ -11284,6 +11261,7 @@ declare namespace chrome {
|
|
|
11284
11261
|
*
|
|
11285
11262
|
* @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
|
|
11286
11263
|
* @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`.
|
|
11264
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11287
11265
|
* @since Chrome 125
|
|
11288
11266
|
*/
|
|
11289
11267
|
export function startScan(
|
|
@@ -11298,7 +11276,6 @@ declare namespace chrome {
|
|
|
11298
11276
|
*
|
|
11299
11277
|
* @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
|
|
11300
11278
|
* @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 Returns a Promise which resolves with the result.
|
|
11302
11279
|
* @since Chrome 125
|
|
11303
11280
|
*/
|
|
11304
11281
|
export function startScan(
|
|
@@ -11316,6 +11293,7 @@ declare namespace chrome {
|
|
|
11316
11293
|
* 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.
|
|
11317
11294
|
*
|
|
11318
11295
|
* @param job The handle of an active scan job previously returned from a call to {@link startScan}.
|
|
11296
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11319
11297
|
* @since Chrome 125
|
|
11320
11298
|
*/
|
|
11321
11299
|
export function cancelScan(
|
|
@@ -11327,7 +11305,6 @@ declare namespace chrome {
|
|
|
11327
11305
|
* 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
11306
|
*
|
|
11329
11307
|
* @param job The handle of an active scan job previously returned from a call to {@link startScan}.
|
|
11330
|
-
* @param callback Returns a Promise which resolves with the result.
|
|
11331
11308
|
* @since Chrome 125
|
|
11332
11309
|
*/
|
|
11333
11310
|
export function cancelScan(
|
|
@@ -11347,6 +11324,7 @@ declare namespace chrome {
|
|
|
11347
11324
|
* When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
|
|
11348
11325
|
*
|
|
11349
11326
|
* @param job Active job handle previously returned from {@link startScan}.
|
|
11327
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11350
11328
|
* @since Chrome 125
|
|
11351
11329
|
*/
|
|
11352
11330
|
export function readScanData(
|
|
@@ -11362,7 +11340,6 @@ declare namespace chrome {
|
|
|
11362
11340
|
* 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
11341
|
*
|
|
11364
11342
|
* @param job Active job handle previously returned from {@link startScan}.
|
|
11365
|
-
* @param callback Returns a Promise which resolves with the result.
|
|
11366
11343
|
* @since Chrome 125
|
|
11367
11344
|
*/
|
|
11368
11345
|
export function readScanData(
|
|
@@ -11920,6 +11897,7 @@ declare namespace chrome {
|
|
|
11920
11897
|
*
|
|
11921
11898
|
* @chrome-returns-extra since Chrome 96
|
|
11922
11899
|
* @param options What to download and how.
|
|
11900
|
+
* @returns Returns a Promise which resolves with the id of the new {@link DownloadItem}.
|
|
11923
11901
|
*/
|
|
11924
11902
|
export function download(
|
|
11925
11903
|
|
|
@@ -11930,7 +11908,6 @@ declare namespace chrome {
|
|
|
11930
11908
|
* 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
11909
|
*
|
|
11932
11910
|
* @param options What to download and how.
|
|
11933
|
-
* @param callback Returns a Promise which resolves with the id of the new {@link DownloadItem}.
|
|
11934
11911
|
*/
|
|
11935
11912
|
export function download(
|
|
11936
11913
|
|
|
@@ -11968,6 +11945,7 @@ declare namespace chrome {
|
|
|
11968
11945
|
*
|
|
11969
11946
|
* @chrome-returns-extra since Chrome 96
|
|
11970
11947
|
* @param downloadId The id of the download to pause.
|
|
11948
|
+
* @returns Returns a Promise which resolves when the pause request is completed.
|
|
11971
11949
|
*/
|
|
11972
11950
|
export function pause(
|
|
11973
11951
|
|
|
@@ -11978,7 +11956,6 @@ declare namespace chrome {
|
|
|
11978
11956
|
* 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
11957
|
*
|
|
11980
11958
|
* @param downloadId The id of the download to pause.
|
|
11981
|
-
* @param callback Returns a Promise which resolves when the pause request is completed.
|
|
11982
11959
|
*/
|
|
11983
11960
|
export function pause(
|
|
11984
11961
|
|
|
@@ -11992,6 +11969,7 @@ declare namespace chrome {
|
|
|
11992
11969
|
*
|
|
11993
11970
|
* @chrome-returns-extra since Chrome 96
|
|
11994
11971
|
* @param downloadId The id of the download to resume.
|
|
11972
|
+
* @returns Returns a Promise which resolves when the resume request is completed.
|
|
11995
11973
|
*/
|
|
11996
11974
|
export function resume(
|
|
11997
11975
|
|
|
@@ -12002,7 +11980,6 @@ declare namespace chrome {
|
|
|
12002
11980
|
* 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
11981
|
*
|
|
12004
11982
|
* @param downloadId The id of the download to resume.
|
|
12005
|
-
* @param callback Returns a Promise which resolves when the resume request is completed.
|
|
12006
11983
|
*/
|
|
12007
11984
|
export function resume(
|
|
12008
11985
|
|
|
@@ -12016,6 +11993,7 @@ declare namespace chrome {
|
|
|
12016
11993
|
*
|
|
12017
11994
|
* @chrome-returns-extra since Chrome 96
|
|
12018
11995
|
* @param downloadId The id of the download to cancel.
|
|
11996
|
+
* @returns Returns a Promise which resolves when the cancel request is completed.
|
|
12019
11997
|
*/
|
|
12020
11998
|
export function cancel(
|
|
12021
11999
|
|
|
@@ -12026,7 +12004,6 @@ declare namespace chrome {
|
|
|
12026
12004
|
* Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
|
|
12027
12005
|
*
|
|
12028
12006
|
* @param downloadId The id of the download to cancel.
|
|
12029
|
-
* @param callback Returns a Promise which resolves when the cancel request is completed.
|
|
12030
12007
|
*/
|
|
12031
12008
|
export function cancel(
|
|
12032
12009
|
|
|
@@ -12040,6 +12017,7 @@ declare namespace chrome {
|
|
|
12040
12017
|
*
|
|
12041
12018
|
* @chrome-returns-extra since Chrome 96
|
|
12042
12019
|
* @param downloadId The identifier for the download.
|
|
12020
|
+
* @returns Returns a Promise which resolves with a URL to an image that represents the download.
|
|
12043
12021
|
*/
|
|
12044
12022
|
export function getFileIcon(
|
|
12045
12023
|
|
|
@@ -12052,7 +12030,6 @@ declare namespace chrome {
|
|
|
12052
12030
|
* 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
12031
|
*
|
|
12054
12032
|
* @param downloadId The identifier for the download.
|
|
12055
|
-
* @param callback Returns a Promise which resolves with a URL to an image that represents the download.
|
|
12056
12033
|
*/
|
|
12057
12034
|
export function getFileIcon(
|
|
12058
12035
|
|
|
@@ -12153,6 +12130,7 @@ declare namespace chrome {
|
|
|
12153
12130
|
*
|
|
12154
12131
|
* @chrome-returns-extra since Chrome 96
|
|
12155
12132
|
* @param downloadId The identifier for the {@link DownloadItem}.
|
|
12133
|
+
* @returns Returns a Promise which resolves when the danger prompt dialog closes.
|
|
12156
12134
|
*/
|
|
12157
12135
|
export function acceptDanger(
|
|
12158
12136
|
|
|
@@ -12163,7 +12141,6 @@ declare namespace chrome {
|
|
|
12163
12141
|
* 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
12142
|
*
|
|
12165
12143
|
* @param downloadId The identifier for the {@link DownloadItem}.
|
|
12166
|
-
* @param callback Returns a Promise which resolves when the danger prompt dialog closes.
|
|
12167
12144
|
*/
|
|
12168
12145
|
export function acceptDanger(
|
|
12169
12146
|
|
|
@@ -12187,6 +12164,7 @@ declare namespace chrome {
|
|
|
12187
12164
|
* 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.
|
|
12188
12165
|
*
|
|
12189
12166
|
* @param options Encapsulate a change to the download UI.
|
|
12167
|
+
* @returns Returns a Promise which resolves when the UI update is completed.
|
|
12190
12168
|
* @since Chrome 105
|
|
12191
12169
|
*/
|
|
12192
12170
|
export function setUiOptions(
|
|
@@ -12198,7 +12176,6 @@ declare namespace chrome {
|
|
|
12198
12176
|
* 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
12177
|
*
|
|
12200
12178
|
* @param options Encapsulate a change to the download UI.
|
|
12201
|
-
* @param callback Returns a Promise which resolves when the UI update is completed.
|
|
12202
12179
|
* @since Chrome 105
|
|
12203
12180
|
*/
|
|
12204
12181
|
export function setUiOptions(
|
|
@@ -12223,13 +12200,12 @@ declare namespace chrome {
|
|
|
12223
12200
|
* 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.
|
|
12224
12201
|
*
|
|
12225
12202
|
* @chrome-returns-extra since Chrome 96
|
|
12203
|
+
* @returns Returns a Promise which resolves with the device identifier of the directory API.
|
|
12226
12204
|
*/
|
|
12227
12205
|
export function getDirectoryDeviceId(): Promise<string>;
|
|
12228
12206
|
|
|
12229
12207
|
/**
|
|
12230
12208
|
* 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
|
-
*
|
|
12232
|
-
* @param callback Returns a Promise which resolves with the device identifier of the directory API.
|
|
12233
12209
|
*/
|
|
12234
12210
|
export function getDirectoryDeviceId(
|
|
12235
12211
|
|
|
@@ -12242,6 +12218,7 @@ declare namespace chrome {
|
|
|
12242
12218
|
* 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.
|
|
12243
12219
|
*
|
|
12244
12220
|
* @chrome-returns-extra since Chrome 96
|
|
12221
|
+
* @returns Returns a Promise which resolves with the serial number of the device.
|
|
12245
12222
|
* @since Chrome 66
|
|
12246
12223
|
*/
|
|
12247
12224
|
export function getDeviceSerialNumber(): Promise<string>;
|
|
@@ -12249,7 +12226,6 @@ declare namespace chrome {
|
|
|
12249
12226
|
/**
|
|
12250
12227
|
* 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
12228
|
*
|
|
12252
|
-
* @param callback Returns a Promise which resolves with the serial number of the device.
|
|
12253
12229
|
* @since Chrome 66
|
|
12254
12230
|
*/
|
|
12255
12231
|
export function getDeviceSerialNumber(
|
|
@@ -12263,6 +12239,7 @@ declare namespace chrome {
|
|
|
12263
12239
|
* 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.
|
|
12264
12240
|
*
|
|
12265
12241
|
* @chrome-returns-extra since Chrome 96
|
|
12242
|
+
* @returns Returns a Promise which resolves with the Asset ID of the device.
|
|
12266
12243
|
* @since Chrome 66
|
|
12267
12244
|
*/
|
|
12268
12245
|
export function getDeviceAssetId(): Promise<string>;
|
|
@@ -12270,7 +12247,6 @@ declare namespace chrome {
|
|
|
12270
12247
|
/**
|
|
12271
12248
|
* 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
12249
|
*
|
|
12273
|
-
* @param callback Returns a Promise which resolves with the Asset ID of the device.
|
|
12274
12250
|
* @since Chrome 66
|
|
12275
12251
|
*/
|
|
12276
12252
|
export function getDeviceAssetId(
|
|
@@ -12284,6 +12260,7 @@ declare namespace chrome {
|
|
|
12284
12260
|
* 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.
|
|
12285
12261
|
*
|
|
12286
12262
|
* @chrome-returns-extra since Chrome 96
|
|
12263
|
+
* @returns Returns a Promise which resolves with the Annotated Location of the device.
|
|
12287
12264
|
* @since Chrome 66
|
|
12288
12265
|
*/
|
|
12289
12266
|
export function getDeviceAnnotatedLocation(): Promise<string>;
|
|
@@ -12291,7 +12268,6 @@ declare namespace chrome {
|
|
|
12291
12268
|
/**
|
|
12292
12269
|
* 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
12270
|
*
|
|
12294
|
-
* @param callback Returns a Promise which resolves with the Annotated Location of the device.
|
|
12295
12271
|
* @since Chrome 66
|
|
12296
12272
|
*/
|
|
12297
12273
|
export function getDeviceAnnotatedLocation(
|
|
@@ -12305,6 +12281,7 @@ declare namespace chrome {
|
|
|
12305
12281
|
* 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.
|
|
12306
12282
|
*
|
|
12307
12283
|
* @chrome-returns-extra since Chrome 96
|
|
12284
|
+
* @returns Returns a Promise which resolves with the hostname of the device.
|
|
12308
12285
|
* @since Chrome 82
|
|
12309
12286
|
*/
|
|
12310
12287
|
export function getDeviceHostname(): Promise<string>;
|
|
@@ -12312,7 +12289,6 @@ declare namespace chrome {
|
|
|
12312
12289
|
/**
|
|
12313
12290
|
* 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
12291
|
*
|
|
12315
|
-
* @param callback Returns a Promise which resolves with the hostname of the device.
|
|
12316
12292
|
* @since Chrome 82
|
|
12317
12293
|
*/
|
|
12318
12294
|
export function getDeviceHostname(
|
|
@@ -12343,13 +12319,12 @@ declare namespace chrome {
|
|
|
12343
12319
|
* Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
|
|
12344
12320
|
*
|
|
12345
12321
|
* @chrome-returns-extra since Chrome 96
|
|
12322
|
+
* @returns Returns a Promise which resolves with the hardware platform info.
|
|
12346
12323
|
*/
|
|
12347
12324
|
export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
|
|
12348
12325
|
|
|
12349
12326
|
/**
|
|
12350
12327
|
* Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
|
|
12351
|
-
*
|
|
12352
|
-
* @param callback Returns a Promise which resolves with the hardware platform info.
|
|
12353
12328
|
*/
|
|
12354
12329
|
export function getHardwarePlatformInfo(
|
|
12355
12330
|
|
|
@@ -12381,6 +12356,7 @@ declare namespace chrome {
|
|
|
12381
12356
|
* 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.
|
|
12382
12357
|
*
|
|
12383
12358
|
* @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
|
|
12359
|
+
* @returns Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
|
|
12384
12360
|
*/
|
|
12385
12361
|
export function setCurrentInputMethod(
|
|
12386
12362
|
|
|
@@ -12391,7 +12367,6 @@ declare namespace chrome {
|
|
|
12391
12367
|
* 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
12368
|
*
|
|
12393
12369
|
* @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
|
|
12394
|
-
* @param callback Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
|
|
12395
12370
|
*/
|
|
12396
12371
|
export function setCurrentInputMethod(
|
|
12397
12372
|
|
|
@@ -12457,13 +12432,12 @@ declare namespace chrome {
|
|
|
12457
12432
|
* 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.
|
|
12458
12433
|
*
|
|
12459
12434
|
* @chrome-returns-extra since Chrome 96
|
|
12435
|
+
* @returns Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
|
|
12460
12436
|
*/
|
|
12461
12437
|
export function getNetworkDetails(): Promise<NetworkDetails>;
|
|
12462
12438
|
|
|
12463
12439
|
/**
|
|
12464
12440
|
* 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
|
-
*
|
|
12466
|
-
* @param callback Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
|
|
12467
12441
|
*/
|
|
12468
12442
|
export function getNetworkDetails(
|
|
12469
12443
|
|
|
@@ -12562,13 +12536,12 @@ declare namespace chrome {
|
|
|
12562
12536
|
* Returns the available Tokens. In a regular user's session the list will always contain the user's token with `id` `"user"`. If a system-wide TPM token is available, the returned list will also contain the system-wide token with `id` `"system"`. The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
|
|
12563
12537
|
*
|
|
12564
12538
|
* @chrome-returns-extra since Chrome 131
|
|
12539
|
+
* @returns Invoked by `getTokens` with the list of available Tokens.
|
|
12565
12540
|
*/
|
|
12566
12541
|
export function getTokens(): Promise<Token[]>;
|
|
12567
12542
|
|
|
12568
12543
|
/**
|
|
12569
12544
|
* Returns the available Tokens. In a regular user's session the list will always contain the user's token with `id` `"user"`. If a system-wide TPM token is available, the returned list will also contain the system-wide token with `id` `"system"`. The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
|
|
12570
|
-
*
|
|
12571
|
-
* @param callback Invoked by `getTokens` with the list of available Tokens.
|
|
12572
12545
|
*/
|
|
12573
12546
|
export function getTokens(
|
|
12574
12547
|
|
|
@@ -12585,6 +12558,7 @@ declare namespace chrome {
|
|
|
12585
12558
|
*
|
|
12586
12559
|
* @chrome-returns-extra since Chrome 131
|
|
12587
12560
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12561
|
+
* @returns Returns a Promise which resolves with the list of the available certificates.
|
|
12588
12562
|
*/
|
|
12589
12563
|
export function getCertificates(
|
|
12590
12564
|
|
|
@@ -12595,7 +12569,6 @@ declare namespace chrome {
|
|
|
12595
12569
|
* 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
12570
|
*
|
|
12597
12571
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12598
|
-
* @param callback Returns a Promise which resolves with the list of the available certificates.
|
|
12599
12572
|
*/
|
|
12600
12573
|
export function getCertificates(
|
|
12601
12574
|
|
|
@@ -12615,6 +12588,7 @@ declare namespace chrome {
|
|
|
12615
12588
|
* @chrome-returns-extra since Chrome 131
|
|
12616
12589
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12617
12590
|
* @param certificate The DER encoding of a X.509 certificate.
|
|
12591
|
+
* @returns Returns a Promise which resolves when this operation is finished.
|
|
12618
12592
|
*/
|
|
12619
12593
|
export function importCertificate(
|
|
12620
12594
|
|
|
@@ -12628,7 +12602,6 @@ declare namespace chrome {
|
|
|
12628
12602
|
*
|
|
12629
12603
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12630
12604
|
* @param certificate The DER encoding of a X.509 certificate.
|
|
12631
|
-
* @param callback Returns a Promise which resolves when this operation is finished.
|
|
12632
12605
|
*/
|
|
12633
12606
|
export function importCertificate(
|
|
12634
12607
|
|
|
@@ -12645,6 +12618,7 @@ declare namespace chrome {
|
|
|
12645
12618
|
* @chrome-returns-extra since Chrome 131
|
|
12646
12619
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12647
12620
|
* @param certificate The DER encoding of a X.509 certificate.
|
|
12621
|
+
* @returns Returns a Promise which resolves when this operation is finished.
|
|
12648
12622
|
*/
|
|
12649
12623
|
export function removeCertificate(
|
|
12650
12624
|
|
|
@@ -12658,7 +12632,6 @@ declare namespace chrome {
|
|
|
12658
12632
|
*
|
|
12659
12633
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12660
12634
|
* @param certificate The DER encoding of a X.509 certificate.
|
|
12661
|
-
* @param callback Returns a Promise which resolves when this operation is finished.
|
|
12662
12635
|
*/
|
|
12663
12636
|
export function removeCertificate(
|
|
12664
12637
|
|
|
@@ -12678,6 +12651,7 @@ declare namespace chrome {
|
|
|
12678
12651
|
*
|
|
12679
12652
|
* @chrome-returns-extra since Chrome 131
|
|
12680
12653
|
* @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
|
|
12654
|
+
* @returns Returns a Promise which resolves with the challenge response.
|
|
12681
12655
|
* @since Chrome 110
|
|
12682
12656
|
*/
|
|
12683
12657
|
export function challengeKey(
|
|
@@ -12693,7 +12667,6 @@ declare namespace chrome {
|
|
|
12693
12667
|
* 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
12668
|
*
|
|
12695
12669
|
* @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
|
|
12696
|
-
* @param callback Returns a Promise which resolves with the challenge response.
|
|
12697
12670
|
* @since Chrome 110
|
|
12698
12671
|
*/
|
|
12699
12672
|
export function challengeKey(
|
|
@@ -12714,6 +12687,7 @@ declare namespace chrome {
|
|
|
12714
12687
|
* @chrome-returns-extra since Chrome 131
|
|
12715
12688
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
12716
12689
|
* @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.
|
|
12690
|
+
* @returns Returns a Promise which resolves with the challenge response.
|
|
12717
12691
|
* @deprecated Use {@link challengeKey} instead.
|
|
12718
12692
|
* @since Chrome 50
|
|
12719
12693
|
* @chrome-deprecated-since Chrome 110
|
|
@@ -12733,7 +12707,6 @@ declare namespace chrome {
|
|
|
12733
12707
|
*
|
|
12734
12708
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
12735
12709
|
* @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 Returns a Promise which resolves with the challenge response.
|
|
12737
12710
|
* @deprecated Use {@link challengeKey} instead.
|
|
12738
12711
|
* @since Chrome 50
|
|
12739
12712
|
* @chrome-deprecated-since Chrome 110
|
|
@@ -12761,6 +12734,7 @@ declare namespace chrome {
|
|
|
12761
12734
|
* @chrome-returns-extra since Chrome 131
|
|
12762
12735
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
12763
12736
|
* @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.
|
|
12737
|
+
* @returns Returns a Promise which resolves with the challenge response.
|
|
12764
12738
|
* @deprecated Use {@link challengeKey} instead.
|
|
12765
12739
|
* @since Chrome 50
|
|
12766
12740
|
* @chrome-deprecated-since Chrome 110
|
|
@@ -12777,7 +12751,6 @@ declare namespace chrome {
|
|
|
12777
12751
|
*
|
|
12778
12752
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
12779
12753
|
* @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 Returns a Promise which resolves with the challenge response.
|
|
12781
12754
|
* @deprecated Use {@link challengeKey} instead.
|
|
12782
12755
|
* @since Chrome 50
|
|
12783
12756
|
* @chrome-deprecated-since Chrome 110
|
|
@@ -15097,6 +15070,7 @@ declare namespace chrome {
|
|
|
15097
15070
|
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
15098
15071
|
*
|
|
15099
15072
|
* @chrome-returns-extra since Chrome 96
|
|
15073
|
+
* @returns A generic result callback to indicate success or failure.
|
|
15100
15074
|
*/
|
|
15101
15075
|
export function mount(
|
|
15102
15076
|
|
|
@@ -15109,8 +15083,6 @@ declare namespace chrome {
|
|
|
15109
15083
|
* Depending on the type of the file system being mounted, the `source` option must be set appropriately.
|
|
15110
15084
|
*
|
|
15111
15085
|
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
15112
|
-
*
|
|
15113
|
-
* @param callback A generic result callback to indicate success or failure.
|
|
15114
15086
|
*/
|
|
15115
15087
|
export function mount(
|
|
15116
15088
|
|
|
@@ -15125,6 +15097,7 @@ declare namespace chrome {
|
|
|
15125
15097
|
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
15126
15098
|
*
|
|
15127
15099
|
* @chrome-returns-extra since Chrome 96
|
|
15100
|
+
* @returns A generic result callback to indicate success or failure.
|
|
15128
15101
|
*/
|
|
15129
15102
|
export function unmount(
|
|
15130
15103
|
|
|
@@ -15135,8 +15108,6 @@ declare namespace chrome {
|
|
|
15135
15108
|
* Unmounts a file system with the given `fileSystemId`. It must be called after {@link onUnmountRequested} is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
|
|
15136
15109
|
*
|
|
15137
15110
|
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
15138
|
-
*
|
|
15139
|
-
* @param callback A generic result callback to indicate success or failure.
|
|
15140
15111
|
*/
|
|
15141
15112
|
export function unmount(
|
|
15142
15113
|
|
|
@@ -15149,13 +15120,12 @@ declare namespace chrome {
|
|
|
15149
15120
|
* Returns all file systems mounted by the extension.
|
|
15150
15121
|
*
|
|
15151
15122
|
* @chrome-returns-extra since Chrome 96
|
|
15123
|
+
* @returns Callback to receive the result of {@link getAll} function.
|
|
15152
15124
|
*/
|
|
15153
15125
|
export function getAll(): Promise<FileSystemInfo[]>;
|
|
15154
15126
|
|
|
15155
15127
|
/**
|
|
15156
15128
|
* Returns all file systems mounted by the extension.
|
|
15157
|
-
*
|
|
15158
|
-
* @param callback Callback to receive the result of {@link getAll} function.
|
|
15159
15129
|
*/
|
|
15160
15130
|
export function getAll(
|
|
15161
15131
|
|
|
@@ -15168,6 +15138,7 @@ declare namespace chrome {
|
|
|
15168
15138
|
* Returns information about a file system with the passed `fileSystemId`.
|
|
15169
15139
|
*
|
|
15170
15140
|
* @chrome-returns-extra since Chrome 96
|
|
15141
|
+
* @returns Callback to receive the result of {@link get} function.
|
|
15171
15142
|
*/
|
|
15172
15143
|
export function get(
|
|
15173
15144
|
|
|
@@ -15176,8 +15147,6 @@ declare namespace chrome {
|
|
|
15176
15147
|
|
|
15177
15148
|
/**
|
|
15178
15149
|
* Returns information about a file system with the passed `fileSystemId`.
|
|
15179
|
-
*
|
|
15180
|
-
* @param callback Callback to receive the result of {@link get} function.
|
|
15181
15150
|
*/
|
|
15182
15151
|
export function get(
|
|
15183
15152
|
|
|
@@ -15202,6 +15171,7 @@ declare namespace chrome {
|
|
|
15202
15171
|
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
15203
15172
|
*
|
|
15204
15173
|
* @chrome-returns-extra since Chrome 96
|
|
15174
|
+
* @returns A generic result callback to indicate success or failure.
|
|
15205
15175
|
* @since Chrome 45
|
|
15206
15176
|
*/
|
|
15207
15177
|
export function notify(
|
|
@@ -15222,7 +15192,6 @@ declare namespace chrome {
|
|
|
15222
15192
|
*
|
|
15223
15193
|
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
15224
15194
|
*
|
|
15225
|
-
* @param callback A generic result callback to indicate success or failure.
|
|
15226
15195
|
* @since Chrome 45
|
|
15227
15196
|
*/
|
|
15228
15197
|
export function notify(
|
|
@@ -15909,6 +15878,7 @@ declare namespace chrome {
|
|
|
15909
15878
|
*
|
|
15910
15879
|
* @chrome-returns-extra since Chrome 116
|
|
15911
15880
|
* @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
|
|
15881
|
+
* @returns Resolves when registration completes.
|
|
15912
15882
|
*/
|
|
15913
15883
|
export function register(
|
|
15914
15884
|
|
|
@@ -15919,7 +15889,6 @@ declare namespace chrome {
|
|
|
15919
15889
|
* Registers the application with FCM. The registration ID will be returned by the `callback`. If `register` is called again with the same list of `senderIds`, the same registration ID will be returned.
|
|
15920
15890
|
*
|
|
15921
15891
|
* @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
|
|
15922
|
-
* @param callback Resolves when registration completes.
|
|
15923
15892
|
*/
|
|
15924
15893
|
export function register(
|
|
15925
15894
|
|
|
@@ -15937,13 +15906,12 @@ declare namespace chrome {
|
|
|
15937
15906
|
* Unregisters the application from FCM.
|
|
15938
15907
|
*
|
|
15939
15908
|
* @chrome-returns-extra since Chrome 116
|
|
15909
|
+
* @returns Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
|
|
15940
15910
|
*/
|
|
15941
15911
|
export function unregister(): Promise<void>;
|
|
15942
15912
|
|
|
15943
15913
|
/**
|
|
15944
15914
|
* Unregisters the application from FCM.
|
|
15945
|
-
*
|
|
15946
|
-
* @param callback Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
|
|
15947
15915
|
*/
|
|
15948
15916
|
export function unregister(
|
|
15949
15917
|
|
|
@@ -15955,6 +15923,7 @@ declare namespace chrome {
|
|
|
15955
15923
|
*
|
|
15956
15924
|
* @chrome-returns-extra since Chrome 116
|
|
15957
15925
|
* @param message A message to send to the other party via FCM.
|
|
15926
|
+
* @returns Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
|
|
15958
15927
|
*/
|
|
15959
15928
|
export function send(
|
|
15960
15929
|
|
|
@@ -15986,7 +15955,6 @@ declare namespace chrome {
|
|
|
15986
15955
|
* Sends a message according to its contents.
|
|
15987
15956
|
*
|
|
15988
15957
|
* @param message A message to send to the other party via FCM.
|
|
15989
|
-
* @param callback Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
|
|
15990
15958
|
*/
|
|
15991
15959
|
export function send(
|
|
15992
15960
|
|
|
@@ -17002,6 +16970,7 @@ declare namespace chrome {
|
|
|
17002
16970
|
*
|
|
17003
16971
|
* @chrome-returns-extra since Chrome 105
|
|
17004
16972
|
* @param details Token options.
|
|
16973
|
+
* @returns 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.
|
|
17005
16974
|
*/
|
|
17006
16975
|
export function getAuthToken(
|
|
17007
16976
|
|
|
@@ -17018,7 +16987,6 @@ declare namespace chrome {
|
|
|
17018
16987
|
* 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
16988
|
*
|
|
17020
16989
|
* @param details Token options.
|
|
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
16990
|
*/
|
|
17023
16991
|
export function getAuthToken(
|
|
17024
16992
|
|
|
@@ -17041,6 +17009,7 @@ declare namespace chrome {
|
|
|
17041
17009
|
*
|
|
17042
17010
|
* @chrome-returns-extra since Chrome 106
|
|
17043
17011
|
* @param details Profile options.
|
|
17012
|
+
* @returns 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.
|
|
17044
17013
|
*/
|
|
17045
17014
|
export function getProfileUserInfo(
|
|
17046
17015
|
|
|
@@ -17058,7 +17027,6 @@ declare namespace chrome {
|
|
|
17058
17027
|
* 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
17028
|
*
|
|
17060
17029
|
* @param details Profile options.
|
|
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
17030
|
*/
|
|
17063
17031
|
export function getProfileUserInfo(
|
|
17064
17032
|
|
|
@@ -17079,6 +17047,7 @@ declare namespace chrome {
|
|
|
17079
17047
|
*
|
|
17080
17048
|
* @chrome-returns-extra since Chrome 106
|
|
17081
17049
|
* @param details Token information.
|
|
17050
|
+
* @returns Returns a Promise which resolves when the token has been removed from the cache.
|
|
17082
17051
|
*/
|
|
17083
17052
|
export function removeCachedAuthToken(
|
|
17084
17053
|
|
|
@@ -17091,7 +17060,6 @@ declare namespace chrome {
|
|
|
17091
17060
|
* 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
17061
|
*
|
|
17093
17062
|
* @param details Token information.
|
|
17094
|
-
* @param callback Returns a Promise which resolves when the token has been removed from the cache.
|
|
17095
17063
|
*/
|
|
17096
17064
|
export function removeCachedAuthToken(
|
|
17097
17065
|
|
|
@@ -17108,6 +17076,7 @@ declare namespace chrome {
|
|
|
17108
17076
|
* * De-authorizes the user from all auth flows
|
|
17109
17077
|
*
|
|
17110
17078
|
* @chrome-returns-extra since Chrome 106
|
|
17079
|
+
* @returns Returns a Promise which resolves when the state has been cleared.
|
|
17111
17080
|
* @since Chrome 87
|
|
17112
17081
|
*/
|
|
17113
17082
|
export function clearAllCachedAuthTokens(): Promise<void>;
|
|
@@ -17119,7 +17088,6 @@ declare namespace chrome {
|
|
|
17119
17088
|
* * Removes user's account preferences
|
|
17120
17089
|
* * De-authorizes the user from all auth flows
|
|
17121
17090
|
*
|
|
17122
|
-
* @param callback Returns a Promise which resolves when the state has been cleared.
|
|
17123
17091
|
* @since Chrome 87
|
|
17124
17092
|
*/
|
|
17125
17093
|
export function clearAllCachedAuthTokens(
|
|
@@ -17136,6 +17104,7 @@ declare namespace chrome {
|
|
|
17136
17104
|
*
|
|
17137
17105
|
* @chrome-returns-extra since Chrome 106
|
|
17138
17106
|
* @param details WebAuth flow options.
|
|
17107
|
+
* @returns Returns a Promise which resolves with the URL redirected back to your application.
|
|
17139
17108
|
*/
|
|
17140
17109
|
export function launchWebAuthFlow(
|
|
17141
17110
|
|
|
@@ -17150,7 +17119,6 @@ declare namespace chrome {
|
|
|
17150
17119
|
* 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
17120
|
*
|
|
17152
17121
|
* @param details WebAuth flow options.
|
|
17153
|
-
* @param callback Returns a Promise which resolves with the URL redirected back to your application.
|
|
17154
17122
|
*/
|
|
17155
17123
|
export function launchWebAuthFlow(
|
|
17156
17124
|
|
|
@@ -17653,6 +17621,7 @@ declare namespace chrome {
|
|
|
17653
17621
|
* Set the current composition. If this extension does not own the active IME, this fails.
|
|
17654
17622
|
*
|
|
17655
17623
|
* @chrome-returns-extra since Chrome 111
|
|
17624
|
+
* @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17656
17625
|
*/
|
|
17657
17626
|
export function setComposition(
|
|
17658
17627
|
|
|
@@ -17708,8 +17677,6 @@ declare namespace chrome {
|
|
|
17708
17677
|
|
|
17709
17678
|
/**
|
|
17710
17679
|
* Set the current composition. If this extension does not own the active IME, this fails.
|
|
17711
|
-
*
|
|
17712
|
-
* @param callback Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17713
17680
|
*/
|
|
17714
17681
|
export function setComposition(
|
|
17715
17682
|
|
|
@@ -17771,6 +17738,7 @@ declare namespace chrome {
|
|
|
17771
17738
|
* Clear the current composition. If this extension does not own the active IME, this fails.
|
|
17772
17739
|
*
|
|
17773
17740
|
* @chrome-returns-extra since Chrome 111
|
|
17741
|
+
* @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17774
17742
|
*/
|
|
17775
17743
|
export function clearComposition(
|
|
17776
17744
|
|
|
@@ -17785,8 +17753,6 @@ declare namespace chrome {
|
|
|
17785
17753
|
|
|
17786
17754
|
/**
|
|
17787
17755
|
* Clear the current composition. If this extension does not own the active IME, this fails.
|
|
17788
|
-
*
|
|
17789
|
-
* @param callback Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17790
17756
|
*/
|
|
17791
17757
|
export function clearComposition(
|
|
17792
17758
|
|
|
@@ -17807,6 +17773,7 @@ declare namespace chrome {
|
|
|
17807
17773
|
* Commits the provided text to the current input.
|
|
17808
17774
|
*
|
|
17809
17775
|
* @chrome-returns-extra since Chrome 111
|
|
17776
|
+
* @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17810
17777
|
*/
|
|
17811
17778
|
export function commitText(
|
|
17812
17779
|
|
|
@@ -17826,8 +17793,6 @@ declare namespace chrome {
|
|
|
17826
17793
|
|
|
17827
17794
|
/**
|
|
17828
17795
|
* Commits the provided text to the current input.
|
|
17829
|
-
*
|
|
17830
|
-
* @param callback Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17831
17796
|
*/
|
|
17832
17797
|
export function commitText(
|
|
17833
17798
|
|
|
@@ -17853,6 +17818,7 @@ declare namespace chrome {
|
|
|
17853
17818
|
* Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
|
|
17854
17819
|
*
|
|
17855
17820
|
* @chrome-returns-extra since Chrome 111
|
|
17821
|
+
* @returns Resolves when the operation completes.
|
|
17856
17822
|
*/
|
|
17857
17823
|
export function sendKeyEvents(
|
|
17858
17824
|
|
|
@@ -17872,8 +17838,6 @@ declare namespace chrome {
|
|
|
17872
17838
|
|
|
17873
17839
|
/**
|
|
17874
17840
|
* Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
|
|
17875
|
-
*
|
|
17876
|
-
* @param callback Resolves when the operation completes.
|
|
17877
17841
|
*/
|
|
17878
17842
|
export function sendKeyEvents(
|
|
17879
17843
|
|
|
@@ -17902,6 +17866,7 @@ declare namespace chrome {
|
|
|
17902
17866
|
* Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
|
|
17903
17867
|
*
|
|
17904
17868
|
* @chrome-returns-extra since Chrome 111
|
|
17869
|
+
* @returns Resolves when the operation completes.
|
|
17905
17870
|
*/
|
|
17906
17871
|
export function setCandidateWindowProperties(
|
|
17907
17872
|
|
|
@@ -17968,8 +17933,6 @@ declare namespace chrome {
|
|
|
17968
17933
|
|
|
17969
17934
|
/**
|
|
17970
17935
|
* Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
|
|
17971
|
-
*
|
|
17972
|
-
* @param callback Resolves when the operation completes.
|
|
17973
17936
|
*/
|
|
17974
17937
|
export function setCandidateWindowProperties(
|
|
17975
17938
|
|
|
@@ -18042,6 +18005,7 @@ declare namespace chrome {
|
|
|
18042
18005
|
* Sets the current candidate list. This fails if this extension doesn't own the active IME
|
|
18043
18006
|
*
|
|
18044
18007
|
* @chrome-returns-extra since Chrome 111
|
|
18008
|
+
* @returns Resolves when the operation completes.
|
|
18045
18009
|
*/
|
|
18046
18010
|
export function setCandidates(
|
|
18047
18011
|
|
|
@@ -18103,8 +18067,6 @@ declare namespace chrome {
|
|
|
18103
18067
|
|
|
18104
18068
|
/**
|
|
18105
18069
|
* Sets the current candidate list. This fails if this extension doesn't own the active IME
|
|
18106
|
-
*
|
|
18107
|
-
* @param callback Resolves when the operation completes.
|
|
18108
18070
|
*/
|
|
18109
18071
|
export function setCandidates(
|
|
18110
18072
|
|
|
@@ -18172,6 +18134,7 @@ declare namespace chrome {
|
|
|
18172
18134
|
* Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
|
|
18173
18135
|
*
|
|
18174
18136
|
* @chrome-returns-extra since Chrome 111
|
|
18137
|
+
* @returns Resolves when the operation completes
|
|
18175
18138
|
*/
|
|
18176
18139
|
export function setCursorPosition(
|
|
18177
18140
|
|
|
@@ -18191,8 +18154,6 @@ declare namespace chrome {
|
|
|
18191
18154
|
|
|
18192
18155
|
/**
|
|
18193
18156
|
* Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
|
|
18194
|
-
*
|
|
18195
|
-
* @param callback Resolves when the operation completes
|
|
18196
18157
|
*/
|
|
18197
18158
|
export function setCursorPosition(
|
|
18198
18159
|
|
|
@@ -18218,6 +18179,7 @@ declare namespace chrome {
|
|
|
18218
18179
|
* Shows/Hides an assistive window with the given properties.
|
|
18219
18180
|
*
|
|
18220
18181
|
* @chrome-returns-extra since Chrome 111
|
|
18182
|
+
* @returns Resolves when the operation completes.
|
|
18221
18183
|
* @since Chrome 85
|
|
18222
18184
|
*/
|
|
18223
18185
|
export function setAssistiveWindowProperties(
|
|
@@ -18239,7 +18201,6 @@ declare namespace chrome {
|
|
|
18239
18201
|
/**
|
|
18240
18202
|
* Shows/Hides an assistive window with the given properties.
|
|
18241
18203
|
*
|
|
18242
|
-
* @param callback Resolves when the operation completes.
|
|
18243
18204
|
* @since Chrome 85
|
|
18244
18205
|
*/
|
|
18245
18206
|
export function setAssistiveWindowProperties(
|
|
@@ -18266,6 +18227,7 @@ declare namespace chrome {
|
|
|
18266
18227
|
* Highlights/Unhighlights a button in an assistive window.
|
|
18267
18228
|
*
|
|
18268
18229
|
* @chrome-returns-extra since Chrome 111
|
|
18230
|
+
* @returns Resolves when the operation completes. On failure, the promise will be rejected.
|
|
18269
18231
|
* @since Chrome 86
|
|
18270
18232
|
*/
|
|
18271
18233
|
export function setAssistiveWindowButtonHighlighted(
|
|
@@ -18302,7 +18264,6 @@ declare namespace chrome {
|
|
|
18302
18264
|
/**
|
|
18303
18265
|
* Highlights/Unhighlights a button in an assistive window.
|
|
18304
18266
|
*
|
|
18305
|
-
* @param callback Resolves when the operation completes. On failure, the promise will be rejected.
|
|
18306
18267
|
* @since Chrome 86
|
|
18307
18268
|
*/
|
|
18308
18269
|
export function setAssistiveWindowButtonHighlighted(
|
|
@@ -18362,6 +18323,7 @@ declare namespace chrome {
|
|
|
18362
18323
|
* Updates the state of the MenuItems specified
|
|
18363
18324
|
*
|
|
18364
18325
|
* @chrome-returns-extra since Chrome 111
|
|
18326
|
+
* @returns Resolves when the operation completes
|
|
18365
18327
|
*/
|
|
18366
18328
|
export function updateMenuItems(
|
|
18367
18329
|
|
|
@@ -18370,8 +18332,6 @@ declare namespace chrome {
|
|
|
18370
18332
|
|
|
18371
18333
|
/**
|
|
18372
18334
|
* Updates the state of the MenuItems specified
|
|
18373
|
-
*
|
|
18374
|
-
* @param callback Resolves when the operation completes
|
|
18375
18335
|
*/
|
|
18376
18336
|
export function updateMenuItems(
|
|
18377
18337
|
|
|
@@ -18384,6 +18344,7 @@ declare namespace chrome {
|
|
|
18384
18344
|
* Deletes the text around the caret.
|
|
18385
18345
|
*
|
|
18386
18346
|
* @chrome-returns-extra since Chrome 111
|
|
18347
|
+
* @returns Resolves when the operation completes.
|
|
18387
18348
|
*/
|
|
18388
18349
|
export function deleteSurroundingText(
|
|
18389
18350
|
|
|
@@ -18413,8 +18374,6 @@ declare namespace chrome {
|
|
|
18413
18374
|
|
|
18414
18375
|
/**
|
|
18415
18376
|
* Deletes the text around the caret.
|
|
18416
|
-
*
|
|
18417
|
-
* @param callback Resolves when the operation completes.
|
|
18418
18377
|
*/
|
|
18419
18378
|
export function deleteSurroundingText(
|
|
18420
18379
|
|
|
@@ -18475,13 +18434,12 @@ declare namespace chrome {
|
|
|
18475
18434
|
* Retrieves an identifier for the app instance. The instance ID will be returned by the `callback`. The same ID will be returned as long as the application identity has not been revoked or expired.
|
|
18476
18435
|
*
|
|
18477
18436
|
* @chrome-returns-extra since Chrome 96
|
|
18437
|
+
* @returns Resolves when the retrieval completes.
|
|
18478
18438
|
*/
|
|
18479
18439
|
export function getID(): Promise<string>;
|
|
18480
18440
|
|
|
18481
18441
|
/**
|
|
18482
18442
|
* Retrieves an identifier for the app instance. The instance ID will be returned by the `callback`. The same ID will be returned as long as the application identity has not been revoked or expired.
|
|
18483
|
-
*
|
|
18484
|
-
* @param callback Resolves when the retrieval completes.
|
|
18485
18443
|
*/
|
|
18486
18444
|
export function getID(
|
|
18487
18445
|
|
|
@@ -18497,13 +18455,12 @@ declare namespace chrome {
|
|
|
18497
18455
|
* Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
|
|
18498
18456
|
*
|
|
18499
18457
|
* @chrome-returns-extra since Chrome 96
|
|
18458
|
+
* @returns Resolves when the retrieval completes.
|
|
18500
18459
|
*/
|
|
18501
18460
|
export function getCreationTime(): Promise<number>;
|
|
18502
18461
|
|
|
18503
18462
|
/**
|
|
18504
18463
|
* Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
|
|
18505
|
-
*
|
|
18506
|
-
* @param callback Resolves when the retrieval completes.
|
|
18507
18464
|
*/
|
|
18508
18465
|
export function getCreationTime(
|
|
18509
18466
|
|
|
@@ -18520,6 +18477,7 @@ declare namespace chrome {
|
|
|
18520
18477
|
*
|
|
18521
18478
|
* @chrome-returns-extra since Chrome 96
|
|
18522
18479
|
* @param getTokenParams Parameters for getToken.
|
|
18480
|
+
* @returns Resolves when the retrieval completes.
|
|
18523
18481
|
*/
|
|
18524
18482
|
export function getToken(
|
|
18525
18483
|
|
|
@@ -18554,7 +18512,6 @@ declare namespace chrome {
|
|
|
18554
18512
|
* Return a token that allows the authorized entity to access the service defined by scope.
|
|
18555
18513
|
*
|
|
18556
18514
|
* @param getTokenParams Parameters for getToken.
|
|
18557
|
-
* @param callback Resolves when the retrieval completes.
|
|
18558
18515
|
*/
|
|
18559
18516
|
export function getToken(
|
|
18560
18517
|
|
|
@@ -18597,6 +18554,7 @@ declare namespace chrome {
|
|
|
18597
18554
|
*
|
|
18598
18555
|
* @chrome-returns-extra since Chrome 96
|
|
18599
18556
|
* @param deleteTokenParams Parameters for deleteToken.
|
|
18557
|
+
* @returns Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
|
|
18600
18558
|
*/
|
|
18601
18559
|
export function deleteToken(
|
|
18602
18560
|
|
|
@@ -18622,7 +18580,6 @@ declare namespace chrome {
|
|
|
18622
18580
|
* Revokes a granted token.
|
|
18623
18581
|
*
|
|
18624
18582
|
* @param deleteTokenParams Parameters for deleteToken.
|
|
18625
|
-
* @param callback Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
|
|
18626
18583
|
*/
|
|
18627
18584
|
export function deleteToken(
|
|
18628
18585
|
|
|
@@ -18650,13 +18607,12 @@ declare namespace chrome {
|
|
|
18650
18607
|
* Resets the app instance identifier and revokes all tokens associated with it.
|
|
18651
18608
|
*
|
|
18652
18609
|
* @chrome-returns-extra since Chrome 96
|
|
18610
|
+
* @returns Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
|
|
18653
18611
|
*/
|
|
18654
18612
|
export function deleteID(): Promise<void>;
|
|
18655
18613
|
|
|
18656
18614
|
/**
|
|
18657
18615
|
* Resets the app instance identifier and revokes all tokens associated with it.
|
|
18658
|
-
*
|
|
18659
|
-
* @param callback Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
|
|
18660
18616
|
*/
|
|
18661
18617
|
export function deleteID(
|
|
18662
18618
|
|
|
@@ -19458,6 +19414,7 @@ declare namespace chrome {
|
|
|
19458
19414
|
* Immediately issues a multicast DNS query for all service types. `callback` is invoked immediately. At a later time, queries will be sent, and any service events will be fired.
|
|
19459
19415
|
*
|
|
19460
19416
|
* @chrome-returns-extra since Chrome 96
|
|
19417
|
+
* @returns Callback invoked after ForceDiscovery() has started.
|
|
19461
19418
|
* @since Chrome 45
|
|
19462
19419
|
*/
|
|
19463
19420
|
export function forceDiscovery(): Promise<void>;
|
|
@@ -19465,7 +19422,6 @@ declare namespace chrome {
|
|
|
19465
19422
|
/**
|
|
19466
19423
|
* Immediately issues a multicast DNS query for all service types. `callback` is invoked immediately. At a later time, queries will be sent, and any service events will be fired.
|
|
19467
19424
|
*
|
|
19468
|
-
* @param callback Callback invoked after ForceDiscovery() has started.
|
|
19469
19425
|
* @since Chrome 45
|
|
19470
19426
|
*/
|
|
19471
19427
|
export function forceDiscovery(
|
|
@@ -21424,6 +21380,7 @@ declare namespace chrome {
|
|
|
21424
21380
|
*
|
|
21425
21381
|
* @chrome-returns-extra since Chrome 125
|
|
21426
21382
|
* @param networkGuid The GUID of the network to get properties for.
|
|
21383
|
+
* @returns Called with the network properties when received.
|
|
21427
21384
|
*/
|
|
21428
21385
|
export function getProperties(
|
|
21429
21386
|
|
|
@@ -21434,7 +21391,6 @@ declare namespace chrome {
|
|
|
21434
21391
|
* Gets all the properties of the network with id networkGuid. Includes all properties of the network (read-only and read/write values).
|
|
21435
21392
|
*
|
|
21436
21393
|
* @param networkGuid The GUID of the network to get properties for.
|
|
21437
|
-
* @param callback Called with the network properties when received.
|
|
21438
21394
|
*/
|
|
21439
21395
|
export function getProperties(
|
|
21440
21396
|
|
|
@@ -21450,6 +21406,7 @@ declare namespace chrome {
|
|
|
21450
21406
|
*
|
|
21451
21407
|
* @chrome-returns-extra since Chrome 125
|
|
21452
21408
|
* @param networkGuid The GUID of the network to get properties for.
|
|
21409
|
+
* @returns Called with the managed network properties when received.
|
|
21453
21410
|
*/
|
|
21454
21411
|
export function getManagedProperties(
|
|
21455
21412
|
|
|
@@ -21460,7 +21417,6 @@ declare namespace chrome {
|
|
|
21460
21417
|
* Gets the merged properties of the network with id networkGuid from the sources: User settings, shared settings, user policy, device policy and the currently active settings.
|
|
21461
21418
|
*
|
|
21462
21419
|
* @param networkGuid The GUID of the network to get properties for.
|
|
21463
|
-
* @param callback Called with the managed network properties when received.
|
|
21464
21420
|
*/
|
|
21465
21421
|
export function getManagedProperties(
|
|
21466
21422
|
|
|
@@ -21476,6 +21432,7 @@ declare namespace chrome {
|
|
|
21476
21432
|
*
|
|
21477
21433
|
* @chrome-returns-extra since Chrome 125
|
|
21478
21434
|
* @param networkGuid The GUID of the network to get properties for.
|
|
21435
|
+
* @returns Called immediately with the network state properties.
|
|
21479
21436
|
*/
|
|
21480
21437
|
export function getState(
|
|
21481
21438
|
|
|
@@ -21486,7 +21443,6 @@ declare namespace chrome {
|
|
|
21486
21443
|
* Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than {@link getProperties}, which requires a round trip to query the networking subsystem. The following properties are returned for all networks: GUID, Type, Name, WiFi.Security. Additional properties are provided for visible networks: ConnectionState, ErrorState, WiFi.SignalStrength, Cellular.NetworkTechnology, Cellular.ActivationState, Cellular.RoamingState.
|
|
21487
21444
|
*
|
|
21488
21445
|
* @param networkGuid The GUID of the network to get properties for.
|
|
21489
|
-
* @param callback Called immediately with the network state properties.
|
|
21490
21446
|
*/
|
|
21491
21447
|
export function getState(
|
|
21492
21448
|
|
|
@@ -21503,6 +21459,7 @@ declare namespace chrome {
|
|
|
21503
21459
|
* @chrome-returns-extra since Chrome 125
|
|
21504
21460
|
* @param networkGuid The GUID of the network to set properties for.
|
|
21505
21461
|
* @param properties The properties to set.
|
|
21462
|
+
* @returns Called when the operation has completed.
|
|
21506
21463
|
*/
|
|
21507
21464
|
export function setProperties(
|
|
21508
21465
|
|
|
@@ -21516,7 +21473,6 @@ declare namespace chrome {
|
|
|
21516
21473
|
*
|
|
21517
21474
|
* @param networkGuid The GUID of the network to set properties for.
|
|
21518
21475
|
* @param properties The properties to set.
|
|
21519
|
-
* @param callback Called when the operation has completed.
|
|
21520
21476
|
*/
|
|
21521
21477
|
export function setProperties(
|
|
21522
21478
|
|
|
@@ -21537,6 +21493,7 @@ declare namespace chrome {
|
|
|
21537
21493
|
|
|
21538
21494
|
**This option is exposed only to Chrome's Web UI.** When called by apps, `false` is the only allowed value.
|
|
21539
21495
|
* @param properties The properties to configure the new network with.
|
|
21496
|
+
* @returns Called with the GUID for the new network configuration once the network has been created.
|
|
21540
21497
|
*/
|
|
21541
21498
|
export function createNetwork(
|
|
21542
21499
|
|
|
@@ -21554,7 +21511,6 @@ declare namespace chrome {
|
|
|
21554
21511
|
|
|
21555
21512
|
**This option is exposed only to Chrome's Web UI.** When called by apps, `false` is the only allowed value.
|
|
21556
21513
|
* @param properties The properties to configure the new network with.
|
|
21557
|
-
* @param callback Called with the GUID for the new network configuration once the network has been created.
|
|
21558
21514
|
*/
|
|
21559
21515
|
export function createNetwork(
|
|
21560
21516
|
|
|
@@ -21574,6 +21530,7 @@ declare namespace chrome {
|
|
|
21574
21530
|
*
|
|
21575
21531
|
* @chrome-returns-extra since Chrome 125
|
|
21576
21532
|
* @param networkGuid The GUID of the network to forget.
|
|
21533
|
+
* @returns Called when the operation has completed.
|
|
21577
21534
|
*/
|
|
21578
21535
|
export function forgetNetwork(
|
|
21579
21536
|
|
|
@@ -21586,7 +21543,6 @@ declare namespace chrome {
|
|
|
21586
21543
|
* **In kiosk sessions, this method will not be able to forget shared network configurations.**
|
|
21587
21544
|
*
|
|
21588
21545
|
* @param networkGuid The GUID of the network to forget.
|
|
21589
|
-
* @param callback Called when the operation has completed.
|
|
21590
21546
|
*/
|
|
21591
21547
|
export function forgetNetwork(
|
|
21592
21548
|
|
|
@@ -21600,6 +21556,7 @@ declare namespace chrome {
|
|
|
21600
21556
|
*
|
|
21601
21557
|
* @chrome-returns-extra since Chrome 125
|
|
21602
21558
|
* @param filter Describes which networks to return.
|
|
21559
|
+
* @returns Called with a dictionary of networks and their state properties when received.
|
|
21603
21560
|
*/
|
|
21604
21561
|
export function getNetworks(
|
|
21605
21562
|
|
|
@@ -21610,7 +21567,6 @@ declare namespace chrome {
|
|
|
21610
21567
|
* Returns a list of network objects with the same properties provided by {@link getState}. A filter is provided to specify the type of networks returned and to limit the number of networks. Networks are ordered by the system based on their priority, with connected or connecting networks listed first.
|
|
21611
21568
|
*
|
|
21612
21569
|
* @param filter Describes which networks to return.
|
|
21613
|
-
* @param callback Called with a dictionary of networks and their state properties when received.
|
|
21614
21570
|
*/
|
|
21615
21571
|
export function getNetworks(
|
|
21616
21572
|
|
|
@@ -21625,13 +21581,12 @@ declare namespace chrome {
|
|
|
21625
21581
|
* Returns states of available networking devices.
|
|
21626
21582
|
*
|
|
21627
21583
|
* @chrome-returns-extra since Chrome 125
|
|
21584
|
+
* @returns Called with a list of devices and their state.
|
|
21628
21585
|
*/
|
|
21629
21586
|
export function getDeviceStates(): Promise<DeviceStateProperties[]>;
|
|
21630
21587
|
|
|
21631
21588
|
/**
|
|
21632
21589
|
* Returns states of available networking devices.
|
|
21633
|
-
*
|
|
21634
|
-
* @param callback Called with a list of devices and their state.
|
|
21635
21590
|
*/
|
|
21636
21591
|
export function getDeviceStates(
|
|
21637
21592
|
|
|
@@ -21678,6 +21633,7 @@ declare namespace chrome {
|
|
|
21678
21633
|
*
|
|
21679
21634
|
* @chrome-returns-extra since Chrome 125
|
|
21680
21635
|
* @param networkGuid The GUID of the network to connect to.
|
|
21636
|
+
* @returns Called when the connect request has been sent. Note: the connection may not have completed. Observe {@link onNetworksChanged} to be notified when a network state changes. If the connect request immediately failed (e.g. the network is unconfigured), {@link runtime.lastError} will be set with a failure reason.
|
|
21681
21637
|
*/
|
|
21682
21638
|
export function startConnect(
|
|
21683
21639
|
|
|
@@ -21688,7 +21644,6 @@ declare namespace chrome {
|
|
|
21688
21644
|
* Starts a connection to the network with networkGuid.
|
|
21689
21645
|
*
|
|
21690
21646
|
* @param networkGuid The GUID of the network to connect to.
|
|
21691
|
-
* @param callback Called when the connect request has been sent. Note: the connection may not have completed. Observe {@link onNetworksChanged} to be notified when a network state changes. If the connect request immediately failed (e.g. the network is unconfigured), {@link runtime.lastError} will be set with a failure reason.
|
|
21692
21647
|
*/
|
|
21693
21648
|
export function startConnect(
|
|
21694
21649
|
|
|
@@ -21702,6 +21657,7 @@ declare namespace chrome {
|
|
|
21702
21657
|
*
|
|
21703
21658
|
* @chrome-returns-extra since Chrome 125
|
|
21704
21659
|
* @param networkGuid The GUID of the network to disconnect from.
|
|
21660
|
+
* @returns Called when the disconnect request has been sent. See note for {@link startConnect}.
|
|
21705
21661
|
*/
|
|
21706
21662
|
export function startDisconnect(
|
|
21707
21663
|
|
|
@@ -21712,7 +21668,6 @@ declare namespace chrome {
|
|
|
21712
21668
|
* Starts a disconnect from the network with networkGuid.
|
|
21713
21669
|
*
|
|
21714
21670
|
* @param networkGuid The GUID of the network to disconnect from.
|
|
21715
|
-
* @param callback Called when the disconnect request has been sent. See note for {@link startConnect}.
|
|
21716
21671
|
*/
|
|
21717
21672
|
export function startDisconnect(
|
|
21718
21673
|
|
|
@@ -21726,6 +21681,7 @@ declare namespace chrome {
|
|
|
21726
21681
|
*
|
|
21727
21682
|
* @chrome-returns-extra since Chrome 125
|
|
21728
21683
|
* @param networkGuid The GUID of the network to get captive portal status for.
|
|
21684
|
+
* @returns A callback function that returns the results of the query for network captive portal status.
|
|
21729
21685
|
*/
|
|
21730
21686
|
export function getCaptivePortalStatus(
|
|
21731
21687
|
|
|
@@ -21736,7 +21692,6 @@ declare namespace chrome {
|
|
|
21736
21692
|
* Returns captive portal status for the network matching 'networkGuid'.
|
|
21737
21693
|
*
|
|
21738
21694
|
* @param networkGuid The GUID of the network to get captive portal status for.
|
|
21739
|
-
* @param callback A callback function that returns the results of the query for network captive portal status.
|
|
21740
21695
|
*/
|
|
21741
21696
|
export function getCaptivePortalStatus(
|
|
21742
21697
|
|
|
@@ -21960,6 +21915,7 @@ declare namespace chrome {
|
|
|
21960
21915
|
|
|
21961
21916
|
The `notificationId` parameter is required before Chrome 42.
|
|
21962
21917
|
* @param options Contents of the notification.
|
|
21918
|
+
* @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
|
|
21963
21919
|
*/
|
|
21964
21920
|
export function create(
|
|
21965
21921
|
|
|
@@ -21973,6 +21929,7 @@ declare namespace chrome {
|
|
|
21973
21929
|
*
|
|
21974
21930
|
* @chrome-returns-extra since Chrome 116
|
|
21975
21931
|
* @param options Contents of the notification.
|
|
21932
|
+
* @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
|
|
21976
21933
|
*/
|
|
21977
21934
|
export function create(
|
|
21978
21935
|
|
|
@@ -21988,7 +21945,6 @@ declare namespace chrome {
|
|
|
21988
21945
|
|
|
21989
21946
|
The `notificationId` parameter is required before Chrome 42.
|
|
21990
21947
|
* @param options Contents of the notification.
|
|
21991
|
-
* @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
|
|
21992
21948
|
*/
|
|
21993
21949
|
export function create(
|
|
21994
21950
|
|
|
@@ -22005,7 +21961,6 @@ declare namespace chrome {
|
|
|
22005
21961
|
* Creates and displays a notification.
|
|
22006
21962
|
*
|
|
22007
21963
|
* @param options Contents of the notification.
|
|
22008
|
-
* @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
|
|
22009
21964
|
*/
|
|
22010
21965
|
export function create(
|
|
22011
21966
|
|
|
@@ -22022,6 +21977,7 @@ declare namespace chrome {
|
|
|
22022
21977
|
* @chrome-returns-extra since Chrome 116
|
|
22023
21978
|
* @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
|
|
22024
21979
|
* @param options Contents of the notification to update to.
|
|
21980
|
+
* @returns Returns a Promise which resolves to indicate whether a matching notification existed.
|
|
22025
21981
|
*/
|
|
22026
21982
|
export function update(
|
|
22027
21983
|
|
|
@@ -22035,7 +21991,6 @@ declare namespace chrome {
|
|
|
22035
21991
|
*
|
|
22036
21992
|
* @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
|
|
22037
21993
|
* @param options Contents of the notification to update to.
|
|
22038
|
-
* @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
|
|
22039
21994
|
*/
|
|
22040
21995
|
export function update(
|
|
22041
21996
|
|
|
@@ -22053,6 +22008,7 @@ declare namespace chrome {
|
|
|
22053
22008
|
*
|
|
22054
22009
|
* @chrome-returns-extra since Chrome 116
|
|
22055
22010
|
* @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
|
|
22011
|
+
* @returns Returns a Promise which resolves to indicate whether a matching notification existed.
|
|
22056
22012
|
*/
|
|
22057
22013
|
export function clear(
|
|
22058
22014
|
|
|
@@ -22063,7 +22019,6 @@ declare namespace chrome {
|
|
|
22063
22019
|
* Clears the specified notification.
|
|
22064
22020
|
*
|
|
22065
22021
|
* @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
|
|
22066
|
-
* @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
|
|
22067
22022
|
*/
|
|
22068
22023
|
export function clear(
|
|
22069
22024
|
|
|
@@ -22078,13 +22033,12 @@ declare namespace chrome {
|
|
|
22078
22033
|
* Retrieves all the notifications of this app or extension.
|
|
22079
22034
|
*
|
|
22080
22035
|
* @chrome-returns-extra since Chrome 116
|
|
22036
|
+
* @returns Returns a Promise which resolves with the set of notification\_ids currently in the system.
|
|
22081
22037
|
*/
|
|
22082
22038
|
export function getAll(): Promise<{[name: string]: any}>;
|
|
22083
22039
|
|
|
22084
22040
|
/**
|
|
22085
22041
|
* Retrieves all the notifications of this app or extension.
|
|
22086
|
-
*
|
|
22087
|
-
* @param callback Returns a Promise which resolves with the set of notification\_ids currently in the system.
|
|
22088
22042
|
*/
|
|
22089
22043
|
export function getAll(
|
|
22090
22044
|
|
|
@@ -22097,13 +22051,12 @@ declare namespace chrome {
|
|
|
22097
22051
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
|
22098
22052
|
*
|
|
22099
22053
|
* @chrome-returns-extra since Chrome 116
|
|
22054
|
+
* @returns Returns a Promise which resolves with the current permission level.
|
|
22100
22055
|
*/
|
|
22101
22056
|
export function getPermissionLevel(): Promise<PermissionLevel>;
|
|
22102
22057
|
|
|
22103
22058
|
/**
|
|
22104
22059
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
|
22105
|
-
*
|
|
22106
|
-
* @param callback Returns a Promise which resolves with the current permission level.
|
|
22107
22060
|
*/
|
|
22108
22061
|
export function getPermissionLevel(
|
|
22109
22062
|
|
|
@@ -22184,6 +22137,7 @@ declare namespace chrome {
|
|
|
22184
22137
|
* Creates a new offscreen document for the extension.
|
|
22185
22138
|
*
|
|
22186
22139
|
* @param parameters The parameters describing the offscreen document to create.
|
|
22140
|
+
* @returns Promise that resolves when the offscreen document is created and has completed its initial page load.
|
|
22187
22141
|
*/
|
|
22188
22142
|
export function createDocument(
|
|
22189
22143
|
|
|
@@ -22194,7 +22148,6 @@ declare namespace chrome {
|
|
|
22194
22148
|
* Creates a new offscreen document for the extension.
|
|
22195
22149
|
*
|
|
22196
22150
|
* @param parameters The parameters describing the offscreen document to create.
|
|
22197
|
-
* @param callback Promise that resolves when the offscreen document is created and has completed its initial page load.
|
|
22198
22151
|
*/
|
|
22199
22152
|
export function createDocument(
|
|
22200
22153
|
|
|
@@ -22205,13 +22158,13 @@ declare namespace chrome {
|
|
|
22205
22158
|
|
|
22206
22159
|
/**
|
|
22207
22160
|
* Closes the currently-open offscreen document for the extension.
|
|
22161
|
+
*
|
|
22162
|
+
* @returns Promise that resolves when the offscreen document has been closed.
|
|
22208
22163
|
*/
|
|
22209
22164
|
export function closeDocument(): Promise<void>;
|
|
22210
22165
|
|
|
22211
22166
|
/**
|
|
22212
22167
|
* Closes the currently-open offscreen document for the extension.
|
|
22213
|
-
*
|
|
22214
|
-
* @param callback Promise that resolves when the offscreen document has been closed.
|
|
22215
22168
|
*/
|
|
22216
22169
|
export function closeDocument(
|
|
22217
22170
|
|
|
@@ -22632,6 +22585,7 @@ declare namespace chrome {
|
|
|
22632
22585
|
* Saves the content of the tab with given id as MHTML.
|
|
22633
22586
|
*
|
|
22634
22587
|
* @chrome-returns-extra since Chrome 116
|
|
22588
|
+
* @returns Resolves when the MHTML has been generated.
|
|
22635
22589
|
*/
|
|
22636
22590
|
export function saveAsMHTML(
|
|
22637
22591
|
|
|
@@ -22646,8 +22600,6 @@ declare namespace chrome {
|
|
|
22646
22600
|
|
|
22647
22601
|
/**
|
|
22648
22602
|
* Saves the content of the tab with given id as MHTML.
|
|
22649
|
-
*
|
|
22650
|
-
* @param callback Resolves when the MHTML has been generated.
|
|
22651
22603
|
*/
|
|
22652
22604
|
export function saveAsMHTML(
|
|
22653
22605
|
|
|
@@ -24025,6 +23977,7 @@ declare namespace chrome {
|
|
|
24025
23977
|
* Returns the ID of the renderer process for the specified tab.
|
|
24026
23978
|
*
|
|
24027
23979
|
* @param tabId The ID of the tab for which the renderer process ID is to be returned.
|
|
23980
|
+
* @returns A callback to return the ID of the renderer process of a tab.
|
|
24028
23981
|
*/
|
|
24029
23982
|
export function getProcessIdForTab(
|
|
24030
23983
|
|
|
@@ -24035,7 +23988,6 @@ declare namespace chrome {
|
|
|
24035
23988
|
* Returns the ID of the renderer process for the specified tab.
|
|
24036
23989
|
*
|
|
24037
23990
|
* @param tabId The ID of the tab for which the renderer process ID is to be returned.
|
|
24038
|
-
* @param callback A callback to return the ID of the renderer process of a tab.
|
|
24039
23991
|
*/
|
|
24040
23992
|
export function getProcessIdForTab(
|
|
24041
23993
|
|
|
@@ -24053,6 +24005,7 @@ declare namespace chrome {
|
|
|
24053
24005
|
* Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
|
|
24054
24006
|
*
|
|
24055
24007
|
* @param processId The ID of the process to be terminated.
|
|
24008
|
+
* @returns A callback to report the status of the termination.
|
|
24056
24009
|
*/
|
|
24057
24010
|
export function terminate(
|
|
24058
24011
|
|
|
@@ -24063,7 +24016,6 @@ declare namespace chrome {
|
|
|
24063
24016
|
* Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
|
|
24064
24017
|
*
|
|
24065
24018
|
* @param processId The ID of the process to be terminated.
|
|
24066
|
-
* @param callback A callback to report the status of the termination.
|
|
24067
24019
|
*/
|
|
24068
24020
|
export function terminate(
|
|
24069
24021
|
|
|
@@ -24082,6 +24034,7 @@ declare namespace chrome {
|
|
|
24082
24034
|
*
|
|
24083
24035
|
* @param processIds The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested.
|
|
24084
24036
|
* @param includeMemory True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
|
|
24037
|
+
* @returns A callback called when the processes information is collected.
|
|
24085
24038
|
*/
|
|
24086
24039
|
export function getProcessInfo(
|
|
24087
24040
|
|
|
@@ -24095,7 +24048,6 @@ declare namespace chrome {
|
|
|
24095
24048
|
*
|
|
24096
24049
|
* @param processIds The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested.
|
|
24097
24050
|
* @param includeMemory True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
|
|
24098
|
-
* @param callback A callback called when the processes information is collected.
|
|
24099
24051
|
*/
|
|
24100
24052
|
export function getProcessInfo(
|
|
24101
24053
|
|
|
@@ -24411,6 +24363,7 @@ declare namespace chrome {
|
|
|
24411
24363
|
* Adds an entry to the reading list if it does not exist.
|
|
24412
24364
|
*
|
|
24413
24365
|
* @param entry The entry to add to the reading list.
|
|
24366
|
+
* @returns Resolves once the entry has been added.
|
|
24414
24367
|
*/
|
|
24415
24368
|
export function addEntry(
|
|
24416
24369
|
|
|
@@ -24421,7 +24374,6 @@ declare namespace chrome {
|
|
|
24421
24374
|
* Adds an entry to the reading list if it does not exist.
|
|
24422
24375
|
*
|
|
24423
24376
|
* @param entry The entry to add to the reading list.
|
|
24424
|
-
* @param callback Resolves once the entry has been added.
|
|
24425
24377
|
*/
|
|
24426
24378
|
export function addEntry(
|
|
24427
24379
|
|
|
@@ -24434,6 +24386,7 @@ declare namespace chrome {
|
|
|
24434
24386
|
* Removes an entry from the reading list if it exists.
|
|
24435
24387
|
*
|
|
24436
24388
|
* @param info The entry to remove from the reading list.
|
|
24389
|
+
* @returns Resolves once the entry has been removed.
|
|
24437
24390
|
*/
|
|
24438
24391
|
export function removeEntry(
|
|
24439
24392
|
|
|
@@ -24444,7 +24397,6 @@ declare namespace chrome {
|
|
|
24444
24397
|
* Removes an entry from the reading list if it exists.
|
|
24445
24398
|
*
|
|
24446
24399
|
* @param info The entry to remove from the reading list.
|
|
24447
|
-
* @param callback Resolves once the entry has been removed.
|
|
24448
24400
|
*/
|
|
24449
24401
|
export function removeEntry(
|
|
24450
24402
|
|
|
@@ -24457,6 +24409,7 @@ declare namespace chrome {
|
|
|
24457
24409
|
* Updates a reading list entry if it exists.
|
|
24458
24410
|
*
|
|
24459
24411
|
* @param info The entry to update.
|
|
24412
|
+
* @returns Resolves once the matched entries have been updated.
|
|
24460
24413
|
*/
|
|
24461
24414
|
export function updateEntry(
|
|
24462
24415
|
|
|
@@ -24467,7 +24420,6 @@ declare namespace chrome {
|
|
|
24467
24420
|
* Updates a reading list entry if it exists.
|
|
24468
24421
|
*
|
|
24469
24422
|
* @param info The entry to update.
|
|
24470
|
-
* @param callback Resolves once the matched entries have been updated.
|
|
24471
24423
|
*/
|
|
24472
24424
|
export function updateEntry(
|
|
24473
24425
|
|
|
@@ -24480,6 +24432,7 @@ declare namespace chrome {
|
|
|
24480
24432
|
* Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
|
|
24481
24433
|
*
|
|
24482
24434
|
* @param info The properties to search for.
|
|
24435
|
+
* @returns Resolves once the entries have been matched.
|
|
24483
24436
|
*/
|
|
24484
24437
|
export function query(
|
|
24485
24438
|
|
|
@@ -24490,7 +24443,6 @@ declare namespace chrome {
|
|
|
24490
24443
|
* Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
|
|
24491
24444
|
*
|
|
24492
24445
|
* @param info The properties to search for.
|
|
24493
|
-
* @param callback Resolves once the entries have been matched.
|
|
24494
24446
|
*/
|
|
24495
24447
|
export function query(
|
|
24496
24448
|
|
|
@@ -25044,6 +24996,7 @@ declare namespace chrome {
|
|
|
25044
24996
|
*
|
|
25045
24997
|
* @chrome-returns-extra since Chrome 99
|
|
25046
24998
|
* @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
|
|
24999
|
+
* @returns Promise that resolves when the uninstall URL is set. If the given URL is invalid, the promise will be rejected.
|
|
25047
25000
|
*/
|
|
25048
25001
|
export function setUninstallURL(
|
|
25049
25002
|
|
|
@@ -25054,7 +25007,6 @@ declare namespace chrome {
|
|
|
25054
25007
|
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 1023 characters.
|
|
25055
25008
|
*
|
|
25056
25009
|
* @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
|
|
25057
|
-
* @param callback Called when the uninstall URL is set. If the given URL is invalid, {@link runtime.lastError} will be set.
|
|
25058
25010
|
*/
|
|
25059
25011
|
export function setUninstallURL(
|
|
25060
25012
|
|
|
@@ -25138,6 +25090,7 @@ declare namespace chrome {
|
|
|
25138
25090
|
*
|
|
25139
25091
|
* @chrome-returns-extra since Chrome 99
|
|
25140
25092
|
* @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
|
|
25093
|
+
* @returns Promise that resolves when a restart request was successfully rescheduled.
|
|
25141
25094
|
* @since Chrome 53
|
|
25142
25095
|
*/
|
|
25143
25096
|
export function restartAfterDelay(
|
|
@@ -25149,7 +25102,6 @@ declare namespace chrome {
|
|
|
25149
25102
|
* Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API.
|
|
25150
25103
|
*
|
|
25151
25104
|
* @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
|
|
25152
|
-
* @param callback A callback to be invoked when a restart request was successfully rescheduled.
|
|
25153
25105
|
* @since Chrome 53
|
|
25154
25106
|
*/
|
|
25155
25107
|
export function restartAfterDelay(
|
|
@@ -25201,6 +25153,7 @@ declare namespace chrome {
|
|
|
25201
25153
|
* @chrome-returns-extra since Chrome 99
|
|
25202
25154
|
* @param extensionId The ID of the extension to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
|
|
25203
25155
|
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
25156
|
+
* @returns Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
|
|
25204
25157
|
*/
|
|
25205
25158
|
export function sendMessage(
|
|
25206
25159
|
|
|
@@ -25222,6 +25175,7 @@ declare namespace chrome {
|
|
|
25222
25175
|
*
|
|
25223
25176
|
* @chrome-returns-extra since Chrome 99
|
|
25224
25177
|
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
25178
|
+
* @returns Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
|
|
25225
25179
|
*/
|
|
25226
25180
|
export function sendMessage(
|
|
25227
25181
|
|
|
@@ -25241,7 +25195,6 @@ declare namespace chrome {
|
|
|
25241
25195
|
*
|
|
25242
25196
|
* @param extensionId The ID of the extension to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
|
|
25243
25197
|
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
25244
|
-
* @param callback Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
|
|
25245
25198
|
*/
|
|
25246
25199
|
export function sendMessage(
|
|
25247
25200
|
|
|
@@ -25270,7 +25223,6 @@ declare namespace chrome {
|
|
|
25270
25223
|
* Sends a single message to event listeners within your extension or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
25271
25224
|
*
|
|
25272
25225
|
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
25273
|
-
* @param callback Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
|
|
25274
25226
|
*/
|
|
25275
25227
|
export function sendMessage(
|
|
25276
25228
|
|
|
@@ -25334,13 +25286,12 @@ declare namespace chrome {
|
|
|
25334
25286
|
* Returns information about the current platform.
|
|
25335
25287
|
*
|
|
25336
25288
|
* @chrome-returns-extra since Chrome 99
|
|
25289
|
+
* @returns Promise that resolves with information about the current platform.
|
|
25337
25290
|
*/
|
|
25338
25291
|
export function getPlatformInfo(): Promise<PlatformInfo>;
|
|
25339
25292
|
|
|
25340
25293
|
/**
|
|
25341
25294
|
* Returns information about the current platform.
|
|
25342
|
-
*
|
|
25343
|
-
* @param callback Called with results
|
|
25344
25295
|
*/
|
|
25345
25296
|
export function getPlatformInfo(
|
|
25346
25297
|
|
|
@@ -25373,6 +25324,7 @@ declare namespace chrome {
|
|
|
25373
25324
|
* Fetches information about active contexts associated with this extension
|
|
25374
25325
|
*
|
|
25375
25326
|
* @param filter A filter to find matching contexts. A context matches if it matches all specified fields in the filter. Any unspecified field in the filter matches all contexts.
|
|
25327
|
+
* @returns Promise that resolves with the matching contexts, if any.
|
|
25376
25328
|
* @since Chrome 116
|
|
25377
25329
|
* @chrome-min-manifest MV3
|
|
25378
25330
|
*/
|
|
@@ -25385,7 +25337,6 @@ declare namespace chrome {
|
|
|
25385
25337
|
* Fetches information about active contexts associated with this extension
|
|
25386
25338
|
*
|
|
25387
25339
|
* @param filter A filter to find matching contexts. A context matches if it matches all specified fields in the filter. Any unspecified field in the filter matches all contexts.
|
|
25388
|
-
* @param callback Invoked with the matching contexts, if any.
|
|
25389
25340
|
* @since Chrome 116
|
|
25390
25341
|
* @chrome-min-manifest MV3
|
|
25391
25342
|
*/
|
|
@@ -25612,6 +25563,7 @@ declare namespace chrome {
|
|
|
25612
25563
|
*
|
|
25613
25564
|
* @chrome-returns-extra since Chrome 90
|
|
25614
25565
|
* @param injection The details of the script which to inject.
|
|
25566
|
+
* @returns 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.
|
|
25615
25567
|
*/
|
|
25616
25568
|
export function executeScript(
|
|
25617
25569
|
|
|
@@ -25622,7 +25574,6 @@ declare namespace chrome {
|
|
|
25622
25574
|
* 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.
|
|
25623
25575
|
*
|
|
25624
25576
|
* @param injection The details of the script which to inject.
|
|
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.
|
|
25626
25577
|
*/
|
|
25627
25578
|
export function executeScript(
|
|
25628
25579
|
|
|
@@ -25638,6 +25589,7 @@ declare namespace chrome {
|
|
|
25638
25589
|
*
|
|
25639
25590
|
* @chrome-returns-extra since Chrome 90
|
|
25640
25591
|
* @param injection The details of the styles to insert.
|
|
25592
|
+
* @returns Returns a Promise which resolves upon completion of the insertion.
|
|
25641
25593
|
*/
|
|
25642
25594
|
export function insertCSS(
|
|
25643
25595
|
|
|
@@ -25648,7 +25600,6 @@ declare namespace chrome {
|
|
|
25648
25600
|
* Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
|
|
25649
25601
|
*
|
|
25650
25602
|
* @param injection The details of the styles to insert.
|
|
25651
|
-
* @param callback Returns a Promise which resolves upon completion of the insertion.
|
|
25652
25603
|
*/
|
|
25653
25604
|
export function insertCSS(
|
|
25654
25605
|
|
|
@@ -25661,6 +25612,7 @@ declare namespace chrome {
|
|
|
25661
25612
|
* Removes a CSS stylesheet that was previously inserted by this extension from a target context.
|
|
25662
25613
|
*
|
|
25663
25614
|
* @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.
|
|
25615
|
+
* @returns Returns a Promise which resolves upon the completion of the removal.
|
|
25664
25616
|
* @since Chrome 90
|
|
25665
25617
|
*/
|
|
25666
25618
|
export function removeCSS(
|
|
@@ -25672,7 +25624,6 @@ declare namespace chrome {
|
|
|
25672
25624
|
* Removes a CSS stylesheet that was previously inserted by this extension from a target context.
|
|
25673
25625
|
*
|
|
25674
25626
|
* @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.
|
|
25675
|
-
* @param callback Returns a Promise which resolves upon the completion of the removal.
|
|
25676
25627
|
* @since Chrome 90
|
|
25677
25628
|
*/
|
|
25678
25629
|
export function removeCSS(
|
|
@@ -25686,6 +25637,7 @@ declare namespace chrome {
|
|
|
25686
25637
|
* Registers one or more content scripts for this extension.
|
|
25687
25638
|
*
|
|
25688
25639
|
* @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.
|
|
25640
|
+
* @returns Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
|
|
25689
25641
|
* @since Chrome 96
|
|
25690
25642
|
*/
|
|
25691
25643
|
export function registerContentScripts(
|
|
@@ -25697,7 +25649,6 @@ declare namespace chrome {
|
|
|
25697
25649
|
* Registers one or more content scripts for this extension.
|
|
25698
25650
|
*
|
|
25699
25651
|
* @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.
|
|
25700
|
-
* @param callback Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
|
|
25701
25652
|
* @since Chrome 96
|
|
25702
25653
|
*/
|
|
25703
25654
|
export function registerContentScripts(
|
|
@@ -25737,6 +25688,7 @@ declare namespace chrome {
|
|
|
25737
25688
|
* Unregisters content scripts for this extension.
|
|
25738
25689
|
*
|
|
25739
25690
|
* @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
|
|
25691
|
+
* @returns Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
|
|
25740
25692
|
* @since Chrome 96
|
|
25741
25693
|
*/
|
|
25742
25694
|
export function unregisterContentScripts(
|
|
@@ -25748,7 +25700,6 @@ declare namespace chrome {
|
|
|
25748
25700
|
* Unregisters content scripts for this extension.
|
|
25749
25701
|
*
|
|
25750
25702
|
* @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
|
|
25751
|
-
* @param callback Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
|
|
25752
25703
|
* @since Chrome 96
|
|
25753
25704
|
*/
|
|
25754
25705
|
export function unregisterContentScripts(
|
|
@@ -25762,6 +25713,7 @@ declare namespace chrome {
|
|
|
25762
25713
|
* Updates one or more content scripts for this extension.
|
|
25763
25714
|
*
|
|
25764
25715
|
* @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.
|
|
25716
|
+
* @returns Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
|
|
25765
25717
|
* @since Chrome 96
|
|
25766
25718
|
*/
|
|
25767
25719
|
export function updateContentScripts(
|
|
@@ -25773,7 +25725,6 @@ declare namespace chrome {
|
|
|
25773
25725
|
* Updates one or more content scripts for this extension.
|
|
25774
25726
|
*
|
|
25775
25727
|
* @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.
|
|
25776
|
-
* @param callback Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
|
|
25777
25728
|
* @since Chrome 96
|
|
25778
25729
|
*/
|
|
25779
25730
|
export function updateContentScripts(
|
|
@@ -26109,13 +26060,12 @@ declare namespace chrome {
|
|
|
26109
26060
|
* Returns information about available serial devices on the system. The list is regenerated each time this method is called.
|
|
26110
26061
|
*
|
|
26111
26062
|
* @chrome-returns-extra since Chrome 117
|
|
26063
|
+
* @returns Called with the list of `DeviceInfo` objects.
|
|
26112
26064
|
*/
|
|
26113
26065
|
export function getDevices(): Promise<DeviceInfo[]>;
|
|
26114
26066
|
|
|
26115
26067
|
/**
|
|
26116
26068
|
* Returns information about available serial devices on the system. The list is regenerated each time this method is called.
|
|
26117
|
-
*
|
|
26118
|
-
* @param callback Called with the list of `DeviceInfo` objects.
|
|
26119
26069
|
*/
|
|
26120
26070
|
export function getDevices(
|
|
26121
26071
|
|
|
@@ -26130,6 +26080,7 @@ declare namespace chrome {
|
|
|
26130
26080
|
* @chrome-returns-extra since Chrome 117
|
|
26131
26081
|
* @param path The system path of the serial port to open.
|
|
26132
26082
|
* @param options Port configuration options.
|
|
26083
|
+
* @returns Called when the connection has been opened.
|
|
26133
26084
|
*/
|
|
26134
26085
|
export function connect(
|
|
26135
26086
|
|
|
@@ -26143,7 +26094,6 @@ declare namespace chrome {
|
|
|
26143
26094
|
*
|
|
26144
26095
|
* @param path The system path of the serial port to open.
|
|
26145
26096
|
* @param options Port configuration options.
|
|
26146
|
-
* @param callback Called when the connection has been opened.
|
|
26147
26097
|
*/
|
|
26148
26098
|
export function connect(
|
|
26149
26099
|
|
|
@@ -26162,6 +26112,7 @@ declare namespace chrome {
|
|
|
26162
26112
|
* @chrome-returns-extra since Chrome 117
|
|
26163
26113
|
* @param connectionId The id of the opened connection.
|
|
26164
26114
|
* @param options Port configuration options.
|
|
26115
|
+
* @returns Called when the configuation has completed.
|
|
26165
26116
|
*/
|
|
26166
26117
|
export function update(
|
|
26167
26118
|
|
|
@@ -26175,7 +26126,6 @@ declare namespace chrome {
|
|
|
26175
26126
|
*
|
|
26176
26127
|
* @param connectionId The id of the opened connection.
|
|
26177
26128
|
* @param options Port configuration options.
|
|
26178
|
-
* @param callback Called when the configuation has completed.
|
|
26179
26129
|
*/
|
|
26180
26130
|
export function update(
|
|
26181
26131
|
|
|
@@ -26193,6 +26143,7 @@ declare namespace chrome {
|
|
|
26193
26143
|
*
|
|
26194
26144
|
* @chrome-returns-extra since Chrome 117
|
|
26195
26145
|
* @param connectionId The id of the opened connection.
|
|
26146
|
+
* @returns Called when the connection has been closed.
|
|
26196
26147
|
*/
|
|
26197
26148
|
export function disconnect(
|
|
26198
26149
|
|
|
@@ -26203,7 +26154,6 @@ declare namespace chrome {
|
|
|
26203
26154
|
* Disconnects from a serial port.
|
|
26204
26155
|
*
|
|
26205
26156
|
* @param connectionId The id of the opened connection.
|
|
26206
|
-
* @param callback Called when the connection has been closed.
|
|
26207
26157
|
*/
|
|
26208
26158
|
export function disconnect(
|
|
26209
26159
|
|
|
@@ -26220,6 +26170,7 @@ declare namespace chrome {
|
|
|
26220
26170
|
* @chrome-returns-extra since Chrome 117
|
|
26221
26171
|
* @param connectionId The id of the opened connection.
|
|
26222
26172
|
* @param paused Flag to indicate whether to pause or unpause.
|
|
26173
|
+
* @returns Called when the connection has been successfully paused or unpaused.
|
|
26223
26174
|
*/
|
|
26224
26175
|
export function setPaused(
|
|
26225
26176
|
|
|
@@ -26233,7 +26184,6 @@ declare namespace chrome {
|
|
|
26233
26184
|
*
|
|
26234
26185
|
* @param connectionId The id of the opened connection.
|
|
26235
26186
|
* @param paused Flag to indicate whether to pause or unpause.
|
|
26236
|
-
* @param callback Called when the connection has been successfully paused or unpaused.
|
|
26237
26187
|
*/
|
|
26238
26188
|
export function setPaused(
|
|
26239
26189
|
|
|
@@ -26249,6 +26199,7 @@ declare namespace chrome {
|
|
|
26249
26199
|
*
|
|
26250
26200
|
* @chrome-returns-extra since Chrome 117
|
|
26251
26201
|
* @param connectionId The id of the opened connection.
|
|
26202
|
+
* @returns Called with connection state information when available.
|
|
26252
26203
|
*/
|
|
26253
26204
|
export function getInfo(
|
|
26254
26205
|
|
|
@@ -26259,7 +26210,6 @@ declare namespace chrome {
|
|
|
26259
26210
|
* Retrieves the state of a given connection.
|
|
26260
26211
|
*
|
|
26261
26212
|
* @param connectionId The id of the opened connection.
|
|
26262
|
-
* @param callback Called with connection state information when available.
|
|
26263
26213
|
*/
|
|
26264
26214
|
export function getInfo(
|
|
26265
26215
|
|
|
@@ -26274,13 +26224,12 @@ declare namespace chrome {
|
|
|
26274
26224
|
* Retrieves the list of currently opened serial port connections owned by the application.
|
|
26275
26225
|
*
|
|
26276
26226
|
* @chrome-returns-extra since Chrome 117
|
|
26227
|
+
* @returns Called with the list of connections when available.
|
|
26277
26228
|
*/
|
|
26278
26229
|
export function getConnections(): Promise<ConnectionInfo[]>;
|
|
26279
26230
|
|
|
26280
26231
|
/**
|
|
26281
26232
|
* Retrieves the list of currently opened serial port connections owned by the application.
|
|
26282
|
-
*
|
|
26283
|
-
* @param callback Called with the list of connections when available.
|
|
26284
26233
|
*/
|
|
26285
26234
|
export function getConnections(
|
|
26286
26235
|
|
|
@@ -26295,6 +26244,7 @@ declare namespace chrome {
|
|
|
26295
26244
|
* @chrome-returns-extra since Chrome 117
|
|
26296
26245
|
* @param connectionId The id of the connection.
|
|
26297
26246
|
* @param data The data to send.
|
|
26247
|
+
* @returns Called when the operation has completed.
|
|
26298
26248
|
*/
|
|
26299
26249
|
export function send(
|
|
26300
26250
|
|
|
@@ -26308,7 +26258,6 @@ declare namespace chrome {
|
|
|
26308
26258
|
*
|
|
26309
26259
|
* @param connectionId The id of the connection.
|
|
26310
26260
|
* @param data The data to send.
|
|
26311
|
-
* @param callback Called when the operation has completed.
|
|
26312
26261
|
*/
|
|
26313
26262
|
export function send(
|
|
26314
26263
|
|
|
@@ -26348,6 +26297,7 @@ declare namespace chrome {
|
|
|
26348
26297
|
*
|
|
26349
26298
|
* @chrome-returns-extra since Chrome 117
|
|
26350
26299
|
* @param connectionId The id of the connection.
|
|
26300
|
+
* @returns Called when the control signals are available.
|
|
26351
26301
|
*/
|
|
26352
26302
|
export function getControlSignals(
|
|
26353
26303
|
|
|
@@ -26358,7 +26308,6 @@ declare namespace chrome {
|
|
|
26358
26308
|
* Retrieves the state of control signals on a given connection.
|
|
26359
26309
|
*
|
|
26360
26310
|
* @param connectionId The id of the connection.
|
|
26361
|
-
* @param callback Called when the control signals are available.
|
|
26362
26311
|
*/
|
|
26363
26312
|
export function getControlSignals(
|
|
26364
26313
|
|
|
@@ -26375,6 +26324,7 @@ declare namespace chrome {
|
|
|
26375
26324
|
* @chrome-returns-extra since Chrome 117
|
|
26376
26325
|
* @param connectionId The id of the connection.
|
|
26377
26326
|
* @param signals The set of signal changes to send to the device.
|
|
26327
|
+
* @returns Called once the control signals have been set.
|
|
26378
26328
|
*/
|
|
26379
26329
|
export function setControlSignals(
|
|
26380
26330
|
|
|
@@ -26388,7 +26338,6 @@ declare namespace chrome {
|
|
|
26388
26338
|
*
|
|
26389
26339
|
* @param connectionId The id of the connection.
|
|
26390
26340
|
* @param signals The set of signal changes to send to the device.
|
|
26391
|
-
* @param callback Called once the control signals have been set.
|
|
26392
26341
|
*/
|
|
26393
26342
|
export function setControlSignals(
|
|
26394
26343
|
|
|
@@ -26786,6 +26735,7 @@ declare namespace chrome {
|
|
|
26786
26735
|
* Configures the side panel.
|
|
26787
26736
|
*
|
|
26788
26737
|
* @param options The configuration options to apply to the panel.
|
|
26738
|
+
* @returns Returns a Promise which resolves when the options have been set.
|
|
26789
26739
|
*/
|
|
26790
26740
|
export function setOptions(
|
|
26791
26741
|
|
|
@@ -26796,7 +26746,6 @@ declare namespace chrome {
|
|
|
26796
26746
|
* Configures the side panel.
|
|
26797
26747
|
*
|
|
26798
26748
|
* @param options The configuration options to apply to the panel.
|
|
26799
|
-
* @param callback Returns a Promise which resolves when the options have been set.
|
|
26800
26749
|
*/
|
|
26801
26750
|
export function setOptions(
|
|
26802
26751
|
|
|
@@ -26809,6 +26758,7 @@ declare namespace chrome {
|
|
|
26809
26758
|
* Returns the active panel configuration.
|
|
26810
26759
|
*
|
|
26811
26760
|
* @param options Specifies the context to return the configuration for.
|
|
26761
|
+
* @returns Returns a Promise which resolves with the active panel configuration.
|
|
26812
26762
|
*/
|
|
26813
26763
|
export function getOptions(
|
|
26814
26764
|
|
|
@@ -26819,7 +26769,6 @@ declare namespace chrome {
|
|
|
26819
26769
|
* Returns the active panel configuration.
|
|
26820
26770
|
*
|
|
26821
26771
|
* @param options Specifies the context to return the configuration for.
|
|
26822
|
-
* @param callback Returns a Promise which resolves with the active panel configuration.
|
|
26823
26772
|
*/
|
|
26824
26773
|
export function getOptions(
|
|
26825
26774
|
|
|
@@ -26834,6 +26783,7 @@ declare namespace chrome {
|
|
|
26834
26783
|
* Configures the extension's side panel behavior. This is an upsert operation.
|
|
26835
26784
|
*
|
|
26836
26785
|
* @param behavior The new behavior to be set.
|
|
26786
|
+
* @returns Returns a Promise which resolves when the new behavior has been set.
|
|
26837
26787
|
*/
|
|
26838
26788
|
export function setPanelBehavior(
|
|
26839
26789
|
|
|
@@ -26844,7 +26794,6 @@ declare namespace chrome {
|
|
|
26844
26794
|
* Configures the extension's side panel behavior. This is an upsert operation.
|
|
26845
26795
|
*
|
|
26846
26796
|
* @param behavior The new behavior to be set.
|
|
26847
|
-
* @param callback Returns a Promise which resolves when the new behavior has been set.
|
|
26848
26797
|
*/
|
|
26849
26798
|
export function setPanelBehavior(
|
|
26850
26799
|
|
|
@@ -26855,13 +26804,13 @@ declare namespace chrome {
|
|
|
26855
26804
|
|
|
26856
26805
|
/**
|
|
26857
26806
|
* Returns the extension's current side panel behavior.
|
|
26807
|
+
*
|
|
26808
|
+
* @returns Returns a Promise which resolves with the extension's side panel behavior.
|
|
26858
26809
|
*/
|
|
26859
26810
|
export function getPanelBehavior(): Promise<PanelBehavior>;
|
|
26860
26811
|
|
|
26861
26812
|
/**
|
|
26862
26813
|
* Returns the extension's current side panel behavior.
|
|
26863
|
-
*
|
|
26864
|
-
* @param callback Returns a Promise which resolves with the extension's side panel behavior.
|
|
26865
26814
|
*/
|
|
26866
26815
|
export function getPanelBehavior(
|
|
26867
26816
|
|
|
@@ -26874,6 +26823,7 @@ declare namespace chrome {
|
|
|
26874
26823
|
* Opens the side panel for the extension. This may only be called in response to a user action.
|
|
26875
26824
|
*
|
|
26876
26825
|
* @param options Specifies the context in which to open the side panel.
|
|
26826
|
+
* @returns Returns a Promise which resolves when the side panel has been opened.
|
|
26877
26827
|
* @since Chrome 116
|
|
26878
26828
|
*/
|
|
26879
26829
|
export function open(
|
|
@@ -26885,7 +26835,6 @@ declare namespace chrome {
|
|
|
26885
26835
|
* Opens the side panel for the extension. This may only be called in response to a user action.
|
|
26886
26836
|
*
|
|
26887
26837
|
* @param options Specifies the context in which to open the side panel.
|
|
26888
|
-
* @param callback Returns a Promise which resolves when the side panel has been opened.
|
|
26889
26838
|
* @since Chrome 116
|
|
26890
26839
|
*/
|
|
26891
26840
|
export function open(
|
|
@@ -26898,6 +26847,7 @@ declare namespace chrome {
|
|
|
26898
26847
|
/**
|
|
26899
26848
|
* Returns the side panel's current layout.
|
|
26900
26849
|
*
|
|
26850
|
+
* @returns Returns a Promise which resolves with a {@link PanelLayout}.
|
|
26901
26851
|
* @since Chrome 140
|
|
26902
26852
|
*/
|
|
26903
26853
|
export function getLayout(): Promise<PanelLayout>;
|
|
@@ -26905,7 +26855,6 @@ declare namespace chrome {
|
|
|
26905
26855
|
/**
|
|
26906
26856
|
* Returns the side panel's current layout.
|
|
26907
26857
|
*
|
|
26908
|
-
* @param callback Returns a Promise which resolves with a {@link PanelLayout}.
|
|
26909
26858
|
* @since Chrome 140
|
|
26910
26859
|
*/
|
|
26911
26860
|
export function getLayout(
|
|
@@ -27064,6 +27013,7 @@ declare namespace chrome {
|
|
|
27064
27013
|
* @chrome-returns-extra since Chrome 121
|
|
27065
27014
|
* @param type The type of socket to create. Must be `tcp` or `udp`.
|
|
27066
27015
|
* @param options The socket options.
|
|
27016
|
+
* @returns Called when the socket has been created.
|
|
27067
27017
|
*/
|
|
27068
27018
|
export function create(
|
|
27069
27019
|
|
|
@@ -27077,7 +27027,6 @@ declare namespace chrome {
|
|
|
27077
27027
|
*
|
|
27078
27028
|
* @param type The type of socket to create. Must be `tcp` or `udp`.
|
|
27079
27029
|
* @param options The socket options.
|
|
27080
|
-
* @param callback Called when the socket has been created.
|
|
27081
27030
|
*/
|
|
27082
27031
|
export function create(
|
|
27083
27032
|
|
|
@@ -27382,6 +27331,7 @@ declare namespace chrome {
|
|
|
27382
27331
|
*
|
|
27383
27332
|
* @chrome-returns-extra since Chrome 121
|
|
27384
27333
|
* @param socketId The socketId.
|
|
27334
|
+
* @returns Called when the state is available.
|
|
27385
27335
|
*/
|
|
27386
27336
|
export function getInfo(
|
|
27387
27337
|
|
|
@@ -27392,7 +27342,6 @@ declare namespace chrome {
|
|
|
27392
27342
|
* Retrieves the state of the given socket.
|
|
27393
27343
|
*
|
|
27394
27344
|
* @param socketId The socketId.
|
|
27395
|
-
* @param callback Called when the state is available.
|
|
27396
27345
|
*/
|
|
27397
27346
|
export function getInfo(
|
|
27398
27347
|
|
|
@@ -27407,13 +27356,12 @@ declare namespace chrome {
|
|
|
27407
27356
|
* Retrieves information about local adapters on this system.
|
|
27408
27357
|
*
|
|
27409
27358
|
* @chrome-returns-extra since Chrome 121
|
|
27359
|
+
* @returns Called when local adapter information is available.
|
|
27410
27360
|
*/
|
|
27411
27361
|
export function getNetworkList(): Promise<NetworkInterface[]>;
|
|
27412
27362
|
|
|
27413
27363
|
/**
|
|
27414
27364
|
* Retrieves information about local adapters on this system.
|
|
27415
|
-
*
|
|
27416
|
-
* @param callback Called when local adapter information is available.
|
|
27417
27365
|
*/
|
|
27418
27366
|
export function getNetworkList(
|
|
27419
27367
|
|
|
@@ -27724,6 +27672,7 @@ declare namespace chrome {
|
|
|
27724
27672
|
*
|
|
27725
27673
|
* @chrome-returns-extra since Chrome 121
|
|
27726
27674
|
* @param properties The socket properties (optional).
|
|
27675
|
+
* @returns Called when the socket has been created.
|
|
27727
27676
|
*/
|
|
27728
27677
|
export function create(
|
|
27729
27678
|
|
|
@@ -27734,7 +27683,6 @@ declare namespace chrome {
|
|
|
27734
27683
|
* Creates a TCP socket.
|
|
27735
27684
|
*
|
|
27736
27685
|
* @param properties The socket properties (optional).
|
|
27737
|
-
* @param callback Called when the socket has been created.
|
|
27738
27686
|
*/
|
|
27739
27687
|
export function create(
|
|
27740
27688
|
|
|
@@ -27754,6 +27702,7 @@ declare namespace chrome {
|
|
|
27754
27702
|
* @chrome-returns-extra since Chrome 121
|
|
27755
27703
|
* @param socketId The socket identifier.
|
|
27756
27704
|
* @param properties The properties to update.
|
|
27705
|
+
* @returns Called when the properties are updated.
|
|
27757
27706
|
*/
|
|
27758
27707
|
export function update(
|
|
27759
27708
|
|
|
@@ -27767,7 +27716,6 @@ declare namespace chrome {
|
|
|
27767
27716
|
*
|
|
27768
27717
|
* @param socketId The socket identifier.
|
|
27769
27718
|
* @param properties The properties to update.
|
|
27770
|
-
* @param callback Called when the properties are updated.
|
|
27771
27719
|
*/
|
|
27772
27720
|
export function update(
|
|
27773
27721
|
|
|
@@ -27782,6 +27730,7 @@ declare namespace chrome {
|
|
|
27782
27730
|
* Enables or disables the application from receiving messages from its peer. The default value is "false". Pausing a socket is typically used by an application to throttle data sent by its peer. When a socket is paused, no `onReceive` event is raised. When a socket is connected and un-paused, `onReceive` events are raised again when messages are received.
|
|
27783
27731
|
*
|
|
27784
27732
|
* @chrome-returns-extra since Chrome 121
|
|
27733
|
+
* @returns Callback from the `setPaused` method.
|
|
27785
27734
|
*/
|
|
27786
27735
|
export function setPaused(
|
|
27787
27736
|
|
|
@@ -27792,8 +27741,6 @@ declare namespace chrome {
|
|
|
27792
27741
|
|
|
27793
27742
|
/**
|
|
27794
27743
|
* Enables or disables the application from receiving messages from its peer. The default value is "false". Pausing a socket is typically used by an application to throttle data sent by its peer. When a socket is paused, no `onReceive` event is raised. When a socket is connected and un-paused, `onReceive` events are raised again when messages are received.
|
|
27795
|
-
*
|
|
27796
|
-
* @param callback Callback from the `setPaused` method.
|
|
27797
27744
|
*/
|
|
27798
27745
|
export function setPaused(
|
|
27799
27746
|
|
|
@@ -27929,6 +27876,7 @@ declare namespace chrome {
|
|
|
27929
27876
|
*
|
|
27930
27877
|
* @chrome-returns-extra since Chrome 121
|
|
27931
27878
|
* @param socketId The socket identifier.
|
|
27879
|
+
* @returns Called when the disconnect attempt is complete.
|
|
27932
27880
|
*/
|
|
27933
27881
|
export function disconnect(
|
|
27934
27882
|
|
|
@@ -27939,7 +27887,6 @@ declare namespace chrome {
|
|
|
27939
27887
|
* Disconnects the socket.
|
|
27940
27888
|
*
|
|
27941
27889
|
* @param socketId The socket identifier.
|
|
27942
|
-
* @param callback Called when the disconnect attempt is complete.
|
|
27943
27890
|
*/
|
|
27944
27891
|
export function disconnect(
|
|
27945
27892
|
|
|
@@ -28007,6 +27954,7 @@ declare namespace chrome {
|
|
|
28007
27954
|
*
|
|
28008
27955
|
* @chrome-returns-extra since Chrome 121
|
|
28009
27956
|
* @param socketId The socket identifier.
|
|
27957
|
+
* @returns Called when the `close` operation completes.
|
|
28010
27958
|
*/
|
|
28011
27959
|
export function close(
|
|
28012
27960
|
|
|
@@ -28017,7 +27965,6 @@ declare namespace chrome {
|
|
|
28017
27965
|
* Closes the socket and releases the address/port the socket is bound to. Each socket created should be closed after use. The socket id is no no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
|
|
28018
27966
|
*
|
|
28019
27967
|
* @param socketId The socket identifier.
|
|
28020
|
-
* @param callback Called when the `close` operation completes.
|
|
28021
27968
|
*/
|
|
28022
27969
|
export function close(
|
|
28023
27970
|
|
|
@@ -28031,6 +27978,7 @@ declare namespace chrome {
|
|
|
28031
27978
|
*
|
|
28032
27979
|
* @chrome-returns-extra since Chrome 121
|
|
28033
27980
|
* @param socketId The socket identifier.
|
|
27981
|
+
* @returns Called when the socket state is available.
|
|
28034
27982
|
*/
|
|
28035
27983
|
export function getInfo(
|
|
28036
27984
|
|
|
@@ -28041,7 +27989,6 @@ declare namespace chrome {
|
|
|
28041
27989
|
* Retrieves the state of the given socket.
|
|
28042
27990
|
*
|
|
28043
27991
|
* @param socketId The socket identifier.
|
|
28044
|
-
* @param callback Called when the socket state is available.
|
|
28045
27992
|
*/
|
|
28046
27993
|
export function getInfo(
|
|
28047
27994
|
|
|
@@ -28059,13 +28006,12 @@ declare namespace chrome {
|
|
|
28059
28006
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
28060
28007
|
*
|
|
28061
28008
|
* @chrome-returns-extra since Chrome 121
|
|
28009
|
+
* @returns Called when the list of sockets is available.
|
|
28062
28010
|
*/
|
|
28063
28011
|
export function getSockets(): Promise<SocketInfo[]>;
|
|
28064
28012
|
|
|
28065
28013
|
/**
|
|
28066
28014
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
28067
|
-
*
|
|
28068
|
-
* @param callback Called when the list of sockets is available.
|
|
28069
28015
|
*/
|
|
28070
28016
|
export function getSockets(
|
|
28071
28017
|
|
|
@@ -28189,6 +28135,7 @@ declare namespace chrome {
|
|
|
28189
28135
|
*
|
|
28190
28136
|
* @chrome-returns-extra since Chrome 121
|
|
28191
28137
|
* @param properties The socket properties (optional).
|
|
28138
|
+
* @returns Called when the socket has been created.
|
|
28192
28139
|
*/
|
|
28193
28140
|
export function create(
|
|
28194
28141
|
|
|
@@ -28199,7 +28146,6 @@ declare namespace chrome {
|
|
|
28199
28146
|
* Creates a TCP server socket.
|
|
28200
28147
|
*
|
|
28201
28148
|
* @param properties The socket properties (optional).
|
|
28202
|
-
* @param callback Called when the socket has been created.
|
|
28203
28149
|
*/
|
|
28204
28150
|
export function create(
|
|
28205
28151
|
|
|
@@ -28219,6 +28165,7 @@ declare namespace chrome {
|
|
|
28219
28165
|
* @chrome-returns-extra since Chrome 121
|
|
28220
28166
|
* @param socketId The socket identifier.
|
|
28221
28167
|
* @param properties The properties to update.
|
|
28168
|
+
* @returns Called when the properties are updated.
|
|
28222
28169
|
*/
|
|
28223
28170
|
export function update(
|
|
28224
28171
|
|
|
@@ -28232,7 +28179,6 @@ declare namespace chrome {
|
|
|
28232
28179
|
*
|
|
28233
28180
|
* @param socketId The socket identifier.
|
|
28234
28181
|
* @param properties The properties to update.
|
|
28235
|
-
* @param callback Called when the properties are updated.
|
|
28236
28182
|
*/
|
|
28237
28183
|
export function update(
|
|
28238
28184
|
|
|
@@ -28247,6 +28193,7 @@ declare namespace chrome {
|
|
|
28247
28193
|
* Enables or disables a listening socket from accepting new connections. When paused, a listening socket accepts new connections until its backlog (see `listen` function) is full then refuses additional connection requests. `onAccept` events are raised only when the socket is un-paused.
|
|
28248
28194
|
*
|
|
28249
28195
|
* @chrome-returns-extra since Chrome 121
|
|
28196
|
+
* @returns Callback from the `setPaused` method.
|
|
28250
28197
|
*/
|
|
28251
28198
|
export function setPaused(
|
|
28252
28199
|
|
|
@@ -28257,8 +28204,6 @@ declare namespace chrome {
|
|
|
28257
28204
|
|
|
28258
28205
|
/**
|
|
28259
28206
|
* Enables or disables a listening socket from accepting new connections. When paused, a listening socket accepts new connections until its backlog (see `listen` function) is full then refuses additional connection requests. `onAccept` events are raised only when the socket is un-paused.
|
|
28260
|
-
*
|
|
28261
|
-
* @param callback Callback from the `setPaused` method.
|
|
28262
28207
|
*/
|
|
28263
28208
|
export function setPaused(
|
|
28264
28209
|
|
|
@@ -28325,6 +28270,7 @@ declare namespace chrome {
|
|
|
28325
28270
|
*
|
|
28326
28271
|
* @chrome-returns-extra since Chrome 121
|
|
28327
28272
|
* @param socketId The socket identifier.
|
|
28273
|
+
* @returns Called when the disconnect attempt is complete.
|
|
28328
28274
|
*/
|
|
28329
28275
|
export function disconnect(
|
|
28330
28276
|
|
|
@@ -28335,7 +28281,6 @@ declare namespace chrome {
|
|
|
28335
28281
|
* Disconnects the listening socket, i.e. stops accepting new connections and releases the address/port the socket is bound to. The socket identifier remains valid, e.g. it can be used with `listen` to accept connections on a new port and address.
|
|
28336
28282
|
*
|
|
28337
28283
|
* @param socketId The socket identifier.
|
|
28338
|
-
* @param callback Called when the disconnect attempt is complete.
|
|
28339
28284
|
*/
|
|
28340
28285
|
export function disconnect(
|
|
28341
28286
|
|
|
@@ -28349,6 +28294,7 @@ declare namespace chrome {
|
|
|
28349
28294
|
*
|
|
28350
28295
|
* @chrome-returns-extra since Chrome 121
|
|
28351
28296
|
* @param socketId The socket identifier.
|
|
28297
|
+
* @returns Called when the `close` operation completes.
|
|
28352
28298
|
*/
|
|
28353
28299
|
export function close(
|
|
28354
28300
|
|
|
@@ -28359,7 +28305,6 @@ declare namespace chrome {
|
|
|
28359
28305
|
* Disconnects and destroys the socket. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
|
|
28360
28306
|
*
|
|
28361
28307
|
* @param socketId The socket identifier.
|
|
28362
|
-
* @param callback Called when the `close` operation completes.
|
|
28363
28308
|
*/
|
|
28364
28309
|
export function close(
|
|
28365
28310
|
|
|
@@ -28373,6 +28318,7 @@ declare namespace chrome {
|
|
|
28373
28318
|
*
|
|
28374
28319
|
* @chrome-returns-extra since Chrome 121
|
|
28375
28320
|
* @param socketId The socket identifier.
|
|
28321
|
+
* @returns Called when the socket state is available.
|
|
28376
28322
|
*/
|
|
28377
28323
|
export function getInfo(
|
|
28378
28324
|
|
|
@@ -28383,7 +28329,6 @@ declare namespace chrome {
|
|
|
28383
28329
|
* Retrieves the state of the given socket.
|
|
28384
28330
|
*
|
|
28385
28331
|
* @param socketId The socket identifier.
|
|
28386
|
-
* @param callback Called when the socket state is available.
|
|
28387
28332
|
*/
|
|
28388
28333
|
export function getInfo(
|
|
28389
28334
|
|
|
@@ -28401,13 +28346,12 @@ declare namespace chrome {
|
|
|
28401
28346
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
28402
28347
|
*
|
|
28403
28348
|
* @chrome-returns-extra since Chrome 121
|
|
28349
|
+
* @returns Called when the list of sockets is available.
|
|
28404
28350
|
*/
|
|
28405
28351
|
export function getSockets(): Promise<SocketInfo[]>;
|
|
28406
28352
|
|
|
28407
28353
|
/**
|
|
28408
28354
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
28409
|
-
*
|
|
28410
|
-
* @param callback Called when the list of sockets is available.
|
|
28411
28355
|
*/
|
|
28412
28356
|
export function getSockets(
|
|
28413
28357
|
|
|
@@ -28571,6 +28515,7 @@ declare namespace chrome {
|
|
|
28571
28515
|
*
|
|
28572
28516
|
* @chrome-returns-extra since Chrome 121
|
|
28573
28517
|
* @param properties The socket properties (optional).
|
|
28518
|
+
* @returns Called when the socket has been created.
|
|
28574
28519
|
*/
|
|
28575
28520
|
export function create(
|
|
28576
28521
|
|
|
@@ -28581,7 +28526,6 @@ declare namespace chrome {
|
|
|
28581
28526
|
* Creates a UDP socket with the given properties.
|
|
28582
28527
|
*
|
|
28583
28528
|
* @param properties The socket properties (optional).
|
|
28584
|
-
* @param callback Called when the socket has been created.
|
|
28585
28529
|
*/
|
|
28586
28530
|
export function create(
|
|
28587
28531
|
|
|
@@ -28601,6 +28545,7 @@ declare namespace chrome {
|
|
|
28601
28545
|
* @chrome-returns-extra since Chrome 121
|
|
28602
28546
|
* @param socketId The socket ID.
|
|
28603
28547
|
* @param properties The properties to update.
|
|
28548
|
+
* @returns Called when the properties are updated.
|
|
28604
28549
|
*/
|
|
28605
28550
|
export function update(
|
|
28606
28551
|
|
|
@@ -28614,7 +28559,6 @@ declare namespace chrome {
|
|
|
28614
28559
|
*
|
|
28615
28560
|
* @param socketId The socket ID.
|
|
28616
28561
|
* @param properties The properties to update.
|
|
28617
|
-
* @param callback Called when the properties are updated.
|
|
28618
28562
|
*/
|
|
28619
28563
|
export function update(
|
|
28620
28564
|
|
|
@@ -28630,6 +28574,7 @@ declare namespace chrome {
|
|
|
28630
28574
|
*
|
|
28631
28575
|
* @chrome-returns-extra since Chrome 121
|
|
28632
28576
|
* @param paused Flag to indicate whether to pause or unpause.
|
|
28577
|
+
* @returns Called when the socket has been successfully paused or unpaused.
|
|
28633
28578
|
*/
|
|
28634
28579
|
export function setPaused(
|
|
28635
28580
|
|
|
@@ -28642,7 +28587,6 @@ declare namespace chrome {
|
|
|
28642
28587
|
* Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
|
|
28643
28588
|
*
|
|
28644
28589
|
* @param paused Flag to indicate whether to pause or unpause.
|
|
28645
|
-
* @param callback Called when the socket has been successfully paused or unpaused.
|
|
28646
28590
|
*/
|
|
28647
28591
|
export function setPaused(
|
|
28648
28592
|
|
|
@@ -28744,6 +28688,7 @@ declare namespace chrome {
|
|
|
28744
28688
|
*
|
|
28745
28689
|
* @chrome-returns-extra since Chrome 121
|
|
28746
28690
|
* @param socketId The socket ID.
|
|
28691
|
+
* @returns Called when the `close` operation completes.
|
|
28747
28692
|
*/
|
|
28748
28693
|
export function close(
|
|
28749
28694
|
|
|
@@ -28754,7 +28699,6 @@ declare namespace chrome {
|
|
|
28754
28699
|
* Closes the socket and releases the address/port the socket is bound to. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
|
|
28755
28700
|
*
|
|
28756
28701
|
* @param socketId The socket ID.
|
|
28757
|
-
* @param callback Called when the `close` operation completes.
|
|
28758
28702
|
*/
|
|
28759
28703
|
export function close(
|
|
28760
28704
|
|
|
@@ -28768,6 +28712,7 @@ declare namespace chrome {
|
|
|
28768
28712
|
*
|
|
28769
28713
|
* @chrome-returns-extra since Chrome 121
|
|
28770
28714
|
* @param socketId The socket ID.
|
|
28715
|
+
* @returns Called when the socket state is available.
|
|
28771
28716
|
*/
|
|
28772
28717
|
export function getInfo(
|
|
28773
28718
|
|
|
@@ -28778,7 +28723,6 @@ declare namespace chrome {
|
|
|
28778
28723
|
* Retrieves the state of the given socket.
|
|
28779
28724
|
*
|
|
28780
28725
|
* @param socketId The socket ID.
|
|
28781
|
-
* @param callback Called when the socket state is available.
|
|
28782
28726
|
*/
|
|
28783
28727
|
export function getInfo(
|
|
28784
28728
|
|
|
@@ -28796,13 +28740,12 @@ declare namespace chrome {
|
|
|
28796
28740
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
28797
28741
|
*
|
|
28798
28742
|
* @chrome-returns-extra since Chrome 121
|
|
28743
|
+
* @returns Called when the list of sockets is available.
|
|
28799
28744
|
*/
|
|
28800
28745
|
export function getSockets(): Promise<SocketInfo[]>;
|
|
28801
28746
|
|
|
28802
28747
|
/**
|
|
28803
28748
|
* Retrieves the list of currently opened sockets owned by the application.
|
|
28804
|
-
*
|
|
28805
|
-
* @param callback Called when the list of sockets is available.
|
|
28806
28749
|
*/
|
|
28807
28750
|
export function getSockets(
|
|
28808
28751
|
|
|
@@ -28911,6 +28854,7 @@ declare namespace chrome {
|
|
|
28911
28854
|
*
|
|
28912
28855
|
* @chrome-returns-extra since Chrome 121
|
|
28913
28856
|
* @param socketId The socket ID.
|
|
28857
|
+
* @returns Called with an array of strings of the result.
|
|
28914
28858
|
*/
|
|
28915
28859
|
export function getJoinedGroups(
|
|
28916
28860
|
|
|
@@ -28921,7 +28865,6 @@ declare namespace chrome {
|
|
|
28921
28865
|
* Gets the multicast group addresses the socket is currently joined to.
|
|
28922
28866
|
*
|
|
28923
28867
|
* @param socketId The socket ID.
|
|
28924
|
-
* @param callback Called with an array of strings of the result.
|
|
28925
28868
|
*/
|
|
28926
28869
|
export function getJoinedGroups(
|
|
28927
28870
|
|
|
@@ -29003,6 +28946,7 @@ declare namespace chrome {
|
|
|
29003
28946
|
*
|
|
29004
28947
|
* @chrome-returns-extra since Chrome 95
|
|
29005
28948
|
* @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
|
|
28949
|
+
* @returns Promise that resolves with storage items, or rejects on failure.
|
|
29006
28950
|
*/
|
|
29007
28951
|
get(
|
|
29008
28952
|
|
|
@@ -29013,7 +28957,6 @@ declare namespace chrome {
|
|
|
29013
28957
|
* Gets one or more items from storage.
|
|
29014
28958
|
*
|
|
29015
28959
|
* @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
|
|
29016
|
-
* @param callback Callback with storage items, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29017
28960
|
*/
|
|
29018
28961
|
get(
|
|
29019
28962
|
|
|
@@ -29030,6 +28973,7 @@ declare namespace chrome {
|
|
|
29030
28973
|
/**
|
|
29031
28974
|
* Gets all keys from storage.
|
|
29032
28975
|
*
|
|
28976
|
+
* @returns Promise that resolves with storage keys, or rejects on failure.
|
|
29033
28977
|
* @since Chrome 130
|
|
29034
28978
|
*/
|
|
29035
28979
|
getKeys(): Promise<string[]>;
|
|
@@ -29037,7 +28981,6 @@ declare namespace chrome {
|
|
|
29037
28981
|
/**
|
|
29038
28982
|
* Gets all keys from storage.
|
|
29039
28983
|
*
|
|
29040
|
-
* @param callback Callback with storage keys, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29041
28984
|
* @since Chrome 130
|
|
29042
28985
|
*/
|
|
29043
28986
|
getKeys(
|
|
@@ -29055,6 +28998,7 @@ declare namespace chrome {
|
|
|
29055
28998
|
*
|
|
29056
28999
|
* @chrome-returns-extra since Chrome 95
|
|
29057
29000
|
* @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
|
|
29001
|
+
* @returns Promise that resolves with the amount of space being used by storage, or rejects on failure.
|
|
29058
29002
|
*/
|
|
29059
29003
|
getBytesInUse(
|
|
29060
29004
|
|
|
@@ -29065,7 +29009,6 @@ declare namespace chrome {
|
|
|
29065
29009
|
* Gets the amount of space (in bytes) being used by one or more items.
|
|
29066
29010
|
*
|
|
29067
29011
|
* @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
|
|
29068
|
-
* @param callback Callback with the amount of space being used by storage, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29069
29012
|
*/
|
|
29070
29013
|
getBytesInUse(
|
|
29071
29014
|
|
|
@@ -29088,6 +29031,7 @@ declare namespace chrome {
|
|
|
29088
29031
|
An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
|
|
29089
29032
|
|
|
29090
29033
|
Primitive values such as numbers will serialize as expected. Values with a `typeof` `"object"` and `"function"` will typically serialize to `{}`, with the exception of `Array` (serializes as expected), `Date`, and `Regex` (serialize using their `String` representation).
|
|
29034
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
29091
29035
|
*/
|
|
29092
29036
|
set(
|
|
29093
29037
|
|
|
@@ -29102,7 +29046,6 @@ declare namespace chrome {
|
|
|
29102
29046
|
An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
|
|
29103
29047
|
|
|
29104
29048
|
Primitive values such as numbers will serialize as expected. Values with a `typeof` `"object"` and `"function"` will typically serialize to `{}`, with the exception of `Array` (serializes as expected), `Date`, and `Regex` (serialize using their `String` representation).
|
|
29105
|
-
* @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29106
29049
|
*/
|
|
29107
29050
|
set(
|
|
29108
29051
|
|
|
@@ -29116,6 +29059,7 @@ declare namespace chrome {
|
|
|
29116
29059
|
*
|
|
29117
29060
|
* @chrome-returns-extra since Chrome 95
|
|
29118
29061
|
* @param keys A single key or a list of keys for items to remove.
|
|
29062
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
29119
29063
|
*/
|
|
29120
29064
|
remove(
|
|
29121
29065
|
|
|
@@ -29126,7 +29070,6 @@ declare namespace chrome {
|
|
|
29126
29070
|
* Removes one or more items from storage.
|
|
29127
29071
|
*
|
|
29128
29072
|
* @param keys A single key or a list of keys for items to remove.
|
|
29129
|
-
* @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29130
29073
|
*/
|
|
29131
29074
|
remove(
|
|
29132
29075
|
|
|
@@ -29139,13 +29082,12 @@ declare namespace chrome {
|
|
|
29139
29082
|
* Removes all items from storage.
|
|
29140
29083
|
*
|
|
29141
29084
|
* @chrome-returns-extra since Chrome 95
|
|
29085
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
29142
29086
|
*/
|
|
29143
29087
|
clear(): Promise<void>;
|
|
29144
29088
|
|
|
29145
29089
|
/**
|
|
29146
29090
|
* Removes all items from storage.
|
|
29147
|
-
*
|
|
29148
|
-
* @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29149
29091
|
*/
|
|
29150
29092
|
clear(
|
|
29151
29093
|
|
|
@@ -29155,6 +29097,7 @@ declare namespace chrome {
|
|
|
29155
29097
|
/**
|
|
29156
29098
|
* Sets the desired access level for the storage area. By default, `session` storage is restricted to trusted contexts (extension pages and service workers), while `managed`, `local`, and `sync` storage allow access from both trusted and untrusted contexts.
|
|
29157
29099
|
*
|
|
29100
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
29158
29101
|
* @since Chrome 102
|
|
29159
29102
|
*/
|
|
29160
29103
|
setAccessLevel(
|
|
@@ -29171,7 +29114,6 @@ declare namespace chrome {
|
|
|
29171
29114
|
/**
|
|
29172
29115
|
* Sets the desired access level for the storage area. By default, `session` storage is restricted to trusted contexts (extension pages and service workers), while `managed`, `local`, and `sync` storage allow access from both trusted and untrusted contexts.
|
|
29173
29116
|
*
|
|
29174
|
-
* @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
|
|
29175
29117
|
* @since Chrome 102
|
|
29176
29118
|
*/
|
|
29177
29119
|
setAccessLevel(
|
|
@@ -29374,6 +29316,7 @@ declare namespace chrome {
|
|
|
29374
29316
|
* Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback.
|
|
29375
29317
|
*
|
|
29376
29318
|
* @chrome-returns-extra since Chrome 117
|
|
29319
|
+
* @returns A callback type for requestFileSystem.
|
|
29377
29320
|
*/
|
|
29378
29321
|
export function requestFileSystem(): Promise<DOMFileSystem>;
|
|
29379
29322
|
|
|
@@ -29383,8 +29326,6 @@ declare namespace chrome {
|
|
|
29383
29326
|
* Calling this multiple times from the same app will return the same handle to the same file system.
|
|
29384
29327
|
*
|
|
29385
29328
|
* Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback.
|
|
29386
|
-
*
|
|
29387
|
-
* @param callback A callback type for requestFileSystem.
|
|
29388
29329
|
*/
|
|
29389
29330
|
export function requestFileSystem(
|
|
29390
29331
|
|
|
@@ -29397,6 +29338,7 @@ declare namespace chrome {
|
|
|
29397
29338
|
* Sets the default conflict resolution policy for the `'syncable'` file storage for the app. By default it is set to `'last_write_win'`. When conflict resolution policy is set to `'last_write_win'` conflicts for existing files are automatically resolved next time the file is updated. `callback` can be optionally given to know if the request has succeeded or not.
|
|
29398
29339
|
*
|
|
29399
29340
|
* @chrome-returns-extra since Chrome 117
|
|
29341
|
+
* @returns A generic result callback to indicate success or failure.
|
|
29400
29342
|
*/
|
|
29401
29343
|
export function setConflictResolutionPolicy(
|
|
29402
29344
|
|
|
@@ -29405,8 +29347,6 @@ declare namespace chrome {
|
|
|
29405
29347
|
|
|
29406
29348
|
/**
|
|
29407
29349
|
* Sets the default conflict resolution policy for the `'syncable'` file storage for the app. By default it is set to `'last_write_win'`. When conflict resolution policy is set to `'last_write_win'` conflicts for existing files are automatically resolved next time the file is updated. `callback` can be optionally given to know if the request has succeeded or not.
|
|
29408
|
-
*
|
|
29409
|
-
* @param callback A generic result callback to indicate success or failure.
|
|
29410
29350
|
*/
|
|
29411
29351
|
export function setConflictResolutionPolicy(
|
|
29412
29352
|
|
|
@@ -29419,13 +29359,12 @@ declare namespace chrome {
|
|
|
29419
29359
|
* Gets the current conflict resolution policy.
|
|
29420
29360
|
*
|
|
29421
29361
|
* @chrome-returns-extra since Chrome 117
|
|
29362
|
+
* @returns A callback type for getConflictResolutionPolicy.
|
|
29422
29363
|
*/
|
|
29423
29364
|
export function getConflictResolutionPolicy(): Promise<ConflictResolutionPolicy>;
|
|
29424
29365
|
|
|
29425
29366
|
/**
|
|
29426
29367
|
* Gets the current conflict resolution policy.
|
|
29427
|
-
*
|
|
29428
|
-
* @param callback A callback type for getConflictResolutionPolicy.
|
|
29429
29368
|
*/
|
|
29430
29369
|
export function getConflictResolutionPolicy(
|
|
29431
29370
|
|
|
@@ -29438,6 +29377,7 @@ declare namespace chrome {
|
|
|
29438
29377
|
* Returns the current usage and quota in bytes for the `'syncable'` file storage for the app.
|
|
29439
29378
|
*
|
|
29440
29379
|
* @chrome-returns-extra since Chrome 117
|
|
29380
|
+
* @returns A callback type for getUsageAndQuota.
|
|
29441
29381
|
*/
|
|
29442
29382
|
export function getUsageAndQuota(
|
|
29443
29383
|
|
|
@@ -29446,8 +29386,6 @@ declare namespace chrome {
|
|
|
29446
29386
|
|
|
29447
29387
|
/**
|
|
29448
29388
|
* Returns the current usage and quota in bytes for the `'syncable'` file storage for the app.
|
|
29449
|
-
*
|
|
29450
|
-
* @param callback A callback type for getUsageAndQuota.
|
|
29451
29389
|
*/
|
|
29452
29390
|
export function getUsageAndQuota(
|
|
29453
29391
|
|
|
@@ -29462,6 +29400,7 @@ declare namespace chrome {
|
|
|
29462
29400
|
* Returns the {@link FileStatus} for the given `fileEntry`. The status value can be `'synced'`, `'pending'` or `'conflicting'`. Note that `'conflicting'` state only happens when the service's conflict resolution policy is set to `'manual'`.
|
|
29463
29401
|
*
|
|
29464
29402
|
* @chrome-returns-extra since Chrome 117
|
|
29403
|
+
* @returns A callback type for getFileStatus.
|
|
29465
29404
|
*/
|
|
29466
29405
|
export function getFileStatus(
|
|
29467
29406
|
|
|
@@ -29470,8 +29409,6 @@ declare namespace chrome {
|
|
|
29470
29409
|
|
|
29471
29410
|
/**
|
|
29472
29411
|
* Returns the {@link FileStatus} for the given `fileEntry`. The status value can be `'synced'`, `'pending'` or `'conflicting'`. Note that `'conflicting'` state only happens when the service's conflict resolution policy is set to `'manual'`.
|
|
29473
|
-
*
|
|
29474
|
-
* @param callback A callback type for getFileStatus.
|
|
29475
29412
|
*/
|
|
29476
29413
|
export function getFileStatus(
|
|
29477
29414
|
|
|
@@ -29486,6 +29423,7 @@ declare namespace chrome {
|
|
|
29486
29423
|
* Returns each {@link FileStatus} for the given `fileEntry` array. Typically called with the result from dirReader.readEntries().
|
|
29487
29424
|
*
|
|
29488
29425
|
* @chrome-returns-extra since Chrome 117
|
|
29426
|
+
* @returns A callback type for getFileStatuses.
|
|
29489
29427
|
*/
|
|
29490
29428
|
export function getFileStatuses(
|
|
29491
29429
|
|
|
@@ -29494,8 +29432,6 @@ declare namespace chrome {
|
|
|
29494
29432
|
|
|
29495
29433
|
/**
|
|
29496
29434
|
* Returns each {@link FileStatus} for the given `fileEntry` array. Typically called with the result from dirReader.readEntries().
|
|
29497
|
-
*
|
|
29498
|
-
* @param callback A callback type for getFileStatuses.
|
|
29499
29435
|
*/
|
|
29500
29436
|
export function getFileStatuses(
|
|
29501
29437
|
|
|
@@ -29510,13 +29446,12 @@ declare namespace chrome {
|
|
|
29510
29446
|
* Returns the current sync backend status.
|
|
29511
29447
|
*
|
|
29512
29448
|
* @chrome-returns-extra since Chrome 117
|
|
29449
|
+
* @returns A callback type for getServiceStatus.
|
|
29513
29450
|
*/
|
|
29514
29451
|
export function getServiceStatus(): Promise<ServiceStatus>;
|
|
29515
29452
|
|
|
29516
29453
|
/**
|
|
29517
29454
|
* Returns the current sync backend status.
|
|
29518
|
-
*
|
|
29519
|
-
* @param callback A callback type for getServiceStatus.
|
|
29520
29455
|
*/
|
|
29521
29456
|
export function getServiceStatus(
|
|
29522
29457
|
|
|
@@ -30081,6 +30016,7 @@ declare namespace chrome {
|
|
|
30081
30016
|
*
|
|
30082
30017
|
* @chrome-returns-extra since Chrome 91
|
|
30083
30018
|
* @param flags Options affecting how the information is returned.
|
|
30019
|
+
* @returns Promise that resolves with the results.
|
|
30084
30020
|
*/
|
|
30085
30021
|
export function getInfo(
|
|
30086
30022
|
|
|
@@ -30094,7 +30030,6 @@ declare namespace chrome {
|
|
|
30094
30030
|
* Requests the information for all attached display devices.
|
|
30095
30031
|
*
|
|
30096
30032
|
* @param flags Options affecting how the information is returned.
|
|
30097
|
-
* @param callback Promise that resolves with the results.
|
|
30098
30033
|
*/
|
|
30099
30034
|
export function getInfo(
|
|
30100
30035
|
|
|
@@ -30112,6 +30047,7 @@ declare namespace chrome {
|
|
|
30112
30047
|
* Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
|
|
30113
30048
|
*
|
|
30114
30049
|
* @chrome-returns-extra since Chrome 91
|
|
30050
|
+
* @returns Promise that resolves with the results.
|
|
30115
30051
|
* @since Chrome 53
|
|
30116
30052
|
*/
|
|
30117
30053
|
export function getDisplayLayout(): Promise<DisplayLayout[]>;
|
|
@@ -30119,7 +30055,6 @@ declare namespace chrome {
|
|
|
30119
30055
|
/**
|
|
30120
30056
|
* Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
|
|
30121
30057
|
*
|
|
30122
|
-
* @param callback Promise that resolves with the results.
|
|
30123
30058
|
* @since Chrome 53
|
|
30124
30059
|
*/
|
|
30125
30060
|
export function getDisplayLayout(
|
|
@@ -30135,6 +30070,7 @@ declare namespace chrome {
|
|
|
30135
30070
|
* @chrome-returns-extra since Chrome 91
|
|
30136
30071
|
* @param id The display's unique identifier.
|
|
30137
30072
|
* @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`.
|
|
30073
|
+
* @returns Promise that resolves when the function finishes.
|
|
30138
30074
|
*/
|
|
30139
30075
|
export function setDisplayProperties(
|
|
30140
30076
|
|
|
@@ -30148,7 +30084,6 @@ declare namespace chrome {
|
|
|
30148
30084
|
*
|
|
30149
30085
|
* @param id The display's unique identifier.
|
|
30150
30086
|
* @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`.
|
|
30151
|
-
* @param callback Promise that resolves when the function finishes.
|
|
30152
30087
|
*/
|
|
30153
30088
|
export function setDisplayProperties(
|
|
30154
30089
|
|
|
@@ -30164,6 +30099,7 @@ declare namespace chrome {
|
|
|
30164
30099
|
*
|
|
30165
30100
|
* @chrome-returns-extra since Chrome 91
|
|
30166
30101
|
* @param layouts The layout information, required for all displays except the primary display.
|
|
30102
|
+
* @returns Promise that resolves when the function finishes.
|
|
30167
30103
|
* @since Chrome 53
|
|
30168
30104
|
*/
|
|
30169
30105
|
export function setDisplayLayout(
|
|
@@ -30175,7 +30111,6 @@ declare namespace chrome {
|
|
|
30175
30111
|
* 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.
|
|
30176
30112
|
*
|
|
30177
30113
|
* @param layouts The layout information, required for all displays except the primary display.
|
|
30178
|
-
* @param callback Promise that resolves when the function finishes.
|
|
30179
30114
|
* @since Chrome 53
|
|
30180
30115
|
*/
|
|
30181
30116
|
export function setDisplayLayout(
|
|
@@ -30248,6 +30183,7 @@ declare namespace chrome {
|
|
|
30248
30183
|
*
|
|
30249
30184
|
* @chrome-returns-extra since Chrome 91
|
|
30250
30185
|
* @param id The display's unique identifier.
|
|
30186
|
+
* @returns 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.
|
|
30251
30187
|
* @since Chrome 57
|
|
30252
30188
|
*/
|
|
30253
30189
|
export function showNativeTouchCalibration(
|
|
@@ -30259,7 +30195,6 @@ declare namespace chrome {
|
|
|
30259
30195
|
* 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.
|
|
30260
30196
|
*
|
|
30261
30197
|
* @param id The display's unique identifier.
|
|
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.
|
|
30263
30198
|
* @since Chrome 57
|
|
30264
30199
|
*/
|
|
30265
30200
|
export function showNativeTouchCalibration(
|
|
@@ -30312,6 +30247,7 @@ declare namespace chrome {
|
|
|
30312
30247
|
*
|
|
30313
30248
|
* @chrome-returns-extra since Chrome 91
|
|
30314
30249
|
* @param info The information of the mirror mode that should be applied to the display mode.
|
|
30250
|
+
* @returns Promise that resolves when the function finishes.
|
|
30315
30251
|
* @since Chrome 65
|
|
30316
30252
|
*/
|
|
30317
30253
|
export function setMirrorMode(
|
|
@@ -30323,7 +30259,6 @@ declare namespace chrome {
|
|
|
30323
30259
|
* 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.
|
|
30324
30260
|
*
|
|
30325
30261
|
* @param info The information of the mirror mode that should be applied to the display mode.
|
|
30326
|
-
* @param callback Promise that resolves when the function finishes.
|
|
30327
30262
|
* @since Chrome 65
|
|
30328
30263
|
*/
|
|
30329
30264
|
export function setMirrorMode(
|
|
@@ -30402,13 +30337,12 @@ declare namespace chrome {
|
|
|
30402
30337
|
* Retrieves information about local adapters on this system.
|
|
30403
30338
|
*
|
|
30404
30339
|
* @chrome-returns-extra since Chrome 91
|
|
30340
|
+
* @returns Called when local adapter information is available.
|
|
30405
30341
|
*/
|
|
30406
30342
|
export function getNetworkInterfaces(): Promise<NetworkInterface[]>;
|
|
30407
30343
|
|
|
30408
30344
|
/**
|
|
30409
30345
|
* Retrieves information about local adapters on this system.
|
|
30410
|
-
*
|
|
30411
|
-
* @param callback Called when local adapter information is available.
|
|
30412
30346
|
*/
|
|
30413
30347
|
export function getNetworkInterfaces(
|
|
30414
30348
|
|
|
@@ -30582,6 +30516,7 @@ declare namespace chrome {
|
|
|
30582
30516
|
* Adds a new log record.
|
|
30583
30517
|
*
|
|
30584
30518
|
* @param options The logging options.
|
|
30519
|
+
* @returns Returns a Promise which resolves once the log has been added.
|
|
30585
30520
|
*/
|
|
30586
30521
|
export function add(
|
|
30587
30522
|
|
|
@@ -30592,7 +30527,6 @@ declare namespace chrome {
|
|
|
30592
30527
|
* Adds a new log record.
|
|
30593
30528
|
*
|
|
30594
30529
|
* @param options The logging options.
|
|
30595
|
-
* @param callback Returns a Promise which resolves once the log has been added.
|
|
30596
30530
|
*/
|
|
30597
30531
|
export function add(
|
|
30598
30532
|
|
|
@@ -30690,13 +30624,12 @@ declare namespace chrome {
|
|
|
30690
30624
|
* 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).
|
|
30691
30625
|
*
|
|
30692
30626
|
* @chrome-returns-extra since Chrome 116
|
|
30627
|
+
* @returns Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
|
|
30693
30628
|
*/
|
|
30694
30629
|
export function getCapturedTabs(): Promise<CaptureInfo[]>;
|
|
30695
30630
|
|
|
30696
30631
|
/**
|
|
30697
30632
|
* 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).
|
|
30698
|
-
*
|
|
30699
|
-
* @param callback Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
|
|
30700
30633
|
*/
|
|
30701
30634
|
export function getCapturedTabs(
|
|
30702
30635
|
|
|
@@ -30709,6 +30642,7 @@ declare namespace chrome {
|
|
|
30709
30642
|
* 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.
|
|
30710
30643
|
*
|
|
30711
30644
|
* @chrome-returns-extra since Chrome 116
|
|
30645
|
+
* @returns 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.
|
|
30712
30646
|
* @since Chrome 71
|
|
30713
30647
|
*/
|
|
30714
30648
|
export function getMediaStreamId(
|
|
@@ -30719,7 +30653,6 @@ declare namespace chrome {
|
|
|
30719
30653
|
/**
|
|
30720
30654
|
* 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.
|
|
30721
30655
|
*
|
|
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.
|
|
30723
30656
|
* @since Chrome 71
|
|
30724
30657
|
*/
|
|
30725
30658
|
export function getMediaStreamId(
|
|
@@ -32726,6 +32659,7 @@ declare namespace chrome {
|
|
|
32726
32659
|
* @chrome-returns-extra since Chrome 88
|
|
32727
32660
|
* @param tabId The ID of the tab in which to run the script; defaults to the active tab of the current window.
|
|
32728
32661
|
* @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32662
|
+
* @returns Resolves after all the JavaScript has been executed.
|
|
32729
32663
|
* @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
|
|
32730
32664
|
* @chrome-max-manifest MV2
|
|
32731
32665
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32742,6 +32676,7 @@ declare namespace chrome {
|
|
|
32742
32676
|
*
|
|
32743
32677
|
* @chrome-returns-extra since Chrome 88
|
|
32744
32678
|
* @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32679
|
+
* @returns Resolves after all the JavaScript has been executed.
|
|
32745
32680
|
* @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
|
|
32746
32681
|
* @chrome-max-manifest MV2
|
|
32747
32682
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32756,7 +32691,6 @@ declare namespace chrome {
|
|
|
32756
32691
|
*
|
|
32757
32692
|
* @param tabId The ID of the tab in which to run the script; defaults to the active tab of the current window.
|
|
32758
32693
|
* @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32759
|
-
* @param callback Resolves after all the JavaScript has been executed.
|
|
32760
32694
|
* @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
|
|
32761
32695
|
* @chrome-max-manifest MV2
|
|
32762
32696
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32779,7 +32713,6 @@ declare namespace chrome {
|
|
|
32779
32713
|
* Injects JavaScript code into a page. For details, see the [programmatic injection](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#programmatic) section of the content scripts doc.
|
|
32780
32714
|
*
|
|
32781
32715
|
* @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32782
|
-
* @param callback Resolves after all the JavaScript has been executed.
|
|
32783
32716
|
* @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
|
|
32784
32717
|
* @chrome-max-manifest MV2
|
|
32785
32718
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32802,6 +32735,7 @@ declare namespace chrome {
|
|
|
32802
32735
|
* @chrome-returns-extra since Chrome 88
|
|
32803
32736
|
* @param tabId The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
|
|
32804
32737
|
* @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32738
|
+
* @returns Resolves when all the CSS has been inserted.
|
|
32805
32739
|
* @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
|
|
32806
32740
|
* @chrome-max-manifest MV2
|
|
32807
32741
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32818,6 +32752,7 @@ declare namespace chrome {
|
|
|
32818
32752
|
*
|
|
32819
32753
|
* @chrome-returns-extra since Chrome 88
|
|
32820
32754
|
* @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32755
|
+
* @returns Resolves when all the CSS has been inserted.
|
|
32821
32756
|
* @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
|
|
32822
32757
|
* @chrome-max-manifest MV2
|
|
32823
32758
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32832,7 +32767,6 @@ declare namespace chrome {
|
|
|
32832
32767
|
*
|
|
32833
32768
|
* @param tabId The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
|
|
32834
32769
|
* @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32835
|
-
* @param callback Resolves when all the CSS has been inserted.
|
|
32836
32770
|
* @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
|
|
32837
32771
|
* @chrome-max-manifest MV2
|
|
32838
32772
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32850,7 +32784,6 @@ declare namespace chrome {
|
|
|
32850
32784
|
* Injects CSS into a page. Styles inserted with this method can be removed with {@link scripting.removeCSS}. For details, see the [programmatic injection](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#programmatic) section of the content scripts doc.
|
|
32851
32785
|
*
|
|
32852
32786
|
* @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32853
|
-
* @param callback Resolves when all the CSS has been inserted.
|
|
32854
32787
|
* @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
|
|
32855
32788
|
* @chrome-max-manifest MV2
|
|
32856
32789
|
* @chrome-deprecated-since Chrome 91
|
|
@@ -32868,6 +32801,7 @@ declare namespace chrome {
|
|
|
32868
32801
|
* @chrome-returns-extra since Chrome 88
|
|
32869
32802
|
* @param tabId The ID of the tab from which to remove the CSS; defaults to the active tab of the current window.
|
|
32870
32803
|
* @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32804
|
+
* @returns Resolves when all the CSS has been removed.
|
|
32871
32805
|
* @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
|
|
32872
32806
|
* @since Chrome 87
|
|
32873
32807
|
* @chrome-max-manifest MV2
|
|
@@ -32885,6 +32819,7 @@ declare namespace chrome {
|
|
|
32885
32819
|
*
|
|
32886
32820
|
* @chrome-returns-extra since Chrome 88
|
|
32887
32821
|
* @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32822
|
+
* @returns Resolves when all the CSS has been removed.
|
|
32888
32823
|
* @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
|
|
32889
32824
|
* @since Chrome 87
|
|
32890
32825
|
* @chrome-max-manifest MV2
|
|
@@ -32900,7 +32835,6 @@ declare namespace chrome {
|
|
|
32900
32835
|
*
|
|
32901
32836
|
* @param tabId The ID of the tab from which to remove the CSS; defaults to the active tab of the current window.
|
|
32902
32837
|
* @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32903
|
-
* @param callback Resolves when all the CSS has been removed.
|
|
32904
32838
|
* @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
|
|
32905
32839
|
* @since Chrome 87
|
|
32906
32840
|
* @chrome-max-manifest MV2
|
|
@@ -32919,7 +32853,6 @@ declare namespace chrome {
|
|
|
32919
32853
|
* Removes from a page CSS that was previously injected by a call to {@link scripting.insertCSS}.
|
|
32920
32854
|
*
|
|
32921
32855
|
* @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
32922
|
-
* @param callback Resolves when all the CSS has been removed.
|
|
32923
32856
|
* @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
|
|
32924
32857
|
* @since Chrome 87
|
|
32925
32858
|
* @chrome-max-manifest MV2
|
|
@@ -32938,6 +32871,7 @@ declare namespace chrome {
|
|
|
32938
32871
|
* @chrome-returns-extra since Chrome 88
|
|
32939
32872
|
* @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
|
|
32940
32873
|
* @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
|
|
32874
|
+
* @returns Resolves after the zoom factor has been changed.
|
|
32941
32875
|
*/
|
|
32942
32876
|
export function setZoom(
|
|
32943
32877
|
|
|
@@ -32951,6 +32885,7 @@ declare namespace chrome {
|
|
|
32951
32885
|
*
|
|
32952
32886
|
* @chrome-returns-extra since Chrome 88
|
|
32953
32887
|
* @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
|
|
32888
|
+
* @returns Resolves after the zoom factor has been changed.
|
|
32954
32889
|
*/
|
|
32955
32890
|
export function setZoom(
|
|
32956
32891
|
|
|
@@ -32962,7 +32897,6 @@ declare namespace chrome {
|
|
|
32962
32897
|
*
|
|
32963
32898
|
* @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
|
|
32964
32899
|
* @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
|
|
32965
|
-
* @param callback Resolves after the zoom factor has been changed.
|
|
32966
32900
|
*/
|
|
32967
32901
|
export function setZoom(
|
|
32968
32902
|
|
|
@@ -32977,7 +32911,6 @@ declare namespace chrome {
|
|
|
32977
32911
|
* Zooms a specified tab.
|
|
32978
32912
|
*
|
|
32979
32913
|
* @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
|
|
32980
|
-
* @param callback Resolves after the zoom factor has been changed.
|
|
32981
32914
|
*/
|
|
32982
32915
|
export function setZoom(
|
|
32983
32916
|
|
|
@@ -32991,6 +32924,7 @@ declare namespace chrome {
|
|
|
32991
32924
|
*
|
|
32992
32925
|
* @chrome-returns-extra since Chrome 88
|
|
32993
32926
|
* @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
|
|
32927
|
+
* @returns Resolves with the tab's current zoom factor after it has been fetched.
|
|
32994
32928
|
*/
|
|
32995
32929
|
export function getZoom(
|
|
32996
32930
|
|
|
@@ -33001,7 +32935,6 @@ declare namespace chrome {
|
|
|
33001
32935
|
* Gets the current zoom factor of a specified tab.
|
|
33002
32936
|
*
|
|
33003
32937
|
* @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
|
|
33004
|
-
* @param callback Resolves with the tab's current zoom factor after it has been fetched.
|
|
33005
32938
|
*/
|
|
33006
32939
|
export function getZoom(
|
|
33007
32940
|
|
|
@@ -33021,6 +32954,7 @@ declare namespace chrome {
|
|
|
33021
32954
|
* @chrome-returns-extra since Chrome 88
|
|
33022
32955
|
* @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
|
|
33023
32956
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
|
32957
|
+
* @returns Resolves after the zoom settings are changed.
|
|
33024
32958
|
*/
|
|
33025
32959
|
export function setZoomSettings(
|
|
33026
32960
|
|
|
@@ -33034,6 +32968,7 @@ declare namespace chrome {
|
|
|
33034
32968
|
*
|
|
33035
32969
|
* @chrome-returns-extra since Chrome 88
|
|
33036
32970
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
|
32971
|
+
* @returns Resolves after the zoom settings are changed.
|
|
33037
32972
|
*/
|
|
33038
32973
|
export function setZoomSettings(
|
|
33039
32974
|
|
|
@@ -33045,7 +32980,6 @@ declare namespace chrome {
|
|
|
33045
32980
|
*
|
|
33046
32981
|
* @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
|
|
33047
32982
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
|
33048
|
-
* @param callback Resolves after the zoom settings are changed.
|
|
33049
32983
|
*/
|
|
33050
32984
|
export function setZoomSettings(
|
|
33051
32985
|
|
|
@@ -33060,7 +32994,6 @@ declare namespace chrome {
|
|
|
33060
32994
|
* Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
|
|
33061
32995
|
*
|
|
33062
32996
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
|
33063
|
-
* @param callback Resolves after the zoom settings are changed.
|
|
33064
32997
|
*/
|
|
33065
32998
|
export function setZoomSettings(
|
|
33066
32999
|
|
|
@@ -33074,6 +33007,7 @@ declare namespace chrome {
|
|
|
33074
33007
|
*
|
|
33075
33008
|
* @chrome-returns-extra since Chrome 88
|
|
33076
33009
|
* @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
|
|
33010
|
+
* @returns Resolves with the tab's current zoom settings.
|
|
33077
33011
|
*/
|
|
33078
33012
|
export function getZoomSettings(
|
|
33079
33013
|
|
|
@@ -33084,7 +33018,6 @@ declare namespace chrome {
|
|
|
33084
33018
|
* Gets the current zoom settings of a specified tab.
|
|
33085
33019
|
*
|
|
33086
33020
|
* @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
|
|
33087
|
-
* @param callback Resolves with the tab's current zoom settings.
|
|
33088
33021
|
*/
|
|
33089
33022
|
export function getZoomSettings(
|
|
33090
33023
|
|
|
@@ -33103,6 +33036,7 @@ declare namespace chrome {
|
|
|
33103
33036
|
*
|
|
33104
33037
|
* @chrome-returns-extra since Chrome 88
|
|
33105
33038
|
* @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist.
|
|
33039
|
+
* @returns Resolves after the operation is completed.
|
|
33106
33040
|
* @since Chrome 54
|
|
33107
33041
|
*/
|
|
33108
33042
|
export function discard(
|
|
@@ -33114,7 +33048,6 @@ declare namespace chrome {
|
|
|
33114
33048
|
* Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
|
|
33115
33049
|
*
|
|
33116
33050
|
* @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist.
|
|
33117
|
-
* @param callback Resolves after the operation is completed.
|
|
33118
33051
|
* @since Chrome 54
|
|
33119
33052
|
*/
|
|
33120
33053
|
export function discard(
|
|
@@ -33390,6 +33323,7 @@ declare namespace chrome {
|
|
|
33390
33323
|
* @chrome-returns-extra since Chrome 101
|
|
33391
33324
|
* @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
|
|
33392
33325
|
* @param options The speech options.
|
|
33326
|
+
* @returns Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
|
|
33393
33327
|
*/
|
|
33394
33328
|
export function speak(
|
|
33395
33329
|
|
|
@@ -33403,7 +33337,6 @@ declare namespace chrome {
|
|
|
33403
33337
|
*
|
|
33404
33338
|
* @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
|
|
33405
33339
|
* @param options The speech options.
|
|
33406
|
-
* @param callback Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
|
|
33407
33340
|
*/
|
|
33408
33341
|
export function speak(
|
|
33409
33342
|
|
|
@@ -33878,6 +33811,7 @@ declare namespace chrome {
|
|
|
33878
33811
|
*
|
|
33879
33812
|
* @chrome-returns-extra since Chrome 96
|
|
33880
33813
|
* @param details Which setting to change.
|
|
33814
|
+
* @returns Called at the completion of the set operation.
|
|
33881
33815
|
*/
|
|
33882
33816
|
set(
|
|
33883
33817
|
|
|
@@ -33900,7 +33834,6 @@ declare namespace chrome {
|
|
|
33900
33834
|
* Sets the value of a setting.
|
|
33901
33835
|
*
|
|
33902
33836
|
* @param details Which setting to change.
|
|
33903
|
-
* @param callback Called at the completion of the set operation.
|
|
33904
33837
|
*/
|
|
33905
33838
|
set(
|
|
33906
33839
|
|
|
@@ -33926,6 +33859,7 @@ declare namespace chrome {
|
|
|
33926
33859
|
*
|
|
33927
33860
|
* @chrome-returns-extra since Chrome 96
|
|
33928
33861
|
* @param details Which setting to clear.
|
|
33862
|
+
* @returns Called at the completion of the clear operation.
|
|
33929
33863
|
*/
|
|
33930
33864
|
clear(
|
|
33931
33865
|
|
|
@@ -33942,7 +33876,6 @@ declare namespace chrome {
|
|
|
33942
33876
|
* Clears the setting, restoring any default value.
|
|
33943
33877
|
*
|
|
33944
33878
|
* @param details Which setting to clear.
|
|
33945
|
-
* @param callback Called at the completion of the clear operation.
|
|
33946
33879
|
*/
|
|
33947
33880
|
clear(
|
|
33948
33881
|
|
|
@@ -34416,6 +34349,7 @@ declare namespace chrome {
|
|
|
34416
34349
|
*
|
|
34417
34350
|
* @chrome-returns-extra since Chrome 116
|
|
34418
34351
|
* @param options Configuration of the device picker dialog box.
|
|
34352
|
+
* @returns Invoked with a list of chosen {@link Device}s.
|
|
34419
34353
|
*/
|
|
34420
34354
|
export function getUserSelectedDevices(
|
|
34421
34355
|
|
|
@@ -34426,7 +34360,6 @@ declare namespace chrome {
|
|
|
34426
34360
|
* Presents a device picker to the user and returns the {@link Device}s selected. If the user cancels the picker devices will be empty. A user gesture is required for the dialog to display. Without a user gesture, the callback will run as though the user cancelled.
|
|
34427
34361
|
*
|
|
34428
34362
|
* @param options Configuration of the device picker dialog box.
|
|
34429
|
-
* @param callback Invoked with a list of chosen {@link Device}s.
|
|
34430
34363
|
*/
|
|
34431
34364
|
export function getUserSelectedDevices(
|
|
34432
34365
|
|
|
@@ -35106,6 +35039,7 @@ declare namespace chrome {
|
|
|
35106
35039
|
* Registers one or more user scripts for this extension.
|
|
35107
35040
|
*
|
|
35108
35041
|
* @param scripts Contains a list of user scripts to be registered.
|
|
35042
|
+
* @returns Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
|
|
35109
35043
|
*/
|
|
35110
35044
|
export function register(
|
|
35111
35045
|
|
|
@@ -35116,7 +35050,6 @@ declare namespace chrome {
|
|
|
35116
35050
|
* Registers one or more user scripts for this extension.
|
|
35117
35051
|
*
|
|
35118
35052
|
* @param scripts Contains a list of user scripts to be registered.
|
|
35119
|
-
* @param callback Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
|
|
35120
35053
|
*/
|
|
35121
35054
|
export function register(
|
|
35122
35055
|
|
|
@@ -35129,6 +35062,7 @@ declare namespace chrome {
|
|
|
35129
35062
|
* Returns all dynamically-registered user scripts for this extension.
|
|
35130
35063
|
*
|
|
35131
35064
|
* @param filter If specified, this method returns only the user scripts that match it.
|
|
35065
|
+
* @returns Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
|
|
35132
35066
|
*/
|
|
35133
35067
|
export function getScripts(
|
|
35134
35068
|
|
|
@@ -35139,7 +35073,6 @@ declare namespace chrome {
|
|
|
35139
35073
|
* Returns all dynamically-registered user scripts for this extension.
|
|
35140
35074
|
*
|
|
35141
35075
|
* @param filter If specified, this method returns only the user scripts that match it.
|
|
35142
|
-
* @param callback Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
|
|
35143
35076
|
*/
|
|
35144
35077
|
export function getScripts(
|
|
35145
35078
|
|
|
@@ -35154,6 +35087,7 @@ declare namespace chrome {
|
|
|
35154
35087
|
* Unregisters all dynamically-registered user scripts for this extension.
|
|
35155
35088
|
*
|
|
35156
35089
|
* @param filter If specified, this method unregisters only the user scripts that match it.
|
|
35090
|
+
* @returns Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
|
|
35157
35091
|
*/
|
|
35158
35092
|
export function unregister(
|
|
35159
35093
|
|
|
@@ -35164,7 +35098,6 @@ declare namespace chrome {
|
|
|
35164
35098
|
* Unregisters all dynamically-registered user scripts for this extension.
|
|
35165
35099
|
*
|
|
35166
35100
|
* @param filter If specified, this method unregisters only the user scripts that match it.
|
|
35167
|
-
* @param callback Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
|
|
35168
35101
|
*/
|
|
35169
35102
|
export function unregister(
|
|
35170
35103
|
|
|
@@ -35177,6 +35110,7 @@ declare namespace chrome {
|
|
|
35177
35110
|
* Updates one or more user scripts for this extension.
|
|
35178
35111
|
*
|
|
35179
35112
|
* @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.
|
|
35113
|
+
* @returns Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
|
|
35180
35114
|
*/
|
|
35181
35115
|
export function update(
|
|
35182
35116
|
|
|
@@ -35187,7 +35121,6 @@ declare namespace chrome {
|
|
|
35187
35121
|
* Updates one or more user scripts for this extension.
|
|
35188
35122
|
*
|
|
35189
35123
|
* @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.
|
|
35190
|
-
* @param callback Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
|
|
35191
35124
|
*/
|
|
35192
35125
|
export function update(
|
|
35193
35126
|
|
|
@@ -35224,6 +35157,7 @@ declare namespace chrome {
|
|
|
35224
35157
|
* Configures the `` `USER_SCRIPT` `` execution environment.
|
|
35225
35158
|
*
|
|
35226
35159
|
* @param properties Contains the user script world configuration.
|
|
35160
|
+
* @returns Promise that resolves once the world has been configured.
|
|
35227
35161
|
*/
|
|
35228
35162
|
export function configureWorld(
|
|
35229
35163
|
|
|
@@ -35234,7 +35168,6 @@ declare namespace chrome {
|
|
|
35234
35168
|
* Configures the `` `USER_SCRIPT` `` execution environment.
|
|
35235
35169
|
*
|
|
35236
35170
|
* @param properties Contains the user script world configuration.
|
|
35237
|
-
* @param callback Promise that resolves once the world has been configured.
|
|
35238
35171
|
*/
|
|
35239
35172
|
export function configureWorld(
|
|
35240
35173
|
|
|
@@ -35246,6 +35179,7 @@ declare namespace chrome {
|
|
|
35246
35179
|
/**
|
|
35247
35180
|
* Retrieves all registered world configurations.
|
|
35248
35181
|
*
|
|
35182
|
+
* @returns Promise that resolves with the registered world configurations.
|
|
35249
35183
|
* @since Chrome 133
|
|
35250
35184
|
*/
|
|
35251
35185
|
export function getWorldConfigurations(): Promise<WorldProperties[]>;
|
|
@@ -35253,7 +35187,6 @@ declare namespace chrome {
|
|
|
35253
35187
|
/**
|
|
35254
35188
|
* Retrieves all registered world configurations.
|
|
35255
35189
|
*
|
|
35256
|
-
* @param callback Promise that resolves with the registered world configurations.
|
|
35257
35190
|
* @since Chrome 133
|
|
35258
35191
|
*/
|
|
35259
35192
|
export function getWorldConfigurations(
|
|
@@ -35267,6 +35200,7 @@ declare namespace chrome {
|
|
|
35267
35200
|
* 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.
|
|
35268
35201
|
*
|
|
35269
35202
|
* @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
|
|
35203
|
+
* @returns Promise that resolves when the configuration is reset.
|
|
35270
35204
|
* @since Chrome 133
|
|
35271
35205
|
*/
|
|
35272
35206
|
export function resetWorldConfiguration(
|
|
@@ -35278,7 +35212,6 @@ declare namespace chrome {
|
|
|
35278
35212
|
* 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.
|
|
35279
35213
|
*
|
|
35280
35214
|
* @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
|
|
35281
|
-
* @param callback Promise that resolves when the configuration is reset.
|
|
35282
35215
|
* @since Chrome 133
|
|
35283
35216
|
*/
|
|
35284
35217
|
export function resetWorldConfiguration(
|
|
@@ -35332,6 +35265,7 @@ declare namespace chrome {
|
|
|
35332
35265
|
*
|
|
35333
35266
|
* @chrome-returns-extra since Chrome 96
|
|
35334
35267
|
* @param restrictions the preferences to enabled/disabled virtual keyboard features.
|
|
35268
|
+
* @returns Invoked with the values which were updated.
|
|
35335
35269
|
*/
|
|
35336
35270
|
export function restrictFeatures(
|
|
35337
35271
|
|
|
@@ -35342,7 +35276,6 @@ declare namespace chrome {
|
|
|
35342
35276
|
* Sets restrictions on features provided by the virtual keyboard.
|
|
35343
35277
|
*
|
|
35344
35278
|
* @param restrictions the preferences to enabled/disabled virtual keyboard features.
|
|
35345
|
-
* @param callback Invoked with the values which were updated.
|
|
35346
35279
|
*/
|
|
35347
35280
|
export function restrictFeatures(
|
|
35348
35281
|
|
|
@@ -35490,6 +35423,7 @@ declare namespace chrome {
|
|
|
35490
35423
|
*
|
|
35491
35424
|
* @chrome-returns-extra since Chrome 96
|
|
35492
35425
|
* @param name The name of the VPN configuration.
|
|
35426
|
+
* @returns Returns a Promise which resolves when the configuration is created or rejects if there is an error.
|
|
35493
35427
|
*/
|
|
35494
35428
|
export function createConfig(
|
|
35495
35429
|
|
|
@@ -35500,7 +35434,6 @@ declare namespace chrome {
|
|
|
35500
35434
|
* Creates a new VPN configuration that persists across multiple login sessions of the user.
|
|
35501
35435
|
*
|
|
35502
35436
|
* @param name The name of the VPN configuration.
|
|
35503
|
-
* @param callback Returns a Promise which resolves when the configuration is created or rejects if there is an error.
|
|
35504
35437
|
*/
|
|
35505
35438
|
export function createConfig(
|
|
35506
35439
|
|
|
@@ -35519,6 +35452,7 @@ declare namespace chrome {
|
|
|
35519
35452
|
*
|
|
35520
35453
|
* @chrome-returns-extra since Chrome 96
|
|
35521
35454
|
* @param id ID of the VPN configuration to destroy.
|
|
35455
|
+
* @returns Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
|
|
35522
35456
|
*/
|
|
35523
35457
|
export function destroyConfig(
|
|
35524
35458
|
|
|
@@ -35529,7 +35463,6 @@ declare namespace chrome {
|
|
|
35529
35463
|
* Destroys a VPN configuration created by the extension.
|
|
35530
35464
|
*
|
|
35531
35465
|
* @param id ID of the VPN configuration to destroy.
|
|
35532
|
-
* @param callback Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
|
|
35533
35466
|
*/
|
|
35534
35467
|
export function destroyConfig(
|
|
35535
35468
|
|
|
@@ -35543,6 +35476,7 @@ declare namespace chrome {
|
|
|
35543
35476
|
*
|
|
35544
35477
|
* @chrome-returns-extra since Chrome 96
|
|
35545
35478
|
* @param parameters The parameters for the VPN session.
|
|
35479
|
+
* @returns Returns a Promise which resolves when the parameters are set or rejects if there is an error.
|
|
35546
35480
|
*/
|
|
35547
35481
|
export function setParameters(
|
|
35548
35482
|
|
|
@@ -35553,7 +35487,6 @@ declare namespace chrome {
|
|
|
35553
35487
|
* 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.
|
|
35554
35488
|
*
|
|
35555
35489
|
* @param parameters The parameters for the VPN session.
|
|
35556
|
-
* @param callback Returns a Promise which resolves when the parameters are set or rejects if there is an error.
|
|
35557
35490
|
*/
|
|
35558
35491
|
export function setParameters(
|
|
35559
35492
|
|
|
@@ -35567,6 +35500,7 @@ declare namespace chrome {
|
|
|
35567
35500
|
*
|
|
35568
35501
|
* @chrome-returns-extra since Chrome 96
|
|
35569
35502
|
* @param data The IP packet to be sent to the platform.
|
|
35503
|
+
* @returns Returns a Promise which resolves when the packet is sent or rejects if there is an error.
|
|
35570
35504
|
*/
|
|
35571
35505
|
export function sendPacket(
|
|
35572
35506
|
|
|
@@ -35577,7 +35511,6 @@ declare namespace chrome {
|
|
|
35577
35511
|
* 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.
|
|
35578
35512
|
*
|
|
35579
35513
|
* @param data The IP packet to be sent to the platform.
|
|
35580
|
-
* @param callback Returns a Promise which resolves when the packet is sent or rejects if there is an error.
|
|
35581
35514
|
*/
|
|
35582
35515
|
export function sendPacket(
|
|
35583
35516
|
|
|
@@ -35591,6 +35524,7 @@ declare namespace chrome {
|
|
|
35591
35524
|
*
|
|
35592
35525
|
* @chrome-returns-extra since Chrome 96
|
|
35593
35526
|
* @param state The VPN session state of the VPN client.
|
|
35527
|
+
* @returns Returns a Promise which resolves when the notification is complete or rejects if there is an error.
|
|
35594
35528
|
*/
|
|
35595
35529
|
export function notifyConnectionStateChanged(
|
|
35596
35530
|
|
|
@@ -35601,7 +35535,6 @@ declare namespace chrome {
|
|
|
35601
35535
|
* Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
|
|
35602
35536
|
*
|
|
35603
35537
|
* @param state The VPN session state of the VPN client.
|
|
35604
|
-
* @param callback Returns a Promise which resolves when the notification is complete or rejects if there is an error.
|
|
35605
35538
|
*/
|
|
35606
35539
|
export function notifyConnectionStateChanged(
|
|
35607
35540
|
|