summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
authortwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 22:39:22 +0000
committertwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 22:39:22 +0000
commit16e3d45d6fd4a2203ddb248d636dcd320a3639f0 (patch)
treea5b9c90129b896ccaa112e5afc4e390adc8e0571 /chrome/common/extensions
parentf325f1e12a828a0a3fa74f75e1b2ea8cb49b0102 (diff)
downloadchromium_src-16e3d45d6fd4a2203ddb248d636dcd320a3639f0.zip
chromium_src-16e3d45d6fd4a2203ddb248d636dcd320a3639f0.tar.gz
chromium_src-16e3d45d6fd4a2203ddb248d636dcd320a3639f0.tar.bz2
Clean-up of the asynchronous behaviour of the experimental extension popup API.
- It was previously possible to programmatically launch two popups from the same extension. (Simply call popup.show twice in a row, or in a callback chain.) I removed this incorrect funcationality by registering ExtensionPopupHost to listen for EXTENSION_HOST_CREATED notifications. If a popup is shown, and a new ExtensionHost is constructed of type EXTENSION_POPUP, then the presently displayed popup is dismissed. - The callback function for popup.show(...) was previously called in response to EXTENSION_POPUP_VIEW_READY, as processed in response to a ViewHostMsg_DocumentAvailableInMainFrame message. This message wassent after PARSING of the conent of the popup view. Because of this behaviour, the API was difficult to use because one could not meaningfully interact with the popup page during the callback: The callback would race with completion of the onload handler within the popup, so some sort of polling for onload-complete was required. I fixed the problem by adding new notifications and messages so that EXTENSION_POPUP_VIEW_READY is now sent only after all onload handlers have been invoked.Corresponding unit-tests have also been added. BUG=None TEST=ExtensionApiTest.Popup Review URL: http://codereview.chromium.org/1512007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/api/extension_api.json4
-rw-r--r--chrome/common/extensions/docs/extension.html2
-rw-r--r--chrome/common/extensions/docs/history.html122
3 files changed, 64 insertions, 64 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 5db6983..99e07f9 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -134,9 +134,9 @@
"properties": {
"type": {
"type": "string",
- "enum": ["tab", "infobar", "notification"],
+ "enum": ["tab", "infobar", "notification", "popup"],
"optional": true,
- "description": "The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'infobar', 'notification'."
+ "description": "The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'infobar', 'notification', 'popup'."
},
"windowId": {
"type": "integer",
diff --git a/chrome/common/extensions/docs/extension.html b/chrome/common/extensions/docs/extension.html
index 113b81a..3c7f0cb 100644
--- a/chrome/common/extensions/docs/extension.html
+++ b/chrome/common/extensions/docs/extension.html
@@ -1158,7 +1158,7 @@ For details, see
<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>
+ <dd>The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'infobar', 'notification', 'popup'.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
diff --git a/chrome/common/extensions/docs/history.html b/chrome/common/extensions/docs/history.html
index 7079c0c..a6bf9b1 100644
--- a/chrome/common/extensions/docs/history.html
+++ b/chrome/common/extensions/docs/history.html
@@ -266,9 +266,9 @@
<a href="#types">Types</a>
<ol>
<li>
- <a href="#type-VisitItem">VisitItem</a>
- </li><li>
<a href="#type-HistoryItem">HistoryItem</a>
+ </li><li>
+ <a href="#type-VisitItem">VisitItem</a>
</li>
</ol>
</li>
@@ -1874,8 +1874,8 @@ For other examples and for help in viewing the source code, see
<!-- iterates over all types -->
<div class="apiItem">
- <a name="type-VisitItem"></a>
- <h4>VisitItem</h4>
+ <a name="type-HistoryItem"></a>
+ <h4>HistoryItem</h4>
<div>
<dt>
@@ -1905,7 +1905,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>An object encapsulating one visit to a URL.</dd>
+ <dd>An object encapsulating one result of a history query.</dd>
<!-- OBJECT PROPERTIES -->
<dd>
@@ -1954,13 +1954,13 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>visitId</var>
+ <var>url</var>
<em>
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional" style="display: none; ">optional</span>
+ <span class="optional">optional</span>
<span id="typeTemplate">
<span style="display: none; ">
<a> Type</a>
@@ -1980,7 +1980,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The unique identifier for this visit.</dd>
+ <dd>The URL navigated to by a user.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -1995,7 +1995,7 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>visitTime</var>
+ <var>title</var>
<em>
<!-- TYPE -->
@@ -2010,7 +2010,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>number</span>
+ <span>string</span>
</span>
</span>
)
@@ -2021,7 +2021,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>When this visit occurred, represented in milliseconds since the epoch.</dd>
+ <dd>The title of the history page.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2036,13 +2036,13 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>referringVisitId</var>
+ <var>lastVisitTime</var>
<em>
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional" style="display: none; ">optional</span>
+ <span class="optional">optional</span>
<span id="typeTemplate">
<span style="display: none; ">
<a> Type</a>
@@ -2051,7 +2051,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>number</span>
</span>
</span>
)
@@ -2062,7 +2062,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The visit_id of the referrer.</dd>
+ <dd>When this page was last loaded, represented in milliseconds since the epoch.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2077,13 +2077,13 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>transition</var>
+ <var>visitCount</var>
<em>
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional" style="display: none; ">optional</span>
+ <span class="optional">optional</span>
<span id="typeTemplate">
<span style="display: none; ">
<a> Type</a>
@@ -2092,7 +2092,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>integer</span>
</span>
</span>
)
@@ -2103,7 +2103,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The <a href="#transition_types">transition type</a> for this visit from its referrer.</dd>
+ <dd>The number of times the user has navigated to this page.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2115,24 +2115,16 @@ For other examples and for help in viewing the source code, see
</dl>
</dd>
</div>
- </div>
- </dl>
- </dd>
- </div>
-
- </div><div class="apiItem">
- <a name="type-HistoryItem"></a>
- <h4>HistoryItem</h4>
-
- <div>
+ </div><div>
+ <div>
<dt>
- <var style="display: none; ">paramName</var>
+ <var>typedCount</var>
<em>
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional" style="display: none; ">optional</span>
+ <span class="optional">optional</span>
<span id="typeTemplate">
<span style="display: none; ">
<a> Type</a>
@@ -2141,7 +2133,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>object</span>
+ <span>integer</span>
</span>
</span>
)
@@ -2152,15 +2144,30 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>An object encapsulating one result of a history query.</dd>
+ <dd>The number of times the user has navigated to this page by typing in the address.</dd>
<!-- OBJECT PROPERTIES -->
- <dd>
+ <dd style="display: none; ">
<dl>
<div>
<div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+ </div>
+ </div>
+ </dl>
+ </dd>
+ </div>
+
+ </div><div class="apiItem">
+ <a name="type-VisitItem"></a>
+ <h4>VisitItem</h4>
+
+ <div>
<dt>
- <var>id</var>
+ <var style="display: none; ">paramName</var>
<em>
<!-- TYPE -->
@@ -2175,7 +2182,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>object</span>
</span>
</span>
)
@@ -2186,28 +2193,21 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The unique identifier for the item.</dd>
+ <dd>An object encapsulating one visit to a URL.</dd>
<!-- OBJECT PROPERTIES -->
- <dd style="display: none; ">
+ <dd>
<dl>
<div>
<div>
- </div>
- </div>
- </dl>
- </dd>
- </div>
- </div><div>
- <div>
<dt>
- <var>url</var>
+ <var>id</var>
<em>
<!-- 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>
@@ -2227,7 +2227,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The URL navigated to by a user.</dd>
+ <dd>The unique identifier for the item.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2242,13 +2242,13 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>title</var>
+ <var>visitId</var>
<em>
<!-- 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>
@@ -2268,7 +2268,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The title of the history page.</dd>
+ <dd>The unique identifier for this visit.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2283,7 +2283,7 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>lastVisitTime</var>
+ <var>visitTime</var>
<em>
<!-- TYPE -->
@@ -2309,7 +2309,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>When this page was last loaded, represented in milliseconds since the epoch.</dd>
+ <dd>When this visit occurred, represented in milliseconds since the epoch.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2324,13 +2324,13 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>visitCount</var>
+ <var>referringVisitId</var>
<em>
<!-- 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>
@@ -2339,7 +2339,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>integer</span>
+ <span>string</span>
</span>
</span>
)
@@ -2350,7 +2350,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The number of times the user has navigated to this page.</dd>
+ <dd>The visit_id of the referrer.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">
@@ -2365,13 +2365,13 @@ For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>typedCount</var>
+ <var>transition</var>
<em>
<!-- 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>
@@ -2380,7 +2380,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>integer</span>
+ <span>string</span>
</span>
</span>
)
@@ -2391,7 +2391,7 @@ For other examples and for help in viewing the source code, see
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The number of times the user has navigated to this page by typing in the address.</dd>
+ <dd>The <a href="#transition_types">transition type</a> for this visit from its referrer.</dd>
<!-- OBJECT PROPERTIES -->
<dd style="display: none; ">