diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 01:00:29 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 01:00:29 +0000 |
commit | 25b77708692187791de1d416b930e36c2a0d6159 (patch) | |
tree | fa5e12f08c72c7f17f35d99328943377c4cc085c /chrome/common/extensions | |
parent | 6df35cc27a11d1694e01d83e7c6b3f9d5ee14824 (diff) | |
download | chromium_src-25b77708692187791de1d416b930e36c2a0d6159.zip chromium_src-25b77708692187791de1d416b930e36c2a0d6159.tar.gz chromium_src-25b77708692187791de1d416b930e36c2a0d6159.tar.bz2 |
Make it so that chrome.bookmarks.update can update the URL of a bookmark.
This changes the API slightly. Previously, if someone called update with an empty object ({}) it would set the title to "". This was only documented in the code and not on the API page. Now that we support updating both the url and title it seems more reasonable to ignore a missing title.
BUG=34841
TEST=browser_tests.exe --gtest_filter=ExtensionApiTest.Bookmarks
Review URL: http://codereview.chromium.org/591006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rwxr-xr-x | chrome/common/extensions/api/extension_api.json | 10 | ||||
-rw-r--r-- | chrome/common/extensions/docs/bookmarks.html | 90 | ||||
-rw-r--r-- | chrome/common/extensions/docs/tabs.html | 11 |
3 files changed, 100 insertions, 11 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 4e7b78e..5ade26f 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -1515,14 +1515,15 @@ { "name": "update", "type": "function", - "description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' is supported.", + "description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.", "parameters": [ {"type": "string", "name": "id"}, { "type": "object", "name": "changes", "properties": { - "title": {"type": "string", "optional": true} + "title": {"type": "string", "optional": true}, + "url": {"type": "string", "optional": true} } }, { @@ -1586,14 +1587,15 @@ { "name": "onChanged", "type": "function", - "description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title changes trigger this.", + "description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes changes trigger this.", "parameters": [ {"type": "string", "name": "id"}, { "type": "object", "name": "changeInfo", "properties": { - "title": { "type": "string" } + "title": {"type": "string"}, + "url": {"type": "string", "optional": true} } } ] diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html index e129afd..313a8f2 100644 --- a/chrome/common/extensions/docs/bookmarks.html +++ b/chrome/common/extensions/docs/bookmarks.html @@ -2262,7 +2262,7 @@ For other examples and for help in viewing the source code, see <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' is supported.</p> + <p>Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.</p> <!-- PARAMETERS --> <h4>Parameters</h4> @@ -2389,6 +2389,49 @@ For other examples and for help in viewing the source code, see </dl> </dd> </div> + </div><div> + <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"> + 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> </dd> @@ -2535,7 +2578,7 @@ For other examples and for help in viewing the source code, see <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title changes trigger this.</p> + <p>Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes changes trigger this.</p> <!-- PARAMETERS --> <h4>Parameters</h4> @@ -2662,6 +2705,49 @@ For other examples and for help in viewing the source code, see </dl> </dd> </div> + </div><div> + <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"> + 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> </dd> diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html index 82da463..0797d1e 100644 --- a/chrome/common/extensions/docs/tabs.html +++ b/chrome/common/extensions/docs/tabs.html @@ -1248,7 +1248,8 @@ For other examples and for help in viewing the source code, see <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, <code>und</code> will be returned.</dd> + <dd>An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href="http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc">kLanguageInfoTable</a>. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, <code>und</code> will be returned.</dd> + <!-- OBJECT PROPERTIES --> <dd style="display: none; "> <dl> @@ -1273,7 +1274,7 @@ For other examples and for help in viewing the source code, see <div class="summary"><span style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span>chrome.tabs.executeScript</span>(<span class="optional"><span style="display: none; ">, </span><span>integer</span> - <var><span>tabId</span></var></span><span class="optional"><span>, </span><span>object</span> + <var><span>tabId</span></var></span><span class="null"><span>, </span><span>object</span> <var><span>details</span></var></span><span class="optional"><span>, </span><span>function</span> <var><span>callback</span></var></span>)</div> @@ -1336,7 +1337,7 @@ For other examples and for help in viewing the source code, see <!-- TYPE --> <div style="display:inline"> ( - <span class="optional">optional</span> + <span class="optional" style="display: none; ">optional</span> <span id="typeTemplate"> <span style="display: none; "> <a> Type</a> @@ -2123,7 +2124,7 @@ For other examples and for help in viewing the source code, see <div class="summary"><span style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> <span>chrome.tabs.insertCSS</span>(<span class="optional"><span style="display: none; ">, </span><span>integer</span> - <var><span>tabId</span></var></span><span class="optional"><span>, </span><span>object</span> + <var><span>tabId</span></var></span><span class="null"><span>, </span><span>object</span> <var><span>details</span></var></span><span class="optional"><span>, </span><span>function</span> <var><span>callback</span></var></span>)</div> @@ -2186,7 +2187,7 @@ For other examples and for help in viewing the source code, see <!-- TYPE --> <div style="display:inline"> ( - <span class="optional">optional</span> + <span class="optional" style="display: none; ">optional</span> <span id="typeTemplate"> <span style="display: none; "> <a> Type</a> |