Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: chrome/common/extensions/docs/templates/intros/fileSystemProvider.html

Issue 356463002: [fsp] Add documentation for the File System Provider API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <h2 id="manifest">Manifest</h2>
2 <p>You must declare the "fileSystemProvider" permission
3 in the <a href="manifest">extension manifest</a>
4 to use the File System Provider API.
5 For example:</p>
6 <pre data-filename="manifest.json">
7 {
8 "name": "My extension",
9 ...
10 <b>"permissions": [
11 "fileSystemProvider"
12 ]</b>,
13 ...
14 }
15 </pre>
16
17 <h2 id="overview">Overview</h2>
18 <p>
19 File System Provider API allows to write extensions providing support for
20 virtual file systems, which are available in the file manager on Chrome OS.
21 Most obvious use cases are decompressing archives, or accessing files in a cloud
not at google - send to devlin 2014/06/24 14:25:42 "Most obvious use cases" -> "Canonical use cases"
mtomasz 2014/06/25 05:38:13 Done.
22 service other than Drive.
23 </p>
24
25 <h2 id="remote-file-systems">Remote file systems</h2>
26 <p>
27 In order to serve contents on a remote server, <code>XMLHttpRequest</code> is
28 recommended. If impossible, then <code>WebSocket</code> API should be used
29 instead.
not at google - send to devlin 2014/06/24 14:25:42 I don't think this paragraph is necessary and migh
mtomasz 2014/06/25 05:38:13 Removed. Done.
30 </p>
31
32 <h2 id="archives">File handlers</h2>
33 <p>
34 Providing extensions can act as file handlers, using the
35 <a href="manifest/file_handlers">file_handlers</a> manifest entry.
36 </p>
37 <p>
38 When the extension is executed with a file to be handled, it has to mount a
39 file system and start serving contents from the input file. The most common use
40 case is decompressing archives.
not at google - send to devlin 2014/06/24 14:25:42 I don't understand the context of this section on
mtomasz 2014/06/25 05:38:13 Basically to write an extension showing contents o
not at google - send to devlin 2014/06/25 14:03:30 lgtm
41 </p>
42
43 <h2 id="archives">Life cycle</h2>
44 <p>
45 Provided file systems once mounted are remembered by Chrome and remounted
46 automatically after reboot or restart. Hence, it can be assumed, that once a
47 file system is <a href="method-mount">mounted</a> by a providing extension, it
not at google - send to devlin 2014/06/24 14:25:42 "Hence, it can be assumed, that once a file system
mtomasz 2014/06/25 05:38:13 Done.
48 will stay until either the extension is unloaded, or the extension calls the
49 <a href="#method-unmount"> unmount</a> method.
50 </p>
51 <p>
52 In case of acting as a file handler, the handled file may need to be stored
53 to access it after either a reboot, or suspending and resuming an event page
54 of the providing extension. In such case
55 <a href="fileSystem#method-retainEntry">chrome.fileSystem.retainEntry</a> and
56 <a href="fileSystem#method-restoreEntry">chrome.fileSystem.restoreEntry</a>
57 should be used.
58 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698