Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: chrome/common/extensions/docs/extensions/webNavigation.html

Issue 10692097: Introduce webNavigation.onTabReplaced event that is fired when a tab from instant or prerender repl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/extensions/webNavigation.html
diff --git a/chrome/common/extensions/docs/extensions/webNavigation.html b/chrome/common/extensions/docs/extensions/webNavigation.html
index d14f32d270b0a8f9a7af80bf1c8d9f9fa9a0dbc6..35f413a21522aea0b33fcd69fbd4121220750dfe 100644
--- a/chrome/common/extensions/docs/extensions/webNavigation.html
+++ b/chrome/common/extensions/docs/extensions/webNavigation.html
@@ -247,6 +247,8 @@
<a href="#event-onErrorOccurred">onErrorOccurred</a>
</li><li>
<a href="#event-onReferenceFragmentUpdated">onReferenceFragmentUpdated</a>
+ </li><li>
+ <a href="#event-onTabReplaced">onTabReplaced</a>
</li>
</ol>
</li>
@@ -310,6 +312,12 @@ If the reference fragment of a frame is changed, a
time after <code>onDOMContentLoaded</code>, even after
<code>onCompleted</code>.
</p>
+<p>
+If a navigation was done via <a href="https://support.google.com/chrome/bin/answer.py?answer=177873">Chrome
+Instant</a> or <a href="https://support.google.com/chrome/bin/answer.py?answer=1385029">Instant
+Pages</a>, a completely loaded page is swapped into the currently navigating
+tab. In that case, an <code>onTabReplaced</code> event is fired.
+</p>
<a name="H2-3"></a><h2>Relation to webRequest events</h2>
<p>
There is no defined ordering between events of the <a href="webRequest.html">webRequest API</a> and the events of the
@@ -1995,6 +2003,127 @@ The following transition qualifiers exist:
</dl>
</div> <!-- /description -->
<!-- /description -->
+ </div><div class="apiItem">
+ <a name="event-onTabReplaced"></a>
+ <h4>onTabReplaced</h4>
+ <div class="summary">
+ <!-- Note: intentionally longer 80 columns -->
+ <span class="subdued">chrome.webNavigation.</span><span>onTabReplaced</span><span class="subdued">.addListener</span>(function(<span>object details</span>) <span class="subdued">{...}</span><span></span>);
+ </div>
+ <div class="description">
+ <p>Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.</p>
+ <!-- LISTENER PARAMETERS -->
+ <div>
+ <h4>Listener parameters</h4>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>details</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>object</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>sourceTabId</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>integer</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>The ID of the tab that was replaced.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>tabId</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>integer</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>The ID of the tab that replaced the old tab.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>timeStamp</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>number</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>The time when the replacement happened, in milliseconds since the epoch.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div>
+ </dl>
+ </dd>
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div>
+ </dl>
+ </div>
+ <!-- EXTRA PARAMETERS -->
+ <!-- LISTENER RETURN VALUE -->
+ <dl>
+ </dl>
+ </div> <!-- /description -->
+ <!-- /description -->
</div> <!-- /apiItem -->
</div> <!-- /apiGroup -->
<!-- TYPES -->

Powered by Google App Engine
This is Rietveld 408576698