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

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

Issue 179068: Extension Doc Changes (no building or testable changes): minor changes for tab & windows doc (Closed)
Patch Set: touch grd. rendered docs Created 11 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
OLDNEW
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1) The <head> information in this page is significant, should be uniform across api docs and should be edited only with knowledge of the templating mecha nism. 2) The <body> tag *must* retain id="body" 3) All <body>.innerHTML is gener eated as an rendering step. If viewed in a browser, it will be re-generated from the template, json schema and authored overview content. 4) The <body>.innerHTM L is also generated by an offline step so that this page may easily be indexed b y search engines. TODO(rafaelw): Abstract this into a "pageshell" that becomes t he single version of page template shell and the "instance" pages (bookmarks.htm l, etc...) can be generated with a build step. --><!-- <html> must retain id="te mplate --><html xmlns="http://www.w3.org/1999/xhtml" jstcache="0"><!-- <head> da ta is significant and loads the needed libraries and styles --><head jstcache="0 "> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache=" 0"> <title jscontent="getPageTitle()" jstcache="1">Formats: Manifest Files</titl e> <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache=" 0"> <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js" jstcache="0"> </script> <script type="text/javascript" src="js/a pi_page_generator.js" jstcache="0"></script> <script type="text/javascript" src= "js/bootstrap.js" jstcache="0"></script> </head><!-- <body> content is completel y generated. Do not edit, as it will be and rewritten. --><body jstcache="0"> <d iv id="container" jstcache="0"> <a name="top" jstcache="0"> </a> <!-- API HEADER --> <div id="pageHeader" jstcache="0"> <div id="searchbox" jstcache="0"> <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0"> <div jstcac he="0"> <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno" jstcache="0"> <input type="hidden" name="ie" value="UTF-8" jstcache="0"> <input type="text" name="q" size="31" jstcache="0"> <input type="submit" name="sa" val ue="Search" jstcache="0"> </div> </form> <script type="text/javascript" src="htt p://www.google.com/jsapi" jstcache="0"></script> <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</scrip t> <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form= cse-search-box&amp;t13n_langs=en" jstcache="0"></script> <script type="text/java script" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=e n" jstcache="0"></script> </div> <div id="pageTitle" jstcache="0"> <h1 jscontent ="getPageTitle()" jstcache="1">Formats: Manifest Files</h1> </div> </div> <!-- / pageHeader --> <div id="pageContent" jstcache="0"> <!-- SIDENAV --> <div id="lef tNav" jstcache="0"> <ul jstcache="0"> <li jstcache="0"> <a href="index.html" jst cache="0">Home</a></li> <li jstcache="0"> <a href="getstarted.html" jstcache="0" >Getting Started</a></li> <li jstcache="0"> <a href="overview.html" jstcache="0" >Overview</a></li> <li jstcache="0"> <a href="devguide.html" jstcache="0"><div j stcache="0">Developer's Guide</div></a> <ul jstcache="0"> <li jstcache="0"><a hr ef="toolstrip.html" jstcache="0">Toolstrips</a></li> <li jstcache="0"><a href="p ageActions.html" jstcache="0">Page Actions</a></li> <li jstcache="0"><a href="ba ckground_pages.html" jstcache="0">Background Pages</a></li> <li jstcache="0"><a href="content_scripts.html" jstcache="0">Content Scripts</a></li> <li jstcache=" 0">Events</li> <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li> < li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></li> <li jstcach e="0"><a href="bookmarks.html" jstcache="0">Bookmarks</a></li> <li jstcache="0"> Themes</li> <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</a> </li> <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</a></li> <li jstcache="0">Autoupdate</li> </ul> </li> <li jstcache="0"><a href="tutorials .html" jstcache="0"><div jstcache="0">Tutorials</div></a> <ul jstcache="0"> <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debugging</a></li> </ul> </li> <li jstcache="0">Reference <ul jstcache="0"> <li jstcache="0"> Formats <ul jstcache="0"> <li jstcache="0" class="leftNavSelected">Manifest Files</li> <li jstcache="0">Match Patterns</li> <li jstcache="0">Packages (.crx)</li> </ul> </l i> <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* APIs</a> </l i> <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs</a> </li> </ul> </li> <li jstcache="0"><a href="http://dev.chromium.org/developers/design- documents/extensions/samples" jstcache="0">Samples</a></li> </ul> </div> <div id ="mainColumn" jstcache="0"> <!-- TABLE OF CONTENTS --> <div id="toc" jsdisplay=" showPageTOC()" jstcache="2"> <p jstcache="0">Contents</p> <ol jstcache="0"> <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0"> <a jscontent="name" jsval ues=".href:'#' + href" jstcache="14" href="#H2-0"> Field summary </a> <ol jstcac he="0"> <li jsselect="$this.children" jstcache="22" jsinstance="*0" style="displ ay: none; "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14">h3Nam e</a> </li> </ol> </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*1 "> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H2-1">Fi eld details</a> <ol jstcache="0"> <li jsselect="$this.children" jstcache="22" js instance="0"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href ="#H3-2">description</a> </li><li jsselect="$this.children" jstcache="22" jsinst ance="1"> <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H 3-3">icon</a> </li><li jsselect="$this.children" jstcache="22" jsinstance="2"> < a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-4">icons< /a> </li><li jsselect="$this.children" jstcache="22" jsinstance="3"> <a jsconten t="name" jsvalues=".href:'#' + href" jstcache="14" href="#H3-5">name</a> </li><l i jsselect="$this.children" jstcache="22" jsinstance="*4"> <a jscontent="name" j svalues=".href:'#' + href" jstcache="14" href="#H3-6">permissions</a> </li> </ol > </li> <div jsselect="apiDefinition" jstcache="3" style="display: none; "> <li jstcache="0"> <a href="#apiReference" jscontent="'API reference: ' + getModuleNa me()" jstcache="4">API reference</a> <ol jstcache="0"> <li jsdisplay="$this.prop erties" jstcache="5"> <a href="#properties" jstcache="0">Properties</a> <ol jstc ache="0"> <li jsselect="getPropertyListFromObject($this)" jstcache="10"> <a jsco ntent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcac he="41">propertyName</a> </li> </ol> </li> <li jsdisplay="functions &amp;&amp; f unctions.length &gt; 0" jstcache="6"> <a href="#methods" jstcache="0">Methods</a > <ol jstcache="0"> <li jsselect="functions" jstcache="11"> <a jscontent="name" jsvalues=".href:'#method-' + name" href="#method-anchor" jstcache="42">methodNam e</a> </li> </ol> </li> <li jsdisplay="events &amp;&amp; events.length &gt; 0" j stcache="7"> <a href="#events" jstcache="0">Events</a> <ol jstcache="0"> <li jss elect="events" jstcache="12"> <a jscontent="name" jsvalues=".href:'#event-' + na me" href="#event-anchor" jstcache="43">eventName</a> </li> </ol> </li> <li jsdis play="types &amp;&amp; types.length &gt; 0" jstcache="8"> <a href="#types" jstca che="0">Types</a> <ol jstcache="0"> <li jsselect="types" jstcache="13"> <a jscon tent="id" jsvalues=".href:'#type-' + id" href="#id-anchor" jstcache="44">id</a> </li> </ol> </li> </ol> </li> </div> </ol> </div> <!-- /TABLE OF CONTENTS --> <! -- STATIC CONTENT PLACEHOLDER --> <div id="static" jstcache="0"><div id="pageDat a-title" class="pageData" jstcache="0">Formats: Manifest Files</div> <div id="pa geData-showTOC" class="pageData" jstcache="0">true</div> <p jstcache="0"> Every extension has a <a href="http://www.json.org" jstcache="0">JSON</a>-formatted ma nifest file, named <code jstcache="0">manifest.json</code>, that provides import ant information about the extension. </p> <a name="H2-0" jstcache="0"></a><h2 id ="overview" jstcache="0"> Field summary </h2> <p jstcache="0"> The following cod e shows the supported manifest fields, with links to the page that discusses eac h field. The only fields that are required for every extension are <b jstcache=" 0">name</b> and <b jstcache="0">version</b>. </p> <pre jstcache="0">{ <b jstcach e="0">"<a href="#name" jstcache="0">name</a>"</b>: "<em jstcache="0">My Extensio n</em>", <b jstcache="0">"<a href="http://dev.chromium.org/developers/design-doc uments/extensions/autoupdate" jstcache="0">version</a>"</b>: "<em jstcache="0">v ersionString</em>", "<a href="#description" jstcache="0">description</a>": "<em jstcache="0">A plain text description</em>", "<a href="#icons" jstcache="0">icon s</a>": { ... }, "<a href="http://dev.chromium.org/developers/design-documents/e xtensions/autoupdate" jstcache="0">update_url</a>": "http://<em jstcache="0">pat h/to/updateInfo</em>.xml", "<a href="background_pages.html" jstcache="0">backgro und_page</a>": "<em jstcache="0">aFile</em>.html", "<a href="content_scripts.htm l" jstcache="0">content_scripts</a>": [...], "<a href="pageActions.html" jstcach e="0">page_actions</a>": [...], "<a href="#permissions" jstcache="0">permissions </a>": [...], "<a href="npapi.html" jstcache="0">plugins</a>": [...], "<a href=" http://dev.chromium.org/developers/design-documents/themes" jstcache="0">theme</ a>": [...], "<a href="toolstrip.html" jstcache="0">toolstrips</a>": [...], } </p re> <a name="H2-1" jstcache="0"></a><h2 jstcache="0">Field details</h2> <p jstca che="0"> This section covers fields that aren't described in another page. For a complete list of fields, with links to where they're described in detail, see t he <a href="#overview" jstcache="0">Field summary</a>. </p> <a name="H3-2" jstca che="0"></a><h3 id="description" jstcache="0">description</h3> <p jstcache="0"> A plain text string (no HTML or other formatting) that describes the extension. The description should be suitable for both the browser's extension management U I and the extension gallery. </p> <a name="H3-3" jstcache="0"></a><h3 id="icon" jstcache="0">icon</h3> <p jstcache="0"> An icon that represents the extension. A s a rule, you should use the <b jstcache="0">icons</b> field instead, so that yo u can specify icons in multiple sizes. Here's an example of using this field: </ p> <pre jstcache="0">"icon": "icon.png", </pre> <a name="H3-4" jstcache="0"></a> <h3 id="icons" jstcache="0">icons</h3> <p jstcache="0"> One or more icons that r epresent the extension. We recommend that you provide icons in four sizes — 16x1 6, 32x32, 48x48, and 128x128 pixels. The icons can be in any format supported by WebKit, such as BMP, GIF, ICO, JPEG, or PNG. Here's an example of specifying al l four icon sizes: </p> <pre jstcache="0">"icons": { "16": "icon16.png", "32": " icon32.png", "48": "icon48.png", "128": "icon128.png" }, </pre> <a name="H3-5" j stcache="0"></a><h3 id="name" jstcache="0">name</h3> <p jstcache="0"> A short, p lain text string that identifies the extension. The name is used in the install dialog, extension management UI, and the extension gallery. </p> <a name="H3-6" jstcache="0"></a><h3 id="permissions" jstcache="0">permissions</h3> <p jstcache= "0"> The capabilities the extension might use. A permission can be either one of a list of known strings (currently, either "tabs" or "bookmarks") or a match pa ttern, which gives access to one or more hosts. The idea is not to restrict what you can do, but to give advanced users an indication of what your extension wil l be able to do. Permissions might also help to limit damage if your extension i s attacked. </p> <p jstcache="0"> Here's an example of the permissions part of a manifest file: </p> <pre jstcache="0">"permissions": [ "tabs", "bookmarks", "ht tp://www.blogger.com/", "http://*.google.com/" ], </pre> <p jstcache="0"> For mo re information, see <a href="http://dev.chromium.org/developers/design-documents /extensions/match-patterns" jstcache="0">Match patterns</a>. Note, however, that the match pattern in the <b jstcache="0">permissions</b> field specifies only t he hosts — not the paths — to which the extension can make XMLHttpRequests. </p> </div> <!-- API PAGE --> <div class="apiPage" jsselect="apiDefinition" jstcache ="3" style="display: none; "> <a name="apiReference" jstcache="0"></a> <h2 jscon tent="'API reference: ' + getModuleName()" jstcache="4">API reference: chrome.ap iname </h2> <!-- PROPERTIES --> <div jsdisplay="$this.properties" class="apiGrou p" jstcache="5"> <a name="properties" jstcache="0"></a> <h3 id="properties" jstc ache="0">Properties</h3> <div jsselect="getPropertyListFromObject($this)" jstcac he="10"> <a jsvalues=".name:'property-' + name" jstcache="15"></a> <h4 jscontent ="name" jstcache="16">getLastError</h4> <div class="summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jscontent="getModuleName() + '.' " jstcache="23">chrome.extension</span><span jscontent="$this.name" jstcache="24 ">lastError</span> </div> <div transclude="valueTemplate" jstcache="17"> </div> </div> </div> <!-- /apiGroup --> <!-- METHODS --> <div jsdisplay="functions &amp ;&amp; functions.length &gt; 0" class="apiGroup" id="methods" jstcache="6"> <a n ame="methods" jstcache="0"></a> <h3 jstcache="0">Methods</h3> <!-- iterates over all functions --> <div class="apiItem" jsselect="functions" jstcache="11"> <a j svalues=".name:'method-' + name" jstcache="18"></a> <!-- method-anchor --> <h4 j scontent="name" jstcache="16">method name</h4> <div class="summary" jstcache="0" ><span jsdisplay="returns" jscontent="getTypeName(returns)" jstcache="25">void</ span> <!-- Note: intentionally longer 80 columns --> <span jscontent="getFullyQu alifiedFunctionName($this)" jstcache="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="class:optional ? 'optional' : ''" jstcache="27"> <span jsdisplay="$index" jstcache="33">, </span><span jscontent="getTypeName($th is)" jstcache="34"></span> <var jstcache="0"><span jscontent="name" jstcache="16 "></span></var></span>)</div> <div class="description" jstcache="0"> <p class="t odo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="desc ription" jsvalues=".innerHTML:description" jstcache="29"> A description from the json schema def of the function goes here. </p> <!-- PARAMETERS --> <h4 jstcach e="0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35" > <!-- VALUE: This is a subtemplate that is used elsewhere via jsTemplate *trans clude* --> <div id="valueTemplate" jstcache="0"> <dt jstcache="0"> <var jsdispla y="$this.name" jscontent="$this.name" jstcache="45">paramName</var> <em jstcache ="0"> <!-- TYPE --> <div style="display:inline" jstcache="0"> ( <span class="opt ional" jsdisplay="optional" jstcache="46">optional</span> <span id="typeTemplate " jstcache="0"> <span jsdisplay="getTypeRef($this)" jstcache="47"> <a jsvalues=" .href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeR ef($this)" jstcache="49"> Type</a> </span> <span jsdisplay="!getTypeRef($this)" jstcache="48"> <span jsdisplay="isArray($this)" jstcache="50"> array of <span js select="items" jstcache="52"><span transclude="typeTemplate" jstcache="53"></spa n></span> </span> <span jsdisplay="!isArray($this)" jscontent="getTypeName($this )" jstcache="51">paramType</span> </span> </span> ) </div> </em> </dt> <dd class ="todo" jsdisplay="!$this.description" jstcache="38"> Undocumented. </dd> <dd js display="$this.description" jsvalues=".innerHTML:$this.description" jstcache="39 "> Description of this parameter from the json schema. </dd> <!-- OBJECT PROPERT IES --> <dd jsdisplay="shouldExpandObject($this)" jstcache="40"> <dl jstcache="0 "> <div jsselect="getPropertyListFromObject($this)" jstcache="10"> <div transclu de="valueTemplate" jstcache="17"> </div> </div> </dl> </dd> </div> <!-- /VALUE - -> </div> </dl> <!-- RETURNS --> <h4 jsdisplay="returns" jstcache="30">Returns</ h4> <dl jstcache="0"> <div jsselect="returns" jstcache="36"> <div transclude="va lueTemplate" jstcache="17"> </div> </div> </dl> <!-- CALLBACK --> <div js display="hasCallback(parameters)" jstcache="31"> <div jsselect="getCallbackParam eters(parameters)" jstcache="37"> <h4 jstcache="0">Callback function</h4> <p jst cache="0"> If you specify the <em jstcache="0">callback</em> parameter, it shoul d specify a function that looks like this: </p> <!-- Note: intentionally longer 80 columns --> <pre jstcache="0">function(<span jscontent="getSignatureString(pa rameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);</pre> <dl jstcache="0"> <div jsselect="parameters" j stcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> </div> </div> <!-- /description --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- EVENTS --> <div jsdisplay="events &amp;&amp; events.length & gt; 0" class="apiGroup" jstcache="7"> <a name="events" jstcache="0"></a> <h3 id= "events" jstcache="0">Events</h3> <!-- iterates over all events --> <div jsselec t="events" class="apiItem" jstcache="12"> <a jsvalues=".name:'event-' + name" js tcache="19"></a> <h4 jscontent="name" jstcache="16">event name</h4> <div class=" summary" jstcache="0"> <!-- Note: intentionally longer 80 columns --> <span jsco ntent="getModuleName() + '.'" class="subdued" jstcache="23">chrome.bookmarks</sp an><span jscontent="name" jstcache="16">onEvent</span><span class="subdued" jstc ache="0">.addListener</span>(function(<span jscontent="getSignatureString(parame ters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstc ache="0">{...}</span>); </div> <div class="description" jstcache="0"> <p class=" todo" jsdisplay="!description" jstcache="28">Undocumented.</p> <p jsdisplay="des cription" jsvalues=".innerHTML:description" jstcache="29"> A description from th e json schema def of the event goes here. </p> <!-- PARAMETERS --> <h4 jstcache= "0">Parameters</h4> <dl jstcache="0"> <div jsselect="parameters" jstcache="35"> <div transclude="valueTemplate" jstcache="17"> </div> </div> </dl> </div> <!-- / decription --> </div> <!-- /apiItem --> </div> <!-- /apiGroup --> <!-- TYPES --> <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache ="8"> <a name="types" jstcache="0"></a> <h3 id="types" jstcache="0">Types</h3> < !-- iterates over all types --> <div jsselect="types" class="apiItem" jstcache=" 13"> <a jsvalues=".name:'type-' + id" jstcache="20"></a> <h4 jscontent="id" jstc ache="21">type name</h4> <div transclude="valueTemplate" jstcache="17"> </div> < /div> <!-- /apiItem --> </div> <!-- /apiGroup --> </div> <!-- /apiPage --> </div > <!-- /mainColumn --> </div> <!-- /pageContent --> <div id="pageFooter" --="" j stcache="0"> <p jstcache="0"> Except as otherwise <a href="http://code.google.co m/policies.html#restrictions" jstcache="0">noted</a>, the content of this page i s licensed under the <a rel="license" href="http://creativecommons.org/licenses/ by/3.0/" jstcache="0">Creative Commons Attribution 3.0 License</a>, and code sam ples are licensed under the <a rel="license" href="http://code.google.com/google _bsd_license.html" jstcache="0">BSD License</a>. </p> <p jstcache="0"> ©2009 Goo gle </p> </div> <!-- /pageFooter --> </div> <!-- /container --> </body></html> 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the
4 templating mechanism.
5 2) The <body> tag *must* retain id="body"
6 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
7 browser, it will be re-generated from the template, json schema and
8 authored overview content.
9 4) The <body>.innerHTML is also generated by an offline step so that this
10 page may easily be indexed by search engines.
11
12 TODO(rafaelw): Abstract this into a "pageshell" that becomes the single
13 version of page template shell and the "instance" pages (bookmarks.html,
14 etc...) can be generated with a build step.
15 --><!-- <html> must retain id="template --><html xmlns="http://www.w3.org/1999/x html" jstcache="0"><!-- <head> data is significant and loads the needed librarie s and styles --><head jstcache="0">
16 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" jstcache= "0">
17 <title jscontent="getPageTitle()" jstcache="1">Formats: Manifest Files</titl e>
18 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css" jstcache= "0">
19 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js" jstcache="0">
20 </script>
21 <script type="text/javascript" src="js/api_page_generator.js" jstcache="0">< /script>
22 <script type="text/javascript" src="js/bootstrap.js" jstcache="0"></script>
23 </head><!-- <body> content is completely generated. Do not edit, as it will be
24 and rewritten. --><body jstcache="0"> <div id="container" jstcache="0">
25 <a name="top" jstcache="0"> </a>
26 <!-- API HEADER -->
27 <div id="pageHeader" jstcache="0">
28 <div id="searchbox" jstcache="0">
29 <form action="http://www.google.com/cse" id="cse-search-box" jstcache="0 ">
30 <div jstcache="0">
31 <input type="hidden" name="cx" value="002967670403910741006:61_cvzfq tno" jstcache="0">
32 <input type="hidden" name="ie" value="UTF-8" jstcache="0">
33 <input type="text" name="q" size="31" jstcache="0">
34 <input type="submit" name="sa" value="Search" jstcache="0">
35 </div>
36 </form>
37
38 <script type="text/javascript" src="http://www.google.com/jsapi" jstcach e="0"></script>
39 <script type="text/javascript" jstcache="0">google.load("elements", "1", {packages: "transliteration"});</script>
40 <script type="text/javascript" src="http://www.google.com/coop/cse/t13n? form=cse-search-box&amp;t13n_langs=en" jstcache="0"></script>
41 <script type="text/javascript" src="http://www.google.com/coop/cse/brand ?form=cse-search-box&amp;lang=en" jstcache="0"></script>
42 </div>
43 <div id="pageTitle" jstcache="0">
44 <h1 jscontent="getPageTitle()" jstcache="1">Formats: Manifest Files</h1>
45 </div>
46 </div> <!-- /pageHeader -->
47
48 <div id="pageContent" jstcache="0">
49 <!-- SIDENAV -->
50 <div id="leftNav" jstcache="0">
51 <ul jstcache="0">
52 <li jstcache="0"> <a href="index.html" jstcache="0">Home</a></li>
53 <li jstcache="0"> <a href="getstarted.html" jstcache="0">Getting Start ed</a></li>
54 <li jstcache="0"> <a href="overview.html" jstcache="0">Overview</a></l i>
55 <li jstcache="0"> <a href="devguide.html" jstcache="0"><div jstcache=" 0">Developer's Guide</div></a>
56 <ul jstcache="0">
57 <li jstcache="0"><a href="toolstrip.html" jstcache="0">Toolstrips< /a></li>
58 <li jstcache="0"><a href="pageActions.html" jstcache="0">Page Acti ons</a></li>
59 <li jstcache="0"><a href="background_pages.html" jstcache="0">Back ground Pages</a></li>
60 <li jstcache="0"><a href="content_scripts.html" jstcache="0">Conte nt Scripts</a></li>
61 <li jstcache="0"><a href="events.html" jstcache="0">Events</a></li >
62 <li jstcache="0"><a href="tabs.html" jstcache="0">Tabs</a></li>
63 <li jstcache="0"><a href="windows.html" jstcache="0">Windows</a></ li>
64 <li jstcache="0"><a href="bookmarks.html" jstcache="0">Bookmarks</ a></li>
65 <li jstcache="0"><a href="themes.html" jstcache="0">Themes</a></li >
66 <li jstcache="0"><a href="npapi.html" jstcache="0">NPAPI Plugins</ a></li>
67 <li jstcache="0"><a href="packaging.html" jstcache="0">Packaging</ a></li>
68 <li jstcache="0">Autoupdate</li>
69 </ul>
70 </li>
71 <li jstcache="0"><a href="tutorials.html" jstcache="0"><div jstcache=" 0">Tutorials</div></a>
72 <ul jstcache="0">
73 <li jstcache="0"><a href="tut_debugging.html" jstcache="0">Debuggi ng</a></li>
74 </ul>
75 </li>
76 <li jstcache="0">Reference
77 <ul jstcache="0">
78 <li jstcache="0"> Formats
79 <ul jstcache="0">
80 <li jstcache="0" class="leftNavSelected">Manifest Files</li>
81 <li jstcache="0"><a href="match_patterns.html" jstcache="0">Ma tch Patterns</a></li>
82 <li jstcache="0">Packages (.crx)</li>
83 </ul>
84 </li>
85 <li jstcache="0"> <a href="api_index.html" jstcache="0">chrome.* A PIs</a> </li>
86 <li jstcache="0"> <a href="api_other.html" jstcache="0">Other APIs </a> </li>
87 </ul>
88 </li>
89 <li jstcache="0"><a href="http://dev.chromium.org/developers/design-doc uments/extensions/samples" jstcache="0">Samples</a></li>
90 </ul>
91 </div>
92
93 <div id="mainColumn" jstcache="0">
94 <!-- TABLE OF CONTENTS -->
95 <div id="toc" jsdisplay="showPageTOC()" jstcache="2">
96 <p jstcache="0">Contents</p>
97 <ol jstcache="0">
98 <li jsselect="getStaticTOC()" jstcache="9" jsinstance="0">
99 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href ="#overview"> Field summary </a>
100 <ol jstcache="0">
101 <li jsselect="$this.children" jstcache="22" jsinstance="*0" styl e="display: none; ">
102 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14"> h3Name</a>
103 </li>
104 </ol>
105 </li><li jsselect="getStaticTOC()" jstcache="9" jsinstance="*1">
106 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href ="#H2-1">Field details</a>
107 <ol jstcache="0">
108 <li jsselect="$this.children" jstcache="22" jsinstance="0">
109 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#description">description</a>
110 </li><li jsselect="$this.children" jstcache="22" jsinstance="1">
111 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#icon">icon</a>
112 </li><li jsselect="$this.children" jstcache="22" jsinstance="2">
113 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#icons">icons</a>
114 </li><li jsselect="$this.children" jstcache="22" jsinstance="3">
115 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#name">name</a>
116 </li><li jsselect="$this.children" jstcache="22" jsinstance="*4" >
117 <a jscontent="name" jsvalues=".href:'#' + href" jstcache="14" href="#permissions">permissions</a>
118 </li>
119 </ol>
120 </li>
121 <div jsselect="apiDefinition" jstcache="3" style="display: none; ">
122 <li jstcache="0">
123 <a href="#apiReference" jscontent="'API reference: ' + getModule Name()" jstcache="4">API reference</a>
124 <ol jstcache="0">
125 <li jsdisplay="$this.properties" jstcache="5">
126 <a href="#properties" jstcache="0">Properties</a>
127 <ol jstcache="0">
128 <li jsselect="getPropertyListFromObject($this)" jstcache=" 10">
129 <a jscontent="name" jsvalues=".href:'#property-' + name" href="#property-anchor" jstcache="42">propertyName</a>
130 </li>
131 </ol>
132 </li>
133 <li jsdisplay="functions &amp;&amp; functions.length &gt; 0" j stcache="6">
134 <a href="#methods" jstcache="0">Methods</a>
135 <ol jstcache="0">
136 <li jsselect="functions.sort(sortByName)" jstcache="11">
137 <a jscontent="name" jsvalues=".href:'#method-' + name" h ref="#method-anchor" jstcache="43">methodName</a>
138 </li>
139 </ol>
140 </li>
141 <li jsdisplay="events &amp;&amp; events.length &gt; 0" jstcach e="7">
142 <a href="#events" jstcache="0">Events</a>
143 <ol jstcache="0">
144 <li jsselect="events.sort(sortByName)" jstcache="12">
145 <a jscontent="name" jsvalues=".href:'#event-' + name" hr ef="#event-anchor" jstcache="44">eventName</a>
146 </li>
147 </ol>
148 </li>
149 <li jsdisplay="types &amp;&amp; types.length &gt; 0" jstcache= "8">
150 <a href="#types" jstcache="0">Types</a>
151 <ol jstcache="0">
152 <li jsselect="types.sort(sortByName)" jstcache="38">
153 <a jscontent="id" jsvalues=".href:'#type-' + id" href="# id-anchor" jstcache="45">id</a>
154 </li>
155 </ol>
156 </li>
157 </ol>
158 </li>
159 </div>
160 </ol>
161 </div>
162 <!-- /TABLE OF CONTENTS -->
163
164 <!-- STATIC CONTENT PLACEHOLDER -->
165 <div id="static" jstcache="0"><div id="pageData-title" class="pageData" jstcache="0">Formats: Manifest Files</div>
166 <div id="pageData-showTOC" class="pageData" jstcache="0">true</div>
167
168 <p jstcache="0">
169 Every extension has a
170 <a href="http://www.json.org" jstcache="0">JSON</a>-formatted manifest file,
171 named <code jstcache="0">manifest.json</code>,
172 that provides important information about the extension.
173 </p>
174
175 <h2 id="overview" jstcache="0"> Field summary </h2>
176
177 <p jstcache="0">
178 The following code shows the supported manifest fields,
179 with links to the page that discusses each field.
180 The only fields that are required for every extension
181 are <b jstcache="0">name</b> and <b jstcache="0">version</b>.
182 </p>
183
184 <pre jstcache="0">{
185 <b jstcache="0">"<a href="#name" jstcache="0">name</a>"</b>: "<em jstcache="0" >My Extension</em>",
186 <b jstcache="0">"<a href="http://dev.chromium.org/developers/design-documents/ extensions/autoupdate" jstcache="0">version</a>"</b>: "<em jstcache="0">versionS tring</em>",
187
188 "<a href="#description" jstcache="0">description</a>": "<em jstcache="0">A pla in text description</em>",
189 "<a href="#icons" jstcache="0">icons</a>": { ... },
190 "<a href="http://dev.chromium.org/developers/design-documents/extensions/autou pdate" jstcache="0">update_url</a>": "http://<em jstcache="0">path/to/updateInfo </em>.xml",
191
192 "<a href="background_pages.html" jstcache="0">background_page</a>": "<em jstca che="0">aFile</em>.html",
193 "<a href="content_scripts.html" jstcache="0">content_scripts</a>": [...],
194 "<a href="pageActions.html" jstcache="0">page_actions</a>": [...],
195 "<a href="#permissions" jstcache="0">permissions</a>": [...],
196 "<a href="npapi.html" jstcache="0">plugins</a>": [...],
197 "<a href="themes.html" jstcache="0">theme</a>": [...],
198 "<a href="toolstrip.html" jstcache="0">toolstrips</a>": [...],
199 }
200 </pre>
201
202
203 <a name="H2-1" jstcache="0"></a><h2 jstcache="0">Field details</h2>
204
205 <p jstcache="0">
206 This section covers fields that aren't described in another page.
207 For a complete list of fields,
208 with links to where they're described in detail,
209 see the <a href="#overview" jstcache="0">Field summary</a>.
210 </p>
211
212 <h3 id="description" jstcache="0">description</h3>
213
214 <p jstcache="0">
215 A plain text string
216 (no HTML or other formatting)
217 that describes the extension.
218 The description should be suitable for both
219 the browser's extension management UI
220 and the extension gallery.
221 </p>
222
223 <h3 id="icon" jstcache="0">icon</h3>
224
225 <p jstcache="0">
226 An icon that represents the extension.
227 As a rule, you should use the <b jstcache="0">icons</b> field instead,
228 so that you can specify icons in multiple sizes.
229 Here's an example of using this field:
230 </p>
231
232 <pre jstcache="0">"icon": "icon.png",
233 </pre>
234
235 <h3 id="icons" jstcache="0">icons</h3>
236
237 <p jstcache="0">
238 One or more icons that represent the extension.
239 We recommend that you provide icons in four sizes —
240 16x16, 32x32, 48x48, and 128x128 pixels.
241 The icons can be in any format supported by WebKit,
242 such as BMP, GIF, ICO, JPEG, or PNG.
243 Here's an example of specifying all four icon sizes:
244 </p>
245
246 <pre jstcache="0">"icons": { "16": "icon16.png",
247 "32": "icon32.png",
248 "48": "icon48.png",
249 "128": "icon128.png" },
250 </pre>
251
252
253 <h3 id="name" jstcache="0">name</h3>
254
255 <p jstcache="0">
256 A short, plain text string
257 that identifies the extension.
258 The name is used in the install dialog,
259 extension management UI,
260 and the extension gallery.
261 </p>
262
263 <h3 id="permissions" jstcache="0">permissions</h3>
264
265 <p jstcache="0">
266 The capabilities the extension might use.
267 A permission can be either one of a list of known strings
268 (currently, either "tabs" or "bookmarks")
269 or a match pattern,
270 which gives access to one or more hosts.
271 The idea is not to restrict what you can do,
272 but to give advanced users an indication of what your extension
273 will be able to do.
274 Permissions might also help to limit damage
275 if your extension is attacked.
276 </p>
277
278 <p jstcache="0">
279 Here's an example of the permissions part of a manifest file:
280 </p>
281
282 <pre jstcache="0">"permissions": [
283 "tabs",
284 "bookmarks",
285 "http://www.blogger.com/",
286 "http://*.google.com/"
287 ],
288 </pre>
289
290 <p jstcache="0">
291 For more information, see
292 <a href="match_patterns.html" jstcache="0">Match Patterns</a>.
293 Note, however, that the match pattern in the <b jstcache="0">permissions</b> fie ld
294 specifies only the hosts —
295 not the paths —
296 to which the extension can make XMLHttpRequests.
297 </p>
298
299 </div>
300
301 <!-- API PAGE -->
302 <div class="apiPage" jsselect="apiDefinition" jstcache="3" style="displa y: none; ">
303 <a name="apiReference" jstcache="0"></a>
304 <h2 jscontent="'API reference: ' + getModuleName()" jstcache="4">API ref erence: chrome.apiname </h2>
305
306 <!-- PROPERTIES -->
307 <div jsdisplay="$this.properties" class="apiGroup" jstcache="5">
308 <a name="properties" jstcache="0"></a>
309 <h3 id="properties" jstcache="0">Properties</h3>
310
311 <div jsselect="getPropertyListFromObject($this)" jstcache="10">
312 <a jsvalues=".name:'property-' + name" jstcache="15"></a>
313 <h4 jscontent="name" jstcache="16">getLastError</h4>
314 <div class="summary" jstcache="0">
315 <!-- Note: intentionally longer 80 columns -->
316 <span jscontent="getModuleName() + '.'" jstcache="23">chrome.ext ension</span><span jscontent="$this.name" jstcache="24">lastError</span>
317 </div>
318 <div transclude="valueTemplate" jstcache="17">
319 </div>
320 </div>
321
322 </div> <!-- /apiGroup -->
323
324 <!-- METHODS -->
325 <div jsdisplay="functions &amp;&amp; functions.length &gt; 0" class="a piGroup" id="methods" jstcache="6">
326 <a name="methods" jstcache="0"></a>
327 <h3 jstcache="0">Methods</h3>
328
329 <!-- iterates over all functions -->
330 <div class="apiItem" jsselect="functions.sort(sortByName)" jstcache= "11">
331 <a jsvalues=".name:'method-' + name" jstcache="18"></a> <!-- metho d-anchor -->
332 <h4 jscontent="name" jstcache="16">method name</h4>
333
334 <div class="summary" jstcache="0"><span jsdisplay="returns" jscont ent="getTypeName(returns)" jstcache="25">void</span>
335 <!-- Note: intentionally longer 80 columns -->
336 <span jscontent="getFullyQualifiedFunctionName($this)" jstcach e="26">chrome.module.methodName</span>(<span jsselect="parameters" jsvalues="cla ss:optional ? 'optional' : ''" jstcache="27"><span jsdisplay="$index" jstcache=" 33">, </span><span jscontent="getTypeName($this)" jstcache="34"></span>
337 <var jstcache="0"><span jscontent="name" jstcache="16"></s pan></var></span>)</div>
338
339 <div class="description" jstcache="0">
340 <p class="todo" jsdisplay="!description" jstcache="28">Undocumen ted.</p>
341 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="29">
342 A description from the json schema def of the function goes he re.
343 </p>
344
345 <!-- PARAMETERS -->
346 <h4 jstcache="0">Parameters</h4>
347 <dl jstcache="0">
348 <div jsselect="parameters" jstcache="35">
349
350 <!-- VALUE: This is a subtemplate that is used elsewhere
351 via jsTemplate *transclude* -->
352 <div id="valueTemplate" jstcache="0">
353 <dt jstcache="0">
354 <var jsdisplay="$this.name" jscontent="$this.name" jstca che="46">paramName</var>
355 <em jstcache="0">
356
357 <!-- TYPE -->
358 <div style="display:inline" jstcache="0">
359 (
360 <span class="optional" jsdisplay="optional" jstc ache="47">optional</span>
361 <span id="typeTemplate" jstcache="0">
362 <span jsdisplay="getTypeRef($this)" jstcache=" 48">
363 <a jsvalues=".href: getTypeRefPage($this) + '#type-' + getTypeRef($this)" jscontent="getTypeRef($this)" jstcache="50"> Type< /a>
364 </span>
365 <span jsdisplay="!getTypeRef($this)" jstcache= "49">
366 <span jsdisplay="isArray($this)" jstcache="5 1">
367 array of <span jsselect="items" jstcache=" 53"><span transclude="typeTemplate" jstcache="54"></span></span>
368 </span>
369 <span jsdisplay="!isArray($this)" jscontent= "getTypeName($this)" jstcache="52">paramType</span>
370 </span>
371 </span>
372 )
373 </div>
374
375 </em>
376 </dt>
377 <dd class="todo" jsdisplay="!$this.description" jstcache=" 39">
378 Undocumented.
379 </dd>
380 <dd jsdisplay="$this.description" jsvalues=".innerHTML:$th is.description" jstcache="40">
381 Description of this parameter from the json schema.
382 </dd>
383
384 <!-- OBJECT PROPERTIES -->
385 <dd jsdisplay="shouldExpandObject($this)" jstcache="41">
386 <dl jstcache="0">
387 <div jsselect="getPropertyListFromObject($this)" jstca che="10">
388 <div transclude="valueTemplate" jstcache="17">
389 </div>
390 </div>
391 </dl>
392 </dd>
393 </div> <!-- /VALUE -->
394
395 </div>
396 </dl>
397
398 <!-- RETURNS -->
399 <h4 jsdisplay="returns" jstcache="30">Returns</h4>
400 <dl jstcache="0">
401 <div jsselect="returns" jstcache="36">
402 <div transclude="valueTemplate" jstcache="17">
403 </div>
404 </div>
405 </dl>
406
407 <!-- CALLBACK -->
408 <div jsdisplay="hasCallback(parameters)" jstcache="31">
409 <div jsselect="getCallbackParameters(parameters)" jstcache="37 ">
410 <h4 jstcache="0">Callback function</h4>
411 <p jstcache="0">
412 If you specify the <em jstcache="0">callback</em> parameter,
413 it should specify a function that looks like this:
414 </p>
415
416 <!-- Note: intentionally longer 80 columns -->
417 <pre jstcache="0">function(<span jscontent="getSignatureString (parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdue d" jstcache="0">{...}</span>);</pre>
418 <dl jstcache="0">
419 <div jsselect="parameters" jstcache="35">
420 <div transclude="valueTemplate" jstcache="17">
421 </div>
422 </div>
423 </dl>
424 </div>
425 </div>
426
427 </div> <!-- /description -->
428
429 </div> <!-- /apiItem -->
430
431 </div> <!-- /apiGroup -->
432
433 <!-- EVENTS -->
434 <div jsdisplay="events &amp;&amp; events.length &gt; 0" class="apiGrou p" jstcache="7">
435 <a name="events" jstcache="0"></a>
436 <h3 id="events" jstcache="0">Events</h3>
437
438 <!-- iterates over all events -->
439 <div jsselect="events.sort(sortByName)" class="apiItem" jstcache="12 ">
440 <a jsvalues=".name:'event-' + name" jstcache="19"></a>
441 <h4 jscontent="name" jstcache="16">event name</h4>
442
443 <div class="summary" jstcache="0">
444 <!-- Note: intentionally longer 80 columns -->
445 <span jscontent="getModuleName() + '.'" class="subdued" jstcache ="23">chrome.bookmarks</span><span jscontent="name" jstcache="16">onEvent</span> <span class="subdued" jstcache="0">.addListener</span>(function(<span jscontent= "getSignatureString(parameters)" jstcache="32">Type param1, Type param2</span>) <span class="subdued" jstcache="0">{...}</span>);
446 </div>
447
448 <div class="description" jstcache="0">
449 <p class="todo" jsdisplay="!description" jstcache="28">Undocumen ted.</p>
450 <p jsdisplay="description" jsvalues=".innerHTML:description" jst cache="29">
451 A description from the json schema def of the event goes here.
452 </p>
453
454 <!-- PARAMETERS -->
455 <h4 jstcache="0">Parameters</h4>
456 <dl jstcache="0">
457 <div jsselect="parameters" jstcache="35">
458 <div transclude="valueTemplate" jstcache="17">
459 </div>
460 </div>
461 </dl>
462
463 </div> <!-- /decription -->
464
465 </div> <!-- /apiItem -->
466
467 </div> <!-- /apiGroup -->
468
469 <!-- TYPES -->
470 <div jsdisplay="types &amp;&amp; types.length &gt; 0" class="apiGroup" jstcache="8">
471 <a name="types.sort(sortByName)" jstcache="0"></a>
472 <h3 id="types" jstcache="0">Types</h3>
473
474 <!-- iterates over all types -->
475 <div jsselect="types" class="apiItem" jstcache="13">
476 <a jsvalues=".name:'type-' + id" jstcache="20"></a>
477 <h4 jscontent="id" jstcache="21">type name</h4>
478
479 <div transclude="valueTemplate" jstcache="17">
480 </div>
481
482 </div> <!-- /apiItem -->
483
484 </div> <!-- /apiGroup -->
485
486 </div> <!-- /apiPage -->
487 </div> <!-- /mainColumn -->
488 </div> <!-- /pageContent -->
489 <div id="pageFooter" --="" jstcache="0">
490 <p jstcache="0">
491 Except as otherwise <a href="http://code.google.com/policies.html#restrictions " jstcache="0">noted</a>,
492 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/" jstcache="0">Creative Commons
493 Attribution 3.0 License</a>, and code samples are licensed under the
494 <a rel="license" href="http://code.google.com/google_bsd_license.html" jstcach e="0">BSD License</a>.
495 </p>
496 <p jstcache="0">
497 ©2009 Google
498 </p>
499 </div> <!-- /pageFooter -->
500 </div> <!-- /container -->
501 </body></html>
502 #EOF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698