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

Side by Side Diff: chrome/common/extensions/api/web_navigation.json

Issue 10855015: Add documentation for filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 8 years, 4 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 | « no previous file | chrome/common/extensions/docs/apps/events.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "webNavigation", 7 "namespace": "webNavigation",
8 "types": [], 8 "types": [],
9 "functions": [ 9 "functions": [
10 { 10 {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ] 89 ]
90 } 90 }
91 ] 91 ]
92 } 92 }
93 ], 93 ],
94 "events": [ 94 "events": [
95 { 95 {
96 "name": "onBeforeNavigate", 96 "name": "onBeforeNavigate",
97 "type": "function", 97 "type": "function",
98 "description": "Fired when a navigation is about to occur.", 98 "description": "Fired when a navigation is about to occur.",
99 "options": { 99 "filters": [
100 "supportsFilters": true, 100 {
101 "supportsListeners": true, 101 "name": "url",
102 "supportsRules": false 102 "type": "array",
103 }, 103 "items": { "$ref": "events.UrlFilter" },
104 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
105 }
106 ],
104 "parameters": [ 107 "parameters": [
105 { 108 {
106 "type": "object", 109 "type": "object",
107 "name": "details", 110 "name": "details",
108 "properties": { 111 "properties": {
109 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation is about to occur."}, 112 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation is about to occur."},
110 "url": {"type": "string"}, 113 "url": {"type": "string"},
111 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 114 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
112 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique for a given tab and process."}, 115 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique for a given tab and process."},
113 "timeStamp": {"type": "number", "description": "The time when the browser was about to start the navigation, in milliseconds since the epoch."} 116 "timeStamp": {"type": "number", "description": "The time when the browser was about to start the navigation, in milliseconds since the epoch."}
114 } 117 }
115 } 118 }
116 ] 119 ]
117 }, 120 },
118 { 121 {
119 "name": "onCommitted", 122 "name": "onCommitted",
120 "type": "function", 123 "type": "function",
121 "description": "Fired when a navigation is committed. The document (and the resources it refers to, such as images and subframes) might still be downloa ding, but at least part of the document has been received from the server and th e browser has decided to switch to the new document.", 124 "description": "Fired when a navigation is committed. The document (and the resources it refers to, such as images and subframes) might still be downloa ding, but at least part of the document has been received from the server and th e browser has decided to switch to the new document.",
122 "options": { 125 "filters": [
123 "supportsFilters": true, 126 {
124 "supportsListeners": true, 127 "name": "url",
125 "supportsRules": false 128 "type": "array",
126 }, 129 "items": { "$ref": "events.UrlFilter" },
130 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
131 }
132 ],
127 "parameters": [ 133 "parameters": [
128 { 134 {
129 "type": "object", 135 "type": "object",
130 "name": "details", 136 "name": "details",
131 "properties": { 137 "properties": {
132 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."}, 138 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
133 "url": {"type": "string"}, 139 "url": {"type": "string"},
134 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 140 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
135 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."}, 141 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
136 "transitionType": {"type": "string", "enum": ["link", "typed", "au to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used ."}, 142 "transitionType": {"type": "string", "enum": ["link", "typed", "au to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used ."},
137 "transitionQualifiers": {"type": "array", "description": "A list o f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect ", "server_redirect", "forward_back", "from_address_bar"]}}, 143 "transitionQualifiers": {"type": "array", "description": "A list o f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect ", "server_redirect", "forward_back", "from_address_bar"]}},
138 "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."} 144 "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
139 } 145 }
140 } 146 }
141 ] 147 ]
142 }, 148 },
143 { 149 {
144 "name": "onDOMContentLoaded", 150 "name": "onDOMContentLoaded",
145 "type": "function", 151 "type": "function",
146 "description": "Fired when the page's DOM is fully constructed, but the referenced resources may not finish loading.", 152 "description": "Fired when the page's DOM is fully constructed, but the referenced resources may not finish loading.",
147 "options": { 153 "filters": [
148 "supportsFilters": true, 154 {
149 "supportsListeners": true, 155 "name": "url",
150 "supportsRules": false 156 "type": "array",
151 }, 157 "items": { "$ref": "events.UrlFilter" },
158 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
159 }
160 ],
152 "parameters": [ 161 "parameters": [
153 { 162 {
154 "type": "object", 163 "type": "object",
155 "name": "details", 164 "name": "details",
156 "properties": { 165 "properties": {
157 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."}, 166 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
158 "url": {"type": "string"}, 167 "url": {"type": "string"},
159 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 168 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
160 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."}, 169 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
161 "timeStamp": {"type": "number", "description": "The time when the page's DOM was fully constructed, in milliseconds since the epoch."} 170 "timeStamp": {"type": "number", "description": "The time when the page's DOM was fully constructed, in milliseconds since the epoch."}
162 } 171 }
163 } 172 }
164 ] 173 ]
165 }, 174 },
166 { 175 {
167 "name": "onCompleted", 176 "name": "onCompleted",
168 "type": "function", 177 "type": "function",
169 "description": "Fired when a document, including the resources it refers to, is completely loaded and initialized.", 178 "description": "Fired when a document, including the resources it refers to, is completely loaded and initialized.",
170 "options": { 179 "filters": [
171 "supportsFilters": true, 180 {
172 "supportsListeners": true, 181 "name": "url",
173 "supportsRules": false 182 "type": "array",
174 }, 183 "items": { "$ref": "events.UrlFilter" },
184 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
185 }
186 ],
175 "parameters": [ 187 "parameters": [
176 { 188 {
177 "type": "object", 189 "type": "object",
178 "name": "details", 190 "name": "details",
179 "properties": { 191 "properties": {
180 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."}, 192 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
181 "url": {"type": "string"}, 193 "url": {"type": "string"},
182 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 194 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
183 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."}, 195 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
184 "timeStamp": {"type": "number", "description": "The time when the document finished loading, in milliseconds since the epoch."} 196 "timeStamp": {"type": "number", "description": "The time when the document finished loading, in milliseconds since the epoch."}
185 } 197 }
186 } 198 }
187 ] 199 ]
188 }, 200 },
189 { 201 {
190 "name": "onErrorOccurred", 202 "name": "onErrorOccurred",
191 "type": "function", 203 "type": "function",
192 "description": "Fired when an error occurs and the navigation is aborted . This can happen if either a network error occurred, or the user aborted the na vigation.", 204 "description": "Fired when an error occurs and the navigation is aborted . This can happen if either a network error occurred, or the user aborted the na vigation.",
193 "options": { 205 "filters": [
194 "supportsFilters": true, 206 {
195 "supportsListeners": true, 207 "name": "url",
196 "supportsRules": false 208 "type": "array",
197 }, 209 "items": { "$ref": "events.UrlFilter" },
210 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
211 }
212 ],
198 "parameters": [ 213 "parameters": [
199 { 214 {
200 "type": "object", 215 "type": "object",
201 "name": "details", 216 "name": "details",
202 "properties": { 217 "properties": {
203 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."}, 218 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
204 "url": {"type": "string"}, 219 "url": {"type": "string"},
205 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 220 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
206 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."}, 221 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
207 "error": {"type": "string", "description": "The error description. "}, 222 "error": {"type": "string", "description": "The error description. "},
208 "timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."} 223 "timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."}
209 } 224 }
210 } 225 }
211 ] 226 ]
212 }, 227 },
213 { 228 {
214 "name": "onCreatedNavigationTarget", 229 "name": "onCreatedNavigationTarget",
215 "type": "function", 230 "type": "function",
216 "description": "Fired when a new window, or a new tab in an existing win dow, is created to host a navigation.", 231 "description": "Fired when a new window, or a new tab in an existing win dow, is created to host a navigation.",
217 "options": { 232 "filters": [
218 "supportsFilters": true, 233 {
219 "supportsListeners": true, 234 "name": "url",
220 "supportsRules": false 235 "type": "array",
221 }, 236 "items": { "$ref": "events.UrlFilter" },
237 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
238 }
239 ],
222 "parameters": [ 240 "parameters": [
223 { 241 {
224 "type": "object", 242 "type": "object",
225 "name": "details", 243 "name": "details",
226 "properties": { 244 "properties": {
227 "sourceTabId": {"type": "integer", "description": "The ID of the t ab in which the navigation is triggered."}, 245 "sourceTabId": {"type": "integer", "description": "The ID of the t ab in which the navigation is triggered."},
228 "sourceProcessId": {"type": "integer", "description": "The ID of t he process runs the renderer for the source tab."}, 246 "sourceProcessId": {"type": "integer", "description": "The ID of t he process runs the renderer for the source tab."},
229 "sourceFrameId": {"type": "integer", "description": "The ID of the frame with sourceTabId in which the navigation is triggered. 0 indicates the ma in frame."}, 247 "sourceFrameId": {"type": "integer", "description": "The ID of the frame with sourceTabId in which the navigation is triggered. 0 indicates the ma in frame."},
230 "url": {"type": "string", "description": "The URL to be opened in the new window."}, 248 "url": {"type": "string", "description": "The URL to be opened in the new window."},
231 "tabId": {"type": "integer", "description": "The ID of the tab in which the url is opened"}, 249 "tabId": {"type": "integer", "description": "The ID of the tab in which the url is opened"},
232 "timeStamp": {"type": "number", "description": "The time when the browser was about to create a new view, in milliseconds since the epoch."} 250 "timeStamp": {"type": "number", "description": "The time when the browser was about to create a new view, in milliseconds since the epoch."}
233 } 251 }
234 } 252 }
235 ] 253 ]
236 }, 254 },
237 { 255 {
238 "name": "onReferenceFragmentUpdated", 256 "name": "onReferenceFragmentUpdated",
239 "type": "function", 257 "type": "function",
240 "description": "Fired when the reference fragment of a frame was updated . All future events for that frame will use the updated URL.", 258 "description": "Fired when the reference fragment of a frame was updated . All future events for that frame will use the updated URL.",
241 "options": { 259 "filters": [
242 "supportsFilters": true, 260 {
243 "supportsListeners": true, 261 "name": "url",
244 "supportsRules": false 262 "type": "array",
245 }, 263 "items": { "$ref": "events.UrlFilter" },
264 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
265 }
266 ],
246 "parameters": [ 267 "parameters": [
247 { 268 {
248 "type": "object", 269 "type": "object",
249 "name": "details", 270 "name": "details",
250 "properties": { 271 "properties": {
251 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."}, 272 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
252 "url": {"type": "string"}, 273 "url": {"type": "string"},
253 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 274 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
254 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."}, 275 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
255 "transitionType": {"type": "string", "enum": ["link", "typed", "au to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used ."}, 276 "transitionType": {"type": "string", "enum": ["link", "typed", "au to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used ."},
256 "transitionQualifiers": {"type": "array", "description": "A list o f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect ", "server_redirect", "forward_back", "from_address_bar"]}}, 277 "transitionQualifiers": {"type": "array", "description": "A list o f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect ", "server_redirect", "forward_back", "from_address_bar"]}},
257 "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."} 278 "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
258 } 279 }
259 } 280 }
260 ] 281 ]
261 }, 282 },
262 { 283 {
263 "name": "onTabReplaced", 284 "name": "onTabReplaced",
264 "type": "function", 285 "type": "function",
265 "description": "Fired when the contents of the tab is replaced by a diff erent (usually previously pre-rendered) tab.", 286 "description": "Fired when the contents of the tab is replaced by a diff erent (usually previously pre-rendered) tab.",
266 "options": {
267 "supportsFilters": false,
268 "supportsListeners": true,
269 "supportsRules": false
270 },
271 "parameters": [ 287 "parameters": [
272 { 288 {
273 "type": "object", 289 "type": "object",
274 "name": "details", 290 "name": "details",
275 "properties": { 291 "properties": {
276 "replacedTabId": {"type": "integer", "description": "The ID of the tab that was replaced."}, 292 "replacedTabId": {"type": "integer", "description": "The ID of the tab that was replaced."},
277 "tabId": {"type": "integer", "description": "The ID of the tab tha t replaced the old tab."}, 293 "tabId": {"type": "integer", "description": "The ID of the tab tha t replaced the old tab."},
278 "timeStamp": {"type": "number", "description": "The time when the replacement happened, in milliseconds since the epoch."} 294 "timeStamp": {"type": "number", "description": "The time when the replacement happened, in milliseconds since the epoch."}
279 } 295 }
280 } 296 }
281 ] 297 ]
282 }, 298 },
283 { 299 {
284 "name": "onHistoryStateUpdated", 300 "name": "onHistoryStateUpdated",
285 "type": "function", 301 "type": "function",
286 "description": "Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.", 302 "description": "Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.",
287 "options": { 303 "filters": [
288 "supportsFilters": true, 304 {
289 "supportsListeners": true, 305 "name": "url",
290 "supportsRules": false 306 "type": "array",
291 }, 307 "items": { "$ref": "events.UrlFilter" },
308 "description": "Conditions that the URL being navigated to must sati sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event."
309 }
310 ],
292 "parameters": [ 311 "parameters": [
293 { 312 {
294 "type": "object", 313 "type": "object",
295 "name": "details", 314 "name": "details",
296 "properties": { 315 "properties": {
297 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."}, 316 "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
298 "url": {"type": "string"}, 317 "url": {"type": "string"},
299 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."}, 318 "processId": {"type": "integer", "description": "The ID of the pro cess runs the renderer for this tab."},
300 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."}, 319 "frameId": {"type": "integer", "description": "0 indicates the nav igation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
301 "transitionType": {"type": "string", "enum": ["link", "typed", "au to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used ."}, 320 "transitionType": {"type": "string", "enum": ["link", "typed", "au to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used ."},
302 "transitionQualifiers": {"type": "array", "description": "A list o f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect ", "server_redirect", "forward_back", "from_address_bar"]}}, 321 "transitionQualifiers": {"type": "array", "description": "A list o f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect ", "server_redirect", "forward_back", "from_address_bar"]}},
303 "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."} 322 "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
304 } 323 }
305 } 324 }
306 ] 325 ]
307 } 326 }
308 ] 327 ]
309 } 328 }
310 ] 329 ]
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/apps/events.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698