chrome-types 0.1.41 → 0.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +920 -9
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -80,7 +80,7 @@ declare namespace browserAction {
80
80
 
81
81
  }
82
82
 
83
- // Generated on Wed Sep 22 2021 00:55:21 GMT+0000 (Coordinated Universal Time)
83
+ // Generated on Thu Sep 30 2021 22:23:30 GMT+0000 (Coordinated Universal Time)
84
84
 
85
85
 
86
86
  declare namespace chrome {
@@ -892,7 +892,7 @@ declare namespace chrome {
892
892
  /**
893
893
  * Types of markers on text. See `AutomationNode.markerTypes`.
894
894
  */
895
- export type MarkerType = "spelling" | "grammar" | "textMatch" | "activeSuggestion" | "suggestion";
895
+ export type MarkerType = "spelling" | "grammar" | "textMatch" | "activeSuggestion" | "suggestion" | "highlight";
896
896
 
897
897
  /**
898
898
  * A command associated with an {@link automation.AutomationIntent}.
@@ -2715,6 +2715,23 @@ declare namespace chrome {
2715
2715
  */
2716
2716
  export namespace browsingData {
2717
2717
 
2718
+ /**
2719
+ * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
2720
+ */
2721
+ export function settings(): Promise<{
2722
+ options: RemovalOptions,
2723
+
2724
+ /**
2725
+ * All of the types will be present in the result, with values of `true` if they are both selected to be removed and permitted to be removed, otherwise `false`.
2726
+ */
2727
+ dataToRemove: DataTypeSet,
2728
+
2729
+ /**
2730
+ * All of the types will be present in the result, with values of `true` if they are permitted to be removed (e.g., by enterprise policy) and `false` if not.
2731
+ */
2732
+ dataRemovalPermitted: DataTypeSet,
2733
+ }>;
2734
+
2718
2735
  /**
2719
2736
  * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
2720
2737
  *
@@ -2738,6 +2755,17 @@ declare namespace chrome {
2738
2755
  ) => void,
2739
2756
  ): void;
2740
2757
 
2758
+ /**
2759
+ * Clears various types of browsing data stored in a user's profile.
2760
+ *
2761
+ * @param options
2762
+ * @param dataToRemove The set of data types to remove.
2763
+ */
2764
+ export function remove(
2765
+ options: RemovalOptions,
2766
+ dataToRemove: DataTypeSet,
2767
+ ): Promise<void>;
2768
+
2741
2769
  /**
2742
2770
  * Clears various types of browsing data stored in a user's profile.
2743
2771
  *
@@ -2751,6 +2779,15 @@ declare namespace chrome {
2751
2779
  callback?: () => void,
2752
2780
  ): void;
2753
2781
 
2782
+ /**
2783
+ * Clears websites' appcache data.
2784
+ *
2785
+ * @param options
2786
+ */
2787
+ export function removeAppcache(
2788
+ options: RemovalOptions,
2789
+ ): Promise<void>;
2790
+
2754
2791
  /**
2755
2792
  * Clears websites' appcache data.
2756
2793
  *
@@ -2762,6 +2799,15 @@ declare namespace chrome {
2762
2799
  callback?: () => void,
2763
2800
  ): void;
2764
2801
 
2802
+ /**
2803
+ * Clears the browser's cache.
2804
+ *
2805
+ * @param options
2806
+ */
2807
+ export function removeCache(
2808
+ options: RemovalOptions,
2809
+ ): Promise<void>;
2810
+
2765
2811
  /**
2766
2812
  * Clears the browser's cache.
2767
2813
  *
@@ -2773,6 +2819,16 @@ declare namespace chrome {
2773
2819
  callback?: () => void,
2774
2820
  ): void;
2775
2821
 
2822
+ /**
2823
+ * Clears websites' cache storage data.
2824
+ *
2825
+ * @since Chrome 72
2826
+ * @param options
2827
+ */
2828
+ export function removeCacheStorage(
2829
+ options: RemovalOptions,
2830
+ ): Promise<void>;
2831
+
2776
2832
  /**
2777
2833
  * Clears websites' cache storage data.
2778
2834
  *
@@ -2785,6 +2841,15 @@ declare namespace chrome {
2785
2841
  callback?: () => void,
2786
2842
  ): void;
2787
2843
 
2844
+ /**
2845
+ * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
2846
+ *
2847
+ * @param options
2848
+ */
2849
+ export function removeCookies(
2850
+ options: RemovalOptions,
2851
+ ): Promise<void>;
2852
+
2788
2853
  /**
2789
2854
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
2790
2855
  *
@@ -2796,6 +2861,15 @@ declare namespace chrome {
2796
2861
  callback?: () => void,
2797
2862
  ): void;
2798
2863
 
2864
+ /**
2865
+ * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
2866
+ *
2867
+ * @param options
2868
+ */
2869
+ export function removeDownloads(
2870
+ options: RemovalOptions,
2871
+ ): Promise<void>;
2872
+
2799
2873
  /**
2800
2874
  * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
2801
2875
  *
@@ -2807,6 +2881,15 @@ declare namespace chrome {
2807
2881
  callback?: () => void,
2808
2882
  ): void;
2809
2883
 
2884
+ /**
2885
+ * Clears websites' file system data.
2886
+ *
2887
+ * @param options
2888
+ */
2889
+ export function removeFileSystems(
2890
+ options: RemovalOptions,
2891
+ ): Promise<void>;
2892
+
2810
2893
  /**
2811
2894
  * Clears websites' file system data.
2812
2895
  *
@@ -2818,6 +2901,15 @@ declare namespace chrome {
2818
2901
  callback?: () => void,
2819
2902
  ): void;
2820
2903
 
2904
+ /**
2905
+ * Clears the browser's stored form data (autofill).
2906
+ *
2907
+ * @param options
2908
+ */
2909
+ export function removeFormData(
2910
+ options: RemovalOptions,
2911
+ ): Promise<void>;
2912
+
2821
2913
  /**
2822
2914
  * Clears the browser's stored form data (autofill).
2823
2915
  *
@@ -2829,6 +2921,15 @@ declare namespace chrome {
2829
2921
  callback?: () => void,
2830
2922
  ): void;
2831
2923
 
2924
+ /**
2925
+ * Clears the browser's history.
2926
+ *
2927
+ * @param options
2928
+ */
2929
+ export function removeHistory(
2930
+ options: RemovalOptions,
2931
+ ): Promise<void>;
2932
+
2832
2933
  /**
2833
2934
  * Clears the browser's history.
2834
2935
  *
@@ -2840,6 +2941,15 @@ declare namespace chrome {
2840
2941
  callback?: () => void,
2841
2942
  ): void;
2842
2943
 
2944
+ /**
2945
+ * Clears websites' IndexedDB data.
2946
+ *
2947
+ * @param options
2948
+ */
2949
+ export function removeIndexedDB(
2950
+ options: RemovalOptions,
2951
+ ): Promise<void>;
2952
+
2843
2953
  /**
2844
2954
  * Clears websites' IndexedDB data.
2845
2955
  *
@@ -2851,6 +2961,15 @@ declare namespace chrome {
2851
2961
  callback?: () => void,
2852
2962
  ): void;
2853
2963
 
2964
+ /**
2965
+ * Clears websites' local storage data.
2966
+ *
2967
+ * @param options
2968
+ */
2969
+ export function removeLocalStorage(
2970
+ options: RemovalOptions,
2971
+ ): Promise<void>;
2972
+
2854
2973
  /**
2855
2974
  * Clears websites' local storage data.
2856
2975
  *
@@ -2862,6 +2981,17 @@ declare namespace chrome {
2862
2981
  callback?: () => void,
2863
2982
  ): void;
2864
2983
 
2984
+ /**
2985
+ * Clears plugins' data.
2986
+ *
2987
+ * @deprecated Support for Flash has been removed. This function has no effect.
2988
+ * @deprecated-since Chrome 88
2989
+ * @param options
2990
+ */
2991
+ export function removePluginData(
2992
+ options: RemovalOptions,
2993
+ ): Promise<void>;
2994
+
2865
2995
  /**
2866
2996
  * Clears plugins' data.
2867
2997
  *
@@ -2875,6 +3005,15 @@ declare namespace chrome {
2875
3005
  callback?: () => void,
2876
3006
  ): void;
2877
3007
 
3008
+ /**
3009
+ * Clears the browser's stored passwords.
3010
+ *
3011
+ * @param options
3012
+ */
3013
+ export function removePasswords(
3014
+ options: RemovalOptions,
3015
+ ): Promise<void>;
3016
+
2878
3017
  /**
2879
3018
  * Clears the browser's stored passwords.
2880
3019
  *
@@ -2886,6 +3025,16 @@ declare namespace chrome {
2886
3025
  callback?: () => void,
2887
3026
  ): void;
2888
3027
 
3028
+ /**
3029
+ * Clears websites' service workers.
3030
+ *
3031
+ * @since Chrome 72
3032
+ * @param options
3033
+ */
3034
+ export function removeServiceWorkers(
3035
+ options: RemovalOptions,
3036
+ ): Promise<void>;
3037
+
2889
3038
  /**
2890
3039
  * Clears websites' service workers.
2891
3040
  *
@@ -2898,6 +3047,15 @@ declare namespace chrome {
2898
3047
  callback?: () => void,
2899
3048
  ): void;
2900
3049
 
3050
+ /**
3051
+ * Clears websites' WebSQL data.
3052
+ *
3053
+ * @param options
3054
+ */
3055
+ export function removeWebSQL(
3056
+ options: RemovalOptions,
3057
+ ): Promise<void>;
3058
+
2901
3059
  /**
2902
3060
  * Clears websites' WebSQL data.
2903
3061
  *
@@ -3052,6 +3210,16 @@ declare namespace chrome {
3052
3210
  */
3053
3211
  export namespace certificateProvider {
3054
3212
 
3213
+ /**
3214
+ * 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.
3215
+ *
3216
+ * @since Chrome 57
3217
+ * @param details Contains the details about the requested dialog.
3218
+ */
3219
+ export function requestPin(
3220
+ details: RequestPinDetails,
3221
+ ): Promise<PinResponseDetails>;
3222
+
3055
3223
  /**
3056
3224
  * 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.
3057
3225
  *
@@ -3066,6 +3234,16 @@ declare namespace chrome {
3066
3234
  ) => void,
3067
3235
  ): void;
3068
3236
 
3237
+ /**
3238
+ * Stops the pin request started by the {@link requestPin} function.
3239
+ *
3240
+ * @since Chrome 57
3241
+ * @param details Contains the details about the reason for stopping the request flow.
3242
+ */
3243
+ export function stopPinRequest(
3244
+ details: StopPinRequestDetails,
3245
+ ): Promise<void>;
3246
+
3069
3247
  /**
3070
3248
  * Stops the pin request started by the {@link requestPin} function.
3071
3249
  *
@@ -3078,6 +3256,18 @@ declare namespace chrome {
3078
3256
  callback: () => void,
3079
3257
  ): void;
3080
3258
 
3259
+ /**
3260
+ * Sets a list of certificates to use in the browser.
3261
+ *
3262
+ * 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.
3263
+ *
3264
+ * @since Chrome 86
3265
+ * @param details The certificates to set. Invalid certificates will be ignored.
3266
+ */
3267
+ export function setCertificates(
3268
+ details: SetCertificatesDetails,
3269
+ ): Promise<void>;
3270
+
3081
3271
  /**
3082
3272
  * Sets a list of certificates to use in the browser.
3083
3273
  *
@@ -3092,6 +3282,18 @@ declare namespace chrome {
3092
3282
  callback?: () => void,
3093
3283
  ): void;
3094
3284
 
3285
+ /**
3286
+ * Should be called as a response to {@link onSignatureRequested}.
3287
+ *
3288
+ * The extension must eventually call this function for every {@link onSignatureRequested} event; the API implementation will stop waiting for this call after some time and respond with a timeout error when this function is called.
3289
+ *
3290
+ * @since Chrome 86
3291
+ * @param details
3292
+ */
3293
+ export function reportSignature(
3294
+ details: ReportSignatureDetails,
3295
+ ): Promise<void>;
3296
+
3095
3297
  /**
3096
3298
  * Should be called as a response to {@link onSignatureRequested}.
3097
3299
  *
@@ -5183,7 +5385,7 @@ declare namespace chrome {
5183
5385
  *
5184
5386
  * @since Chrome 91
5185
5387
  */
5186
- export type RequestMethod = "delete" | "get" | "head" | "options" | "patch" | "post" | "put";
5388
+ export type RequestMethod = "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put";
5187
5389
 
5188
5390
  /**
5189
5391
  * This describes whether the request is first or third party to the frame in which it originated. A request is said to be first party if it has the same domain (eTLD+1) as the frame in which the request originated.
@@ -6369,6 +6571,15 @@ declare namespace chrome {
6369
6571
  */
6370
6572
  export namespace documentScan {
6371
6573
 
6574
+ /**
6575
+ * Performs a document scan. On success, the PNG data will be sent to the callback.
6576
+ *
6577
+ * @param options Object containing scan parameters.
6578
+ */
6579
+ export function scan(
6580
+ options: ScanOptions,
6581
+ ): Promise<ScanResults>;
6582
+
6372
6583
  /**
6373
6584
  * Performs a document scan. On success, the PNG data will be sent to the callback.
6374
6585
  *
@@ -6434,6 +6645,15 @@ declare namespace chrome {
6434
6645
  */
6435
6646
  export namespace downloads {
6436
6647
 
6648
+ /**
6649
+ * 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.
6650
+ *
6651
+ * @param options What to download and how.
6652
+ */
6653
+ export function download(
6654
+ options: DownloadOptions,
6655
+ ): Promise<number>;
6656
+
6437
6657
  /**
6438
6658
  * 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.
6439
6659
  *
@@ -6447,6 +6667,15 @@ declare namespace chrome {
6447
6667
  ) => void,
6448
6668
  ): void;
6449
6669
 
6670
+ /**
6671
+ * Find {@link DownloadItem}. Set `query` to the empty object to get all {@link DownloadItem}. To get a specific {@link DownloadItem}, set only the `id` field. To page through a large number of items, set `orderBy: ['-startTime']`, set `limit` to the number of items per page, and set `startedAfter` to the `startTime` of the last item from the last page.
6672
+ *
6673
+ * @param query
6674
+ */
6675
+ export function search(
6676
+ query: DownloadQuery,
6677
+ ): Promise<DownloadItem[]>;
6678
+
6450
6679
  /**
6451
6680
  * Find {@link DownloadItem}. Set `query` to the empty object to get all {@link DownloadItem}. To get a specific {@link DownloadItem}, set only the `id` field. To page through a large number of items, set `orderBy: ['-startTime']`, set `limit` to the number of items per page, and set `startedAfter` to the `startTime` of the last item from the last page.
6452
6681
  *
@@ -6460,6 +6689,15 @@ declare namespace chrome {
6460
6689
  ) => void,
6461
6690
  ): void;
6462
6691
 
6692
+ /**
6693
+ * 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.
6694
+ *
6695
+ * @param downloadId The id of the download to pause.
6696
+ */
6697
+ export function pause(
6698
+ downloadId: number,
6699
+ ): Promise<void>;
6700
+
6463
6701
  /**
6464
6702
  * 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.
6465
6703
  *
@@ -6471,6 +6709,15 @@ declare namespace chrome {
6471
6709
  callback?: () => void,
6472
6710
  ): void;
6473
6711
 
6712
+ /**
6713
+ * 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.
6714
+ *
6715
+ * @param downloadId The id of the download to resume.
6716
+ */
6717
+ export function resume(
6718
+ downloadId: number,
6719
+ ): Promise<void>;
6720
+
6474
6721
  /**
6475
6722
  * 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.
6476
6723
  *
@@ -6482,6 +6729,15 @@ declare namespace chrome {
6482
6729
  callback?: () => void,
6483
6730
  ): void;
6484
6731
 
6732
+ /**
6733
+ * Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
6734
+ *
6735
+ * @param downloadId The id of the download to cancel.
6736
+ */
6737
+ export function cancel(
6738
+ downloadId: number,
6739
+ ): Promise<void>;
6740
+
6485
6741
  /**
6486
6742
  * Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
6487
6743
  *
@@ -6498,15 +6754,26 @@ declare namespace chrome {
6498
6754
  *
6499
6755
  * @param downloadId The identifier for the download.
6500
6756
  * @param options
6501
- * @param callback A URL to an image that represents the download.
6502
6757
  */
6503
6758
  export function getFileIcon(
6504
6759
  downloadId: number,
6505
- options: GetFileIconOptions,
6506
- callback: (
6507
- iconURL?: string,
6508
- ) => void,
6509
- ): void;
6760
+ options?: GetFileIconOptions,
6761
+ ): Promise<string>;
6762
+
6763
+ /**
6764
+ * 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.
6765
+ *
6766
+ * @param downloadId The identifier for the download.
6767
+ * @param options
6768
+ * @param callback A URL to an image that represents the download.
6769
+ */
6770
+ export function getFileIcon(
6771
+ downloadId: number,
6772
+ options: GetFileIconOptions,
6773
+ callback: (
6774
+ iconURL?: string,
6775
+ ) => void,
6776
+ ): void;
6510
6777
 
6511
6778
  /**
6512
6779
  * 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.
@@ -6544,6 +6811,15 @@ declare namespace chrome {
6544
6811
  */
6545
6812
  export function showDefaultFolder(): void;
6546
6813
 
6814
+ /**
6815
+ * Erase matching {@link DownloadItem} from history without deleting the downloaded file. An {@link onErased} event will fire for each {@link DownloadItem} that matches `query`, then `callback` will be called.
6816
+ *
6817
+ * @param query
6818
+ */
6819
+ export function erase(
6820
+ query: DownloadQuery,
6821
+ ): Promise<number[]>;
6822
+
6547
6823
  /**
6548
6824
  * Erase matching {@link DownloadItem} from history without deleting the downloaded file. An {@link onErased} event will fire for each {@link DownloadItem} that matches `query`, then `callback` will be called.
6549
6825
  *
@@ -6557,6 +6833,15 @@ declare namespace chrome {
6557
6833
  ) => void,
6558
6834
  ): void;
6559
6835
 
6836
+ /**
6837
+ * Remove the downloaded file if it exists and the {@link DownloadItem} is complete; otherwise return an error through {@link runtime.lastError}.
6838
+ *
6839
+ * @param downloadId
6840
+ */
6841
+ export function removeFile(
6842
+ downloadId: number,
6843
+ ): Promise<void>;
6844
+
6560
6845
  /**
6561
6846
  * Remove the downloaded file if it exists and the {@link DownloadItem} is complete; otherwise return an error through {@link runtime.lastError}.
6562
6847
  *
@@ -6568,6 +6853,15 @@ declare namespace chrome {
6568
6853
  callback?: () => void,
6569
6854
  ): void;
6570
6855
 
6856
+ /**
6857
+ * 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.
6858
+ *
6859
+ * @param downloadId The identifier for the {@link DownloadItem}.
6860
+ */
6861
+ export function acceptDanger(
6862
+ downloadId: number,
6863
+ ): Promise<void>;
6864
+
6571
6865
  /**
6572
6866
  * 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.
6573
6867
  *
@@ -7128,6 +7422,11 @@ declare namespace chrome {
7128
7422
  */
7129
7423
  export namespace enterprise.deviceAttributes {
7130
7424
 
7425
+ /**
7426
+ * 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.
7427
+ */
7428
+ export function getDirectoryDeviceId(): Promise<string>;
7429
+
7131
7430
  /**
7132
7431
  * 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.
7133
7432
  *
@@ -7139,6 +7438,13 @@ declare namespace chrome {
7139
7438
  ) => void,
7140
7439
  ): void;
7141
7440
 
7441
+ /**
7442
+ * 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.
7443
+ *
7444
+ * @since Chrome 66
7445
+ */
7446
+ export function getDeviceSerialNumber(): Promise<string>;
7447
+
7142
7448
  /**
7143
7449
  * 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.
7144
7450
  *
@@ -7151,6 +7457,13 @@ declare namespace chrome {
7151
7457
  ) => void,
7152
7458
  ): void;
7153
7459
 
7460
+ /**
7461
+ * 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.
7462
+ *
7463
+ * @since Chrome 66
7464
+ */
7465
+ export function getDeviceAssetId(): Promise<string>;
7466
+
7154
7467
  /**
7155
7468
  * 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.
7156
7469
  *
@@ -7163,6 +7476,13 @@ declare namespace chrome {
7163
7476
  ) => void,
7164
7477
  ): void;
7165
7478
 
7479
+ /**
7480
+ * 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.
7481
+ *
7482
+ * @since Chrome 66
7483
+ */
7484
+ export function getDeviceAnnotatedLocation(): Promise<string>;
7485
+
7166
7486
  /**
7167
7487
  * 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.
7168
7488
  *
@@ -7175,6 +7495,13 @@ declare namespace chrome {
7175
7495
  ) => void,
7176
7496
  ): void;
7177
7497
 
7498
+ /**
7499
+ * 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 the enterprise policy, returns an empty string.
7500
+ *
7501
+ * @since Chrome 82
7502
+ */
7503
+ export function getDeviceHostname(): Promise<string>;
7504
+
7178
7505
  /**
7179
7506
  * 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 the enterprise policy, returns an empty string.
7180
7507
  *
@@ -7196,6 +7523,11 @@ declare namespace chrome {
7196
7523
  */
7197
7524
  export namespace enterprise.hardwarePlatform {
7198
7525
 
7526
+ /**
7527
+ * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
7528
+ */
7529
+ export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
7530
+
7199
7531
  /**
7200
7532
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
7201
7533
  *
@@ -7224,6 +7556,11 @@ declare namespace chrome {
7224
7556
  */
7225
7557
  export namespace enterprise.networkingAttributes {
7226
7558
 
7559
+ /**
7560
+ * 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.
7561
+ */
7562
+ export function getNetworkDetails(): Promise<NetworkDetails>;
7563
+
7227
7564
  /**
7228
7565
  * 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.
7229
7566
  *
@@ -8173,6 +8510,19 @@ declare namespace chrome {
8173
8510
  */
8174
8511
  export namespace fileSystemProvider {
8175
8512
 
8513
+ /**
8514
+ * Mounts a file system with the given `fileSystemId` and `displayName`. `displayName` will be shown in the left panel of the Files app. `displayName` can contain any characters including '/', but cannot be an empty string. `displayName` must be descriptive but doesn't have to be unique. The `fileSystemId` must not be an empty string.
8515
+ *
8516
+ * Depending on the type of the file system being mounted, the `source` option must be set appropriately.
8517
+ *
8518
+ * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
8519
+ *
8520
+ * @param options
8521
+ */
8522
+ export function mount(
8523
+ options: MountOptions,
8524
+ ): Promise<void>;
8525
+
8176
8526
  /**
8177
8527
  * Mounts a file system with the given `fileSystemId` and `displayName`. `displayName` will be shown in the left panel of the Files app. `displayName` can contain any characters including '/', but cannot be an empty string. `displayName` must be descriptive but doesn't have to be unique. The `fileSystemId` must not be an empty string.
8178
8528
  *
@@ -8188,6 +8538,17 @@ declare namespace chrome {
8188
8538
  callback?: () => void,
8189
8539
  ): void;
8190
8540
 
8541
+ /**
8542
+ * 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).
8543
+ *
8544
+ * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
8545
+ *
8546
+ * @param options
8547
+ */
8548
+ export function unmount(
8549
+ options: UnmountOptions,
8550
+ ): Promise<void>;
8551
+
8191
8552
  /**
8192
8553
  * 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).
8193
8554
  *
@@ -8201,6 +8562,11 @@ declare namespace chrome {
8201
8562
  callback?: () => void,
8202
8563
  ): void;
8203
8564
 
8565
+ /**
8566
+ * Returns all file systems mounted by the extension.
8567
+ */
8568
+ export function getAll(): Promise<FileSystemInfo[]>;
8569
+
8204
8570
  /**
8205
8571
  * Returns all file systems mounted by the extension.
8206
8572
  *
@@ -8212,6 +8578,15 @@ declare namespace chrome {
8212
8578
  ) => void,
8213
8579
  ): void;
8214
8580
 
8581
+ /**
8582
+ * Returns information about a file system with the passed `fileSystemId`.
8583
+ *
8584
+ * @param fileSystemId
8585
+ */
8586
+ export function get(
8587
+ fileSystemId: string,
8588
+ ): Promise<FileSystemInfo>;
8589
+
8215
8590
  /**
8216
8591
  * Returns information about a file system with the passed `fileSystemId`.
8217
8592
  *
@@ -8225,6 +8600,25 @@ declare namespace chrome {
8225
8600
  ) => void,
8226
8601
  ): void;
8227
8602
 
8603
+ /**
8604
+ * Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNofityTag`, then `tag` must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with {@link getAll}.
8605
+ *
8606
+ * To use, the `file_system_provider.notify` manifest option must be set to true.
8607
+ *
8608
+ * Value of `tag` can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call {@link notify} for all changes which happened since the change tagged as "123". It cannot be an empty string.
8609
+ *
8610
+ * Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
8611
+ *
8612
+ * Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
8613
+ *
8614
+ * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
8615
+ *
8616
+ * @param options
8617
+ */
8618
+ export function notify(
8619
+ options: NotifyOptions,
8620
+ ): Promise<void>;
8621
+
8228
8622
  /**
8229
8623
  * Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNofityTag`, then `tag` must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with {@link getAll}.
8230
8624
  *
@@ -9359,6 +9753,25 @@ declare namespace chrome {
9359
9753
  */
9360
9754
  export namespace fontSettings {
9361
9755
 
9756
+ /**
9757
+ * Clears the font set by this extension, if any.
9758
+ *
9759
+ * @param details
9760
+ */
9761
+ export function clearFont(
9762
+ details: {
9763
+ /**
9764
+ * The script for which the font should be cleared. If omitted, the global script font setting is cleared.
9765
+ */
9766
+ script?: ScriptCode,
9767
+
9768
+ /**
9769
+ * The generic font family for which the font should be cleared.
9770
+ */
9771
+ genericFamily: GenericFamily,
9772
+ },
9773
+ ): Promise<void>;
9774
+
9362
9775
  /**
9363
9776
  * Clears the font set by this extension, if any.
9364
9777
  *
@@ -9380,6 +9793,35 @@ declare namespace chrome {
9380
9793
  callback?: () => void,
9381
9794
  ): void;
9382
9795
 
9796
+ /**
9797
+ * Gets the font for a given script and generic font family.
9798
+ *
9799
+ * @param details
9800
+ */
9801
+ export function getFont(
9802
+ details: {
9803
+ /**
9804
+ * The script for which the font should be retrieved. If omitted, the font setting for the global script (script code "Zyyy") is retrieved.
9805
+ */
9806
+ script?: ScriptCode,
9807
+
9808
+ /**
9809
+ * The generic font family for which the font should be retrieved.
9810
+ */
9811
+ genericFamily: GenericFamily,
9812
+ },
9813
+ ): Promise<{
9814
+ /**
9815
+ * The font ID. Rather than the literal font ID preference value, this may be the ID of the font that the system resolves the preference value to. So, fontId can differ from the font passed to `setFont`, if, for example, the font is not available on the system. The empty string signifies fallback to the global script font setting.
9816
+ */
9817
+ fontId: string,
9818
+
9819
+ /**
9820
+ * The level of control this extension has over the setting.
9821
+ */
9822
+ levelOfControl: LevelOfControl,
9823
+ }>;
9824
+
9383
9825
  /**
9384
9826
  * Gets the font for a given script and generic font family.
9385
9827
  *
@@ -9413,6 +9855,30 @@ declare namespace chrome {
9413
9855
  ) => void,
9414
9856
  ): void;
9415
9857
 
9858
+ /**
9859
+ * Sets the font for a given script and generic font family.
9860
+ *
9861
+ * @param details
9862
+ */
9863
+ export function setFont(
9864
+ details: {
9865
+ /**
9866
+ * The script code which the font should be set. If omitted, the font setting for the global script (script code "Zyyy") is set.
9867
+ */
9868
+ script?: ScriptCode,
9869
+
9870
+ /**
9871
+ * The generic font family for which the font should be set.
9872
+ */
9873
+ genericFamily: GenericFamily,
9874
+
9875
+ /**
9876
+ * The font ID. The empty string means to fallback to the global script font setting.
9877
+ */
9878
+ fontId: string,
9879
+ },
9880
+ ): Promise<void>;
9881
+
9416
9882
  /**
9417
9883
  * Sets the font for a given script and generic font family.
9418
9884
  *
@@ -9439,6 +9905,11 @@ declare namespace chrome {
9439
9905
  callback?: () => void,
9440
9906
  ): void;
9441
9907
 
9908
+ /**
9909
+ * Gets a list of fonts on the system.
9910
+ */
9911
+ export function getFontList(): Promise<FontName[]>;
9912
+
9442
9913
  /**
9443
9914
  * Gets a list of fonts on the system.
9444
9915
  *
@@ -9450,6 +9921,15 @@ declare namespace chrome {
9450
9921
  ) => void,
9451
9922
  ): void;
9452
9923
 
9924
+ /**
9925
+ * Clears the default font size set by this extension, if any.
9926
+ *
9927
+ * @param details This parameter is currently unused.
9928
+ */
9929
+ export function clearDefaultFontSize(
9930
+ details?: {},
9931
+ ): Promise<void>;
9932
+
9453
9933
  /**
9454
9934
  * Clears the default font size set by this extension, if any.
9455
9935
  *
@@ -9461,6 +9941,25 @@ declare namespace chrome {
9461
9941
  callback?: () => void,
9462
9942
  ): void;
9463
9943
 
9944
+ /**
9945
+ * Gets the default font size.
9946
+ *
9947
+ * @param details This parameter is currently unused.
9948
+ */
9949
+ export function getDefaultFontSize(
9950
+ details?: {},
9951
+ ): Promise<{
9952
+ /**
9953
+ * The font size in pixels.
9954
+ */
9955
+ pixelSize: number,
9956
+
9957
+ /**
9958
+ * The level of control this extension has over the setting.
9959
+ */
9960
+ levelOfControl: LevelOfControl,
9961
+ }>;
9962
+
9464
9963
  /**
9465
9964
  * Gets the default font size.
9466
9965
  *
@@ -9484,6 +9983,20 @@ declare namespace chrome {
9484
9983
  ) => void,
9485
9984
  ): void;
9486
9985
 
9986
+ /**
9987
+ * Sets the default font size.
9988
+ *
9989
+ * @param details
9990
+ */
9991
+ export function setDefaultFontSize(
9992
+ details: {
9993
+ /**
9994
+ * The font size in pixels.
9995
+ */
9996
+ pixelSize: number,
9997
+ },
9998
+ ): Promise<void>;
9999
+
9487
10000
  /**
9488
10001
  * Sets the default font size.
9489
10002
  *
@@ -9500,6 +10013,15 @@ declare namespace chrome {
9500
10013
  callback?: () => void,
9501
10014
  ): void;
9502
10015
 
10016
+ /**
10017
+ * Clears the default fixed font size set by this extension, if any.
10018
+ *
10019
+ * @param details This parameter is currently unused.
10020
+ */
10021
+ export function clearDefaultFixedFontSize(
10022
+ details?: {},
10023
+ ): Promise<void>;
10024
+
9503
10025
  /**
9504
10026
  * Clears the default fixed font size set by this extension, if any.
9505
10027
  *
@@ -9511,6 +10033,25 @@ declare namespace chrome {
9511
10033
  callback?: () => void,
9512
10034
  ): void;
9513
10035
 
10036
+ /**
10037
+ * Gets the default size for fixed width fonts.
10038
+ *
10039
+ * @param details This parameter is currently unused.
10040
+ */
10041
+ export function getDefaultFixedFontSize(
10042
+ details?: {},
10043
+ ): Promise<{
10044
+ /**
10045
+ * The font size in pixels.
10046
+ */
10047
+ pixelSize: number,
10048
+
10049
+ /**
10050
+ * The level of control this extension has over the setting.
10051
+ */
10052
+ levelOfControl: LevelOfControl,
10053
+ }>;
10054
+
9514
10055
  /**
9515
10056
  * Gets the default size for fixed width fonts.
9516
10057
  *
@@ -9534,6 +10075,20 @@ declare namespace chrome {
9534
10075
  ) => void,
9535
10076
  ): void;
9536
10077
 
10078
+ /**
10079
+ * Sets the default size for fixed width fonts.
10080
+ *
10081
+ * @param details
10082
+ */
10083
+ export function setDefaultFixedFontSize(
10084
+ details: {
10085
+ /**
10086
+ * The font size in pixels.
10087
+ */
10088
+ pixelSize: number,
10089
+ },
10090
+ ): Promise<void>;
10091
+
9537
10092
  /**
9538
10093
  * Sets the default size for fixed width fonts.
9539
10094
  *
@@ -9550,6 +10105,15 @@ declare namespace chrome {
9550
10105
  callback?: () => void,
9551
10106
  ): void;
9552
10107
 
10108
+ /**
10109
+ * Clears the minimum font size set by this extension, if any.
10110
+ *
10111
+ * @param details This parameter is currently unused.
10112
+ */
10113
+ export function clearMinimumFontSize(
10114
+ details?: {},
10115
+ ): Promise<void>;
10116
+
9553
10117
  /**
9554
10118
  * Clears the minimum font size set by this extension, if any.
9555
10119
  *
@@ -9561,6 +10125,25 @@ declare namespace chrome {
9561
10125
  callback?: () => void,
9562
10126
  ): void;
9563
10127
 
10128
+ /**
10129
+ * Gets the minimum font size.
10130
+ *
10131
+ * @param details This parameter is currently unused.
10132
+ */
10133
+ export function getMinimumFontSize(
10134
+ details?: {},
10135
+ ): Promise<{
10136
+ /**
10137
+ * The font size in pixels.
10138
+ */
10139
+ pixelSize: number,
10140
+
10141
+ /**
10142
+ * The level of control this extension has over the setting.
10143
+ */
10144
+ levelOfControl: LevelOfControl,
10145
+ }>;
10146
+
9564
10147
  /**
9565
10148
  * Gets the minimum font size.
9566
10149
  *
@@ -9584,6 +10167,20 @@ declare namespace chrome {
9584
10167
  ) => void,
9585
10168
  ): void;
9586
10169
 
10170
+ /**
10171
+ * Sets the minimum font size.
10172
+ *
10173
+ * @param details
10174
+ */
10175
+ export function setMinimumFontSize(
10176
+ details: {
10177
+ /**
10178
+ * The font size in pixels.
10179
+ */
10180
+ pixelSize: number,
10181
+ },
10182
+ ): Promise<void>;
10183
+
9587
10184
  /**
9588
10185
  * Sets the minimum font size.
9589
10186
  *
@@ -11369,6 +11966,11 @@ declare namespace chrome {
11369
11966
  */
11370
11967
  export namespace loginState {
11371
11968
 
11969
+ /**
11970
+ * Gets the type of the profile the extension is in.
11971
+ */
11972
+ export function getProfileType(): Promise<ProfileType>;
11973
+
11372
11974
  /**
11373
11975
  * Gets the type of the profile the extension is in.
11374
11976
  *
@@ -11380,6 +11982,11 @@ declare namespace chrome {
11380
11982
  ) => void,
11381
11983
  ): void;
11382
11984
 
11985
+ /**
11986
+ * Gets the current session state.
11987
+ */
11988
+ export function getSessionState(): Promise<SessionState>;
11989
+
11383
11990
  /**
11384
11991
  * Gets the current session state.
11385
11992
  *
@@ -12432,6 +13039,11 @@ declare namespace chrome {
12432
13039
  */
12433
13040
  export namespace permissions {
12434
13041
 
13042
+ /**
13043
+ * Gets the extension's current set of permissions.
13044
+ */
13045
+ export function getAll(): Promise<Permissions>;
13046
+
12435
13047
  /**
12436
13048
  * Gets the extension's current set of permissions.
12437
13049
  *
@@ -12446,6 +13058,15 @@ declare namespace chrome {
12446
13058
  ) => void,
12447
13059
  ): void;
12448
13060
 
13061
+ /**
13062
+ * Checks if the extension has the specified permissions.
13063
+ *
13064
+ * @param permissions
13065
+ */
13066
+ export function contains(
13067
+ permissions: Permissions,
13068
+ ): Promise<boolean>;
13069
+
12449
13070
  /**
12450
13071
  * Checks if the extension has the specified permissions.
12451
13072
  *
@@ -12462,6 +13083,15 @@ declare namespace chrome {
12462
13083
  ) => void,
12463
13084
  ): void;
12464
13085
 
13086
+ /**
13087
+ * Requests access to the specified permissions, displaying a prompt to the user if necessary. These permissions must either be defined in the `optional_permissions` field of the manifest or be required permissions that were withheld by the user. Paths on origin patterns will be ignored. You can request subsets of optional origin permissions; for example, if you specify `*://*\/*` in the `optional_permissions` section of the manifest, you can request `http://example.com/`. If there are any problems requesting the permissions, {@link runtime.lastError} will be set.
13088
+ *
13089
+ * @param permissions
13090
+ */
13091
+ export function request(
13092
+ permissions: Permissions,
13093
+ ): Promise<boolean>;
13094
+
12465
13095
  /**
12466
13096
  * Requests access to the specified permissions, displaying a prompt to the user if necessary. These permissions must either be defined in the `optional_permissions` field of the manifest or be required permissions that were withheld by the user. Paths on origin patterns will be ignored. You can request subsets of optional origin permissions; for example, if you specify `*://*\/*` in the `optional_permissions` section of the manifest, you can request `http://example.com/`. If there are any problems requesting the permissions, {@link runtime.lastError} will be set.
12467
13097
  *
@@ -12478,6 +13108,15 @@ declare namespace chrome {
12478
13108
  ) => void,
12479
13109
  ): void;
12480
13110
 
13111
+ /**
13112
+ * Removes access to the specified permissions. If there are any problems removing the permissions, {@link runtime.lastError} will be set.
13113
+ *
13114
+ * @param permissions
13115
+ */
13116
+ export function remove(
13117
+ permissions: Permissions,
13118
+ ): Promise<boolean>;
13119
+
12481
13120
  /**
12482
13121
  * Removes access to the specified permissions. If there are any problems removing the permissions, {@link runtime.lastError} will be set.
12483
13122
  *
@@ -13025,6 +13664,11 @@ declare namespace chrome {
13025
13664
  */
13026
13665
  export namespace printingMetrics {
13027
13666
 
13667
+ /**
13668
+ * Returns the list of the finished print jobs.
13669
+ */
13670
+ export function getPrintJobs(): Promise<PrintJobInfo[]>;
13671
+
13028
13672
  /**
13029
13673
  * Returns the list of the finished print jobs.
13030
13674
  *
@@ -13320,6 +13964,15 @@ declare namespace chrome {
13320
13964
  */
13321
13965
  export namespace processes {
13322
13966
 
13967
+ /**
13968
+ * Returns the ID of the renderer process for the specified tab.
13969
+ *
13970
+ * @param tabId The ID of the tab for which the renderer process ID is to be returned.
13971
+ */
13972
+ export function getProcessIdForTab(
13973
+ tabId: number,
13974
+ ): Promise<number>;
13975
+
13323
13976
  /**
13324
13977
  * Returns the ID of the renderer process for the specified tab.
13325
13978
  *
@@ -13336,6 +13989,15 @@ declare namespace chrome {
13336
13989
  ) => void,
13337
13990
  ): void;
13338
13991
 
13992
+ /**
13993
+ * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
13994
+ *
13995
+ * @param processId The ID of the process to be terminated.
13996
+ */
13997
+ export function terminate(
13998
+ processId: number,
13999
+ ): Promise<boolean>;
14000
+
13339
14001
  /**
13340
14002
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
13341
14003
  *
@@ -13352,6 +14014,17 @@ declare namespace chrome {
13352
14014
  ) => void,
13353
14015
  ): void;
13354
14016
 
14017
+ /**
14018
+ * Retrieves the process information for each process ID specified.
14019
+ *
14020
+ * @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.
14021
+ * @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.
14022
+ */
14023
+ export function getProcessInfo(
14024
+ processIds: number | number[],
14025
+ includeMemory: boolean,
14026
+ ): Promise<{[name: string]: any}>;
14027
+
13355
14028
  /**
13356
14029
  * Retrieves the process information for each process ID specified.
13357
14030
  *
@@ -14289,6 +14962,108 @@ declare namespace chrome {
14289
14962
  callback?: () => void,
14290
14963
  ): void;
14291
14964
 
14965
+ /**
14966
+ * Registers one or more content scripts for this extension.
14967
+ *
14968
+ * @chrome-unknown-version
14969
+ * @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.
14970
+ */
14971
+ export function registerContentScripts(
14972
+ scripts: RegisteredContentScript[],
14973
+ ): Promise<void>;
14974
+
14975
+ /**
14976
+ * Registers one or more content scripts for this extension.
14977
+ *
14978
+ * @chrome-unknown-version
14979
+ * @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.
14980
+ * @param callback A callback to be invoked once scripts have been fully registered or if an error has occurred.
14981
+ */
14982
+ export function registerContentScripts(
14983
+ scripts: RegisteredContentScript[],
14984
+ callback?: () => void,
14985
+ ): void;
14986
+
14987
+ /**
14988
+ * Returns all dynamically registered content scripts for this extension that match the given filter.
14989
+ *
14990
+ * @chrome-unknown-version
14991
+ * @param filter An object to filter the extension's dynamically registered scripts.
14992
+ */
14993
+ export function getRegisteredContentScripts(
14994
+ filter?: ContentScriptFilter,
14995
+ ): Promise<RegisteredContentScript[]>;
14996
+
14997
+ /**
14998
+ * Returns all dynamically registered content scripts for this extension that match the given filter.
14999
+ *
15000
+ * @chrome-unknown-version
15001
+ * @param filter An object to filter the extension's dynamically registered scripts.
15002
+ * @param callback
15003
+ */
15004
+ export function getRegisteredContentScripts(
15005
+ filter: ContentScriptFilter,
15006
+ callback: (
15007
+ scripts: RegisteredContentScript[],
15008
+ ) => void,
15009
+ ): void;
15010
+
15011
+ /**
15012
+ * Returns all dynamically registered content scripts for this extension that match the given filter.
15013
+ *
15014
+ * @chrome-unknown-version
15015
+ * @param callback
15016
+ */
15017
+ export function getRegisteredContentScripts(
15018
+ callback: (
15019
+ scripts: RegisteredContentScript[],
15020
+ ) => void,
15021
+ ): void;
15022
+
15023
+ /**
15024
+ * Unregisters content scripts for this extension.
15025
+ *
15026
+ * @chrome-unknown-version
15027
+ * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
15028
+ */
15029
+ export function unregisterContentScripts(
15030
+ filter?: ContentScriptFilter,
15031
+ ): Promise<void>;
15032
+
15033
+ /**
15034
+ * Unregisters content scripts for this extension.
15035
+ *
15036
+ * @chrome-unknown-version
15037
+ * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
15038
+ * @param callback A callback to be invoked once scripts have been unregistered or if an error has occurred.
15039
+ */
15040
+ export function unregisterContentScripts(
15041
+ filter?: ContentScriptFilter,
15042
+ callback?: () => void,
15043
+ ): void;
15044
+
15045
+ /**
15046
+ * Updates one or more content scripts for this extension.
15047
+ *
15048
+ * @chrome-unknown-version
15049
+ * @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.
15050
+ */
15051
+ export function updateContentScripts(
15052
+ scripts: RegisteredContentScript[],
15053
+ ): Promise<void>;
15054
+
15055
+ /**
15056
+ * Updates one or more content scripts for this extension.
15057
+ *
15058
+ * @chrome-unknown-version
15059
+ * @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.
15060
+ * @param callback A callback to be invoked once scripts have been updated or if an error has occurred.
15061
+ */
15062
+ export function updateContentScripts(
15063
+ scripts: RegisteredContentScript[],
15064
+ callback?: () => void,
15065
+ ): void;
15066
+
14292
15067
  /**
14293
15068
  * The origin for a style change. See [style origins](https://developer.mozilla.org/en-US/docs/Glossary/Style_origin) for more info.
14294
15069
  */
@@ -14390,6 +15165,63 @@ declare namespace chrome {
14390
15165
  */
14391
15166
  frameId: number;
14392
15167
  }
15168
+
15169
+ /**
15170
+ * @chrome-unknown-version
15171
+ */
15172
+ export interface RegisteredContentScript {
15173
+
15174
+ /**
15175
+ * The id of the content script, specified in the API call. Must not start with a '\_' as it's reserved as a prefix for generated script IDs.
15176
+ */
15177
+ id: string;
15178
+
15179
+ /**
15180
+ * Specifies which pages this content script will be injected into. See [Match Patterns](https://developer.chrome.com/docs/extensions/match_patterns) for more details on the syntax of these strings. Must be specified for {@link registerContentScripts}.
15181
+ */
15182
+ matches?: string[];
15183
+
15184
+ /**
15185
+ * Excludes pages that this content script would otherwise be injected into. See [Match Patterns](https://developer.chrome.com/docs/extensions/match_patterns) for more details on the syntax of these strings.
15186
+ */
15187
+ excludeMatches?: string[];
15188
+
15189
+ /**
15190
+ * The list of CSS files to be injected into matching pages. These are injected in the order they appear in this array, before any DOM is constructed or displayed for the page.
15191
+ */
15192
+ css?: string[];
15193
+
15194
+ /**
15195
+ * The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.
15196
+ */
15197
+ js?: string[];
15198
+
15199
+ /**
15200
+ * If specified true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched.
15201
+ */
15202
+ allFrames?: boolean;
15203
+
15204
+ /**
15205
+ * Specifies when JavaScript files are injected into the web page. The preferred and default value is `document_idle`.
15206
+ */
15207
+ runAt?: extensionTypes.RunAt;
15208
+
15209
+ /**
15210
+ * Specifies if this content script will persist into future sessions. The default is true.
15211
+ */
15212
+ persistAcrossSessions?: boolean;
15213
+ }
15214
+
15215
+ /**
15216
+ * @chrome-unknown-version
15217
+ */
15218
+ export interface ContentScriptFilter {
15219
+
15220
+ /**
15221
+ * If specified, {@link getRegisteredContentScripts} will only return scripts with an id specified in this list.
15222
+ */
15223
+ ids?: string[];
15224
+ }
14393
15225
  }
14394
15226
 
14395
15227
  /**
@@ -14400,6 +15232,15 @@ declare namespace chrome {
14400
15232
  */
14401
15233
  export namespace search {
14402
15234
 
15235
+ /**
15236
+ * Used to query the default search provider. In case of an error, {@link runtime.lastError} will be set.
15237
+ *
15238
+ * @param queryInfo
15239
+ */
15240
+ export function query(
15241
+ queryInfo: QueryInfo,
15242
+ ): Promise<void>;
15243
+
14403
15244
  /**
14404
15245
  * Used to query the default search provider. In case of an error, {@link runtime.lastError} will be set.
14405
15246
  *
@@ -14444,6 +15285,15 @@ declare namespace chrome {
14444
15285
  */
14445
15286
  export const MAX_SESSION_RESULTS: 25;
14446
15287
 
15288
+ /**
15289
+ * Gets the list of recently closed tabs and/or windows.
15290
+ *
15291
+ * @param filter
15292
+ */
15293
+ export function getRecentlyClosed(
15294
+ filter?: Filter,
15295
+ ): Promise<Session[]>;
15296
+
14447
15297
  /**
14448
15298
  * Gets the list of recently closed tabs and/or windows.
14449
15299
  *
@@ -14474,6 +15324,15 @@ declare namespace chrome {
14474
15324
  ) => void,
14475
15325
  ): void;
14476
15326
 
15327
+ /**
15328
+ * Retrieves all devices with synced sessions.
15329
+ *
15330
+ * @param filter
15331
+ */
15332
+ export function getDevices(
15333
+ filter?: Filter,
15334
+ ): Promise<Device[]>;
15335
+
14477
15336
  /**
14478
15337
  * Retrieves all devices with synced sessions.
14479
15338
  *
@@ -14504,6 +15363,15 @@ declare namespace chrome {
14504
15363
  ) => void,
14505
15364
  ): void;
14506
15365
 
15366
+ /**
15367
+ * Reopens a {@link windows.Window} or {@link tabs.Tab}, with an optional callback to run when the entry has been restored.
15368
+ *
15369
+ * @param sessionId The {@link windows.Window.sessionId}, or {@link tabs.Tab.sessionId} to restore. If this parameter is not specified, the most recently closed session is restored.
15370
+ */
15371
+ export function restore(
15372
+ sessionId?: string,
15373
+ ): Promise<Session>;
15374
+
14507
15375
  /**
14508
15376
  * Reopens a {@link windows.Window} or {@link tabs.Tab}, with an optional callback to run when the entry has been restored.
14509
15377
  *
@@ -14603,6 +15471,15 @@ declare namespace chrome {
14603
15471
  */
14604
15472
  export namespace signedInDevices {
14605
15473
 
15474
+ /**
15475
+ * Gets the array of signed in devices, signed into the same account as the current profile.
15476
+ *
15477
+ * @param isLocal If true only return the information for the local device. If false or omitted return the list of all devices including the local device.
15478
+ */
15479
+ export function get(
15480
+ isLocal?: boolean,
15481
+ ): Promise<DeviceInfo[]>;
15482
+
14606
15483
  /**
14607
15484
  * Gets the array of signed in devices, signed into the same account as the current profile.
14608
15485
  *
@@ -18739,6 +19616,40 @@ declare namespace chrome {
18739
19616
  */
18740
19617
  export namespace wallpaper {
18741
19618
 
19619
+ /**
19620
+ * Sets wallpaper to the image at _url_ or _wallpaperData_ with the specified _layout_
19621
+ *
19622
+ * @param details
19623
+ */
19624
+ export function setWallpaper(
19625
+ details: {
19626
+ /**
19627
+ * The jpeg or png encoded wallpaper image as an ArrayBuffer.
19628
+ */
19629
+ data?: ArrayBuffer,
19630
+
19631
+ /**
19632
+ * The URL of the wallpaper to be set (can be relative).
19633
+ */
19634
+ url?: string,
19635
+
19636
+ /**
19637
+ * The supported wallpaper layouts.
19638
+ */
19639
+ layout: WallpaperLayout,
19640
+
19641
+ /**
19642
+ * The file name of the saved wallpaper.
19643
+ */
19644
+ filename: string,
19645
+
19646
+ /**
19647
+ * True if a 128x60 thumbnail should be generated. Layout and ratio are not supported yet.
19648
+ */
19649
+ thumbnail?: boolean,
19650
+ },
19651
+ ): Promise<ArrayBuffer>;
19652
+
18742
19653
  /**
18743
19654
  * Sets wallpaper to the image at _url_ or _wallpaperData_ with the specified _layout_
18744
19655
  *