diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 21:44:32 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 21:44:32 +0000 |
commit | 37ad8892fe9576eef898295e50e7d42b5d7a3e27 (patch) | |
tree | 2074f825af3d7430187dde4f7d5de75a91580d90 /chrome/common/extensions | |
parent | 68828be583862a07c72c3c223a6309b8fb708051 (diff) | |
download | chromium_src-37ad8892fe9576eef898295e50e7d42b5d7a3e27.zip chromium_src-37ad8892fe9576eef898295e50e7d42b5d7a3e27.tar.gz chromium_src-37ad8892fe9576eef898295e50e7d42b5d7a3e27.tar.bz2 |
Add two Extension view types: Notification and Infobars.
Also hooked them up to GetExtensionViews and consolidated
various methods of getting views into one (getViews, which
now takes an optional param type).
BUG=26463
TEST=None
Review URL: http://codereview.chromium.org/1397002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rwxr-xr-x | chrome/common/extensions/api/extension_api.json | 28 | ||||
-rw-r--r-- | chrome/common/extensions/docs/extension.html | 245 |
2 files changed, 163 insertions, 110 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 1adf289..5ab7351 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -125,8 +125,27 @@ { "name": "getViews", "type": "function", - "description": "Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. This includes background pages and tabs.", - "parameters": [], + "description": "Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.", + "parameters": [ + { + "type": "object", + "name": "fetchProperties", + "optional": true, + "properties": { + "type": { + "type": "string", + "enum": ["tab", "infobar", "notification"], + "optional": true, + "description": "The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'infobar', 'notification'." + }, + "windowId": { + "type": "integer", + "optional": true, + "description": "The window to restrict the search to. If omitted, returns all views." + } + } + } + ], "returns": { "type": "array", "description": "Array of global objects", @@ -146,7 +165,7 @@ "name": "getToolstrips", "nodoc": true, "type": "function", - "description": "Returns an array of the JavaScript 'window' objects for each of the toolstrip views running inside the current extension. If windowId is specified, returns only the 'window' objects of toolstrips attached to the specified window.", + "description": "Deprecated. Please use getViews({type: 'TOOLSTRIP'}). Returns an array of the JavaScript 'window' objects for each of the toolstrip views running inside the current extension. If windowId is specified, returns only the 'window' objects of toolstrips attached to the specified window.", "parameters": [ {"type": "integer", "name": "windowId", "optional": true} ], @@ -158,8 +177,9 @@ }, { "name": "getExtensionTabs", + "nodoc": true, "type": "function", - "description": "Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.", + "description": "Deprecated. Please use getViews({type: 'TAB'}). Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.", "parameters": [ {"type": "integer", "name": "windowId", "optional": true} ], diff --git a/chrome/common/extensions/docs/extension.html b/chrome/common/extensions/docs/extension.html index 8285e27..f4ba4dd 100644 --- a/chrome/common/extensions/docs/extension.html +++ b/chrome/common/extensions/docs/extension.html @@ -228,8 +228,8 @@ <a href="#method-connect">connect</a> </li><li> <a href="#method-getBackgroundPage">getBackgroundPage</a> - </li><li> - <a href="#method-getExtensionTabs">getExtensionTabs</a> + </li><li style="display: none; "> + <a href="#method-anchor">methodName</a> </li><li style="display: none; "> <a href="#method-anchor">methodName</a> </li><li> @@ -825,65 +825,27 @@ For details, see </div> <!-- /description --> - </div><div class="apiItem"> - <a name="method-getExtensionTabs"></a> <!-- method-anchor --> - <h4>getExtensionTabs</h4> + </div><div class="apiItem" style="display: none; "> + <a></a> <!-- method-anchor --> + <h4>method name</h4> - <div class="summary"><span>array of DOMWindow</span> + <div class="summary"><span>void</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.extension.getExtensionTabs</span>(<span class="optional"><span style="display: none; ">, </span><span>integer</span> - <var><span>windowId</span></var></span>)</div> + <span>chrome.module.methodName</span>(<span><span>, </span><span></span> + <var><span></span></var></span>)</div> <div class="description"> - <p class="todo" style="display: none; ">Undocumented.</p> - <p>Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.</p> + <p class="todo">Undocumented.</p> + <p> + A description from the json schema def of the function goes here. + </p> <!-- PARAMETERS --> <h4>Parameters</h4> <dl> <div> <div> - <dt> - <var>windowId</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"> - 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> </div> </dl> @@ -892,60 +854,12 @@ For details, see <dl> <div> <div> - <dt> - <var style="display: none; ">paramName</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> - array of <span><span> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>DOMWindow</span> - </span> - </span></span> - </span> - <span style="display: none; ">paramType</span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>Array of global window objects</dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - </div> + </div> </div> </dl> <!-- CALLBACK --> - <div style="display: none; "> + <div> <div> <h4>Callback function</h4> <p> @@ -1168,19 +1082,138 @@ For details, see <div class="summary"><span>array of DOMWindow</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.extension.getViews</span>(<span style="display: none; "><span>, </span><span></span> - <var><span></span></var></span>)</div> + <span>chrome.extension.getViews</span>(<span class="optional"><span style="display: none; ">, </span><span>object</span> + <var><span>fetchProperties</span></var></span>)</div> <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. This includes background pages and tabs.</p> + <p>Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.</p> <!-- PARAMETERS --> <h4>Parameters</h4> <dl> - <div style="display: none; "> + <div> <div> - </div> + <dt> + <var>fetchProperties</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> + <div> + <dt> + <var>type</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>The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'infobar', 'notification'.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> + </div><div> + <div> + <dt> + <var>windowId</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>The window to restrict the search to. If omitted, returns all views.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> + </div> + </dl> + </dd> + </div> </div> </dl> |