summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 16:06:05 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 16:06:05 +0000
commit4ce39887a02c9877976b7e6686a877dd0961c7a2 (patch)
tree5cb84e28ca7ccca9998f17148bfd5dd5efd4c0d8 /chrome/common/extensions
parent6e6f2bb1d57b20c85e4636504bd723f75a7b3200 (diff)
downloadchromium_src-4ce39887a02c9877976b7e6686a877dd0961c7a2.zip
chromium_src-4ce39887a02c9877976b7e6686a877dd0961c7a2.tar.gz
chromium_src-4ce39887a02c9877976b7e6686a877dd0961c7a2.tar.bz2
Add pinned property to tabs.update and create.
Fire tabs.onUpdated event if a tab's pinned state changes. BUG=24781 TEST=ExtensionApiTest Review URL: http://codereview.chromium.org/3816005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/api/extension_api.json30
-rw-r--r--chrome/common/extensions/docs/tabs.html246
2 files changed, 264 insertions, 12 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index cde62c8..3fa0606 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -809,6 +809,7 @@
"index": {"type": "integer", "minimum": 0, "description": "The zero-based index of the tab within its window."},
"windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."},
"selected": {"type": "boolean", "description": "Whether the tab is selected."},
+ "pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
"url": {"type": "string", "description": "The URL the tab is displaying."},
"title": {"type": "string", "optional": true, "description": "The title of the tab. This may not be available if the tab is loading."},
"favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This may not be available if the tab is loading."},
@@ -979,6 +980,11 @@
"type": "boolean",
"optional": true,
"description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>"
+ },
+ "pinned": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the tab should be pinned. Defaults to <var>false</var>"
}
}
},
@@ -1006,8 +1012,20 @@
"type": "object",
"name": "updateProperties",
"properties": {
- "url": {"type": "string", "optional": true},
- "selected": {"type": "boolean", "optional": true}
+ "url": {
+ "optional": true,
+ "description": "A URL to navigate the tab to."
+ },
+ "selected": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the tab should be selected."
+ },
+ "pinned": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the tab should be pinned."
+ }
}
},
{
@@ -1214,12 +1232,18 @@
"properties": {
"status": {
"type": "string",
+ "optional": true,
"description": "The status of the tab. Can be either <em>loading</em> or <em>complete</em>."
},
"url": {
"type": "string",
"optional": true,
- "description": "Only specified if the tab's URL changed."
+ "description": "The tab's URL if it has changed."
+ },
+ "pinned": {
+ "type": "boolean",
+ "optional": true,
+ "description": "The tab's new pinned state."
}
}
},
diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html
index c930911..9aa03b4 100644
--- a/chrome/common/extensions/docs/tabs.html
+++ b/chrome/common/extensions/docs/tabs.html
@@ -1402,6 +1402,64 @@ For other examples and for help in viewing the source code, see
</dd>
</div>
+ </div><div>
+ <div>
+ <dt>
+ <var>pinned</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</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>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether the tab should be pinned. Defaults to <var>false</var></dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
</div>
</dl>
</dd>
@@ -4623,7 +4681,7 @@ For other examples and for help in viewing the source code, see
<span style="display: none; ">
array of <span><span></span></span>
</span>
- <span>string</span>
+ <span>undefined</span>
<span style="display: none; "></span>
</span>
</span>
@@ -4632,12 +4690,10 @@ For other examples and for help in viewing the source code, see
</em>
</dt>
- <dd class="todo">
+ <dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd style="display: none; ">
- Description of this parameter from the json schema.
- </dd>
+ <dd>A URL to navigate the tab to.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -4692,12 +4748,68 @@ For other examples and for help in viewing the source code, see
</em>
</dt>
- <dd class="todo">
+ <dd class="todo" style="display: none; ">
Undocumented.
</dd>
+ <dd>Whether the tab should be selected.</dd>
<dd style="display: none; ">
- Description of this parameter from the json schema.
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
</dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>pinned</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</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>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether the tab should be pinned.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -6337,7 +6449,7 @@ For other examples and for help in viewing the source code, see
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional" style="display: none; ">optional</span>
+ <span class="optional">optional</span>
<span class="enum" style="display: none; ">enumerated</span>
<span id="typeTemplate">
<span style="display: none; ">
@@ -6417,7 +6529,65 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>Only specified if the tab's URL changed.</dd>
+ <dd>The tab's URL if it has changed.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>pinned</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</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>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The tab's new pinned state.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -6812,6 +6982,64 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
+ <var>pinned</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</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>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether the tab is pinned.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
<var>url</var>
<em>