chrome-types 0.1.448 → 0.1.450
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 +1317 -443
- package/index.d.ts +1291 -417
- package/package.json +2 -2
package/index.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 Sep 23 2026 22:44:06 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 4f6f60a0f126d22f11acf933a69c614504e7e20e
|
|
19
19
|
|
|
20
20
|
// Includes MV3+ APIs only.
|
|
21
21
|
|
|
@@ -9565,479 +9565,1446 @@ declare namespace chrome {
|
|
|
9565
9565
|
}
|
|
9566
9566
|
|
|
9567
9567
|
/**
|
|
9568
|
-
*
|
|
9568
|
+
* The `chrome.extensionTypes` API contains type declarations for Chrome extensions.
|
|
9569
|
+
*/
|
|
9570
|
+
export namespace extensionTypes {
|
|
9571
|
+
|
|
9572
|
+
/**
|
|
9573
|
+
* @since Chrome 139
|
|
9574
|
+
*/
|
|
9575
|
+
export type ColorArray = [number, number, number, number];
|
|
9576
|
+
|
|
9577
|
+
/**
|
|
9578
|
+
* Pixel data for an image. Must be an ImageData object; for example, from a `canvas` element.
|
|
9579
|
+
*
|
|
9580
|
+
* @since Chrome 139
|
|
9581
|
+
*/
|
|
9582
|
+
export type ImageDataType = ImageData;
|
|
9583
|
+
|
|
9584
|
+
/**
|
|
9585
|
+
* The format of an image.
|
|
9586
|
+
*
|
|
9587
|
+
* @since Chrome 44
|
|
9588
|
+
*/
|
|
9589
|
+
export type ImageFormat = "jpeg" | "png";
|
|
9590
|
+
|
|
9591
|
+
/**
|
|
9592
|
+
* Details about the format, quality, and area of an image.
|
|
9593
|
+
*/
|
|
9594
|
+
export interface ImageDetails {
|
|
9595
|
+
|
|
9596
|
+
/**
|
|
9597
|
+
* The format of the resulting image. Default is `"jpeg"`.
|
|
9598
|
+
*/
|
|
9599
|
+
format?: ImageFormat;
|
|
9600
|
+
|
|
9601
|
+
/**
|
|
9602
|
+
* When format is `"jpeg"`, controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease.
|
|
9603
|
+
*/
|
|
9604
|
+
quality?: number;
|
|
9605
|
+
}
|
|
9606
|
+
|
|
9607
|
+
/**
|
|
9608
|
+
* The soonest that the JavaScript or CSS will be injected into the tab.
|
|
9609
|
+
*
|
|
9610
|
+
* @chrome-enum "document\_start" Script is injected after any files from css, but before any other DOM is constructed or any other script is run.
|
|
9611
|
+
* @chrome-enum "document\_end" Script is injected immediately after the DOM is complete, but before subresources like images and frames have loaded.
|
|
9612
|
+
* @chrome-enum "document\_idle" The browser chooses a time to inject the script between "document\_end" and immediately after the `window.onload` event fires. The exact moment of injection depends on how complex the document is and how long it is taking to load, and is optimized for page load speed. Content scripts running at "document\_idle" don't need to listen for the `window.onload` event; they are guaranteed to run after the DOM completes. If a script definitely needs to run after `window.onload`, the extension can check if `onload` has already fired by using the `document.readyState` property.
|
|
9613
|
+
* @since Chrome 44
|
|
9614
|
+
*/
|
|
9615
|
+
export type RunAt = "document_start" | "document_end" | "document_idle";
|
|
9616
|
+
|
|
9617
|
+
/**
|
|
9618
|
+
* The [origin](https://www.w3.org/TR/css3-cascade/#cascading-origins) of injected CSS.
|
|
9619
|
+
*
|
|
9620
|
+
* @since Chrome 66
|
|
9621
|
+
*/
|
|
9622
|
+
export type CSSOrigin = "author" | "user";
|
|
9623
|
+
|
|
9624
|
+
/**
|
|
9625
|
+
* Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
|
|
9626
|
+
*/
|
|
9627
|
+
export interface InjectDetails {
|
|
9628
|
+
|
|
9629
|
+
/**
|
|
9630
|
+
* JavaScript or CSS code to inject.
|
|
9631
|
+
*
|
|
9632
|
+
*
|
|
9633
|
+
* **Warning:** Be careful using the `code` parameter. Incorrect use of it may open your extension to [cross site scripting](https://en.wikipedia.org/wiki/Cross-site_scripting) attacks
|
|
9634
|
+
*/
|
|
9635
|
+
code?: string;
|
|
9636
|
+
|
|
9637
|
+
/**
|
|
9638
|
+
* JavaScript or CSS file to inject.
|
|
9639
|
+
*/
|
|
9640
|
+
file?: string;
|
|
9641
|
+
|
|
9642
|
+
/**
|
|
9643
|
+
* If allFrames is `true`, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's `false` and is only injected into the top frame. If `true` and `frameId` is set, then the code is inserted in the selected frame and all of its child frames.
|
|
9644
|
+
*/
|
|
9645
|
+
allFrames?: boolean;
|
|
9646
|
+
|
|
9647
|
+
/**
|
|
9648
|
+
* The [frame](https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids) where the script or CSS should be injected. Defaults to 0 (the top-level frame).
|
|
9649
|
+
*
|
|
9650
|
+
* @since Chrome 50
|
|
9651
|
+
*/
|
|
9652
|
+
frameId?: number;
|
|
9653
|
+
|
|
9654
|
+
/**
|
|
9655
|
+
* If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is `false`.
|
|
9656
|
+
*/
|
|
9657
|
+
matchAboutBlank?: boolean;
|
|
9658
|
+
|
|
9659
|
+
/**
|
|
9660
|
+
* The soonest that the JavaScript or CSS will be injected into the tab. Defaults to "document\_idle".
|
|
9661
|
+
*/
|
|
9662
|
+
runAt?: RunAt;
|
|
9663
|
+
|
|
9664
|
+
/**
|
|
9665
|
+
* The [origin](https://www.w3.org/TR/css3-cascade/#cascading-origins) of the CSS to inject. This may only be specified for CSS, not JavaScript. Defaults to `"author"`.
|
|
9666
|
+
*
|
|
9667
|
+
* @since Chrome 66
|
|
9668
|
+
*/
|
|
9669
|
+
cssOrigin?: CSSOrigin;
|
|
9670
|
+
}
|
|
9671
|
+
|
|
9672
|
+
/**
|
|
9673
|
+
* Details of the CSS to remove. Either the code or the file property must be set, but both may not be set at the same time.
|
|
9674
|
+
*
|
|
9675
|
+
* @since Chrome 87
|
|
9676
|
+
*/
|
|
9677
|
+
export interface DeleteInjectionDetails {
|
|
9678
|
+
|
|
9679
|
+
/**
|
|
9680
|
+
* CSS code to remove.
|
|
9681
|
+
*/
|
|
9682
|
+
code?: string;
|
|
9683
|
+
|
|
9684
|
+
/**
|
|
9685
|
+
* CSS file to remove.
|
|
9686
|
+
*/
|
|
9687
|
+
file?: string;
|
|
9688
|
+
|
|
9689
|
+
/**
|
|
9690
|
+
* If allFrames is `true`, implies that the CSS should be removed from all frames of current page. By default, it's `false` and is only removed from the top frame. If `true` and `frameId` is set, then the code is removed from the selected frame and all of its child frames.
|
|
9691
|
+
*/
|
|
9692
|
+
allFrames?: boolean;
|
|
9693
|
+
|
|
9694
|
+
/**
|
|
9695
|
+
* The [frame](https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids) from where the CSS should be removed. Defaults to 0 (the top-level frame).
|
|
9696
|
+
*/
|
|
9697
|
+
frameId?: number;
|
|
9698
|
+
|
|
9699
|
+
/**
|
|
9700
|
+
* If matchAboutBlank is true, then the code is also removed from about:blank and about:srcdoc frames if your extension has access to its parent document. By default it is `false`.
|
|
9701
|
+
*/
|
|
9702
|
+
matchAboutBlank?: boolean;
|
|
9703
|
+
|
|
9704
|
+
/**
|
|
9705
|
+
* The [origin](https://www.w3.org/TR/css3-cascade/#cascading-origins) of the CSS to remove. Defaults to `"author"`.
|
|
9706
|
+
*/
|
|
9707
|
+
cssOrigin?: CSSOrigin;
|
|
9708
|
+
}
|
|
9709
|
+
|
|
9710
|
+
/**
|
|
9711
|
+
* The type of frame.
|
|
9712
|
+
*
|
|
9713
|
+
* @since Chrome 106
|
|
9714
|
+
*/
|
|
9715
|
+
export type FrameType = "outermost_frame" | "fenced_frame" | "sub_frame";
|
|
9716
|
+
|
|
9717
|
+
/**
|
|
9718
|
+
* The document lifecycle of the frame.
|
|
9719
|
+
*
|
|
9720
|
+
* @since Chrome 106
|
|
9721
|
+
*/
|
|
9722
|
+
export type DocumentLifecycle = "prerender" | "active" | "cached" | "pending_deletion";
|
|
9723
|
+
|
|
9724
|
+
/**
|
|
9725
|
+
* The JavaScript world for a script to execute within. Can either be an isolated world unique to this extension, the main world of the DOM which is shared with the page's JavaScript, or a user scripts world that is only available for scripts registered with the User Scripts API.
|
|
9726
|
+
*
|
|
9727
|
+
* @since Chrome 111
|
|
9728
|
+
*/
|
|
9729
|
+
export type ExecutionWorld = "ISOLATED" | "MAIN" | "USER_SCRIPT";
|
|
9730
|
+
}
|
|
9731
|
+
|
|
9732
|
+
/**
|
|
9733
|
+
* Use the `chrome.fileBrowserHandler` API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website.
|
|
9734
|
+
*
|
|
9735
|
+
* @chrome-permission fileBrowserHandler
|
|
9736
|
+
* @chrome-disallow-service-workers
|
|
9737
|
+
* @chrome-platform chromeos
|
|
9738
|
+
*/
|
|
9739
|
+
export namespace fileBrowserHandler {
|
|
9740
|
+
|
|
9741
|
+
/**
|
|
9742
|
+
* Event details payload for fileBrowserHandler.onExecute event.
|
|
9743
|
+
*/
|
|
9744
|
+
export interface FileHandlerExecuteEventDetails {
|
|
9745
|
+
|
|
9746
|
+
/**
|
|
9747
|
+
* Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser).
|
|
9748
|
+
*/
|
|
9749
|
+
entries: any[];
|
|
9750
|
+
|
|
9751
|
+
/**
|
|
9752
|
+
* The ID of the tab that raised this event. Tab IDs are unique within a browser session.
|
|
9753
|
+
*/
|
|
9754
|
+
tab_id?: number;
|
|
9755
|
+
}
|
|
9756
|
+
|
|
9757
|
+
/**
|
|
9758
|
+
* Fired when file system action is executed from ChromeOS file browser.
|
|
9759
|
+
*/
|
|
9760
|
+
export const onExecute: events.Event<(
|
|
9761
|
+
id: string,
|
|
9762
|
+
details: FileHandlerExecuteEventDetails,
|
|
9763
|
+
) => void>;
|
|
9764
|
+
}
|
|
9765
|
+
|
|
9766
|
+
/**
|
|
9767
|
+
* `file_handlers` manifest key defintion. File Handlers allow developers to let extensions interact with files on the operating system. This manifest key can be used by developers to register an extension to a given file type.
|
|
9768
|
+
*
|
|
9769
|
+
* @since Chrome 109
|
|
9569
9770
|
*/
|
|
9570
|
-
export namespace
|
|
9771
|
+
export namespace fileHandlers {
|
|
9772
|
+
|
|
9773
|
+
export interface Icon {
|
|
9774
|
+
|
|
9775
|
+
/**
|
|
9776
|
+
* URL from which a user agent can fetch image data.
|
|
9777
|
+
*/
|
|
9778
|
+
src: string;
|
|
9779
|
+
|
|
9780
|
+
/**
|
|
9781
|
+
* Multiple space-separated size values to also accommodate image formats that can act as containers for multiple images of varying dimensions: e.g. "16x16", "16x16 32x32".
|
|
9782
|
+
*/
|
|
9783
|
+
sizes?: string;
|
|
9784
|
+
|
|
9785
|
+
/**
|
|
9786
|
+
* MIME type is purely advisory with no default value.
|
|
9787
|
+
*/
|
|
9788
|
+
type?: string;
|
|
9789
|
+
}
|
|
9790
|
+
|
|
9791
|
+
export interface FileHandler {
|
|
9792
|
+
|
|
9793
|
+
/**
|
|
9794
|
+
* A mapping of one or more MIME types to one or more file extensions. e.g. "accept": {"text/csv": ".csv"} or {"text/csv": \[".csv", ".txt"\]}.
|
|
9795
|
+
*
|
|
9796
|
+
* @since Chrome 110
|
|
9797
|
+
*/
|
|
9798
|
+
accept: {[name: string]: any};
|
|
9799
|
+
|
|
9800
|
+
/**
|
|
9801
|
+
* Specifies the url after the origin that is the navigation destination for file handling launches.
|
|
9802
|
+
*/
|
|
9803
|
+
action: string;
|
|
9804
|
+
|
|
9805
|
+
/**
|
|
9806
|
+
* Description of the file type.
|
|
9807
|
+
*/
|
|
9808
|
+
name: string;
|
|
9809
|
+
|
|
9810
|
+
/**
|
|
9811
|
+
* Array of ImageResources. Only icons declared at the manifest level are currently supported. The icon for the extension will appear in the "Open" menu.
|
|
9812
|
+
*/
|
|
9813
|
+
icons?: Icon[];
|
|
9814
|
+
|
|
9815
|
+
/**
|
|
9816
|
+
* Whether multiple files should be opened in a single client or multiple. Defaults to \`single-client\`, which makes all files available in only one tab. \`multiple-client\` opens a new tab for each file.
|
|
9817
|
+
*/
|
|
9818
|
+
launch_type?: string;
|
|
9819
|
+
}
|
|
9820
|
+
}
|
|
9821
|
+
|
|
9822
|
+
/**
|
|
9823
|
+
* Use the `chrome.fileSystemProvider` API to create file systems, that can be accessible from the file manager on Chrome OS.
|
|
9824
|
+
*
|
|
9825
|
+
* @chrome-permission fileSystemProvider
|
|
9826
|
+
* @chrome-platform chromeos
|
|
9827
|
+
*/
|
|
9828
|
+
export namespace fileSystemProvider {
|
|
9829
|
+
|
|
9830
|
+
/**
|
|
9831
|
+
* Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used.
|
|
9832
|
+
*/
|
|
9833
|
+
export type ProviderError = "OK" | "FAILED" | "IN_USE" | "EXISTS" | "NOT_FOUND" | "ACCESS_DENIED" | "TOO_MANY_OPENED" | "NO_MEMORY" | "NO_SPACE" | "NOT_A_DIRECTORY" | "INVALID_OPERATION" | "SECURITY" | "ABORT" | "NOT_A_FILE" | "NOT_EMPTY" | "INVALID_URL" | "IO";
|
|
9834
|
+
|
|
9835
|
+
/**
|
|
9836
|
+
* Mode of opening a file. Used by {@link onOpenFileRequested}.
|
|
9837
|
+
*/
|
|
9838
|
+
export type OpenFileMode = "READ" | "WRITE";
|
|
9839
|
+
|
|
9840
|
+
/**
|
|
9841
|
+
* Type of a change detected on the observed directory.
|
|
9842
|
+
*/
|
|
9843
|
+
export type ChangeType = "CHANGED" | "DELETED";
|
|
9844
|
+
|
|
9845
|
+
/**
|
|
9846
|
+
* List of common actions. `"SHARE"` is for sharing files with others. `"SAVE_FOR_OFFLINE"` for pinning (saving for offline access). `"OFFLINE_NOT_NECESSARY"` for notifying that the file doesn't need to be stored for offline access anymore. Used by {@link onGetActionsRequested} and {@link onExecuteActionRequested}.
|
|
9847
|
+
*
|
|
9848
|
+
* @since Chrome 45
|
|
9849
|
+
*/
|
|
9850
|
+
export type CommonActionId = "SAVE_FOR_OFFLINE" | "OFFLINE_NOT_NECESSARY" | "SHARE";
|
|
9851
|
+
|
|
9852
|
+
/**
|
|
9853
|
+
* @since Chrome 117
|
|
9854
|
+
*/
|
|
9855
|
+
export interface CloudIdentifier {
|
|
9856
|
+
|
|
9857
|
+
/**
|
|
9858
|
+
* Identifier for the cloud storage provider (e.g. 'drive.google.com').
|
|
9859
|
+
*/
|
|
9860
|
+
providerName: string;
|
|
9861
|
+
|
|
9862
|
+
/**
|
|
9863
|
+
* The provider's identifier for the given file/directory.
|
|
9864
|
+
*/
|
|
9865
|
+
id: string;
|
|
9866
|
+
}
|
|
9867
|
+
|
|
9868
|
+
/**
|
|
9869
|
+
* @since Chrome 125
|
|
9870
|
+
*/
|
|
9871
|
+
export interface CloudFileInfo {
|
|
9872
|
+
|
|
9873
|
+
/**
|
|
9874
|
+
* A tag that represents the version of the file.
|
|
9875
|
+
*/
|
|
9876
|
+
versionTag?: string;
|
|
9877
|
+
}
|
|
9878
|
+
|
|
9879
|
+
export interface EntryMetadata {
|
|
9880
|
+
|
|
9881
|
+
/**
|
|
9882
|
+
* True if it is a directory. Must be provided if requested in `options`.
|
|
9883
|
+
*/
|
|
9884
|
+
isDirectory?: boolean;
|
|
9885
|
+
|
|
9886
|
+
/**
|
|
9887
|
+
* Name of this entry (not full path name). Must not contain '/'. For root it must be empty. Must be provided if requested in `options`.
|
|
9888
|
+
*/
|
|
9889
|
+
name?: string;
|
|
9890
|
+
|
|
9891
|
+
/**
|
|
9892
|
+
* File size in bytes. Must be provided if requested in `options`.
|
|
9893
|
+
*/
|
|
9894
|
+
size?: number;
|
|
9895
|
+
|
|
9896
|
+
/**
|
|
9897
|
+
* The last modified time of this entry. Must be provided if requested in `options`.
|
|
9898
|
+
*/
|
|
9899
|
+
modificationTime?: Date;
|
|
9900
|
+
|
|
9901
|
+
/**
|
|
9902
|
+
* Mime type for the entry. Always optional, but should be provided if requested in `options`.
|
|
9903
|
+
*/
|
|
9904
|
+
mimeType?: string;
|
|
9905
|
+
|
|
9906
|
+
/**
|
|
9907
|
+
* Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most 32 KB in size. Optional, but can be provided only when explicitly requested by the {@link onGetMetadataRequested} event.
|
|
9908
|
+
*/
|
|
9909
|
+
thumbnail?: string;
|
|
9910
|
+
|
|
9911
|
+
/**
|
|
9912
|
+
* Cloud storage representation of this entry. Must be provided if requested in `options` and the file is backed by cloud storage. For local files not backed by cloud storage, it should be undefined when requested.
|
|
9913
|
+
*
|
|
9914
|
+
* @since Chrome 117
|
|
9915
|
+
*/
|
|
9916
|
+
cloudIdentifier?: CloudIdentifier;
|
|
9917
|
+
|
|
9918
|
+
/**
|
|
9919
|
+
* Information that identifies a specific file in the underlying cloud file system. Must be provided if requested in `options` and the file is backed by cloud storage.
|
|
9920
|
+
*
|
|
9921
|
+
* @since Chrome 125
|
|
9922
|
+
*/
|
|
9923
|
+
cloudFileInfo?: CloudFileInfo;
|
|
9924
|
+
}
|
|
9925
|
+
|
|
9926
|
+
export interface Watcher {
|
|
9927
|
+
|
|
9928
|
+
/**
|
|
9929
|
+
* The path of the entry being observed.
|
|
9930
|
+
*/
|
|
9931
|
+
entryPath: string;
|
|
9932
|
+
|
|
9933
|
+
/**
|
|
9934
|
+
* Whether watching should include all child entries recursively. It can be true for directories only.
|
|
9935
|
+
*/
|
|
9936
|
+
recursive: boolean;
|
|
9937
|
+
|
|
9938
|
+
/**
|
|
9939
|
+
* Tag used by the last notification for the watcher.
|
|
9940
|
+
*/
|
|
9941
|
+
lastTag?: string;
|
|
9942
|
+
}
|
|
9943
|
+
|
|
9944
|
+
export interface OpenedFile {
|
|
9945
|
+
|
|
9946
|
+
/**
|
|
9947
|
+
* A request ID to be be used by consecutive read/write and close requests.
|
|
9948
|
+
*/
|
|
9949
|
+
openRequestId: number;
|
|
9950
|
+
|
|
9951
|
+
/**
|
|
9952
|
+
* The path of the opened file.
|
|
9953
|
+
*/
|
|
9954
|
+
filePath: string;
|
|
9955
|
+
|
|
9956
|
+
/**
|
|
9957
|
+
* Whether the file was opened for reading or writing.
|
|
9958
|
+
*/
|
|
9959
|
+
mode: OpenFileMode;
|
|
9960
|
+
}
|
|
9961
|
+
|
|
9962
|
+
export interface FileSystemInfo {
|
|
9963
|
+
|
|
9964
|
+
/**
|
|
9965
|
+
* The identifier of the file system.
|
|
9966
|
+
*/
|
|
9967
|
+
fileSystemId: string;
|
|
9968
|
+
|
|
9969
|
+
/**
|
|
9970
|
+
* A human-readable name for the file system.
|
|
9971
|
+
*/
|
|
9972
|
+
displayName: string;
|
|
9973
|
+
|
|
9974
|
+
/**
|
|
9975
|
+
* Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files).
|
|
9976
|
+
*/
|
|
9977
|
+
writable: boolean;
|
|
9978
|
+
|
|
9979
|
+
/**
|
|
9980
|
+
* The maximum number of files that can be opened at once. If 0, then not limited.
|
|
9981
|
+
*/
|
|
9982
|
+
openedFilesLimit: number;
|
|
9983
|
+
|
|
9984
|
+
/**
|
|
9985
|
+
* List of currently opened files.
|
|
9986
|
+
*/
|
|
9987
|
+
openedFiles: OpenedFile[];
|
|
9988
|
+
|
|
9989
|
+
/**
|
|
9990
|
+
* Whether the file system supports the `tag` field for observing directories.
|
|
9991
|
+
*
|
|
9992
|
+
* @since Chrome 45
|
|
9993
|
+
*/
|
|
9994
|
+
supportsNotifyTag?: boolean;
|
|
9995
|
+
|
|
9996
|
+
/**
|
|
9997
|
+
* List of watchers.
|
|
9998
|
+
*
|
|
9999
|
+
* @since Chrome 45
|
|
10000
|
+
*/
|
|
10001
|
+
watchers: Watcher[];
|
|
10002
|
+
}
|
|
10003
|
+
|
|
10004
|
+
export interface MountOptions {
|
|
10005
|
+
|
|
10006
|
+
/**
|
|
10007
|
+
* The string indentifier of the file system. Must be unique per each extension.
|
|
10008
|
+
*/
|
|
10009
|
+
fileSystemId: string;
|
|
10010
|
+
|
|
10011
|
+
/**
|
|
10012
|
+
* A human-readable name for the file system.
|
|
10013
|
+
*/
|
|
10014
|
+
displayName: string;
|
|
10015
|
+
|
|
10016
|
+
/**
|
|
10017
|
+
* Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files).
|
|
10018
|
+
*/
|
|
10019
|
+
writable?: boolean;
|
|
10020
|
+
|
|
10021
|
+
/**
|
|
10022
|
+
* The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
|
|
10023
|
+
*/
|
|
10024
|
+
openedFilesLimit?: number;
|
|
10025
|
+
|
|
10026
|
+
/**
|
|
10027
|
+
* Whether the file system supports the `tag` field for observed directories.
|
|
10028
|
+
*
|
|
10029
|
+
* @since Chrome 45
|
|
10030
|
+
*/
|
|
10031
|
+
supportsNotifyTag?: boolean;
|
|
10032
|
+
|
|
10033
|
+
/**
|
|
10034
|
+
* Whether the framework should resume the file system at the next sign-in session. True by default.
|
|
10035
|
+
*
|
|
10036
|
+
* @since Chrome 64
|
|
10037
|
+
*/
|
|
10038
|
+
persistent?: boolean;
|
|
10039
|
+
}
|
|
10040
|
+
|
|
10041
|
+
export interface UnmountOptions {
|
|
10042
|
+
|
|
10043
|
+
/**
|
|
10044
|
+
* The identifier of the file system to be unmounted.
|
|
10045
|
+
*/
|
|
10046
|
+
fileSystemId: string;
|
|
10047
|
+
}
|
|
10048
|
+
|
|
10049
|
+
export interface UnmountRequestedOptions {
|
|
10050
|
+
|
|
10051
|
+
/**
|
|
10052
|
+
* The identifier of the file system to be unmounted.
|
|
10053
|
+
*/
|
|
10054
|
+
fileSystemId: string;
|
|
10055
|
+
|
|
10056
|
+
/**
|
|
10057
|
+
* The unique identifier of this request.
|
|
10058
|
+
*/
|
|
10059
|
+
requestId: number;
|
|
10060
|
+
}
|
|
10061
|
+
|
|
10062
|
+
export interface GetMetadataRequestedOptions {
|
|
10063
|
+
|
|
10064
|
+
/**
|
|
10065
|
+
* The identifier of the file system related to this operation.
|
|
10066
|
+
*/
|
|
10067
|
+
fileSystemId: string;
|
|
10068
|
+
|
|
10069
|
+
/**
|
|
10070
|
+
* The unique identifier of this request.
|
|
10071
|
+
*/
|
|
10072
|
+
requestId: number;
|
|
10073
|
+
|
|
10074
|
+
/**
|
|
10075
|
+
* The path of the entry to fetch metadata about.
|
|
10076
|
+
*/
|
|
10077
|
+
entryPath: string;
|
|
10078
|
+
|
|
10079
|
+
/**
|
|
10080
|
+
* Set to `true` if `is_directory` value is requested.
|
|
10081
|
+
*
|
|
10082
|
+
* @since Chrome 49
|
|
10083
|
+
*/
|
|
10084
|
+
isDirectory: boolean;
|
|
10085
|
+
|
|
10086
|
+
/**
|
|
10087
|
+
* Set to `true` if `name` value is requested.
|
|
10088
|
+
*
|
|
10089
|
+
* @since Chrome 49
|
|
10090
|
+
*/
|
|
10091
|
+
name: boolean;
|
|
10092
|
+
|
|
10093
|
+
/**
|
|
10094
|
+
* Set to `true` if `size` value is requested.
|
|
10095
|
+
*
|
|
10096
|
+
* @since Chrome 49
|
|
10097
|
+
*/
|
|
10098
|
+
size: boolean;
|
|
10099
|
+
|
|
10100
|
+
/**
|
|
10101
|
+
* Set to `true` if `modificationTime` value is requested.
|
|
10102
|
+
*
|
|
10103
|
+
* @since Chrome 49
|
|
10104
|
+
*/
|
|
10105
|
+
modificationTime: boolean;
|
|
10106
|
+
|
|
10107
|
+
/**
|
|
10108
|
+
* Set to `true` if `mimeType` value is requested.
|
|
10109
|
+
*
|
|
10110
|
+
* @since Chrome 49
|
|
10111
|
+
*/
|
|
10112
|
+
mimeType: boolean;
|
|
10113
|
+
|
|
10114
|
+
/**
|
|
10115
|
+
* Set to `true` if `thumbnail` value is requested.
|
|
10116
|
+
*/
|
|
10117
|
+
thumbnail: boolean;
|
|
10118
|
+
|
|
10119
|
+
/**
|
|
10120
|
+
* Set to `true` if `cloudIdentifier` value is requested.
|
|
10121
|
+
*
|
|
10122
|
+
* @since Chrome 117
|
|
10123
|
+
*/
|
|
10124
|
+
cloudIdentifier: boolean;
|
|
10125
|
+
|
|
10126
|
+
/**
|
|
10127
|
+
* Set to `true` if `cloudFileInfo` value is requested.
|
|
10128
|
+
*
|
|
10129
|
+
* @since Chrome 125
|
|
10130
|
+
*/
|
|
10131
|
+
cloudFileInfo: boolean;
|
|
10132
|
+
}
|
|
10133
|
+
|
|
10134
|
+
/**
|
|
10135
|
+
* @since Chrome 45
|
|
10136
|
+
*/
|
|
10137
|
+
export interface GetActionsRequestedOptions {
|
|
10138
|
+
|
|
10139
|
+
/**
|
|
10140
|
+
* The identifier of the file system related to this operation.
|
|
10141
|
+
*/
|
|
10142
|
+
fileSystemId: string;
|
|
10143
|
+
|
|
10144
|
+
/**
|
|
10145
|
+
* The unique identifier of this request.
|
|
10146
|
+
*/
|
|
10147
|
+
requestId: number;
|
|
10148
|
+
|
|
10149
|
+
/**
|
|
10150
|
+
* List of paths of entries for the list of actions.
|
|
10151
|
+
*
|
|
10152
|
+
* @since Chrome 47
|
|
10153
|
+
*/
|
|
10154
|
+
entryPaths: string[];
|
|
10155
|
+
}
|
|
10156
|
+
|
|
10157
|
+
export interface ReadDirectoryRequestedOptions {
|
|
10158
|
+
|
|
10159
|
+
/**
|
|
10160
|
+
* The identifier of the file system related to this operation.
|
|
10161
|
+
*/
|
|
10162
|
+
fileSystemId: string;
|
|
10163
|
+
|
|
10164
|
+
/**
|
|
10165
|
+
* The unique identifier of this request.
|
|
10166
|
+
*/
|
|
10167
|
+
requestId: number;
|
|
10168
|
+
|
|
10169
|
+
/**
|
|
10170
|
+
* The path of the directory which contents are requested.
|
|
10171
|
+
*/
|
|
10172
|
+
directoryPath: string;
|
|
10173
|
+
|
|
10174
|
+
/**
|
|
10175
|
+
* Set to `true` if `is_directory` value is requested.
|
|
10176
|
+
*
|
|
10177
|
+
* @since Chrome 49
|
|
10178
|
+
*/
|
|
10179
|
+
isDirectory: boolean;
|
|
10180
|
+
|
|
10181
|
+
/**
|
|
10182
|
+
* Set to `true` if `name` value is requested.
|
|
10183
|
+
*
|
|
10184
|
+
* @since Chrome 49
|
|
10185
|
+
*/
|
|
10186
|
+
name: boolean;
|
|
10187
|
+
|
|
10188
|
+
/**
|
|
10189
|
+
* Set to `true` if `size` value is requested.
|
|
10190
|
+
*
|
|
10191
|
+
* @since Chrome 49
|
|
10192
|
+
*/
|
|
10193
|
+
size: boolean;
|
|
10194
|
+
|
|
10195
|
+
/**
|
|
10196
|
+
* Set to `true` if `modificationTime` value is requested.
|
|
10197
|
+
*
|
|
10198
|
+
* @since Chrome 49
|
|
10199
|
+
*/
|
|
10200
|
+
modificationTime: boolean;
|
|
10201
|
+
|
|
10202
|
+
/**
|
|
10203
|
+
* Set to `true` if `mimeType` value is requested.
|
|
10204
|
+
*
|
|
10205
|
+
* @since Chrome 49
|
|
10206
|
+
*/
|
|
10207
|
+
mimeType: boolean;
|
|
10208
|
+
|
|
10209
|
+
/**
|
|
10210
|
+
* Set to `true` if `thumbnail` value is requested.
|
|
10211
|
+
*
|
|
10212
|
+
* @since Chrome 49
|
|
10213
|
+
*/
|
|
10214
|
+
thumbnail: boolean;
|
|
10215
|
+
}
|
|
10216
|
+
|
|
10217
|
+
export interface OpenFileRequestedOptions {
|
|
10218
|
+
|
|
10219
|
+
/**
|
|
10220
|
+
* The identifier of the file system related to this operation.
|
|
10221
|
+
*/
|
|
10222
|
+
fileSystemId: string;
|
|
10223
|
+
|
|
10224
|
+
/**
|
|
10225
|
+
* A request ID which will be used by consecutive read/write and close requests.
|
|
10226
|
+
*/
|
|
10227
|
+
requestId: number;
|
|
10228
|
+
|
|
10229
|
+
/**
|
|
10230
|
+
* The path of the file to be opened.
|
|
10231
|
+
*/
|
|
10232
|
+
filePath: string;
|
|
10233
|
+
|
|
10234
|
+
/**
|
|
10235
|
+
* Whether the file will be used for reading or writing.
|
|
10236
|
+
*/
|
|
10237
|
+
mode: OpenFileMode;
|
|
10238
|
+
}
|
|
10239
|
+
|
|
10240
|
+
export interface CloseFileRequestedOptions {
|
|
10241
|
+
|
|
10242
|
+
/**
|
|
10243
|
+
* The identifier of the file system related to this operation.
|
|
10244
|
+
*/
|
|
10245
|
+
fileSystemId: string;
|
|
10246
|
+
|
|
10247
|
+
/**
|
|
10248
|
+
* The unique identifier of this request.
|
|
10249
|
+
*/
|
|
10250
|
+
requestId: number;
|
|
10251
|
+
|
|
10252
|
+
/**
|
|
10253
|
+
* A request ID used to open the file.
|
|
10254
|
+
*/
|
|
10255
|
+
openRequestId: number;
|
|
10256
|
+
}
|
|
10257
|
+
|
|
10258
|
+
export interface ReadFileRequestedOptions {
|
|
10259
|
+
|
|
10260
|
+
/**
|
|
10261
|
+
* The identifier of the file system related to this operation.
|
|
10262
|
+
*/
|
|
10263
|
+
fileSystemId: string;
|
|
10264
|
+
|
|
10265
|
+
/**
|
|
10266
|
+
* The unique identifier of this request.
|
|
10267
|
+
*/
|
|
10268
|
+
requestId: number;
|
|
10269
|
+
|
|
10270
|
+
/**
|
|
10271
|
+
* A request ID used to open the file.
|
|
10272
|
+
*/
|
|
10273
|
+
openRequestId: number;
|
|
10274
|
+
|
|
10275
|
+
/**
|
|
10276
|
+
* Position in the file (in bytes) to start reading from.
|
|
10277
|
+
*/
|
|
10278
|
+
offset: number;
|
|
10279
|
+
|
|
10280
|
+
/**
|
|
10281
|
+
* Number of bytes to be returned.
|
|
10282
|
+
*/
|
|
10283
|
+
length: number;
|
|
10284
|
+
}
|
|
10285
|
+
|
|
10286
|
+
export interface CreateDirectoryRequestedOptions {
|
|
10287
|
+
|
|
10288
|
+
/**
|
|
10289
|
+
* The identifier of the file system related to this operation.
|
|
10290
|
+
*/
|
|
10291
|
+
fileSystemId: string;
|
|
10292
|
+
|
|
10293
|
+
/**
|
|
10294
|
+
* The unique identifier of this request.
|
|
10295
|
+
*/
|
|
10296
|
+
requestId: number;
|
|
10297
|
+
|
|
10298
|
+
/**
|
|
10299
|
+
* The path of the directory to be created.
|
|
10300
|
+
*/
|
|
10301
|
+
directoryPath: string;
|
|
10302
|
+
|
|
10303
|
+
/**
|
|
10304
|
+
* Whether the operation is recursive (for directories only).
|
|
10305
|
+
*/
|
|
10306
|
+
recursive: boolean;
|
|
10307
|
+
}
|
|
10308
|
+
|
|
10309
|
+
export interface DeleteEntryRequestedOptions {
|
|
10310
|
+
|
|
10311
|
+
/**
|
|
10312
|
+
* The identifier of the file system related to this operation.
|
|
10313
|
+
*/
|
|
10314
|
+
fileSystemId: string;
|
|
10315
|
+
|
|
10316
|
+
/**
|
|
10317
|
+
* The unique identifier of this request.
|
|
10318
|
+
*/
|
|
10319
|
+
requestId: number;
|
|
10320
|
+
|
|
10321
|
+
/**
|
|
10322
|
+
* The path of the entry to be deleted.
|
|
10323
|
+
*/
|
|
10324
|
+
entryPath: string;
|
|
10325
|
+
|
|
10326
|
+
/**
|
|
10327
|
+
* Whether the operation is recursive (for directories only).
|
|
10328
|
+
*/
|
|
10329
|
+
recursive: boolean;
|
|
10330
|
+
}
|
|
10331
|
+
|
|
10332
|
+
export interface CreateFileRequestedOptions {
|
|
10333
|
+
|
|
10334
|
+
/**
|
|
10335
|
+
* The identifier of the file system related to this operation.
|
|
10336
|
+
*/
|
|
10337
|
+
fileSystemId: string;
|
|
10338
|
+
|
|
10339
|
+
/**
|
|
10340
|
+
* The unique identifier of this request.
|
|
10341
|
+
*/
|
|
10342
|
+
requestId: number;
|
|
10343
|
+
|
|
10344
|
+
/**
|
|
10345
|
+
* The path of the file to be created.
|
|
10346
|
+
*/
|
|
10347
|
+
filePath: string;
|
|
10348
|
+
}
|
|
10349
|
+
|
|
10350
|
+
export interface CopyEntryRequestedOptions {
|
|
10351
|
+
|
|
10352
|
+
/**
|
|
10353
|
+
* The identifier of the file system related to this operation.
|
|
10354
|
+
*/
|
|
10355
|
+
fileSystemId: string;
|
|
10356
|
+
|
|
10357
|
+
/**
|
|
10358
|
+
* The unique identifier of this request.
|
|
10359
|
+
*/
|
|
10360
|
+
requestId: number;
|
|
10361
|
+
|
|
10362
|
+
/**
|
|
10363
|
+
* The source path of the entry to be copied.
|
|
10364
|
+
*/
|
|
10365
|
+
sourcePath: string;
|
|
10366
|
+
|
|
10367
|
+
/**
|
|
10368
|
+
* The destination path for the copy operation.
|
|
10369
|
+
*/
|
|
10370
|
+
targetPath: string;
|
|
10371
|
+
}
|
|
10372
|
+
|
|
10373
|
+
export interface MoveEntryRequestedOptions {
|
|
10374
|
+
|
|
10375
|
+
/**
|
|
10376
|
+
* The identifier of the file system related to this operation.
|
|
10377
|
+
*/
|
|
10378
|
+
fileSystemId: string;
|
|
10379
|
+
|
|
10380
|
+
/**
|
|
10381
|
+
* The unique identifier of this request.
|
|
10382
|
+
*/
|
|
10383
|
+
requestId: number;
|
|
9571
10384
|
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
*/
|
|
9577
|
-
export type automation = boolean | {
|
|
10385
|
+
/**
|
|
10386
|
+
* The source path of the entry to be moved into a new place.
|
|
10387
|
+
*/
|
|
10388
|
+
sourcePath: string;
|
|
9578
10389
|
|
|
9579
10390
|
/**
|
|
9580
|
-
*
|
|
10391
|
+
* The destination path for the copy operation.
|
|
9581
10392
|
*/
|
|
9582
|
-
|
|
9583
|
-
}
|
|
10393
|
+
targetPath: string;
|
|
10394
|
+
}
|
|
9584
10395
|
|
|
9585
|
-
|
|
9586
|
-
* The `content_capabilities` manifest entry allows an extension to grant certain additional capabilities to web contents whose locations match a given set of URL patterns.
|
|
9587
|
-
*/
|
|
9588
|
-
export interface ContentCapabilities {
|
|
10396
|
+
export interface TruncateRequestedOptions {
|
|
9589
10397
|
|
|
9590
10398
|
/**
|
|
9591
|
-
* The
|
|
10399
|
+
* The identifier of the file system related to this operation.
|
|
9592
10400
|
*/
|
|
9593
|
-
|
|
10401
|
+
fileSystemId: string;
|
|
9594
10402
|
|
|
9595
10403
|
/**
|
|
9596
|
-
* The
|
|
10404
|
+
* The unique identifier of this request.
|
|
9597
10405
|
*/
|
|
9598
|
-
|
|
10406
|
+
requestId: number;
|
|
10407
|
+
|
|
10408
|
+
/**
|
|
10409
|
+
* The path of the file to be truncated.
|
|
10410
|
+
*/
|
|
10411
|
+
filePath: string;
|
|
10412
|
+
|
|
10413
|
+
/**
|
|
10414
|
+
* Number of bytes to be retained after the operation completes.
|
|
10415
|
+
*/
|
|
10416
|
+
length: number;
|
|
9599
10417
|
}
|
|
9600
10418
|
|
|
9601
|
-
export interface
|
|
10419
|
+
export interface WriteFileRequestedOptions {
|
|
9602
10420
|
|
|
9603
10421
|
/**
|
|
9604
|
-
* The
|
|
9605
|
-
*
|
|
9606
|
-
* The wildcard `"*"` will allow all extensions and apps to connect.
|
|
10422
|
+
* The identifier of the file system related to this operation.
|
|
9607
10423
|
*/
|
|
9608
|
-
|
|
10424
|
+
fileSystemId: string;
|
|
9609
10425
|
|
|
9610
10426
|
/**
|
|
9611
|
-
* The
|
|
9612
|
-
*
|
|
9613
|
-
* Patterns cannot include wildcard domains nor subdomains of [(effective) top level domains](https://publicsuffix.org/list/); `*://google.com/*` and `http://*.chromium.org/*` are valid, while `<all_urls>`, `http://*\/*`, `*://*.com/*`, and even `http://*.appspot.com/*` are not.
|
|
10427
|
+
* The unique identifier of this request.
|
|
9614
10428
|
*/
|
|
9615
|
-
|
|
10429
|
+
requestId: number;
|
|
10430
|
+
|
|
10431
|
+
/**
|
|
10432
|
+
* A request ID used to open the file.
|
|
10433
|
+
*/
|
|
10434
|
+
openRequestId: number;
|
|
10435
|
+
|
|
10436
|
+
/**
|
|
10437
|
+
* Position in the file (in bytes) to start writing the bytes from.
|
|
10438
|
+
*/
|
|
10439
|
+
offset: number;
|
|
9616
10440
|
|
|
9617
10441
|
/**
|
|
9618
|
-
*
|
|
10442
|
+
* Buffer of bytes to be written to the file.
|
|
9619
10443
|
*/
|
|
9620
|
-
|
|
10444
|
+
data: ArrayBuffer;
|
|
9621
10445
|
}
|
|
9622
10446
|
|
|
9623
|
-
|
|
9624
|
-
* The `options_ui` manifest property declares how the options page should be displayed.
|
|
9625
|
-
*/
|
|
9626
|
-
export interface OptionsUI {
|
|
10447
|
+
export interface AbortRequestedOptions {
|
|
9627
10448
|
|
|
9628
10449
|
/**
|
|
9629
|
-
* The
|
|
10450
|
+
* The identifier of the file system related to this operation.
|
|
9630
10451
|
*/
|
|
9631
|
-
|
|
10452
|
+
fileSystemId: string;
|
|
9632
10453
|
|
|
9633
10454
|
/**
|
|
9634
|
-
*
|
|
10455
|
+
* The unique identifier of this request.
|
|
9635
10456
|
*/
|
|
9636
|
-
|
|
10457
|
+
requestId: number;
|
|
9637
10458
|
|
|
9638
10459
|
/**
|
|
9639
|
-
*
|
|
9640
|
-
*
|
|
9641
|
-
* **This is only useful to delay the inevitable deprecation of the old options UI!** It will be removed soon, so try not to use it. It will break.
|
|
10460
|
+
* An ID of the request to be aborted.
|
|
9642
10461
|
*/
|
|
9643
|
-
|
|
10462
|
+
operationRequestId: number;
|
|
9644
10463
|
}
|
|
9645
10464
|
|
|
9646
|
-
|
|
9647
|
-
* A single string or a list of strings representing host:port patterns.
|
|
9648
|
-
*/
|
|
9649
|
-
export type SocketHostPatterns = string | string[];
|
|
10465
|
+
export interface AddWatcherRequestedOptions {
|
|
9650
10466
|
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
10467
|
+
/**
|
|
10468
|
+
* The identifier of the file system related to this operation.
|
|
10469
|
+
*/
|
|
10470
|
+
fileSystemId: string;
|
|
9655
10471
|
|
|
9656
10472
|
/**
|
|
9657
|
-
* The
|
|
10473
|
+
* The unique identifier of this request.
|
|
9658
10474
|
*/
|
|
9659
|
-
|
|
10475
|
+
requestId: number;
|
|
9660
10476
|
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
10477
|
+
/**
|
|
10478
|
+
* The path of the entry to be observed.
|
|
10479
|
+
*/
|
|
10480
|
+
entryPath: string;
|
|
9665
10481
|
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
10482
|
+
/**
|
|
10483
|
+
* Whether observing should include all child entries recursively. It can be true for directories only.
|
|
10484
|
+
*/
|
|
10485
|
+
recursive: boolean;
|
|
10486
|
+
}
|
|
9670
10487
|
|
|
9671
|
-
|
|
9672
|
-
* The host:port pattern for `joinGroup` operations.
|
|
9673
|
-
*/
|
|
9674
|
-
multicastMembership?: SocketHostPatterns,
|
|
9675
|
-
};
|
|
10488
|
+
export interface RemoveWatcherRequestedOptions {
|
|
9676
10489
|
|
|
9677
10490
|
/**
|
|
9678
|
-
* The
|
|
10491
|
+
* The identifier of the file system related to this operation.
|
|
9679
10492
|
*/
|
|
9680
|
-
|
|
10493
|
+
fileSystemId: string;
|
|
9681
10494
|
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
};
|
|
10495
|
+
/**
|
|
10496
|
+
* The unique identifier of this request.
|
|
10497
|
+
*/
|
|
10498
|
+
requestId: number;
|
|
9687
10499
|
|
|
9688
10500
|
/**
|
|
9689
|
-
* The
|
|
10501
|
+
* The path of the watched entry.
|
|
9690
10502
|
*/
|
|
9691
|
-
|
|
10503
|
+
entryPath: string;
|
|
9692
10504
|
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
};
|
|
10505
|
+
/**
|
|
10506
|
+
* Mode of the watcher.
|
|
10507
|
+
*/
|
|
10508
|
+
recursive: boolean;
|
|
9698
10509
|
}
|
|
9699
10510
|
|
|
9700
10511
|
/**
|
|
9701
|
-
*
|
|
10512
|
+
* @since Chrome 45
|
|
9702
10513
|
*/
|
|
9703
|
-
export interface
|
|
10514
|
+
export interface Action {
|
|
10515
|
+
|
|
10516
|
+
/**
|
|
10517
|
+
* The identifier of the action. Any string or {@link CommonActionId} for common actions.
|
|
10518
|
+
*/
|
|
10519
|
+
id: string;
|
|
9704
10520
|
|
|
9705
10521
|
/**
|
|
9706
|
-
* The
|
|
10522
|
+
* The title of the action. It may be ignored for common actions.
|
|
9707
10523
|
*/
|
|
9708
|
-
|
|
10524
|
+
title?: string;
|
|
10525
|
+
}
|
|
10526
|
+
|
|
10527
|
+
/**
|
|
10528
|
+
* @since Chrome 45
|
|
10529
|
+
*/
|
|
10530
|
+
export interface ExecuteActionRequestedOptions {
|
|
9709
10531
|
|
|
9710
10532
|
/**
|
|
9711
|
-
*
|
|
10533
|
+
* The identifier of the file system related to this operation.
|
|
9712
10534
|
*/
|
|
9713
|
-
|
|
10535
|
+
fileSystemId: string;
|
|
9714
10536
|
|
|
9715
10537
|
/**
|
|
9716
|
-
*
|
|
10538
|
+
* The unique identifier of this request.
|
|
9717
10539
|
*/
|
|
9718
|
-
|
|
10540
|
+
requestId: number;
|
|
9719
10541
|
|
|
9720
10542
|
/**
|
|
9721
|
-
*
|
|
10543
|
+
* The set of paths of the entries to be used for the action.
|
|
9722
10544
|
*
|
|
9723
|
-
* @since Chrome
|
|
10545
|
+
* @since Chrome 47
|
|
10546
|
+
*/
|
|
10547
|
+
entryPaths: string[];
|
|
10548
|
+
|
|
10549
|
+
/**
|
|
10550
|
+
* The identifier of the action to be executed.
|
|
9724
10551
|
*/
|
|
9725
|
-
|
|
10552
|
+
actionId: string;
|
|
9726
10553
|
}
|
|
9727
10554
|
|
|
9728
|
-
|
|
9729
|
-
* The `usb_printers` manifest property lists the USB printers supported by an app implementing the {@link printerProvider} API.
|
|
9730
|
-
*
|
|
9731
|
-
* @since Chrome 44
|
|
9732
|
-
*/
|
|
9733
|
-
export interface UsbPrinters {
|
|
10555
|
+
export interface Change {
|
|
9734
10556
|
|
|
9735
10557
|
/**
|
|
9736
|
-
*
|
|
10558
|
+
* The path of the changed entry.
|
|
9737
10559
|
*/
|
|
9738
|
-
|
|
10560
|
+
entryPath: string;
|
|
9739
10561
|
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
10562
|
+
/**
|
|
10563
|
+
* The type of the change which happened to the entry.
|
|
10564
|
+
*/
|
|
10565
|
+
changeType: ChangeType;
|
|
9744
10566
|
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
10567
|
+
/**
|
|
10568
|
+
* Information relating to the file if backed by a cloud file system.
|
|
10569
|
+
*
|
|
10570
|
+
* @since Chrome 125
|
|
10571
|
+
*/
|
|
10572
|
+
cloudFileInfo?: CloudFileInfo;
|
|
10573
|
+
}
|
|
9749
10574
|
|
|
9750
|
-
|
|
9751
|
-
* USB interface class implemented by any interface of a matching device.
|
|
9752
|
-
*/
|
|
9753
|
-
interfaceClass?: number,
|
|
10575
|
+
export interface NotifyOptions {
|
|
9754
10576
|
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
10577
|
+
/**
|
|
10578
|
+
* The identifier of the file system related to this change.
|
|
10579
|
+
*/
|
|
10580
|
+
fileSystemId: string;
|
|
9759
10581
|
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
10582
|
+
/**
|
|
10583
|
+
* The path of the observed entry.
|
|
10584
|
+
*/
|
|
10585
|
+
observedPath: string;
|
|
10586
|
+
|
|
10587
|
+
/**
|
|
10588
|
+
* Mode of the observed entry.
|
|
10589
|
+
*/
|
|
10590
|
+
recursive: boolean;
|
|
10591
|
+
|
|
10592
|
+
/**
|
|
10593
|
+
* The type of the change which happened to the observed entry. If it is DELETED, then the observed entry will be automatically removed from the list of observed entries.
|
|
10594
|
+
*/
|
|
10595
|
+
changeType: ChangeType;
|
|
10596
|
+
|
|
10597
|
+
/**
|
|
10598
|
+
* List of changes to entries within the observed directory (including the entry itself)
|
|
10599
|
+
*/
|
|
10600
|
+
changes?: Change[];
|
|
10601
|
+
|
|
10602
|
+
/**
|
|
10603
|
+
* Tag for the notification. Required if the file system was mounted with the `supportsNotifyTag` option. Note, that this flag is necessary to provide notifications about changes which changed even when the system was shutdown.
|
|
10604
|
+
*/
|
|
10605
|
+
tag?: string;
|
|
9765
10606
|
}
|
|
9766
10607
|
|
|
9767
10608
|
/**
|
|
9768
|
-
*
|
|
9769
|
-
*
|
|
9770
|
-
* @since Chrome 47
|
|
10609
|
+
* @since Chrome 44
|
|
9771
10610
|
*/
|
|
9772
|
-
export
|
|
10611
|
+
export interface ConfigureRequestedOptions {
|
|
9773
10612
|
|
|
9774
10613
|
/**
|
|
9775
|
-
*
|
|
10614
|
+
* The identifier of the file system to be configured.
|
|
9776
10615
|
*/
|
|
9777
|
-
|
|
10616
|
+
fileSystemId: string;
|
|
9778
10617
|
|
|
9779
10618
|
/**
|
|
9780
|
-
*
|
|
9781
|
-
*
|
|
9782
|
-
* @since Chrome 66
|
|
10619
|
+
* The unique identifier of this request.
|
|
9783
10620
|
*/
|
|
9784
|
-
|
|
9785
|
-
}
|
|
9786
|
-
}
|
|
9787
|
-
|
|
9788
|
-
/**
|
|
9789
|
-
* The `chrome.extensionTypes` API contains type declarations for Chrome extensions.
|
|
9790
|
-
*/
|
|
9791
|
-
export namespace extensionTypes {
|
|
10621
|
+
requestId: number;
|
|
10622
|
+
}
|
|
9792
10623
|
|
|
9793
10624
|
/**
|
|
9794
|
-
* @
|
|
10625
|
+
* Raised when unmounting for the file system with the `fileSystemId` identifier is requested. In the response, the {@link unmount} API method must be called together with `successCallback`. If unmounting is not possible (eg. due to a pending operation), then `errorCallback` must be called.
|
|
9795
10626
|
*/
|
|
9796
|
-
export
|
|
10627
|
+
export const onUnmountRequested: events.Event<(
|
|
10628
|
+
options: UnmountRequestedOptions,
|
|
10629
|
+
successCallback: () => void,
|
|
10630
|
+
errorCallback: (
|
|
10631
|
+
error: ProviderError,
|
|
10632
|
+
) => void,
|
|
10633
|
+
) => void>;
|
|
9797
10634
|
|
|
9798
10635
|
/**
|
|
9799
|
-
*
|
|
9800
|
-
*
|
|
9801
|
-
* @since Chrome 139
|
|
10636
|
+
* Raised when metadata of a file or a directory at `entryPath` is requested. The metadata must be returned with the `successCallback` call. In case of an error, `errorCallback` must be called.
|
|
9802
10637
|
*/
|
|
9803
|
-
export
|
|
10638
|
+
export const onGetMetadataRequested: events.Event<(
|
|
10639
|
+
options: GetMetadataRequestedOptions,
|
|
10640
|
+
successCallback: (
|
|
10641
|
+
metadata: EntryMetadata,
|
|
10642
|
+
) => void,
|
|
10643
|
+
errorCallback: (
|
|
10644
|
+
error: ProviderError,
|
|
10645
|
+
) => void,
|
|
10646
|
+
) => void>;
|
|
9804
10647
|
|
|
9805
10648
|
/**
|
|
9806
|
-
* The
|
|
10649
|
+
* Raised when a list of actions for a set of files or directories at `entryPaths` is requested. All of the returned actions must be applicable to each entry. If there are no such actions, an empty array should be returned. The actions must be returned with the `successCallback` call. In case of an error, `errorCallback` must be called.
|
|
9807
10650
|
*
|
|
9808
|
-
* @since Chrome
|
|
10651
|
+
* @since Chrome 48
|
|
9809
10652
|
*/
|
|
9810
|
-
export
|
|
10653
|
+
export const onGetActionsRequested: events.Event<(
|
|
10654
|
+
options: GetActionsRequestedOptions,
|
|
10655
|
+
successCallback: (
|
|
10656
|
+
actions: Action[],
|
|
10657
|
+
) => void,
|
|
10658
|
+
errorCallback: (
|
|
10659
|
+
error: ProviderError,
|
|
10660
|
+
) => void,
|
|
10661
|
+
) => void>;
|
|
9811
10662
|
|
|
9812
10663
|
/**
|
|
9813
|
-
*
|
|
10664
|
+
* Raised when contents of a directory at `directoryPath` are requested. The results must be returned in chunks by calling the `successCallback` several times. In case of an error, `errorCallback` must be called.
|
|
9814
10665
|
*/
|
|
9815
|
-
export
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
10666
|
+
export const onReadDirectoryRequested: events.Event<(
|
|
10667
|
+
options: ReadDirectoryRequestedOptions,
|
|
10668
|
+
successCallback: (
|
|
10669
|
+
entries: EntryMetadata[],
|
|
10670
|
+
hasMore: boolean,
|
|
10671
|
+
) => void,
|
|
10672
|
+
errorCallback: (
|
|
10673
|
+
error: ProviderError,
|
|
10674
|
+
) => void,
|
|
10675
|
+
) => void>;
|
|
9821
10676
|
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
10677
|
+
/**
|
|
10678
|
+
* Raised when opening a file at `filePath` is requested. If the file does not exist, then the operation must fail. Maximum number of files opened at once can be specified with `MountOptions`.
|
|
10679
|
+
*/
|
|
10680
|
+
export const onOpenFileRequested: events.Event<(
|
|
10681
|
+
options: OpenFileRequestedOptions,
|
|
10682
|
+
successCallback: (
|
|
10683
|
+
/**
|
|
10684
|
+
* @since Chrome 125
|
|
10685
|
+
*/
|
|
10686
|
+
metadata?: EntryMetadata,
|
|
10687
|
+
) => void,
|
|
10688
|
+
errorCallback: (
|
|
10689
|
+
error: ProviderError,
|
|
10690
|
+
) => void,
|
|
10691
|
+
) => void>;
|
|
9827
10692
|
|
|
9828
10693
|
/**
|
|
9829
|
-
*
|
|
9830
|
-
*
|
|
9831
|
-
* @chrome-enum "document\_start" Script is injected after any files from css, but before any other DOM is constructed or any other script is run.
|
|
9832
|
-
* @chrome-enum "document\_end" Script is injected immediately after the DOM is complete, but before subresources like images and frames have loaded.
|
|
9833
|
-
* @chrome-enum "document\_idle" The browser chooses a time to inject the script between "document\_end" and immediately after the `window.onload` event fires. The exact moment of injection depends on how complex the document is and how long it is taking to load, and is optimized for page load speed. Content scripts running at "document\_idle" don't need to listen for the `window.onload` event; they are guaranteed to run after the DOM completes. If a script definitely needs to run after `window.onload`, the extension can check if `onload` has already fired by using the `document.readyState` property.
|
|
9834
|
-
* @since Chrome 44
|
|
10694
|
+
* Raised when opening a file previously opened with `openRequestId` is requested to be closed.
|
|
9835
10695
|
*/
|
|
9836
|
-
export
|
|
10696
|
+
export const onCloseFileRequested: events.Event<(
|
|
10697
|
+
options: CloseFileRequestedOptions,
|
|
10698
|
+
successCallback: () => void,
|
|
10699
|
+
errorCallback: (
|
|
10700
|
+
error: ProviderError,
|
|
10701
|
+
) => void,
|
|
10702
|
+
) => void>;
|
|
9837
10703
|
|
|
9838
10704
|
/**
|
|
9839
|
-
* The
|
|
9840
|
-
*
|
|
9841
|
-
* @since Chrome 66
|
|
10705
|
+
* Raised when reading contents of a file opened previously with `openRequestId` is requested. The results must be returned in chunks by calling `successCallback` several times. In case of an error, `errorCallback` must be called.
|
|
9842
10706
|
*/
|
|
9843
|
-
export
|
|
10707
|
+
export const onReadFileRequested: events.Event<(
|
|
10708
|
+
options: ReadFileRequestedOptions,
|
|
10709
|
+
successCallback: (
|
|
10710
|
+
data: ArrayBuffer,
|
|
10711
|
+
hasMore: boolean,
|
|
10712
|
+
) => void,
|
|
10713
|
+
errorCallback: (
|
|
10714
|
+
error: ProviderError,
|
|
10715
|
+
) => void,
|
|
10716
|
+
) => void>;
|
|
9844
10717
|
|
|
9845
10718
|
/**
|
|
9846
|
-
*
|
|
10719
|
+
* Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory already exists. If `recursive` is true, then all of the missing directories on the directory path must be created.
|
|
9847
10720
|
*/
|
|
9848
|
-
export
|
|
10721
|
+
export const onCreateDirectoryRequested: events.Event<(
|
|
10722
|
+
options: CreateDirectoryRequestedOptions,
|
|
10723
|
+
successCallback: () => void,
|
|
10724
|
+
errorCallback: (
|
|
10725
|
+
error: ProviderError,
|
|
10726
|
+
) => void,
|
|
10727
|
+
) => void>;
|
|
9849
10728
|
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
10729
|
+
/**
|
|
10730
|
+
* Raised when deleting an entry is requested. If `recursive` is true, and the entry is a directory, then all of the entries inside must be recursively deleted as well.
|
|
10731
|
+
*/
|
|
10732
|
+
export const onDeleteEntryRequested: events.Event<(
|
|
10733
|
+
options: DeleteEntryRequestedOptions,
|
|
10734
|
+
successCallback: () => void,
|
|
10735
|
+
errorCallback: (
|
|
10736
|
+
error: ProviderError,
|
|
10737
|
+
) => void,
|
|
10738
|
+
) => void>;
|
|
9857
10739
|
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
10740
|
+
/**
|
|
10741
|
+
* Raised when creating a file is requested. If the file already exists, then `errorCallback` must be called with the `"EXISTS"` error code.
|
|
10742
|
+
*/
|
|
10743
|
+
export const onCreateFileRequested: events.Event<(
|
|
10744
|
+
options: CreateFileRequestedOptions,
|
|
10745
|
+
successCallback: () => void,
|
|
10746
|
+
errorCallback: (
|
|
10747
|
+
error: ProviderError,
|
|
10748
|
+
) => void,
|
|
10749
|
+
) => void>;
|
|
9862
10750
|
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
10751
|
+
/**
|
|
10752
|
+
* Raised when copying an entry (recursively if a directory) is requested. If an error occurs, then `errorCallback` must be called.
|
|
10753
|
+
*/
|
|
10754
|
+
export const onCopyEntryRequested: events.Event<(
|
|
10755
|
+
options: CopyEntryRequestedOptions,
|
|
10756
|
+
successCallback: () => void,
|
|
10757
|
+
errorCallback: (
|
|
10758
|
+
error: ProviderError,
|
|
10759
|
+
) => void,
|
|
10760
|
+
) => void>;
|
|
9867
10761
|
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
10762
|
+
/**
|
|
10763
|
+
* Raised when moving an entry (recursively if a directory) is requested. If an error occurs, then `errorCallback` must be called.
|
|
10764
|
+
*/
|
|
10765
|
+
export const onMoveEntryRequested: events.Event<(
|
|
10766
|
+
options: MoveEntryRequestedOptions,
|
|
10767
|
+
successCallback: () => void,
|
|
10768
|
+
errorCallback: (
|
|
10769
|
+
error: ProviderError,
|
|
10770
|
+
) => void,
|
|
10771
|
+
) => void>;
|
|
9874
10772
|
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
10773
|
+
/**
|
|
10774
|
+
* Raised when truncating a file to a desired length is requested. If an error occurs, then `errorCallback` must be called.
|
|
10775
|
+
*/
|
|
10776
|
+
export const onTruncateRequested: events.Event<(
|
|
10777
|
+
options: TruncateRequestedOptions,
|
|
10778
|
+
successCallback: () => void,
|
|
10779
|
+
errorCallback: (
|
|
10780
|
+
error: ProviderError,
|
|
10781
|
+
) => void,
|
|
10782
|
+
) => void>;
|
|
9879
10783
|
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
|
|
10784
|
+
/**
|
|
10785
|
+
* Raised when writing contents to a file opened previously with `openRequestId` is requested.
|
|
10786
|
+
*/
|
|
10787
|
+
export const onWriteFileRequested: events.Event<(
|
|
10788
|
+
options: WriteFileRequestedOptions,
|
|
10789
|
+
successCallback: () => void,
|
|
10790
|
+
errorCallback: (
|
|
10791
|
+
error: ProviderError,
|
|
10792
|
+
) => void,
|
|
10793
|
+
) => void>;
|
|
9884
10794
|
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
10795
|
+
/**
|
|
10796
|
+
* Raised when aborting an operation with `operationRequestId` is requested. The operation executed with `operationRequestId` must be immediately stopped and `successCallback` of this abort request executed. If aborting fails, then `errorCallback` must be called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling `errorCallback`, the request may be forcibly aborted.
|
|
10797
|
+
*/
|
|
10798
|
+
export const onAbortRequested: events.Event<(
|
|
10799
|
+
options: AbortRequestedOptions,
|
|
10800
|
+
successCallback: () => void,
|
|
10801
|
+
errorCallback: (
|
|
10802
|
+
error: ProviderError,
|
|
10803
|
+
) => void,
|
|
10804
|
+
) => void>;
|
|
9892
10805
|
|
|
9893
10806
|
/**
|
|
9894
|
-
*
|
|
10807
|
+
* Raised when showing a configuration dialog for `fileSystemId` is requested. If it's handled, the `file_system_provider.configurable` manfiest option must be set to true.
|
|
9895
10808
|
*
|
|
9896
|
-
* @since Chrome
|
|
10809
|
+
* @since Chrome 44
|
|
9897
10810
|
*/
|
|
9898
|
-
export
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
/**
|
|
9906
|
-
* CSS file to remove.
|
|
9907
|
-
*/
|
|
9908
|
-
file?: string;
|
|
10811
|
+
export const onConfigureRequested: events.Event<(
|
|
10812
|
+
options: ConfigureRequestedOptions,
|
|
10813
|
+
successCallback: () => void,
|
|
10814
|
+
errorCallback: (
|
|
10815
|
+
error: ProviderError,
|
|
10816
|
+
) => void,
|
|
10817
|
+
) => void>;
|
|
9909
10818
|
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
10819
|
+
/**
|
|
10820
|
+
* Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead `app.runtime.onLaunched` should be handled in order to mount new file systems when a file is opened. For multiple mounts, the `file_system_provider.multiple_mounts` manifest option must be set to true.
|
|
10821
|
+
*
|
|
10822
|
+
* @since Chrome 44
|
|
10823
|
+
*/
|
|
10824
|
+
export const onMountRequested: events.Event<(
|
|
10825
|
+
successCallback: () => void,
|
|
10826
|
+
errorCallback: (
|
|
10827
|
+
error: ProviderError,
|
|
10828
|
+
) => void,
|
|
10829
|
+
) => void>;
|
|
9914
10830
|
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
10831
|
+
/**
|
|
10832
|
+
* Raised when setting a new directory watcher is requested. If an error occurs, then `errorCallback` must be called.
|
|
10833
|
+
*
|
|
10834
|
+
* @since Chrome 45
|
|
10835
|
+
*/
|
|
10836
|
+
export const onAddWatcherRequested: events.Event<(
|
|
10837
|
+
options: AddWatcherRequestedOptions,
|
|
10838
|
+
successCallback: () => void,
|
|
10839
|
+
errorCallback: (
|
|
10840
|
+
error: ProviderError,
|
|
10841
|
+
) => void,
|
|
10842
|
+
) => void>;
|
|
9919
10843
|
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
10844
|
+
/**
|
|
10845
|
+
* Raised when the watcher should be removed. If an error occurs, then `errorCallback` must be called.
|
|
10846
|
+
*
|
|
10847
|
+
* @since Chrome 45
|
|
10848
|
+
*/
|
|
10849
|
+
export const onRemoveWatcherRequested: events.Event<(
|
|
10850
|
+
options: RemoveWatcherRequestedOptions,
|
|
10851
|
+
successCallback: () => void,
|
|
10852
|
+
errorCallback: (
|
|
10853
|
+
error: ProviderError,
|
|
10854
|
+
) => void,
|
|
10855
|
+
) => void>;
|
|
9924
10856
|
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
10857
|
+
/**
|
|
10858
|
+
* Raised when executing an action for a set of files or directories is\\ requested. After the action is completed, `successCallback` must be called. On error, `errorCallback` must be called.
|
|
10859
|
+
*
|
|
10860
|
+
* @since Chrome 48
|
|
10861
|
+
*/
|
|
10862
|
+
export const onExecuteActionRequested: events.Event<(
|
|
10863
|
+
options: ExecuteActionRequestedOptions,
|
|
10864
|
+
successCallback: () => void,
|
|
10865
|
+
errorCallback: (
|
|
10866
|
+
error: ProviderError,
|
|
10867
|
+
) => void,
|
|
10868
|
+
) => void>;
|
|
9930
10869
|
|
|
9931
10870
|
/**
|
|
9932
|
-
*
|
|
10871
|
+
* 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.
|
|
9933
10872
|
*
|
|
9934
|
-
*
|
|
10873
|
+
* Depending on the type of the file system being mounted, the `source` option must be set appropriately.
|
|
10874
|
+
*
|
|
10875
|
+
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
10876
|
+
*
|
|
10877
|
+
* @chrome-returns-extra since Chrome 96
|
|
10878
|
+
* @returns A generic result callback to indicate success or failure.
|
|
9935
10879
|
*/
|
|
9936
|
-
export
|
|
10880
|
+
export function mount(
|
|
10881
|
+
|
|
10882
|
+
options: MountOptions,
|
|
10883
|
+
): Promise<void>;
|
|
9937
10884
|
|
|
9938
10885
|
/**
|
|
9939
|
-
*
|
|
10886
|
+
* 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.
|
|
9940
10887
|
*
|
|
9941
|
-
*
|
|
10888
|
+
* Depending on the type of the file system being mounted, the `source` option must be set appropriately.
|
|
10889
|
+
*
|
|
10890
|
+
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
9942
10891
|
*/
|
|
9943
|
-
export
|
|
10892
|
+
export function mount(
|
|
10893
|
+
|
|
10894
|
+
options: MountOptions,
|
|
10895
|
+
|
|
10896
|
+
callback?: () => void,
|
|
10897
|
+
): void;
|
|
9944
10898
|
|
|
9945
10899
|
/**
|
|
9946
|
-
*
|
|
10900
|
+
* 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).
|
|
9947
10901
|
*
|
|
9948
|
-
* @
|
|
10902
|
+
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
10903
|
+
*
|
|
10904
|
+
* @chrome-returns-extra since Chrome 96
|
|
10905
|
+
* @returns A generic result callback to indicate success or failure.
|
|
9949
10906
|
*/
|
|
9950
|
-
export
|
|
9951
|
-
}
|
|
10907
|
+
export function unmount(
|
|
9952
10908
|
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
*
|
|
9956
|
-
* @chrome-permission fileBrowserHandler
|
|
9957
|
-
* @chrome-disallow-service-workers
|
|
9958
|
-
* @chrome-platform chromeos
|
|
9959
|
-
*/
|
|
9960
|
-
export namespace fileBrowserHandler {
|
|
10909
|
+
options: UnmountOptions,
|
|
10910
|
+
): Promise<void>;
|
|
9961
10911
|
|
|
9962
10912
|
/**
|
|
9963
|
-
*
|
|
10913
|
+
* 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).
|
|
10914
|
+
*
|
|
10915
|
+
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
9964
10916
|
*/
|
|
9965
|
-
export
|
|
10917
|
+
export function unmount(
|
|
9966
10918
|
|
|
9967
|
-
|
|
9968
|
-
* Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser).
|
|
9969
|
-
*/
|
|
9970
|
-
entries: any[];
|
|
10919
|
+
options: UnmountOptions,
|
|
9971
10920
|
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
*/
|
|
9975
|
-
tab_id?: number;
|
|
9976
|
-
}
|
|
10921
|
+
callback?: () => void,
|
|
10922
|
+
): void;
|
|
9977
10923
|
|
|
9978
10924
|
/**
|
|
9979
|
-
*
|
|
10925
|
+
* Returns all file systems mounted by the extension.
|
|
10926
|
+
*
|
|
10927
|
+
* @chrome-returns-extra since Chrome 96
|
|
10928
|
+
* @returns Callback to receive the result of {@link getAll} function.
|
|
9980
10929
|
*/
|
|
9981
|
-
export
|
|
9982
|
-
id: string,
|
|
9983
|
-
details: FileHandlerExecuteEventDetails,
|
|
9984
|
-
) => void>;
|
|
9985
|
-
}
|
|
10930
|
+
export function getAll(): Promise<FileSystemInfo[]>;
|
|
9986
10931
|
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
*/
|
|
9992
|
-
export namespace fileHandlers {
|
|
10932
|
+
/**
|
|
10933
|
+
* Returns all file systems mounted by the extension.
|
|
10934
|
+
*/
|
|
10935
|
+
export function getAll(
|
|
9993
10936
|
|
|
9994
|
-
|
|
10937
|
+
callback?: (
|
|
10938
|
+
fileSystems: FileSystemInfo[],
|
|
10939
|
+
) => void,
|
|
10940
|
+
): void;
|
|
9995
10941
|
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10942
|
+
/**
|
|
10943
|
+
* Returns information about a file system with the passed `fileSystemId`.
|
|
10944
|
+
*
|
|
10945
|
+
* @chrome-returns-extra since Chrome 96
|
|
10946
|
+
* @returns Callback to receive the result of {@link get} function.
|
|
10947
|
+
*/
|
|
10948
|
+
export function get(
|
|
10000
10949
|
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
*/
|
|
10004
|
-
sizes?: string;
|
|
10950
|
+
fileSystemId: string,
|
|
10951
|
+
): Promise<FileSystemInfo>;
|
|
10005
10952
|
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
}
|
|
10953
|
+
/**
|
|
10954
|
+
* Returns information about a file system with the passed `fileSystemId`.
|
|
10955
|
+
*/
|
|
10956
|
+
export function get(
|
|
10011
10957
|
|
|
10012
|
-
|
|
10958
|
+
fileSystemId: string,
|
|
10013
10959
|
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
*/
|
|
10019
|
-
accept: {[name: string]: any};
|
|
10960
|
+
callback?: (
|
|
10961
|
+
fileSystem: FileSystemInfo,
|
|
10962
|
+
) => void,
|
|
10963
|
+
): void;
|
|
10020
10964
|
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10965
|
+
/**
|
|
10966
|
+
* Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNotifyTag`, 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}.
|
|
10967
|
+
*
|
|
10968
|
+
* To use, the `file_system_provider.notify` manifest option must be set to true.
|
|
10969
|
+
*
|
|
10970
|
+
* 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.
|
|
10971
|
+
*
|
|
10972
|
+
* 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.
|
|
10973
|
+
*
|
|
10974
|
+
* 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.
|
|
10975
|
+
*
|
|
10976
|
+
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
10977
|
+
*
|
|
10978
|
+
* @chrome-returns-extra since Chrome 96
|
|
10979
|
+
* @returns A generic result callback to indicate success or failure.
|
|
10980
|
+
* @since Chrome 45
|
|
10981
|
+
*/
|
|
10982
|
+
export function notify(
|
|
10025
10983
|
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
*/
|
|
10029
|
-
name: string;
|
|
10984
|
+
options: NotifyOptions,
|
|
10985
|
+
): Promise<void>;
|
|
10030
10986
|
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10987
|
+
/**
|
|
10988
|
+
* Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNotifyTag`, 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}.
|
|
10989
|
+
*
|
|
10990
|
+
* To use, the `file_system_provider.notify` manifest option must be set to true.
|
|
10991
|
+
*
|
|
10992
|
+
* 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.
|
|
10993
|
+
*
|
|
10994
|
+
* 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.
|
|
10995
|
+
*
|
|
10996
|
+
* 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.
|
|
10997
|
+
*
|
|
10998
|
+
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
10999
|
+
*
|
|
11000
|
+
* @since Chrome 45
|
|
11001
|
+
*/
|
|
11002
|
+
export function notify(
|
|
10035
11003
|
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
}
|
|
11004
|
+
options: NotifyOptions,
|
|
11005
|
+
|
|
11006
|
+
callback?: () => void,
|
|
11007
|
+
): void;
|
|
10041
11008
|
}
|
|
10042
11009
|
|
|
10043
11010
|
/**
|
|
@@ -13713,99 +14680,6 @@ declare namespace chrome {
|
|
|
13713
14680
|
): void;
|
|
13714
14681
|
}
|
|
13715
14682
|
|
|
13716
|
-
/**
|
|
13717
|
-
* Schemas for structured manifest entries
|
|
13718
|
-
*/
|
|
13719
|
-
export namespace manifestTypes {
|
|
13720
|
-
|
|
13721
|
-
/**
|
|
13722
|
-
* Chrome settings which can be overriden by an extension.
|
|
13723
|
-
*/
|
|
13724
|
-
export interface ChromeSettingsOverrides {
|
|
13725
|
-
|
|
13726
|
-
/**
|
|
13727
|
-
* New value for the homepage.
|
|
13728
|
-
*/
|
|
13729
|
-
homepage?: string;
|
|
13730
|
-
|
|
13731
|
-
/**
|
|
13732
|
-
* A search engine
|
|
13733
|
-
*/
|
|
13734
|
-
search_provider?: {
|
|
13735
|
-
|
|
13736
|
-
/**
|
|
13737
|
-
* Name of the search engine displayed to user. This may only be omitted if _prepopulated\_id_ is set.
|
|
13738
|
-
*/
|
|
13739
|
-
name?: string,
|
|
13740
|
-
|
|
13741
|
-
/**
|
|
13742
|
-
* Omnibox keyword for the search engine. This may only be omitted if _prepopulated\_id_ is set.
|
|
13743
|
-
*/
|
|
13744
|
-
keyword?: string,
|
|
13745
|
-
|
|
13746
|
-
/**
|
|
13747
|
-
* An icon URL for the search engine. This may only be omitted if _prepopulated\_id_ is set.
|
|
13748
|
-
*/
|
|
13749
|
-
favicon_url?: string,
|
|
13750
|
-
|
|
13751
|
-
/**
|
|
13752
|
-
* An search URL used by the search engine.
|
|
13753
|
-
*/
|
|
13754
|
-
search_url: string,
|
|
13755
|
-
|
|
13756
|
-
/**
|
|
13757
|
-
* Encoding of the search term. This may only be omitted if _prepopulated\_id_ is set.
|
|
13758
|
-
*/
|
|
13759
|
-
encoding?: string,
|
|
13760
|
-
|
|
13761
|
-
/**
|
|
13762
|
-
* If omitted, this engine does not support suggestions.
|
|
13763
|
-
*/
|
|
13764
|
-
suggest_url?: string,
|
|
13765
|
-
|
|
13766
|
-
/**
|
|
13767
|
-
* If omitted, this engine does not support image search.
|
|
13768
|
-
*/
|
|
13769
|
-
image_url?: string,
|
|
13770
|
-
|
|
13771
|
-
/**
|
|
13772
|
-
* The string of post parameters to search\_url
|
|
13773
|
-
*/
|
|
13774
|
-
search_url_post_params?: string,
|
|
13775
|
-
|
|
13776
|
-
/**
|
|
13777
|
-
* The string of post parameters to suggest\_url
|
|
13778
|
-
*/
|
|
13779
|
-
suggest_url_post_params?: string,
|
|
13780
|
-
|
|
13781
|
-
/**
|
|
13782
|
-
* The string of post parameters to image\_url
|
|
13783
|
-
*/
|
|
13784
|
-
image_url_post_params?: string,
|
|
13785
|
-
|
|
13786
|
-
/**
|
|
13787
|
-
* A list of URL patterns that can be used, in addition to `search_url`.
|
|
13788
|
-
*/
|
|
13789
|
-
alternate_urls?: string[],
|
|
13790
|
-
|
|
13791
|
-
/**
|
|
13792
|
-
* An ID of the built-in search engine in Chrome.
|
|
13793
|
-
*/
|
|
13794
|
-
prepopulated_id?: number,
|
|
13795
|
-
|
|
13796
|
-
/**
|
|
13797
|
-
* Specifies if the search provider should be default.
|
|
13798
|
-
*/
|
|
13799
|
-
is_default: boolean,
|
|
13800
|
-
};
|
|
13801
|
-
|
|
13802
|
-
/**
|
|
13803
|
-
* An array of length one containing a URL to be used as the startup page.
|
|
13804
|
-
*/
|
|
13805
|
-
startup_pages?: string[];
|
|
13806
|
-
}
|
|
13807
|
-
}
|
|
13808
|
-
|
|
13809
14683
|
/**
|
|
13810
14684
|
* Use the `chrome.mimeHandler` API to handle MIME type streams in third-party extensions.
|
|
13811
14685
|
*
|
|
@@ -16814,7 +17688,7 @@ declare namespace chrome {
|
|
|
16814
17688
|
/**
|
|
16815
17689
|
* Fired when an extension goes from being in a disabled state to an enabled state.
|
|
16816
17690
|
*
|
|
16817
|
-
* @since
|
|
17691
|
+
* @since Chrome 155
|
|
16818
17692
|
*/
|
|
16819
17693
|
export const onEnabled: events.Event<() => void>;
|
|
16820
17694
|
|
|
@@ -22171,7 +23045,7 @@ declare namespace chrome {
|
|
|
22171
23045
|
* * If `windowId` is specified, it must be the same as the split-with tab's window ID.
|
|
22172
23046
|
* * If `index` is specified, it must be an index adjacent to the split-with tab and will affect the relative positioning of the newly created tab.
|
|
22173
23047
|
*
|
|
22174
|
-
* @since
|
|
23048
|
+
* @since Chrome 155
|
|
22175
23049
|
*/
|
|
22176
23050
|
splitWithTabId?: number,
|
|
22177
23051
|
},
|
|
@@ -22229,7 +23103,7 @@ declare namespace chrome {
|
|
|
22229
23103
|
* * If `windowId` is specified, it must be the same as the split-with tab's window ID.
|
|
22230
23104
|
* * If `index` is specified, it must be an index adjacent to the split-with tab and will affect the relative positioning of the newly created tab.
|
|
22231
23105
|
*
|
|
22232
|
-
* @since
|
|
23106
|
+
* @since Chrome 155
|
|
22233
23107
|
*/
|
|
22234
23108
|
splitWithTabId?: number,
|
|
22235
23109
|
},
|
|
@@ -22250,7 +23124,7 @@ declare namespace chrome {
|
|
|
22250
23124
|
* They must be adjacent.
|
|
22251
23125
|
* They must not already be in a split view.
|
|
22252
23126
|
* They must have matching `windowId`, `pinned`, and `groupId` states.
|
|
22253
|
-
* @since
|
|
23127
|
+
* @since Chrome 155
|
|
22254
23128
|
*/
|
|
22255
23129
|
export function createSplit(
|
|
22256
23130
|
|
|
@@ -22265,7 +23139,7 @@ declare namespace chrome {
|
|
|
22265
23139
|
* They must be adjacent.
|
|
22266
23140
|
* They must not already be in a split view.
|
|
22267
23141
|
* They must have matching `windowId`, `pinned`, and `groupId` states.
|
|
22268
|
-
* @since
|
|
23142
|
+
* @since Chrome 155
|
|
22269
23143
|
*/
|
|
22270
23144
|
export function createSplit(
|
|
22271
23145
|
|
|
@@ -23046,7 +23920,7 @@ declare namespace chrome {
|
|
|
23046
23920
|
* Separates the tabs in a Split View into independent tabs.
|
|
23047
23921
|
*
|
|
23048
23922
|
* @param splitViewId The ID of the Split View to separate.
|
|
23049
|
-
* @since
|
|
23923
|
+
* @since Chrome 155
|
|
23050
23924
|
*/
|
|
23051
23925
|
export function unsplit(
|
|
23052
23926
|
|
|
@@ -23057,7 +23931,7 @@ declare namespace chrome {
|
|
|
23057
23931
|
* Separates the tabs in a Split View into independent tabs.
|
|
23058
23932
|
*
|
|
23059
23933
|
* @param splitViewId The ID of the Split View to separate.
|
|
23060
|
-
* @since
|
|
23934
|
+
* @since Chrome 155
|
|
23061
23935
|
*/
|
|
23062
23936
|
export function unsplit(
|
|
23063
23937
|
|