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

Side by Side Diff: chrome/common/extensions/docs/templates/articles/manifest/file_handlers.html

Issue 14273041: Doc server manifest page generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Codereview fixes Created 7 years, 7 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
OLDNEW
(Empty)
1 <h1 id="file_handlers">Manifest - File Handlers</h1>
2
3 <p>
4 Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a>
5 to specify what types of files the app can handle. An app can have multiple <cod e>file_handlers</code>, with each one having an identifier, a list of MIME types and/or a list of file extensions that can be handled, and
6 a title. Here's an example of specifying file handlers:
7 </p>
8
9 <pre>
10 "file_handlers": {
11 "text": {
12 "types": [
13 "text/*"
14 ],
15 "title": "Text editor"
16 },
17 "image": {
18 "types": [
19 "image/png",
20 "image/jpeg"
21 ],
22 "extensions": [
23 "tiff"
24 ]
25 "title": "Image editor"
26 },
27 "any": {
28 "extensions": [
29 "*"
30 ]
31 "title": "Any file type editor"
32 }
33 }
34 </pre>
35
36 <p>
37 To handle files, apps also need to declare the $ref:fileSystem
38 permission. Apps can then be passed files in the $ref:app.runtime.onLaunched
39 event - either from the system
40 file manager (currently supported on ChromeOS only) or by providing
41 a path on the <a href="../apps/first_app.html#open">command line</a>.
42 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698