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

Unified 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: fix imports Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/templates/articles/manifest/file_handlers.html
diff --git a/chrome/common/extensions/docs/templates/articles/manifest/file_handlers.html b/chrome/common/extensions/docs/templates/articles/manifest/file_handlers.html
new file mode 100644
index 0000000000000000000000000000000000000000..e2ee9dc38d18f304e0005bcad381b9784c5d6fa6
--- /dev/null
+++ b/chrome/common/extensions/docs/templates/articles/manifest/file_handlers.html
@@ -0,0 +1,42 @@
+<h1 id="file_handlers">Manifest - File Handlers</h1>
+
+<p>
+Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a>
+to specify what types of files the app can handle. An app can have multiple <code>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
+a title. Here's an example of specifying file handlers:
+</p>
+
+<pre>
+"file_handlers": {
+ "text": {
+ "types": [
+ "text/*"
+ ],
+ "title": "Text editor"
+ },
+ "image": {
+ "types": [
+ "image/png",
+ "image/jpeg"
+ ],
+ "extensions": [
+ "tiff"
+ ]
+ "title": "Image editor"
+ },
+ "any": {
+ "extensions": [
+ "*"
+ ]
+ "title": "Any file type editor"
+ }
+}
+</pre>
+
+<p>
+To handle files, apps also need to declare the $ref:fileSystem
+permission. Apps can then be passed files in the $ref:app.runtime.onLaunched
+event - either from the system
+file manager (currently supported on ChromeOS only) or by providing
+a path on the <a href="../apps/first_app.html#open">command line</a>.
+</p>

Powered by Google App Engine
This is Rietveld 408576698