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

Side by Side Diff: chrome/common/extensions/docs/templates/intros/webNavigation.html

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve port lifetime management, add tests Created 5 years, 1 month 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
OLDNEW
1 <h2 id="manifest">Manifest</h2> 1 <h2 id="manifest">Manifest</h2>
2 <p> 2 <p>
3 All <code>chrome.webNavigation</code> methods and events require you to declare 3 All <code>chrome.webNavigation</code> methods and events require you to declare
4 the "webNavigation" permission in the <a href="manifest">extension 4 the "webNavigation" permission in the <a href="manifest">extension
5 manifest</a>. 5 manifest</a>.
6 For example: 6 For example:
7 </p> 7 </p>
8 8
9 <pre data-filename="manifest.json"> 9 <pre data-filename="manifest.json">
10 { 10 {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 It's important to note that some technical oddities in the OS's handling 96 It's important to note that some technical oddities in the OS's handling
97 of distinct Chrome processes can cause the clock to be skewed between the 97 of distinct Chrome processes can cause the clock to be skewed between the
98 browser itself and extension processes. That means that WebNavigation's events' 98 browser itself and extension processes. That means that WebNavigation's events'
99 <code>timeStamp</code> property is only guaranteed to be <i>internally</i> 99 <code>timeStamp</code> property is only guaranteed to be <i>internally</i>
100 consistent. Comparing one event to another event will give you the correct 100 consistent. Comparing one event to another event will give you the correct
101 offset between them, but comparing them to the current time inside the 101 offset between them, but comparing them to the current time inside the
102 extension (via <code>(new Date()).getTime()</code>, for instance) might give 102 extension (via <code>(new Date()).getTime()</code>, for instance) might give
103 unexpected results. 103 unexpected results.
104 </p> 104 </p>
105 105
106 <h2 id="frame_ids">A note about frame and process IDs</h2> 106 <h2 id="frame_ids">A note about frame IDs</h2>
107 <p> 107 <p>
108 Frames within a tab can be identified by a frame ID. The frame ID of the main 108 Frames within a tab can be identified by a frame ID. The frame ID of the main
109 frame is always 0, the ID of child frames is a positive number. Once a document 109 frame is always 0, the ID of child frames is a positive number. Once a document
Devlin 2015/10/30 01:49:39 If frame ID uniquely identifies the frame, it impl
battre 2015/11/02 13:54:57 So this is a non-backwards compatible change, righ
Devlin 2015/11/02 17:07:16 I don't think this should really be a problem. No
battre 2015/11/02 17:18:22 My concern was the "The frame ID of the main frame
Devlin 2015/11/02 17:28:47 Oh, whoops (yay for Monday mornings). Good point.
robwu 2015/11/02 19:08:34 Done. I waited with updating this section until th
battre 2015/11/03 09:07:19 My backwards compatibility concern is that in the
robwu 2015/11/03 10:03:02 frameId 0 is still the main frame. The semantics h
110 is constructed in a frame, its frame ID remains constant during the lifetime of 110 is constructed in a frame, its frame ID remains constant during the lifetime of
111 the document. 111 the document.
112 </p> 112 </p>
113 <p> 113 <p>
114 Due to the multi-process nature of Chrome, a tab might use different processes
115 to render the source and destination of a web page. Therefore, if a navigation
116 takes place in a new process, you might receive events both from the new and
117 the old page until the new navigation is committed (i.e. the
118 <code>onCommitted</code> event is send for the new main frame). Because frame
119 IDs are only unique for a given process, the webNavigation events include a
120 process ID, so you can still determine which frame a navigation came from.
121 </p>
122 <p>
123 Also note that during a provisional load the process might be switched several 114 Also note that during a provisional load the process might be switched several
124 times. This happens when the load is redirected to a different site. In this 115 times. This happens when the load is redirected to a different site. In this
125 case, you will receive repeated <code>onBeforeNavigate</code> and 116 case, you will receive repeated <code>onBeforeNavigate</code> and
126 <code>onErrorOccurred</code> events, until you receive the final 117 <code>onErrorOccurred</code> events, until you receive the final
127 <code>onCommitted</code> event. 118 <code>onCommitted</code> event.
128 </p> 119 </p>
129 120
130 <h2 id="transition_types">Transition types and qualifiers</h2> 121 <h2 id="transition_types">Transition types and qualifiers</h2>
131 <p> 122 <p>
132 The webNavigation API's <code>onCommitted</code> event has a 123 The webNavigation API's <code>onCommitted</code> event has a
(...skipping 30 matching lines...) Expand all
163 The user used the Forward or Back button to initiate the navigation. 154 The user used the Forward or Back button to initiate the navigation.
164 </td> 155 </td>
165 </tr> 156 </tr>
166 <tr> 157 <tr>
167 <td>"from_address_bar"</td> 158 <td>"from_address_bar"</td>
168 <td> 159 <td>
169 The user initiated the navigation from the address bar (aka Omnibox). 160 The user initiated the navigation from the address bar (aka Omnibox).
170 </td> 161 </td>
171 </tr> 162 </tr>
172 </table> 163 </table>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698