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

Side by Side Diff: common/extensions/docs/static/manifest.html

Issue 174526: Filled out the manifest page. Transferred info from dev.chromium.org... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/chrome/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « common/extensions/docs/npapi.html ('k') | common/extensions/docs/static/npapi.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <div id="pageData-title" class="pageData">Formats: Manifest Files</div> 1 <div id="pageData-title" class="pageData">Formats: Manifest Files</div>
2 <div id="pageData-showTOC" class="pageData">true</div>
2 3
3 <p class="comment"> 4 <p>
4 [PENDING: This page should go into detail about all the parts of manifest.json f iles. In cases where there's not too much to say about something (icons, cross-o rigin XHR), we can just document it inline. Otherwise (content scripts), we can link off to a separate page.] 5 Every extension has a
6 <a href="http://www.json.org">JSON</a>-formatted manifest file,
7 named <code>manifest.json</code>,
8 that provides important information about the extension.
5 </p> 9 </p>
6 10
11 <h2 id="overview"> Field summary </h2>
12
13 <p>
14 The following code shows the supported manifest fields,
15 with links to the page that discusses each field.
16 The only fields that are required for every extension
17 are <b>name</b> and <b>version</b>.
18 </p>
19
20 <pre>
21 {
22 <b>"<a href="#name">name</a>"</b>: "<em>My Extension</em>",
23 <b>"<a href="http://dev.chromium.org/developers/design-documents/extensions/au toupdate">version</a>"</b>: "<em>versionString</em>",
24
25 "<a href="#description">description</a>": "<em>A plain text description</em>",
26 "<a href="#icons">icons</a>": { ... },
27 "<a href="http://dev.chromium.org/developers/design-documents/extensions/autou pdate">update_url</a>": "http://<em>path/to/updateInfo</em>.xml",
28
29 "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html",
30 "<a href="content_scripts.html">content_scripts</a>": [...],
31 "<a href="pageActions.html">page_actions</a>": [...],
32 "<a href="#permissions">permissions</a>": [...],
33 "<a href="npapi.html">plugins</a>": [...],
34 "<a href="http://dev.chromium.org/developers/design-documents/themes">theme</a >": [...],
35 "<a href="toolstrip.html">toolstrips</a>": [...],
36 }
37 </pre>
38
39
40 <h2>Field details</h2>
41
42 <p>
43 This section covers fields that aren't described in another page.
44 For a complete list of fields,
45 with links to where they're described in detail,
46 see the <a href="#overview">Field summary</a>.
47 </p>
48
49 <h3 id="description">description</h3>
50
51 <p>
52 A plain text string
53 (no HTML or other formatting)
54 that describes the extension.
55 The description should be suitable for both
56 the browser's extension management UI
57 and the extension gallery.
58 </p>
59
60 <h3 id="icon">icon</h3>
61
62 <p>
63 An icon that represents the extension.
64 As a rule, you should use the <b>icons</b> field instead,
65 so that you can specify icons in multiple sizes.
66 Here's an example of using this field:
67 </p>
68
69 <pre>
70 "icon": "icon.png",
71 </pre>
72
73 <h3 id="icons">icons</h3>
74
75 <p>
76 One or more icons that represent the extension.
77 We recommend that you provide icons in four sizes &mdash;
78 16x16, 32x32, 48x48, and 128x128 pixels.
79 The icons can be in any format supported by WebKit,
80 such as BMP, GIF, ICO, JPEG, or PNG.
81 Here's an example of specifying all four icon sizes:
82 </p>
83
84 <pre>
85 "icons": { "16": "icon16.png",
86 "32": "icon32.png",
87 "48": "icon48.png",
88 "128": "icon128.png" },
89 </pre>
90
91
92 <h3 id="name">name</h3>
93
94 <p>
95 A short, plain text string
96 that identifies the extension.
97 The name is used in the install dialog,
98 extension management UI,
99 and the extension gallery.
100 </p>
101
102 <h3 id="permissions">permissions</h3>
103
104 <p>
105 The capabilities the extension might use.
106 A permission can be either one of a list of known strings
107 (currently, either "tabs" or "bookmarks")
108 or a match pattern,
109 which gives access to one or more hosts.
110 The idea is not to restrict what you can do,
111 but to give advanced users an indication of what your extension
112 will be able to do.
113 Permissions might also help to limit damage
114 if your extension is attacked.
115 </p>
116
117 <p>
118 Here's an example of the permissions part of a manifest file:
119 </p>
120
121 <pre>
122 "permissions": [
123 "tabs",
124 "bookmarks",
125 "http://www.blogger.com/",
126 "http://*.google.com/"
127 ],
128 </pre>
129
130 <p>
131 For more information, see
132 <a href="http://dev.chromium.org/developers/design-documents/extensions/match-pa tterns">Match patterns</a>.
133 Note, however, that the match pattern in the <b>permissions</b> field
134 specifies only the hosts &mdash;
135 not the paths &mdash;
136 to which the extension can make XMLHttpRequests.
137 </p>
138
OLDNEW
« no previous file with comments | « common/extensions/docs/npapi.html ('k') | common/extensions/docs/static/npapi.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698