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

Side by Side Diff: chrome/common/extensions/docs/static/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: updates 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <div id="pageData-name" class="pageData">WebNavigation API</div> 1 <div id="pageData-name" class="pageData">WebNavigation API</div>
2 2
3 <!-- BEGIN AUTHORED CONTENT --> 3 <!-- BEGIN AUTHORED CONTENT -->
4 <p id="classSummary"> 4 <p id="classSummary">
5 Use the <code>chrome.webNavigation</code> module to receive 5 Use the <code>chrome.webNavigation</code> module to receive
6 notifications about the status of navigations requests in-flight. 6 notifications about the status of navigations requests in-flight.
7 </p> 7 </p>
8 8
9 <h2>Manifest</h2> 9 <h2>Manifest</h2>
10 <p> 10 <p>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 before any of its children's <code>onBeforeNavigate</code>; while 52 before any of its children's <code>onBeforeNavigate</code>; while
53 <code>onCompleted</code> is fired after all of its children's 53 <code>onCompleted</code> is fired after all of its children's
54 <code>onCompleted</code>. 54 <code>onCompleted</code>.
55 </p> 55 </p>
56 <p> 56 <p>
57 If the reference fragment of a frame is changed, a 57 If the reference fragment of a frame is changed, a
58 <code>onReferenceFragmentUpdated</code> event is fired. This event can fire any 58 <code>onReferenceFragmentUpdated</code> event is fired. This event can fire any
59 time after <code>onDOMContentLoaded</code>, even after 59 time after <code>onDOMContentLoaded</code>, even after
60 <code>onCompleted</code>. 60 <code>onCompleted</code>.
61 </p> 61 </p>
62 <p>
63 If a navigation was triggered via <a
64 href="https://support.google.com/chrome/bin/answer.py?answer=177873">Chrome
65 Instant</a> or <a
66 href="https://support.google.com/chrome/bin/answer.py?answer=1385029">Instant
67 Pages</a>, a completely loaded page is swapped into the current tab. In that
68 case, an <code>onTabReplaced</code> event is fired.
69 </p>
62 70
63 <h2>Relation to webRequest events</h2> 71 <h2>Relation to webRequest events</h2>
64 <p> 72 <p>
65 There is no defined ordering between events of the <a 73 There is no defined ordering between events of the <a
66 href="webRequest.html">webRequest API</a> and the events of the 74 href="webRequest.html">webRequest API</a> and the events of the
67 webNavigation API. It is possible that webRequest events are still received for 75 webNavigation API. It is possible that webRequest events are still received for
68 frames that already started a new navigation, or that a navigation only 76 frames that already started a new navigation, or that a navigation only
69 proceeds after the network resources are already fully loaded. 77 proceeds after the network resources are already fully loaded.
70 </p> 78 </p>
71 <p> 79 <p>
72 In general, the webNavigation events are closely related to the navigation 80 In general, the webNavigation events are closely related to the navigation
73 state that is displayed in the UI, while the webRequest events correspond to 81 state that is displayed in the UI, while the webRequest events correspond to
74 the state of the network stack which is generally opaque to the user. 82 the state of the network stack which is generally opaque to the user.
75 </p> 83 </p>
76 84
85 <h2>A note about tab IDs</h2>
86 <p>
87 Not all navigating tabs correspond to actual tabs in Chrome's UI, e.g., a tab
88 that is being pre-rendered. Such tabs are not accessible via the
89 <a href="tabs.html">tabs API</a> nor can you request information about them via
90 <code>webNavigation.getFrame</code> or <code>webNavigation.getAllFrames</code>.
91 Once such a tab is swapped in, an <code>onTabReplaced</code> event is fired and
92 they become accessible via these APIs.
93 </p>
94
77 <h2>A note about timestamps</h2> 95 <h2>A note about timestamps</h2>
78 <p> 96 <p>
79 It's important to note that some technical oddities in the OS's handling 97 It's important to note that some technical oddities in the OS's handling
80 of distinct Chrome processes can cause the clock to be skewed between the 98 of distinct Chrome processes can cause the clock to be skewed between the
81 browser itself and extension processes. That means that WebNavigation's events' 99 browser itself and extension processes. That means that WebNavigation's events'
82 <code>timeStamp</code> property is only guaranteed to be <i>internally</i> 100 <code>timeStamp</code> property is only guaranteed to be <i>internally</i>
83 consistent. Comparing one event to another event will give you the correct 101 consistent. Comparing one event to another event will give you the correct
84 offset between them, but comparing them to the current time inside the 102 offset between them, but comparing them to the current time inside the
85 extension (via <code>(new Date()).getTime()</code>, for instance) might give 103 extension (via <code>(new Date()).getTime()</code>, for instance) might give
86 unexpected results. 104 unexpected results.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 </tr> 142 </tr>
125 <tr> 143 <tr>
126 <td>"from_address_bar"</td> 144 <td>"from_address_bar"</td>
127 <td> 145 <td>
128 The user initiated the navigation from the address bar (aka Omnibox). 146 The user initiated the navigation from the address bar (aka Omnibox).
129 </td> 147 </td>
130 </tr> 148 </tr>
131 </table> 149 </table>
132 150
133 <!-- END AUTHORED CONTENT --> 151 <!-- END AUTHORED CONTENT -->
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698