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

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

Issue 22944002: Implementation of the "Redirect URLs to Packaged Apps" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review comments + lint errors Created 7 years, 3 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
1 <h1>Formats: Manifest Files</h1> 1 <h1>Formats: Manifest Files</h1>
2 2
3 3
4 <p> 4 <p>
5 Every extension, installable web app, and theme has a 5 Every extension, installable web app, and theme has a
6 <a href="http://www.json.org">JSON</a>-formatted manifest file, 6 <a href="http://www.json.org">JSON</a>-formatted manifest file,
7 named <code>manifest.json</code>, 7 named <code>manifest.json</code>,
8 that provides important information. 8 that provides important information.
9 </p> 9 </p>
10 10
(...skipping 24 matching lines...) Expand all
35 "<a href="themes.html">theme</a>": {...}, 35 "<a href="themes.html">theme</a>": {...},
36 "<a href="#app">app</a>": {...}, 36 "<a href="#app">app</a>": {...},
37 37
38 <em>// Add any of these that you need</em> 38 <em>// Add any of these that you need</em>
39 "<a href="event_pages.html">background</a>": {"persistent": false, ...}, 39 "<a href="event_pages.html">background</a>": {"persistent": false, ...},
40 "<a href="background_pages.html">background</a>": {"persistent": true, ...}, 40 "<a href="background_pages.html">background</a>": {"persistent": true, ...},
41 "<a href="override.html">chrome_url_overrides</a>": {...}, 41 "<a href="override.html">chrome_url_overrides</a>": {...},
42 "<a href="content_scripts.html">content_scripts</a>": [...], 42 "<a href="content_scripts.html">content_scripts</a>": [...],
43 "<a href="../extensions/contentSecurityPolicy.html">content_security_policy</a >": "<em>policyString</em>", 43 "<a href="../extensions/contentSecurityPolicy.html">content_security_policy</a >": "<em>policyString</em>",
44 "<a href="fileBrowserHandler.html">file_browser_handlers</a>": [...], 44 "<a href="fileBrowserHandler.html">file_browser_handlers</a>": [...],
45 "<a href="#file_handlers">file_handlers</a>": {...}, 45 "<a href="#file_handlers">file_handlers</a>": {...},
not at google - send to devlin 2013/08/30 17:07:58 you have some epic rebasing to do. This file hasn'
sergeygs 2013/09/02 07:36:22 Yes, I've been a couple of weeks behind as it turn
46 "<a href="#homepage_url">homepage_url</a>": "http://<em>path/to/homepage</em>" , 46 "<a href="#homepage_url">homepage_url</a>": "http://<em>path/to/homepage</em>" ,
47 "<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split", 47 "<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split",
48 "<a href="#key">key</a>": "<em>publicKey</em>", 48 "<a href="#key">key</a>": "<em>publicKey</em>",
49 "<a href="#minimum_chrome_version">minimum_chrome_version</a>": "<em>versionSt ring</em>", 49 "<a href="#minimum_chrome_version">minimum_chrome_version</a>": "<em>versionSt ring</em>",
50 50
51 "<a href="#nacl_modules">nacl_modules</a>": [...], 51 "<a href="#nacl_modules">nacl_modules</a>": [...],
52 "<a href="#kiosk_enabled">kiosk_enabled</a>": true, 52 "<a href="#kiosk_enabled">kiosk_enabled</a>": true,
53 "<a href="#offline_enabled">offline_enabled</a>": true, 53 "<a href="#offline_enabled">offline_enabled</a>": true,
54 "<a href="omnibox.html">omnibox</a>": { "keyword": "<em>aString</em>" }, 54 "<a href="omnibox.html">omnibox</a>": { "keyword": "<em>aString</em>" },
55 "<a href="options.html">options_page</a>": "<em>aFile</em>.html", 55 "<a href="options.html">options_page</a>": "<em>aFile</em>.html",
56 "<a href="declare_permissions.html">permissions</a>": [...], 56 "<a href="declare_permissions.html">permissions</a>": [...],
57 "<a href="npapi.html">plugins</a>": [...], 57 "<a href="npapi.html">plugins</a>": [...],
58 "<a href="#requirements">requirements</a>": {...}, 58 "<a href="#requirements">requirements</a>": {...},
59 "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em >.xml", 59 "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em >.xml",
60 "<a href="#url_handlers">url_handlers</a>": {...},
60 "<a href="#web_accessible_resources">web_accessible_resources</a>": [...], 61 "<a href="#web_accessible_resources">web_accessible_resources</a>": [...],
61 "<a href="#sandbox">sandbox</a>": [...] 62 "<a href="#sandbox">sandbox</a>": [...]
62 } 63 }
63 </pre> 64 </pre>
64 65
65 66
66 <h2 id="field_details">Field details</h2> 67 <h2 id="field_details">Field details</h2>
67 68
68 <p> 69 <p>
69 This section covers fields that aren't described in another page. 70 This section covers fields that aren't described in another page.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 the browser's extension management UI 107 the browser's extension management UI
107 and the <a href="https://chrome.google.com/webstore">Chrome Web Store</a>. 108 and the <a href="https://chrome.google.com/webstore">Chrome Web Store</a>.
108 You can specify locale-specific strings for this field; 109 You can specify locale-specific strings for this field;
109 see <a href="i18n.html">Internationalization</a> for details. 110 see <a href="i18n.html">Internationalization</a> for details.
110 </p> 111 </p>
111 112
112 <h3 id="file_handlers">file_handlers</h3> 113 <h3 id="file_handlers">file_handlers</h3>
113 114
114 <p> 115 <p>
115 Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a> 116 Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a>
116 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 that can be handled, and 117 to specify what types of files the app can handle. An app can have multiple
117 a title. Here's an example of specifying file handlers: 118 <code>file_handlers</code>, with each one having an identifier, a list of MIME
119 types that can be handled, and a title. Here's an example of specifying file han dlers:
118 </p> 120 </p>
119 121
120 <pre> 122 <pre>
121 "file_handlers": { 123 "file_handlers": {
122 "text": { 124 "text": {
123 "types": [ 125 "types": [
124 "text/*" 126 "text/*"
125 ], 127 ],
126 "title": "Text editor" 128 "title": "Text editor"
127 }, 129 },
128 "image": { 130 "image": {
129 "types": [ 131 "types": [
130 "image/png", 132 "image/png",
131 "image/jpeg" 133 "image/jpeg"
132 ], 134 ],
133 "title": "Image editor" 135 "title": "Image editor"
134 } 136 }
135 } 137 }
136 </pre> 138 </pre>
137 139
138 <p> 140 <p>
139 To handle files, apps also need to declare the $ref:fileSystem 141 To handle files, apps also need to declare the $ref:fileSystem
140 permission. Apps can then be passed files in the $ref:app.runtime.onLaunched 142 permission. Apps can then be passed files in the $ref:app.runtime.onLaunched
141 event - either from the system 143 event - either from the system
142 file manager (currently supported on ChromeOS only) or by providing 144 file manager (currently supported on ChromeOS only) or by providing
143 a path on the <a href="../apps/first_app.html#open">command line</a>. 145 a path on the <a href="../apps/first_app.html#open">command line</a>.
144 </p> 146 </p>
145 147
148
149 <h3 id="url_handlers">url_handlers</h3>
150
151 <p>
152 Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a>
153 to specify what URL patterns the app can handle. An app can have multiple
154 <code>url_handlers</code>, with each one having an identifier, a URL pattern
155 that can be handled, and a title. Here's an example of specifying URL handlers:
156 </p>
157
158 <pre>
159 "url_handlers": {
160 "presentation": {
161 "matches": [
162 "https://www.foo.com/presentation/view/*",
163 "https://www.bar.com/presentation/view/*"
164 ],
165 "title": "Open presentation"
166 },
167 "spreadsheet_edit": {
168 "matches": [
169 "https://www.foo.com/spreadsheet/edit/*"
170 "https://www.bar.com/spreadsheet/edit/*"
171 ],
172 "title": "Edit spreadsheet"
173 }
174 }</pre>
175
176 <p>
177 Apps can only register to handle URL patterns within domains they can prove
178 ownership of, as determined by the <a href="https://chrome.google.com/webstore"> Chrome Web Store</a>.
179 Apps that do not fulfill this requirement will be rejected by the store.
180 This automatically means that at least a complete domain should always be
181 specified for all patterns in the <code>matches</code> list. Apps can then be
182 passed matching URLs in the $ref:app.runtime.onLaunched event.
183 </p>
184
185
146 <h3 id="homepage_url">homepage_url</h3> 186 <h3 id="homepage_url">homepage_url</h3>
147 187
148 <p> 188 <p>
149 The URL of the homepage for this extension. The extensions management page (chro me://extensions) 189 The URL of the homepage for this extension. The extensions management page (chro me://extensions)
150 will contain a link to this URL. This field is particularly useful if you 190 will contain a link to this URL. This field is particularly useful if you
151 <a href="hosting.html">host the extension on your own site</a>. If you distribut e your 191 <a href="hosting.html">host the extension on your own site</a>. If you distribut e your
152 extension using the <a href="https://chrome.google.com/webstore">Chrome Web Stor e</a>, 192 extension using the <a href="https://chrome.google.com/webstore">Chrome Web Stor e</a>,
153 the homepage URL defaults to the extension's own page. 193 the homepage URL defaults to the extension's own page.
154 </p> 194 </p>
155 195
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 "features": ["webgl"] 436 "features": ["webgl"]
397 } 437 }
398 } 438 }
399 </pre> 439 </pre>
400 440
401 <p> 441 <p>
402 The "plugins" requirement indicates 442 The "plugins" requirement indicates
403 if an app or extension requires NPAPI to run. 443 if an app or extension requires NPAPI to run.
404 This requirement is enabled by default 444 This requirement is enabled by default
405 when the manifest includes the 445 when the manifest includes the
406 <a href="http://developer.chrome.com/extensions/npapi.html">"plugins" field</a>. 446 <a href="http://developer.chrome.com/extensions/npapi.html">"plugins" field</a>.
407 For apps and extensions that still work when plugins aren't available, 447 For apps and extensions that still work when plugins aren't available,
408 you can disable this requirement 448 you can disable this requirement
409 by setting NPAPI to false. 449 by setting NPAPI to false.
410 You can also enable this requirement manually, 450 You can also enable this requirement manually,
411 by setting NPAPI to true, 451 by setting NPAPI to true,
412 as shown in this example: 452 as shown in this example:
413 </p> 453 </p>
414 454
415 <pre> 455 <pre>
416 "requirements": { 456 "requirements": {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 goes into more detail about implementing a sandboxing workflow that enables use 664 goes into more detail about implementing a sandboxing workflow that enables use
625 of libraries that would otherwise have issues executing under extension's 665 of libraries that would otherwise have issues executing under extension's
626 <a href="../extensions/contentSecurityPolicy.html">default Content Security 666 <a href="../extensions/contentSecurityPolicy.html">default Content Security
627 Policy</a>. 667 Policy</a>.
628 </p> 668 </p>
629 669
630 <p> 670 <p>
631 Sandboxed page may only be specified when using 671 Sandboxed page may only be specified when using
632 <a href="#manifest_version"><code>manifest_version</code></a> 2 or above. 672 <a href="#manifest_version"><code>manifest_version</code></a> 2 or above.
633 </p> 673 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698