diff options
author | kathyw@google.com <kathyw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 04:32:47 +0000 |
---|---|---|
committer | kathyw@google.com <kathyw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 04:32:47 +0000 |
commit | 72019a142cb65deac06491e779383e3f28118a8e (patch) | |
tree | 4e0b9e06424cdcacf33ac89d52170b66e86dbe25 /chrome/common | |
parent | 702690427d0185fe546ff21a01e501b77732166b (diff) | |
download | chromium_src-72019a142cb65deac06491e779383e3f28118a8e.zip chromium_src-72019a142cb65deac06491e779383e3f28118a8e.tar.gz chromium_src-72019a142cb65deac06491e779383e3f28118a8e.tar.bz2 |
More toolstrip removal.
What remains: tut_debugging, autoupdate
TEST=none
BUG=none
TBR=aa
Review URL: http://codereview.chromium.org/374027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/docs/api_index.html | 1 | ||||
-rw-r--r-- | chrome/common/extensions/docs/getstarted.html | 24 | ||||
-rw-r--r-- | chrome/common/extensions/docs/npapi.html | 2 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/api_index.html | 1 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/getstarted.html | 24 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/npapi.html | 2 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/toolstrip.html | 51 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/windows.html | 33 | ||||
-rw-r--r-- | chrome/common/extensions/docs/toolstrip.html | 812 | ||||
-rw-r--r-- | chrome/common/extensions/docs/windows.html | 38 |
10 files changed, 62 insertions, 926 deletions
diff --git a/chrome/common/extensions/docs/api_index.html b/chrome/common/extensions/docs/api_index.html index 5ff8ce2..88dadbe 100644 --- a/chrome/common/extensions/docs/api_index.html +++ b/chrome/common/extensions/docs/api_index.html @@ -229,7 +229,6 @@ Here are the supported chrome.* APIs: <li><a href="i18n.html">i18n</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> </ul> diff --git a/chrome/common/extensions/docs/getstarted.html b/chrome/common/extensions/docs/getstarted.html index 169f55d..0c94e91 100644 --- a/chrome/common/extensions/docs/getstarted.html +++ b/chrome/common/extensions/docs/getstarted.html @@ -246,9 +246,6 @@ The button and page will look something like this: <img src="images/hello-world-small.png" width="300" height="199" alt="a window with a grid of images related to HELLO WORLD"> -<p class="comment"> -[PENDING: rewrite the example to use a browser action instead of a toolstrip] -</p> <h2 id="browser">Get your browser ready</h2> @@ -378,28 +375,29 @@ what it means, what else we would've done if this were a real extension (e.g. package it), and where to find more information.]</p> +<p> +Here are some suggestions for what to do next: +</p> + <ul> <li> - Subscribe to - <a href="http://groups.google.com/group/chromium-extensions/subscribe">chromium-extensions</a> - to keep up to date with the latest news + Read the <a href="overview.html">Overview</a> </li> <li> - Learn how to debug your extension by following the + Learn how to debug extensions by following the <a href="tut_debugging.html">debugging tutorial</a> </li> <li> - Look at some - <a href="http://sites.google.com/a/chromium.org/dev/developers/design-documents/extensions/samples">sample extensions</a> + Keep up to date with the latest news by subscribing to + <a href="http://groups.google.com/group/chromium-extensions/subscribe">chromium-extensions</a> </li> <li> Learn more about - <a href="toolstrip.html">toolstrips</a> + <a href="browserAction.html">browser actions</a> </li> <li> - <a href="packaging.html">Package</a> - your extension into a <code>.crx</code> file - so you can share it with your friends + Look at some + <a href="http://sites.google.com/a/chromium.org/dev/developers/design-documents/extensions/samples">sample extensions</a> </li> </ul> </div> diff --git a/chrome/common/extensions/docs/npapi.html b/chrome/common/extensions/docs/npapi.html index 5c761ef..a2baa12 100644 --- a/chrome/common/extensions/docs/npapi.html +++ b/chrome/common/extensions/docs/npapi.html @@ -274,7 +274,7 @@ follow these steps to get your extension using it. </script></pre> <p> - This can be inside a toolstrip, a background page, + This can be inside a background page or any other HTML page used by your extension. If your plugin is "public", you can even use a content script to programmatically diff --git a/chrome/common/extensions/docs/static/api_index.html b/chrome/common/extensions/docs/static/api_index.html index 1f25b08..d8078b5 100644 --- a/chrome/common/extensions/docs/static/api_index.html +++ b/chrome/common/extensions/docs/static/api_index.html @@ -14,7 +14,6 @@ Here are the supported chrome.* APIs: <li><a href="i18n.html">i18n</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> </ul> diff --git a/chrome/common/extensions/docs/static/getstarted.html b/chrome/common/extensions/docs/static/getstarted.html index c3cb8ae..97a35b3 100644 --- a/chrome/common/extensions/docs/static/getstarted.html +++ b/chrome/common/extensions/docs/static/getstarted.html @@ -12,9 +12,6 @@ The button and page will look something like this: width="300" height="199" alt="a window with a grid of images related to HELLO WORLD" /> -<p class="comment"> -[PENDING: rewrite the example to use a browser action instead of a toolstrip] -</p> <h2 id="browser">Get your browser ready</h2> @@ -153,27 +150,28 @@ what it means, what else we would've done if this were a real extension (e.g. package it), and where to find more information.]</p> +<p> +Here are some suggestions for what to do next: +</p> + <ul> <li> - Subscribe to - <a href="http://groups.google.com/group/chromium-extensions/subscribe">chromium-extensions</a> - to keep up to date with the latest news + Read the <a href="overview.html">Overview</a> </li> <li> - Learn how to debug your extension by following the + Learn how to debug extensions by following the <a href="tut_debugging.html">debugging tutorial</a> </li> <li> - Look at some - <a href="http://sites.google.com/a/chromium.org/dev/developers/design-documents/extensions/samples">sample extensions</a> + Keep up to date with the latest news by subscribing to + <a href="http://groups.google.com/group/chromium-extensions/subscribe">chromium-extensions</a> </li> <li> Learn more about - <a href="toolstrip.html">toolstrips</a> + <a href="browserAction.html">browser actions</a> </li> <li> - <a href="packaging.html">Package</a> - your extension into a <code>.crx</code> file - so you can share it with your friends + Look at some + <a href="http://sites.google.com/a/chromium.org/dev/developers/design-documents/extensions/samples">sample extensions</a> </li> </ul> diff --git a/chrome/common/extensions/docs/static/npapi.html b/chrome/common/extensions/docs/static/npapi.html index 74c3554..817d1b3 100644 --- a/chrome/common/extensions/docs/static/npapi.html +++ b/chrome/common/extensions/docs/static/npapi.html @@ -60,7 +60,7 @@ follow these steps to get your extension using it. </script></pre> <p> - This can be inside a toolstrip, a background page, + This can be inside a background page or any other HTML page used by your extension. If your plugin is "public", you can even use a content script to programmatically diff --git a/chrome/common/extensions/docs/static/toolstrip.html b/chrome/common/extensions/docs/static/toolstrip.html deleted file mode 100644 index faf0a59..0000000 --- a/chrome/common/extensions/docs/static/toolstrip.html +++ /dev/null @@ -1,51 +0,0 @@ -<div id="pageData-title" class="pageData">Toolstrips</div> - -<!-- BEGIN AUTHORED CONTENT --> - -<p> -Toolstrips allow you to add UI to Google Chrome's toolbar area. -Toolstrips are nothing more than (very small) HTML pages, -so anything you can do with HTML/CSS/JavaScript, -you can do with toolstrips. -</p> - -<h2 id="manifest">Manifest</h2> -<p>Register your toolstrips in the extension manifest like this:</p> - -<pre>{ - "name": "My First Extension", - "version": "1.0", - "description": "The first extension that I made.", -<b> "toolstrips": [ - "one_toolstrip.html", - "two_toolstrip.html" - ]</b> -}</pre> - -<h2>Creating buttons</h2> -<p>You can create buttons that look like the bookmark bar buttons using this template:</p> - -<pre><div class="toolstrip-button"> - <!-- Image is optional and should be a 16x16 icon. --> - <img src="<em>path/to/some_icon.png</em>"> - <span>My Button</span> -</div></pre> - - -<h2>Debugging tips</h2> - -<ul> -<li>You can bring up the web inspector for a toolstrip by going to chrome://extensions and clicking on the 'inspect' link. This includes a javascript console as well as a debugger.</li> -<li>alert(), prompt(), and confirm() don't work yet. Sorry about that.</li> -<li>You can run toolstrips in the main content area by loading their URL, which would be something like chrome-extension://0000000000000000000000000000000000000000/my_toolstrip.html</li> -</ul> - -<h2>Design tips</h2> - -<ul> -<li>Try not to use too much space. Toolbar real estate is precious and users tend to prefer extensions to use as little of it as possible.</li> -<li>The toolbar automatically detects how much space a toolstrip needs and reflows. So you can resize your toolstrip dynamically if you need a little more room temporarily.</li> -<li>If you need to do more extensive UI, use the tab contents area or a pop up window.</li> -<li>Remember that there can be multiple instances of a given toolstrip page running at one time. Each browser window has its own toolstrip. If you need long-running application logic, try Background Pages.</li> -</ul> -<!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/static/windows.html b/chrome/common/extensions/docs/static/windows.html index ca64ab0..e527cd9 100644 --- a/chrome/common/extensions/docs/static/windows.html +++ b/chrome/common/extensions/docs/static/windows.html @@ -10,39 +10,42 @@ create, modify, and rearrange windows in the browser. <h2 id="manifest">Manifest</h2> <p> -You must declare the "tabs" permission -in your extension's manifest to use the windows API. +To use the windows API, +you must declare the "tabs" permission +in <a href="manifest.html">manifest.json</a>. (No, that isn't a typo — the window and tabs modules interact so closely we decided to just share one permission between them.) For example: </p> -<pre>{ - "name": "My extension that uses windows", - "version": "0.1", -<b> "permissions": [ - "tabs" - ]</b> -}</pre> +<pre> +"permissions": ["tabs"] +</pre> <h2 id="current-window">The current window</h2> <p>Many functions in the extension system -take an optional <var>windowId</var> parameter -which is documented to default to the "current window". +take an optional <var>windowId</var> parameter, +which defaults to the current window. +</p> <p>The <em>current window</em> is the window that contains the code that is currently executing. It's important to realize that this can be different from the topmost or focused window. +</p> -<p>For example, consider code running in a -<a href="toolstrip.html">toolstrip</a>, that -calls <a href="tabs.html#method-getSelected">chrome.tabs.getSelected</a>. -The current window is the window that contains the toolstrip that made +<p>For example, say an extension +creates a few tabs or windows from a single HTML file, +and that the HTML file +contains a call to +<a href="tabs.html#method-getSelected">chrome.tabs.getSelected</a>. +The current window is the window that contains the page that made the call, no matter what the topmost window is. +</p> <p>In the case of the <a href="background_pages.html">background page</a>, the value of the current window falls back to the topmost window. +</p> <!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/toolstrip.html b/chrome/common/extensions/docs/toolstrip.html deleted file mode 100644 index 80d00dc..0000000 --- a/chrome/common/extensions/docs/toolstrip.html +++ /dev/null @@ -1,812 +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"> - <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> - <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>Toolstrips</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>Toolstrips</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> Browser UI - <ul> - <li><a href="browserAction.html">Browser Actions</a></li> - <li><a href="options.html">Options Pages</a></li> - <li><a href="override.html">Override Pages</a></li> - <li><a href="pageAction.html">Page Actions</a></li> - <li><a href="themes.html">Themes</a></li> - </ul> - </li> - <li> Browser Interaction - <ul> - <li><a href="bookmarks.html">Bookmarks</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> - </ul> - </li> - <li> Implementation - <ul> - <li><a href="background_pages.html">Background Pages</a></li> - <li><a href="content_scripts.html">Content Scripts</a></li> - <li><a href="xhr.html">Cross-Origin XHR</a></li> - <li><a href="messaging.html">Message Passing</a></li> - <li><a href="npapi.html">NPAPI Plugins</a></li> - </ul> - </li> - <li> Finishing - <ul> - <li><a href="autoupdate.html">Autoupdating</a></li> - <li><a href="packaging.html">Packaging</a></li> - </ul> - </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="samples.html">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">Creating buttons</a> - <ol> - <li jsinstance="*0" style="display: none; "> - <a>h3Name</a> - </li> - </ol> - </li><li jsinstance="2"> - <a href="#H2-2">Debugging tips</a> - <ol> - <li jsinstance="*0" style="display: none; "> - <a>h3Name</a> - </li> - </ol> - </li><li jsinstance="*3"> - <a href="#H2-3">Design tips</a> - <ol> - <li jsinstance="*0" style="display: none; "> - <a>h3Name</a> - </li> - </ol> - </li> - <div> - <li> - <a href="#apiReference">API reference: chrome.toolstrip</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-collapse">collapse</a> - </li><li jsinstance="*1"> - <a href="#method-expand">expand</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">Toolstrips</div> - -<!-- BEGIN AUTHORED CONTENT --> - -<p> -Toolstrips allow you to add UI to Google Chrome's toolbar area. -Toolstrips are nothing more than (very small) HTML pages, -so anything you can do with HTML/CSS/JavaScript, -you can do with toolstrips. -</p> - -<h2 id="manifest">Manifest</h2> -<p>Register your toolstrips in the extension manifest like this:</p> - -<pre>{ - "name": "My First Extension", - "version": "1.0", - "description": "The first extension that I made.", -<b> "toolstrips": [ - "one_toolstrip.html", - "two_toolstrip.html" - ]</b> -}</pre> - -<a name="H2-1"></a><h2>Creating buttons</h2> -<p>You can create buttons that look like the bookmark bar buttons using this template:</p> - -<pre><div class="toolstrip-button"> - <!-- Image is optional and should be a 16x16 icon. --> - <img src="<em>path/to/some_icon.png</em>"> - <span>My Button</span> -</div></pre> - - -<a name="H2-2"></a><h2>Debugging tips</h2> - -<ul> -<li>You can bring up the web inspector for a toolstrip by going to chrome://extensions and clicking on the 'inspect' link. This includes a javascript console as well as a debugger.</li> -<li>alert(), prompt(), and confirm() don't work yet. Sorry about that.</li> -<li>You can run toolstrips in the main content area by loading their URL, which would be something like chrome-extension://0000000000000000000000000000000000000000/my_toolstrip.html</li> -</ul> - -<a name="H2-3"></a><h2>Design tips</h2> - -<ul> -<li>Try not to use too much space. Toolbar real estate is precious and users tend to prefer extensions to use as little of it as possible.</li> -<li>The toolbar automatically detects how much space a toolstrip needs and reflows. So you can resize your toolstrip dynamically if you need a little more room temporarily.</li> -<li>If you need to do more extensive UI, use the tab contents area or a pop up window.</li> -<li>Remember that there can be multiple instances of a given toolstrip page running at one time. Each browser window has its own toolstrip. If you need long-running application logic, try Background Pages.</li> -</ul> -<!-- END AUTHORED CONTENT --> -</div> - - <!-- API PAGE --> - <div class="apiPage"> - <a name="apiReference"></a> - <h2>API reference: chrome.toolstrip</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-collapse"></a> <!-- method-anchor --> - <h4>collapse</h4> - - <div class="summary"><span style="display: none; ">void</span> - <!-- Note: intentionally longer 80 columns --> - <span>chrome.toolstrip.collapse</span>(<span jsinstance="0" class="optional"><span style="display: none; ">, </span><span>object</span> - <var><span>collapseInfo</span></var></span><span jsinstance="*1" class="optional"><span>, </span><span>function</span> - <var><span>callback</span></var></span>)</div> - - <div class="description"> - <p class="todo">Undocumented.</p> - <p style="display: none; "> - A description from the json schema def of the function goes here. - </p> - - <!-- PARAMETERS --> - <h4>Parameters</h4> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>collapseInfo</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>object</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo"> - Undocumented. - </dd> - <dd style="display: none; "> - Description of this parameter from the json schema. - </dd> - - <!-- OBJECT PROPERTIES --> - <dd> - <dl> - <div jsinstance="*0"> - <div> - <dt> - <var>url</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>If present, the toolstrip mole will change it's content to the provided url. Otherwise, the current page will just be collapsed in size.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="*1"> - <div> - <dt> - <var>callback</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>function</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo"> - Undocumented. - </dd> - <dd style="display: none; "> - Description of this parameter from the json schema. - </dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </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> - <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></span>) <span class="subdued">{...}</span>);</pre> - <dl> - <div jsinstance="*0" style="display: none; "> - <div> - </div> - </div> - </dl> - </div> - </div> - - </div> <!-- /description --> - - </div><div class="apiItem" jsinstance="*1"> - <a name="method-expand"></a> <!-- method-anchor --> - <h4>expand</h4> - - <div class="summary"><span style="display: none; ">void</span> - <!-- Note: intentionally longer 80 columns --> - <span>chrome.toolstrip.expand</span>(<span jsinstance="0" class="null"><span style="display: none; ">, </span><span>object</span> - <var><span>expandInfo</span></var></span><span jsinstance="*1" class="optional"><span>, </span><span>function</span> - <var><span>callback</span></var></span>)</div> - - <div class="description"> - <p class="todo">Undocumented.</p> - <p style="display: none; "> - A description from the json schema def of the function goes here. - </p> - - <!-- PARAMETERS --> - <h4>Parameters</h4> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>expandInfo</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"> - Undocumented. - </dd> - <dd style="display: none; "> - Description of this parameter from the json schema. - </dd> - - <!-- OBJECT PROPERTIES --> - <dd> - <dl> - <div jsinstance="0"> - <div> - <dt> - <var>height</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 vertical pixel height required of the toolstrip area.</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">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>If present, the toolstrip mole will change it's content to the provided url. Otherwise, the current page will just be expanded in size.</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> - </div> - </dl> - </dd> - </div> - </div><div jsinstance="*1"> - <div> - <dt> - <var>callback</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>function</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo"> - Undocumented. - </dd> - <dd style="display: none; "> - Description of this parameter from the json schema. - </dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </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> - <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></span>) <span class="subdued">{...}</span>);</pre> - <dl> - <div jsinstance="*0" style="display: none; "> - <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/windows.html b/chrome/common/extensions/docs/windows.html index 6459dc9..5e3382e 100644 --- a/chrome/common/extensions/docs/windows.html +++ b/chrome/common/extensions/docs/windows.html @@ -248,43 +248,45 @@ create, modify, and rearrange windows in the browser. <h2 id="manifest">Manifest</h2> <p> -You must declare the "tabs" permission -in your extension's manifest to use the windows API. +To use the windows API, +you must declare the "tabs" permission +in <a href="manifest.html">manifest.json</a>. (No, that isn't a typo — the window and tabs modules interact so closely we decided to just share one permission between them.) For example: </p> -<pre>{ - "name": "My extension that uses windows", - "version": "0.1", -<b> "permissions": [ - "tabs" - ]</b> -}</pre> +<pre>"permissions": ["tabs"] +</pre> <h2 id="current-window">The current window</h2> <p>Many functions in the extension system -take an optional <var>windowId</var> parameter -which is documented to default to the "current window". +take an optional <var>windowId</var> parameter, +which defaults to the current window. +</p> -</p><p>The <em>current window</em> is the window that +<p>The <em>current window</em> is the window that contains the code that is currently executing. It's important to realize that this can be different from the topmost or focused window. +</p> -</p><p>For example, consider code running in a -<a href="toolstrip.html">toolstrip</a>, that -calls <a href="tabs.html#method-getSelected">chrome.tabs.getSelected</a>. -The current window is the window that contains the toolstrip that made +<p>For example, say an extension +creates a few tabs or windows from a single HTML file, +and that the HTML file +contains a call to +<a href="tabs.html#method-getSelected">chrome.tabs.getSelected</a>. +The current window is the window that contains the page that made the call, no matter what the topmost window is. +</p> -</p><p>In the case of the <a href="background_pages.html">background page</a>, +<p>In the case of the <a href="background_pages.html">background page</a>, the value of the current window falls back to the topmost window. +</p> <!-- END AUTHORED CONTENT --> -</p></div> +</div> <!-- API PAGE --> <div class="apiPage"> |