OLD | NEW |
1 <div id="pageData-name" class="pageData">Formats: Manifest Files</div> | 1 <div id="pageData-name" class="pageData">Formats: Manifest Files</div> |
2 <div id="pageData-showTOC" class="pageData">true</div> | 2 <div id="pageData-showTOC" class="pageData">true</div> |
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 25 matching lines...) Expand all Loading... |
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="background_pages.html">background</a>": {...}, | 39 "<a href="background_pages.html">background</a>": {...}, |
40 "<a href="override.html">chrome_url_overrides</a>": {...}, | 40 "<a href="override.html">chrome_url_overrides</a>": {...}, |
41 "<a href="content_scripts.html">content_scripts</a>": [...], | 41 "<a href="content_scripts.html">content_scripts</a>": [...], |
42 "<a href="contentSecurityPolicy.html">content_security_policy</a>": "<em>polic
yString</em>", | 42 "<a href="contentSecurityPolicy.html">content_security_policy</a>": "<em>polic
yString</em>", |
43 "<a href="fileBrowserHandler.html">file_browser_handlers</a>": [...], | 43 "<a href="fileBrowserHandler.html">file_browser_handlers</a>": [...], |
44 "<a href="#homepage_url">homepage_url</a>": "http://<em>path/to/homepage</em>"
, | 44 "<a href="#homepage_url">homepage_url</a>": "http://<em>path/to/homepage</em>"
, |
45 "<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split", | 45 "<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split", |
| 46 "<a href="#intents">intents</a>": {...} |
46 "<a href="#key">key</a>": "<em>publicKey</em>", | 47 "<a href="#key">key</a>": "<em>publicKey</em>", |
47 "<a href="#minimum_chrome_version">minimum_chrome_version</a>": "<em>versionSt
ring</em>", | 48 "<a href="#minimum_chrome_version">minimum_chrome_version</a>": "<em>versionSt
ring</em>", |
48 | 49 |
49 "<a href="#nacl_modules">nacl_modules</a>": [...], | 50 "<a href="#nacl_modules">nacl_modules</a>": [...], |
50 "<a href="#offline_enabled">offline_enabled</a>": true, | 51 "<a href="#offline_enabled">offline_enabled</a>": true, |
51 "<a href="omnibox.html">omnibox</a>": { "keyword": "<em>aString</em>" }, | 52 "<a href="omnibox.html">omnibox</a>": { "keyword": "<em>aString</em>" }, |
52 "<a href="options.html">options_page</a>": "<em>aFile</em>.html", | 53 "<a href="options.html">options_page</a>": "<em>aFile</em>.html", |
53 "<a href="#permissions">permissions</a>": [...], | 54 "<a href="#permissions">permissions</a>": [...], |
54 "<a href="npapi.html">plugins</a>": [...], | 55 "<a href="npapi.html">plugins</a>": [...], |
55 "<a href="#requirements">requirements</a>": {...}, | 56 "<a href="#requirements">requirements</a>": {...}, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 The processes are unable to communicate with each other. | 205 The processes are unable to communicate with each other. |
205 </p> | 206 </p> |
206 | 207 |
207 <p> | 208 <p> |
208 As a rule of thumb, if your extension or app needs to load a tab in an incognito
browser, use | 209 As a rule of thumb, if your extension or app needs to load a tab in an incognito
browser, use |
209 <em>split</em> incognito behavior. If your extension or app needs to be logged | 210 <em>split</em> incognito behavior. If your extension or app needs to be logged |
210 into a remote server or persist settings locally, use <em>spanning</em> | 211 into a remote server or persist settings locally, use <em>spanning</em> |
211 incognito behavior. | 212 incognito behavior. |
212 </p> | 213 </p> |
213 | 214 |
| 215 <h3 id="intents">intents</h3> |
| 216 |
| 217 <p> |
| 218 A dictionary that specifies all intent handlers provided by this extension or ap
p. Each key in the dictionary specifies the an action verb that is handled by th
is extension. The following example specifies two handlers for the action verb "
<a href="http://webintents.org/share">http://webintents.org/share</a>". |
| 219 </p> |
| 220 |
| 221 <pre> |
| 222 { |
| 223 "name": "test", |
| 224 "version": "1", |
| 225 "intents": { |
| 226 "http://webintents.org/share": [ |
| 227 { |
| 228 "type": ["text/uri-list"], |
| 229 "href": "/services/sharelink.html", |
| 230 "title" : "Sample Link Sharing Intent", |
| 231 "disposition" : "inline" |
| 232 }, |
| 233 { |
| 234 "type": ["image/*"], |
| 235 "href": "/services/shareimage.html", |
| 236 "title" : "Sample Image Sharing Intent", |
| 237 "disposition" : "window" |
| 238 } |
| 239 ] |
| 240 } |
| 241 } |
| 242 </pre> |
| 243 |
| 244 <p> |
| 245 The value of "type" is an array of mime types that is supported by this handler.
The "href" indicates the URL of the page that handles the intent. For hosted ap
ps, these URLs must be within the allowed set of URLs. For extensions, all URLs
are inside the extension and considered relative to the extension root URL. |
| 246 </p> |
| 247 |
| 248 <p> |
| 249 The "title" is displayed in the intent picker UI when the user initiates the act
ion specific to the handler. |
| 250 </p> |
| 251 |
| 252 <p> |
| 253 The "disposition" is either "inline" or "window". Intents with "window" disposit
ion will open a new tab when invoked. Intents with "inline" disposition will be
displayed inside the intent picker when invoked. |
| 254 </p> |
| 255 |
| 256 <p> |
| 257 For more information on intents, refer to the <a href="http://dvcs.w3.org/hg/web
-intents/raw-file/tip/spec/Overview.html">Web Intents specification</a> and <a h
ref="http://www.webintents.org">webintents.org</a>. |
| 258 </p> |
| 259 |
214 <h3 id="key">key</h3> | 260 <h3 id="key">key</h3> |
215 | 261 |
216 <p> | 262 <p> |
217 This value can be used to control | 263 This value can be used to control |
218 the unique ID of an extension, app, or theme when | 264 the unique ID of an extension, app, or theme when |
219 it is loaded during development. | 265 it is loaded during development. |
220 </p> | 266 </p> |
221 | 267 |
222 <p class="note"> | 268 <p class="note"> |
223 <b>Note:</b> You don't usually need to | 269 <b>Note:</b> You don't usually need to |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 </a> 2 or above are <strong>blocked by default</strong>, and must be whitelisted | 790 </a> 2 or above are <strong>blocked by default</strong>, and must be whitelisted |
745 for use via this property. | 791 for use via this property. |
746 </p> | 792 </p> |
747 | 793 |
748 <p> | 794 <p> |
749 Resources inside of packages using <code>manifest_version</code> 1 are available | 795 Resources inside of packages using <code>manifest_version</code> 1 are available |
750 by default, but <em>if</em> you do set this property, then it will be treated as | 796 by default, but <em>if</em> you do set this property, then it will be treated as |
751 a complete list of all whitelisted resources. Resources not listed will be | 797 a complete list of all whitelisted resources. Resources not listed will be |
752 blocked. | 798 blocked. |
753 </p> | 799 </p> |
| 800 |
OLD | NEW |