diff options
40 files changed, 410 insertions, 1011 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 5d866b0..2a60f66 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -857,7 +857,7 @@ { "name": "setIcon", "type": "function", - "description": "Sets the icon for the page action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the iconIndex or the imageData property must be specified.", + "description": "Sets the icon for the page action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the path or the imageData property must be specified.", "parameters": [ { "name": "details", @@ -872,7 +872,7 @@ "iconIndex": { "type": "integer", "minimum": 0, - "description": "The zero-based index into the |icons| vector specified in the manifest.", + "description": "<b>Deprecated.</b> The zero-based index into the |icons| vector specified in the manifest.", "optional": true } } @@ -983,7 +983,7 @@ { "name": "setIcon", "type": "function", - "description": "Sets the icon for the browser action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the iconIndex or the imageData property must be specified.", + "description": "Sets the icon for the browser action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the path or the imageData property must be specified.", "parameters": [ { "name": "details", @@ -997,7 +997,7 @@ "iconIndex": { "type": "integer", "minimum": 0, - "description": "The zero-based index into the |icons| vector specified in the manifest.", + "description": "<b>Deprecated.</b> The zero-based index into the |icons| vector specified in the manifest.", "optional": true }, "path": { diff --git a/chrome/common/extensions/docs/api_index.html b/chrome/common/extensions/docs/api_index.html index c462455..7b3d4c3 100755 --- a/chrome/common/extensions/docs/api_index.html +++ b/chrome/common/extensions/docs/api_index.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -204,9 +205,10 @@ Here are the supported chrome.* APIs: <ul> <li><a href="bookmarks.html">bookmarks</a></li> + <li><a href="browserAction.html">browserAction</a></li> <li><a href="extension.html">extension</a></li> <li><a href="i18n.html">i18n</a></li> - <li><a href="pageActions.html">pageActions</a></li> + <li><a href="pageAction.html">pageAction</a></li> <li><a href="tabs.html">tabs</a></li> <li><a href="toolstrip.html">toolstrip</a></li> <li><a href="windows.html">windows</a></li> diff --git a/chrome/common/extensions/docs/api_other.html b/chrome/common/extensions/docs/api_other.html index 6b8860d..1523bf0 100755 --- a/chrome/common/extensions/docs/api_other.html +++ b/chrome/common/extensions/docs/api_other.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/autoupdate.html b/chrome/common/extensions/docs/autoupdate.html index 10b94bd..b3dfc79 100755 --- a/chrome/common/extensions/docs/autoupdate.html +++ b/chrome/common/extensions/docs/autoupdate.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html index e47f59c..022c8cd 100755 --- a/chrome/common/extensions/docs/background_pages.html +++ b/chrome/common/extensions/docs/background_pages.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li class="leftNavSelected">Background Pages</li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html index 2b42194..d38524f 100755 --- a/chrome/common/extensions/docs/bookmarks.html +++ b/chrome/common/extensions/docs/bookmarks.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/browserAction.html b/chrome/common/extensions/docs/browserAction.html index 050f127..57232eb 100755 --- a/chrome/common/extensions/docs/browserAction.html +++ b/chrome/common/extensions/docs/browserAction.html @@ -14,7 +14,7 @@ </script> <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> - <title>chrome.browserAction</title></head><body> <div id="container"> + <title>Browser Actions</title></head><body> <div id="container"> <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> <!-- In particular, sub-templates that recurse, must be used by allowing jstemplate to make a copy of the template in this section which @@ -86,7 +86,7 @@ <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script> </div> <div id="pageTitle"> - <h1>chrome.browserAction</h1> + <h1>Browser Actions</h1> </div> </div> <!-- /pageHeader --> @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li class="leftNavSelected">Browser Actions</li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -141,10 +142,38 @@ <div id="toc"> <p>Contents</p> <ol> - <li jsinstance="*0" style="display: none; "> - <a>h2Name</a> + <li jsinstance="0"> + <a href="#icons">Icons</a> <ol> - <li> + <li jsinstance="*0" style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li jsinstance="1"> + <a href="#badges">Badges</a> + <ol> + <li jsinstance="*0" style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li jsinstance="2"> + <a href="#popups">Popups</a> + <ol> + <li jsinstance="*0" style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li jsinstance="3"> + <a href="#H2-3">Style Guide</a> + <ol> + <li jsinstance="*0" style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li jsinstance="*4"> + <a href="#manifest">Manifest</a> + <ol> + <li jsinstance="*0" style="display: none; "> <a>h3Name</a> </li> </ol> @@ -199,7 +228,99 @@ <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> - <div id="static"></div> + <div id="static"><div id="pageData-title" class="pageData">Browser Actions</div> + +<!-- BEGIN AUTHORED CONTENT --> +<p>Browser actions are buttons + that are displayed in the main Chrome toolbar + to the right of the omnibox.</p> + +<img src="images/browser-action.png" width="363" height="226"> + +<h2 id="icons">Icons</h2> + +<p>Browser action icons can be up to 19px square. + Larger icons will be resized to fit, but for best results, + using a 19px icon is recommended.</p> + +<p>Icons can be set two ways: + using a static image or using the + HTML5 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html">canvas element</a>. + Using static images is easier for simple applications, + but you can do more dynamic UIs + using the canvas element. + +</p><p>Static images can be in any format WebKit can display. + These include: png, bmp, ico, jpg, gif.</p> + +<h2 id="badges">Badges</h2> + +<p>Browser actions can optionally display a badge, + which is a bit of text that is layered over the icon. + Badges make it easy to update the browser action + to display a small amount of information + about the state of the extension.</p> + +<p>The badge APIs allow any length of text, + but limiting badges to a max of four characters + is recommended.</p> + +<h2 id="popups">Popups</h2> + +<p>Popups allow browser actions to show additional UI + when the user activates them. + Popups contents are implemented using HTML + and the popup is automatically sized + to the content size.</p> + +<a name="H2-3"></a><h2>Style Guide</h2> + +<p>For the best visual impact, + we recommend observing + the following guidelines:</p> + +<ul> + <li><b>Do</b> use browser actions for features + that make sense on most pages. + </li><li><b>Don't</b> use browser actions for features + that only make sense for a few pages. + Use <a href="pageAction.html">page actions</a> instead. + </li><li><b>Do</b> use big, colorful icons that fully utilize + the 19px square space. + Browser action icons should seem a little bigger + and heavier than page action icons. + </li><li><b>Don't</b> attempt to mimic + Chrome's monochrome "wrench" and "page" icons. + This won't work well with themes, and anyway, + extensions should stand out a little. + </li><li><b>Do</b> use alpha transparency + to add soft edges to your icon. + Remember: many users theme Chrome, + so your icon should look nice + on a variety of background colors. + </li><li><b>Don't</b> constantly animate your icon. + That's just annoying. +</li></ul> + +<h2 id="manifest">Manifest</h2> + +<p>Developers declare their browser action + using the following syntax:</p> + +<pre>"browser_action": { + "default_title": "Google Mail", // Optional. Shown in tooltip. + "default_icon": "images/icon19.png", // Optional. + "popup": "popup.html" // Optional +}</pre> + +<p><b>Note:</b> Even if you don't include + any of the values, you must include an empty + browser_action entry in your manifest + so that the system knows to reserve space + for your browser action in the toolbar.</p> + +<!-- END AUTHORED CONTENT --> +</div> <!-- API PAGE --> <div class="apiPage"> @@ -513,7 +634,7 @@ <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Sets the icon for the browser action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the iconIndex or the imageData property must be specified.</p> + <p>Sets the icon for the browser action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the path or the imageData property must be specified.</p> <!-- PARAMETERS --> <h4>Parameters</h4> @@ -624,7 +745,7 @@ <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The zero-based index into the |icons| vector specified in the manifest.</dd> + <dd><b>Deprecated.</b> The zero-based index into the |icons| vector specified in the manifest.</dd> <!-- OBJECT PROPERTIES --> <dd style="display: none; "> diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html index 4976304..16a00c2 100755 --- a/chrome/common/extensions/docs/content_scripts.html +++ b/chrome/common/extensions/docs/content_scripts.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li class="leftNavSelected">Content Scripts</li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/devguide.html b/chrome/common/extensions/docs/devguide.html index e4532fd..0f97fac 100755 --- a/chrome/common/extensions/docs/devguide.html +++ b/chrome/common/extensions/docs/devguide.html @@ -100,7 +100,8 @@ <li><div class="leftNavSelected">Developer's Guide</div> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -203,7 +204,8 @@ but here's what we have, so far: <ul> <li> Changing the Google Chrome chrome <ul> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="themes.html">Themes</a></li> <li><a href="toolstrip.html">Toolstrips</a></li> </ul> diff --git a/chrome/common/extensions/docs/devtools.html b/chrome/common/extensions/docs/devtools.html index 117447e..3ad7420 100755 --- a/chrome/common/extensions/docs/devtools.html +++ b/chrome/common/extensions/docs/devtools.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/events.html b/chrome/common/extensions/docs/events.html index 2e9cce1..7f4d9ac 100755 --- a/chrome/common/extensions/docs/events.html +++ b/chrome/common/extensions/docs/events.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li class="leftNavSelected">Events</li> diff --git a/chrome/common/extensions/docs/extension.html b/chrome/common/extensions/docs/extension.html index 67acf9d..6522369 100755 --- a/chrome/common/extensions/docs/extension.html +++ b/chrome/common/extensions/docs/extension.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/getstarted.html b/chrome/common/extensions/docs/getstarted.html index 422d193..dde572d 100755 --- a/chrome/common/extensions/docs/getstarted.html +++ b/chrome/common/extensions/docs/getstarted.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/hosting.html b/chrome/common/extensions/docs/hosting.html index 2224c02..f68d935 100755 --- a/chrome/common/extensions/docs/hosting.html +++ b/chrome/common/extensions/docs/hosting.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/i18n.html b/chrome/common/extensions/docs/i18n.html index ba1c494..e72c9fa 100755 --- a/chrome/common/extensions/docs/i18n.html +++ b/chrome/common/extensions/docs/i18n.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/images/browser-action.png b/chrome/common/extensions/docs/images/browser-action.png Binary files differnew file mode 100755 index 0000000..25b0da42 --- /dev/null +++ b/chrome/common/extensions/docs/images/browser-action.png diff --git a/chrome/common/extensions/docs/index.html b/chrome/common/extensions/docs/index.html index 0a7318d..e884f90 100755 --- a/chrome/common/extensions/docs/index.html +++ b/chrome/common/extensions/docs/index.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -244,7 +245,7 @@ Here are some examples of what you can build with extensions: </td> <td valign="top"> <b>Page actions</b><br> - <a href="pageActions.html"><img src="images/index/page_action.png"></a> + <a href="pageAction.html"><img src="images/index/page_action.png"></a> <br> Add buttons to the Omnibox that get displayed for specific pages </td> diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html index be7a2ce..78d1a8e 100755 --- a/chrome/common/extensions/docs/manifest.html +++ b/chrome/common/extensions/docs/manifest.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -236,8 +237,9 @@ are <b>name</b> and <b>version</b>. "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml", "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html", + "<a href="browserAction.html">brower_action</a>": [...], "<a href="content_scripts.html">content_scripts</a>": [...], - "<a href="pageActions.html">page_actions</a>": [...], + "<a href="pageAction.html">page_action</a>": [...], "<a href="#permissions">permissions</a>": [...], "<a href="npapi.html">plugins</a>": [...], "<a href="themes.html">theme</a>": [...], diff --git a/chrome/common/extensions/docs/match_patterns.html b/chrome/common/extensions/docs/match_patterns.html index 93edbb9..bd75375 100755 --- a/chrome/common/extensions/docs/match_patterns.html +++ b/chrome/common/extensions/docs/match_patterns.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/npapi.html b/chrome/common/extensions/docs/npapi.html index 98ce3db..19bc0fd 100755 --- a/chrome/common/extensions/docs/npapi.html +++ b/chrome/common/extensions/docs/npapi.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/overview.html b/chrome/common/extensions/docs/overview.html index 7ae9392..87752d1 100755 --- a/chrome/common/extensions/docs/overview.html +++ b/chrome/common/extensions/docs/overview.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -254,8 +255,9 @@ from XMLHttpRequest to JSON to HTML5 local storage. <p> Many extensions add UI to Google Chrome, in the form of -<a href="toolstrip.html">toolstrips</a> (toolbar additions) -or <a href="pageActions.html">page actions</a> +<a href="toolstrip.html">toolstrips</a> (toolbar additions), +<a href="browserAction.html">browser actions</a>, +or <a href="pageAction.html">page actions</a> (clickable badges in the address bar). Extensions can also interact programmatically with browser features such as diff --git a/chrome/common/extensions/docs/packaging.html b/chrome/common/extensions/docs/packaging.html index 2055aea..1d522cc 100755 --- a/chrome/common/extensions/docs/packaging.html +++ b/chrome/common/extensions/docs/packaging.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/pageAction.html b/chrome/common/extensions/docs/pageAction.html index 2b71b44..3620f73 100755 --- a/chrome/common/extensions/docs/pageAction.html +++ b/chrome/common/extensions/docs/pageAction.html @@ -14,7 +14,7 @@ </script> <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> - <title>chrome.pageAction</title></head><body> <div id="container"> + <title>Page Actions</title></head><body> <div id="container"> <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> <!-- In particular, sub-templates that recurse, must be used by allowing jstemplate to make a copy of the template in this section which @@ -86,7 +86,7 @@ <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script> </div> <div id="pageTitle"> - <h1>chrome.pageAction</h1> + <h1>Page Actions</h1> </div> </div> <!-- /pageHeader --> @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li class="leftNavSelected">Page Actions</li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> @@ -141,10 +142,24 @@ <div id="toc"> <p>Contents</p> <ol> - <li jsinstance="*0" style="display: none; "> - <a>h2Name</a> + <li jsinstance="0"> + <a href="#icons">Icons</a> <ol> - <li> + <li jsinstance="*0" style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li jsinstance="1"> + <a href="#H2-1">Style Guide</a> + <ol> + <li jsinstance="*0" style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li jsinstance="*2"> + <a href="#manifest">Manifest</a> + <ol> + <li jsinstance="*0" style="display: none; "> <a>h3Name</a> </li> </ol> @@ -205,7 +220,90 @@ <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> - <div id="static"></div> + <div id="static"><div id="pageData-title" class="pageData">Page Actions</div> + +<!-- BEGIN AUTHORED CONTENT --> +<p>Page actions are a simple way to represent actions that can be taken on a page ("Email this page", "Share with Facebook", etc).</p> + +<p> +Page actions are displayed as icons on the right side of the OmniBox. +The RSS icon in the following screenshot +represents a page action +that lets you subscribe to +the RSS feed for the current page. +</p> + +<img src="images/page-action.png" width="361" height="79"> + +<h2 id="icons">Icons</h2> + +<p>Page action icons can be +up to 19px square. +Larger icons will be +resized to fit, +but for best results, +using a 19px icon is recommended.</p> + +<p>Icons can be set two ways: +using a static image +or using the HTML5 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html">canvas element</a>. +Using static images is easier +for simple applications, +but you can do +more dynamic UIs +using the canvas element. + +</p><p>Static images can be +in any format WebKit can display. +These include: png, bmp, ico, jpg, gif.</p> + +<a name="H2-1"></a><h2>Style Guide</h2> + +<p>For the best visual impact, +we recommend observing +the following guidelines:</p> + +<ul> + <li><b>Do</b> use page actions + for features that only make sense + for a few pages. + </li><li><b>Don't</b> use page actions + for features that make sense + for most pages. + Use <a href="browserAction.html">browser actions</a> instead. + </li><li><b>Do</b> use icons + that are slightly lighter-weight + than <a href="browserAction.html#icons">browser action icons</a>. + Most icons that Chrome displays + in the location bar + are smaller than 19px. + If the edge pixels are used, + they are usually only used + for a faint shadow. + </li><li><b>Don't</b> constantly animate your icon. + That's just annoying. +</li></ul> + +<h2 id="manifest">Manifest</h2> + +<p>Developers can declare page actions + in the manifest + using the following syntax:</p> + +<pre>"page_action": { + "default_title": "Do action", // Optional, tooltip. + "default_icon": "icons/foo.png" // Optional, icon. +}</pre> + +<p><b>Note:</b> Even if you don't include + any of the values, + you must include an empty page_action entry + in your manifest so that the system knows + to reserve space for your action + in the omnibox.</p> + +<!-- END AUTHORED CONTENT --> +</div> <!-- API PAGE --> <div class="apiPage"> @@ -874,7 +972,7 @@ <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Sets the icon for the page action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the iconIndex or the imageData property must be specified.</p> + <p>Sets the icon for the page action. The icon can be specified either as the index of one of the icons that was pre-specified in the manifest, or as the pixel data from a Canvas element. Either the path or the imageData property must be specified.</p> <!-- PARAMETERS --> <h4>Parameters</h4> @@ -1026,7 +1124,7 @@ <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The zero-based index into the |icons| vector specified in the manifest.</dd> + <dd><b>Deprecated.</b> The zero-based index into the |icons| vector specified in the manifest.</dd> <!-- OBJECT PROPERTIES --> <dd style="display: none; "> diff --git a/chrome/common/extensions/docs/pageActions.html b/chrome/common/extensions/docs/pageActions.html deleted file mode 100755 index a6b8fa0..0000000 --- a/chrome/common/extensions/docs/pageActions.html +++ /dev/null @@ -1,893 +0,0 @@ -<!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 mechanism. - 3) All <body>.innerHTML is genereated 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>.innerHTML is also generated by an offline step so that this - page may easily be indexed by search engines. ---><html xmlns="http://www.w3.org/1999/xhtml"><head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> - <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js"> - </script> - <script type="text/javascript" src="js/api_page_generator.js"></script> - <script type="text/javascript" src="js/bootstrap.js"></script> - <title>Page Actions</title></head><body> <div id="container"> - <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> - <!-- In particular, sub-templates that recurse, must be used by allowing - jstemplate to make a copy of the template in this section which - are not operated on by way of the jsskip="true" --> - <div style="display:none"> - - <!-- VALUE --> - <div id="valueTemplate"> - <dt> - <var>paramName</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional">optional</span> - <span id="typeTemplate"> - <span> - <a> Type</a> - </span> - <span> - <span> - array of <span><span></span></span> - </span> - <span>paramType</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo"> - Undocumented. - </dd> - <dd> - Description of this parameter from the json schema. - </dd> - - <!-- OBJECT PROPERTIES --> - <dd> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> <!-- /VALUE --> - - </div> <!-- /SUBTEMPLATES --> - - <a name="top"> </a> - <!-- API HEADER --> - <div id="pageHeader"> - <div id="searchbox"> - <form action="http://www.google.com/cse" id="cse-search-box"> - <div> - <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno"> - <input type="hidden" name="ie" value="UTF-8"> - <input type="text" name="q" size="31"> - <input type="submit" name="sa" value="Search"> - </div> - </form> - - <script type="text/javascript" src="http://www.google.com/jsapi"></script> - <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script> - <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script> - <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script> - </div> - <div id="pageTitle"> - <h1>Page Actions</h1> - </div> - </div> <!-- /pageHeader --> - - <div id="pageContent"> - <!-- SIDENAV --> - <div id="leftNav"> - <ul> - <li> <a href="index.html">Home</a></li> - <li> <a href="getstarted.html">Getting Started</a></li> - <li> <a href="overview.html">Overview</a></li> - <li> <a href="devguide.html"><div>Developer's Guide</div></a> - <ul> - <li><a href="toolstrip.html">Toolstrips</a></li> - <li class="leftNavSelected">Page Actions</li> - <li><a href="background_pages.html">Background Pages</a></li> - <li><a href="content_scripts.html">Content Scripts</a></li> - <li><a href="events.html">Events</a></li> - <li><a href="tabs.html">Tabs</a></li> - <li><a href="windows.html">Windows</a></li> - <li><a href="bookmarks.html">Bookmarks</a></li> - <li><a href="themes.html">Themes</a></li> - <li><a href="npapi.html">NPAPI Plugins</a></li> - <li><a href="xhr.html">Cross-Origin XHR</a></li> - <li><a href="packaging.html">Packaging</a></li> - <li><a href="autoupdate.html">Autoupdate</a></li> - </ul> - </li> - <li><a href="tutorials.html"><div>Tutorials</div></a> - <ul> - <li><a href="tut_debugging.html">Debugging</a></li> - </ul> - </li> - <li>Reference - <ul> - <li> Formats - <ul> - <li><a href="manifest.html">Manifest Files</a></li> - <li><a href="match_patterns.html">Match Patterns</a></li> - <!-- <li>Packages (.crx)</li> --> - </ul> - </li> - <li> <a href="api_index.html">chrome.* APIs</a> </li> - <li> <a href="api_other.html">Other APIs</a> </li> - </ul> - </li> - <li><a href="http://dev.chromium.org/developers/design-documents/extensions/samples">Samples</a></li> - </ul> - </div> - - <div id="mainColumn"> - <!-- TABLE OF CONTENTS --> - <div id="toc"> - <p>Contents</p> - <ol> - <li jsinstance="0"> - <a href="#manifest">Manifest</a> - <ol> - <li jsinstance="*0" style="display: none; "> - <a>h3Name</a> - </li> - </ol> - </li><li jsinstance="*1"> - <a href="#H2-1">Events</a> - <ol> - <li jsinstance="*0" style="display: none; "> - <a>h3Name</a> - </li> - </ol> - </li> - <div> - <li> - <a href="#apiReference">API reference: chrome.pageActions</a> - <ol> - <li style="display: none; "> - <a href="#properties">Properties</a> - <ol> - <li> - <a href="#property-anchor">propertyName</a> - </li> - </ol> - </li> - <li> - <a href="#methods">Methods</a> - <ol> - <li jsinstance="0"> - <a href="#method-disableForTab">disableForTab</a> - </li><li jsinstance="*1"> - <a href="#method-enableForTab">enableForTab</a> - </li> - </ol> - </li> - <li style="display: none; "> - <a href="#events">Events</a> - <ol> - <li> - <a href="#event-anchor">eventName</a> - </li> - </ol> - </li> - <li style="display: none; "> - <a href="#types">Types</a> - <ol> - <li> - <a href="#id-anchor">id</a> - </li> - </ol> - </li> - </ol> - </li> - </div> - </ol> - </div> - <!-- /TABLE OF CONTENTS --> - - <!-- STATIC CONTENT PLACEHOLDER --> - <div id="static"><div id="pageData-title" class="pageData">Page Actions</div> - -<!-- BEGIN AUTHORED CONTENT --> -<p>Page actions are a simple way to represent actions that can be taken on a page ("Email this page", "Share with Facebook", etc).</p> - -<p> -Page actions are displayed as icons on the right side of the OmniBox. -The RSS icon in the following screenshot -represents a page action -that lets you subscribe to -the RSS feed for the current page. -</p> - -<img src="images/page-action.png" width="361" height="79"> - -<h2 id="manifest">Manifest</h2> - -<p>Developers can declare page actions in the manifest using the following syntax:</p> - -<pre>"page_actions": [ - { - "id": "myaction", // Chosen by the developer. Should be unique within their extension. - "name": "Do action", // The page action name, also used as tooltip (unless overridden). - "icons": ["favicon.png", "favicon2.png"] - } - ]</pre> - -<p>Supported icon image formats include for example: png, bmp, ico, jpg, gif. If an image larger than 16x16 is specified, it will be resized to fit. For optimal performance, consider using an image that does not have to be resized to fit.</p> - -<a name="H2-1"></a><h2>Events</h2> - -<p>Each page action displays an icon in the OmniBox. Whenever the user clicks the icon an event is sent to the extension, signifying that the user wants to apply an action to the current page. To receive notifications about the event, the extension must register a listener.</p> - -<p>Page action events are created dynamically using the id of the page action declared in the manifest. For example, a page action with id 'foo' will setup an event called chrome.pageActions["foo"]. An extension would then register listeners like so:</p> - -<pre>chrome.pageActions["foo"].addListener(function(pageActionId, info) { - console.log(pageActionId); // Display the id of the page action. - console.log(info.tabId); // Display the id of the tab for which the page action event applies. - console.log(info.tabUrl); // Display the URL of the page for which the page action event applies. - console.log(info.button); // Display the number of the button which the user clicked with. -});</pre> - -<p style="margin-left:25px;"><strong>Parameters</strong></p> - -<p style="margin-left:25px;"><i>pageActionId ( string )</i><br> - The id of the page action that triggered the event.</p> -<p style="margin-left:25px;"><i>info ( object )</i><br> - An object containing information about the event and what tab and page the event applies to. Contains the following properties:</p> -<p style="margin-left:75px;"><i>tabId ( string )</i><br> - The id of the tab that was active when the event was triggered.</p> -<p style="margin-left:75px;"><i>tabUrl ( string )</i><br> - The url of the page for which the page action applies to.</p> -<p style="margin-left:75px;"><i>button ( integer )</i><br> - The mouse button which was pressed. The left button is 1, middle button is 2, and right button is 3.</p> -<!-- END AUTHORED CONTENT --> -</div> - - <!-- API PAGE --> - <div class="apiPage"> - <a name="apiReference"></a> - <h2>API reference: chrome.pageActions</h2> - - <!-- PROPERTIES --> - <div class="apiGroup" style="display: none; "> - <a name="properties"></a> - <h3 id="properties">Properties</h3> - - <div> - <a></a> - <h4>getLastError</h4> - <div class="summary"> - <!-- Note: intentionally longer 80 columns --> - <span>chrome.extension</span><span>lastError</span> - </div> - <div> - </div> - </div> - - </div> <!-- /apiGroup --> - - <!-- METHODS --> - <div class="apiGroup" id="methods"> - <a name="methods"></a> - <h3>Methods</h3> - - <!-- iterates over all functions --> - <div class="apiItem" jsinstance="0"> - <a name="method-disableForTab"></a> <!-- method-anchor --> - <h4>disableForTab</h4> - - <div class="summary"><span style="display: none; ">void</span> - <!-- Note: intentionally longer 80 columns --> - <span>chrome.pageActions.disableForTab</span>(<span jsinstance="0" class="null"><span style="display: none; ">, </span><span>string</span> - <var><span>pageActionId</span></var></span><span jsinstance="*1" class=""><span>, </span><span>object</span> - <var><span>action</span></var></span>)</div> - - <div class="description"> - <p class="todo" style="display: none; ">Undocumented.</p> - <p>Disables a page action for a particular tab+url combination (makes its OmniBox page action icon hidden when a certain url is active in a given tab). This can be useful to disable a page action before the user navigates away from a page containing an enabled page action.</p> - - <!-- PARAMETERS --> - <h4>Parameters</h4> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>pageActionId</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>string</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to disable (and must match a page action id declared in the manifest).</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="*1"> - <div> - <dt> - <var>action</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>object</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>An object specifying what action should be applied to the page action. Contains the following properties:</dd> - - <!-- OBJECT PROPERTIES --> - <dd> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>tabId</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>integer</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>The id of the tab for which you want to disable the page action.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="*1"> - <div> - <dt> - <var>url</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>string</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>The URL of the page you want the page action to not apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div> - </dl> - </dd> - </div> - </div> - </dl> - - <!-- RETURNS --> - <h4 style="display: none; ">Returns</h4> - <dl> - <div style="display: none; "> - <div> - </div> - </div> - </dl> - - <!-- CALLBACK --> - <div style="display: none; "> - <div> - <h4>Callback function</h4> - <p> - If you specify the <em>callback</em> parameter, - it should specify a function that looks like this: - </p> - - <!-- Note: intentionally longer 80 columns --> - <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);</pre> - <dl> - <div> - <div> - </div> - </div> - </dl> - </div> - </div> - - </div> <!-- /description --> - - </div><div class="apiItem" jsinstance="*1"> - <a name="method-enableForTab"></a> <!-- method-anchor --> - <h4>enableForTab</h4> - - <div class="summary"><span style="display: none; ">void</span> - <!-- Note: intentionally longer 80 columns --> - <span>chrome.pageActions.enableForTab</span>(<span jsinstance="0" class="null"><span style="display: none; ">, </span><span>string</span> - <var><span>pageActionId</span></var></span><span jsinstance="*1" class=""><span>, </span><span>object</span> - <var><span>action</span></var></span>)</div> - - <div class="description"> - <p class="todo" style="display: none; ">Undocumented.</p> - <p>Enables a page action for a particular tab+url combination (makes its icon visible in the OmniBox when a certain url is active in a given tab). The page action will automatically be disabled (its icon hidden) if the user navigates to a new URL or closes the tab. The action will also automatically be enabled/disabled as the user switches tabs.</p> - - <!-- PARAMETERS --> - <h4>Parameters</h4> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>pageActionId</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>string</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to enable (and must match a page action id declared in the manifest).</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="*1"> - <div> - <dt> - <var>action</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>object</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>An object specifing what action should be applied to the page action. Contains the following properties:</dd> - - <!-- OBJECT PROPERTIES --> - <dd> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>tabId</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>integer</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>The id of the tab for which you want to enable the page action.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="1"> - <div> - <dt> - <var>url</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>string</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>The URL of the page you want the page action to apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="2"> - <div> - <dt> - <var>title</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>string</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>Specifying |title| allows you to change the tooltip that appears when you hover over the page action icon in the OmniBox. This parameter is optional and if omitted then the page action |name| property declared in the manifest is used.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="*3"> - <div> - <dt> - <var>iconId</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional">optional</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>integer</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>A zero-based index into the |icons| vector specified in the manifest. This parameter is optional and if omitted then the first icon in the |icons| vector of the page action is used. This id is useful to represent different page action states. Example: An RSS feed icon could have a 'subscribe now' icon and an 'already subscribed' icon.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div> - </dl> - </dd> - </div> - </div> - </dl> - - <!-- RETURNS --> - <h4 style="display: none; ">Returns</h4> - <dl> - <div style="display: none; "> - <div> - </div> - </div> - </dl> - - <!-- CALLBACK --> - <div style="display: none; "> - <div> - <h4>Callback function</h4> - <p> - If you specify the <em>callback</em> parameter, - it should specify a function that looks like this: - </p> - - <!-- Note: intentionally longer 80 columns --> - <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);</pre> - <dl> - <div> - <div> - </div> - </div> - </dl> - </div> - </div> - - </div> <!-- /description --> - - </div> <!-- /apiItem --> - - </div> <!-- /apiGroup --> - - <!-- EVENTS --> - <div class="apiGroup" style="display: none; "> - <a name="events"></a> - <h3 id="events">Events</h3> - - <!-- iterates over all events --> - <div class="apiItem"> - <a></a> - <h4>event name</h4> - - <div class="summary"> - <!-- Note: intentionally longer 80 columns --> - <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>); - </div> - - <div class="description"> - <p class="todo">Undocumented.</p> - <p> - A description from the json schema def of the event goes here. - </p> - - <!-- PARAMETERS --> - <h4>Parameters</h4> - <dl> - <div> - <div> - </div> - </div> - </dl> - - </div> <!-- /decription --> - - </div> <!-- /apiItem --> - - </div> <!-- /apiGroup --> - - <!-- TYPES --> - <div class="apiGroup" style="display: none; "> - <a name="types.sort(sortByName)"></a> - <h3 id="types">Types</h3> - - <!-- iterates over all types --> - <div class="apiItem"> - <a></a> - <h4>type name</h4> - - <div> - </div> - - </div> <!-- /apiItem --> - - </div> <!-- /apiGroup --> - - </div> <!-- /apiPage --> - </div> <!-- /mainColumn --> - </div> <!-- /pageContent --> - <div id="pageFooter" --=""> - <p> - Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>, - the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons - Attribution 3.0 License</a>, and code samples are licensed under the - <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>. - </p> - <p> - ©2009 Google - </p> - -<!-- begin analytics --> -<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script> -<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script> - -<script type="text/javascript"> - // chrome doc tracking - try { - var engdocs = _gat._getTracker("YT-10763712-2"); - engdocs._trackPageview(); - } catch(err) {} - - // code.google.com site-wide tracking - try { - _uacct="UA-18071-1"; - _uanchor=1; - _uff=0; - urchinTracker(); - } - catch(e) {/* urchinTracker not available. */} -</script> -<!-- end analytics --> - - </div> <!-- /pageFooter --> - </div> <!-- /container --> -</body></html> - diff --git a/chrome/common/extensions/docs/static/api_index.html b/chrome/common/extensions/docs/static/api_index.html index 5bb25c4..1f25b08 100755 --- a/chrome/common/extensions/docs/static/api_index.html +++ b/chrome/common/extensions/docs/static/api_index.html @@ -9,9 +9,10 @@ Here are the supported chrome.* APIs: <ul> <li><a href="bookmarks.html">bookmarks</a></li> + <li><a href="browserAction.html">browserAction</a></li> <li><a href="extension.html">extension</a></li> <li><a href="i18n.html">i18n</a></li> - <li><a href="pageActions.html">pageActions</a></li> + <li><a href="pageAction.html">pageAction</a></li> <li><a href="tabs.html">tabs</a></li> <li><a href="toolstrip.html">toolstrip</a></li> <li><a href="windows.html">windows</a></li> diff --git a/chrome/common/extensions/docs/static/browserAction.html b/chrome/common/extensions/docs/static/browserAction.html new file mode 100755 index 0000000..310fbeb --- /dev/null +++ b/chrome/common/extensions/docs/static/browserAction.html @@ -0,0 +1,93 @@ +<div id="pageData-title" class="pageData">Browser Actions</div> + +<!-- BEGIN AUTHORED CONTENT --> +<p>Browser actions are buttons + that are displayed in the main Chrome toolbar + to the right of the omnibox.</p> + +<img src="images/browser-action.png" + width="363" height="226" /> + +<h2 id="icons">Icons</h2> + +<p>Browser action icons can be up to 19px square. + Larger icons will be resized to fit, but for best results, + using a 19px icon is recommended.</p> + +<p>Icons can be set two ways: + using a static image or using the + HTML5 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html">canvas element</a>. + Using static images is easier for simple applications, + but you can do more dynamic UIs + using the canvas element. + +<p>Static images can be in any format WebKit can display. + These include: png, bmp, ico, jpg, gif.</p> + +<h2 id="badges">Badges</h2> + +<p>Browser actions can optionally display a badge, + which is a bit of text that is layered over the icon. + Badges make it easy to update the browser action + to display a small amount of information + about the state of the extension.</p> + +<p>The badge APIs allow any length of text, + but limiting badges to a max of four characters + is recommended.</p> + +<h2 id="popups">Popups</h2> + +<p>Popups allow browser actions to show additional UI + when the user activates them. + Popups contents are implemented using HTML + and the popup is automatically sized + to the content size.</p> + +<h2>Style Guide</h2> + +<p>For the best visual impact, + we recommend observing + the following guidelines:</p> + +<ul> + <li><b>Do</b> use browser actions for features + that make sense on most pages. + <li><b>Don't</b> use browser actions for features + that only make sense for a few pages. + Use <a href="pageAction.html">page actions</a> instead. + <li><b>Do</b> use big, colorful icons that fully utilize + the 19px square space. + Browser action icons should seem a little bigger + and heavier than page action icons. + <li><b>Don't</b> attempt to mimic + Chrome's monochrome "wrench" and "page" icons. + This won't work well with themes, and anyway, + extensions should stand out a little. + <li><b>Do</b> use alpha transparency + to add soft edges to your icon. + Remember: many users theme Chrome, + so your icon should look nice + on a variety of background colors. + <li><b>Don't</b> constantly animate your icon. + That's just annoying. +</ul> + +<h2 id="manifest">Manifest</h2> + +<p>Developers declare their browser action + using the following syntax:</p> + +<pre>"browser_action": { + "default_title": "Google Mail", // Optional. Shown in tooltip. + "default_icon": "images/icon19.png", // Optional. + "popup": "popup.html" // Optional +}</pre> + +<p><b>Note:</b> Even if you don't include + any of the values, you must include an empty + browser_action entry in your manifest + so that the system knows to reserve space + for your browser action in the toolbar.</p> + +<!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/static/devguide.html b/chrome/common/extensions/docs/static/devguide.html index 9c7bba1..9133c36 100755 --- a/chrome/common/extensions/docs/static/devguide.html +++ b/chrome/common/extensions/docs/static/devguide.html @@ -8,7 +8,8 @@ but here's what we have, so far: <ul> <li> Changing the Google Chrome chrome <ul> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="themes.html">Themes</a></li> <li><a href="toolstrip.html">Toolstrips</a></li> </ul> diff --git a/chrome/common/extensions/docs/static/index.html b/chrome/common/extensions/docs/static/index.html index fb83d88..78a11d5 100755 --- a/chrome/common/extensions/docs/static/index.html +++ b/chrome/common/extensions/docs/static/index.html @@ -49,7 +49,7 @@ Here are some examples of what you can build with extensions: </td> <td valign="top"> <b>Page actions</b><br> - <a href="pageActions.html"><img src="images/index/page_action.png"></a> + <a href="pageAction.html"><img src="images/index/page_action.png"></a> <br> Add buttons to the Omnibox that get displayed for specific pages </td> diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html index 8dea32b..bdb086b 100755 --- a/chrome/common/extensions/docs/static/manifest.html +++ b/chrome/common/extensions/docs/static/manifest.html @@ -27,8 +27,9 @@ are <b>name</b> and <b>version</b>. "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml", "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html", + "<a href="browserAction.html">brower_action</a>": [...], "<a href="content_scripts.html">content_scripts</a>": [...], - "<a href="pageActions.html">page_actions</a>": [...], + "<a href="pageAction.html">page_action</a>": [...], "<a href="#permissions">permissions</a>": [...], "<a href="npapi.html">plugins</a>": [...], "<a href="themes.html">theme</a>": [...], diff --git a/chrome/common/extensions/docs/static/overview.html b/chrome/common/extensions/docs/static/overview.html index 70bbe07..3bd9f63 100755 --- a/chrome/common/extensions/docs/static/overview.html +++ b/chrome/common/extensions/docs/static/overview.html @@ -27,8 +27,9 @@ from XMLHttpRequest to JSON to HTML5 local storage. <p> Many extensions add UI to Google Chrome, in the form of -<a href="toolstrip.html">toolstrips</a> (toolbar additions) -or <a href="pageActions.html">page actions</a> +<a href="toolstrip.html">toolstrips</a> (toolbar additions), +<a href="browserAction.html">browser actions</a>, +or <a href="pageAction.html">page actions</a> (clickable badges in the address bar). Extensions can also interact programmatically with browser features such as diff --git a/chrome/common/extensions/docs/static/pageActions.html b/chrome/common/extensions/docs/static/pageActions.html deleted file mode 100755 index 1902738..0000000 --- a/chrome/common/extensions/docs/static/pageActions.html +++ /dev/null @@ -1,56 +0,0 @@ -<div id="pageData-title" class="pageData">Page Actions</div> - -<!-- BEGIN AUTHORED CONTENT --> -<p>Page actions are a simple way to represent actions that can be taken on a page ("Email this page", "Share with Facebook", etc).</p> - -<p> -Page actions are displayed as icons on the right side of the OmniBox. -The RSS icon in the following screenshot -represents a page action -that lets you subscribe to -the RSS feed for the current page. -</p> - -<img src="images/page-action.png" - width="361" height="79" /> - -<h2 id="manifest">Manifest</h2> - -<p>Developers can declare page actions in the manifest using the following syntax:</p> - -<pre>"page_actions": [ - { - "id": "myaction", // Chosen by the developer. Should be unique within their extension. - "name": "Do action", // The page action name, also used as tooltip (unless overridden). - "icons": ["favicon.png", "favicon2.png"] - } - ]</pre> - -<p>Supported icon image formats include for example: png, bmp, ico, jpg, gif. If an image larger than 16x16 is specified, it will be resized to fit. For optimal performance, consider using an image that does not have to be resized to fit.</p> - -<h2>Events</h2> - -<p>Each page action displays an icon in the OmniBox. Whenever the user clicks the icon an event is sent to the extension, signifying that the user wants to apply an action to the current page. To receive notifications about the event, the extension must register a listener.</p> - -<p>Page action events are created dynamically using the id of the page action declared in the manifest. For example, a page action with id 'foo' will setup an event called chrome.pageActions["foo"]. An extension would then register listeners like so:</p> - -<pre>chrome.pageActions["foo"].addListener(function(pageActionId, info) { - console.log(pageActionId); // Display the id of the page action. - console.log(info.tabId); // Display the id of the tab for which the page action event applies. - console.log(info.tabUrl); // Display the URL of the page for which the page action event applies. - console.log(info.button); // Display the number of the button which the user clicked with. -});</pre> - -<p style="margin-left:25px;"><strong>Parameters</strong></p> - -<p style="margin-left:25px;"><i>pageActionId ( string )</i><br> - The id of the page action that triggered the event.</p> -<p style="margin-left:25px;"><i>info ( object )</i><br> - An object containing information about the event and what tab and page the event applies to. Contains the following properties:</p> -<p style="margin-left:75px;"><i>tabId ( string )</i><br> - The id of the tab that was active when the event was triggered.</p> -<p style="margin-left:75px;"><i>tabUrl ( string )</i><br> - The url of the page for which the page action applies to.</p> -<p style="margin-left:75px;"><i>button ( integer )</i><br> - The mouse button which was pressed. The left button is 1, middle button is 2, and right button is 3.</p> -<!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html index c886b4c..7473fd0 100755 --- a/chrome/common/extensions/docs/tabs.html +++ b/chrome/common/extensions/docs/tabs.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html index 508c506..790c5b6 100755 --- a/chrome/common/extensions/docs/template/api_template.html +++ b/chrome/common/extensions/docs/template/api_template.html @@ -85,7 +85,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/test.html b/chrome/common/extensions/docs/test.html index 09988e4..1852ebf 100755 --- a/chrome/common/extensions/docs/test.html +++ b/chrome/common/extensions/docs/test.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/themes.html b/chrome/common/extensions/docs/themes.html index 435f8e4..1a1b82a 100755 --- a/chrome/common/extensions/docs/themes.html +++ b/chrome/common/extensions/docs/themes.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/toolstrip.html b/chrome/common/extensions/docs/toolstrip.html index 7792616..af0e826 100755 --- a/chrome/common/extensions/docs/toolstrip.html +++ b/chrome/common/extensions/docs/toolstrip.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li class="leftNavSelected">Toolstrips</li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/tut_debugging.html b/chrome/common/extensions/docs/tut_debugging.html index 03e115a..0a7b098 100755 --- a/chrome/common/extensions/docs/tut_debugging.html +++ b/chrome/common/extensions/docs/tut_debugging.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/tutorials.html b/chrome/common/extensions/docs/tutorials.html index f807aa1..f20fb5b 100755 --- a/chrome/common/extensions/docs/tutorials.html +++ b/chrome/common/extensions/docs/tutorials.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/windows.html b/chrome/common/extensions/docs/windows.html index 0abe73f..b663754 100755 --- a/chrome/common/extensions/docs/windows.html +++ b/chrome/common/extensions/docs/windows.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> diff --git a/chrome/common/extensions/docs/xhr.html b/chrome/common/extensions/docs/xhr.html index beae3ea..ae0428c 100755 --- a/chrome/common/extensions/docs/xhr.html +++ b/chrome/common/extensions/docs/xhr.html @@ -100,7 +100,8 @@ <li> <a href="devguide.html"><div>Developer's Guide</div></a> <ul> <li><a href="toolstrip.html">Toolstrips</a></li> - <li><a href="pageActions.html">Page Actions</a></li> + <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="pageAction.html">Page Actions</a></li> <li><a href="background_pages.html">Background Pages</a></li> <li><a href="content_scripts.html">Content Scripts</a></li> <li><a href="events.html">Events</a></li> |