| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 [ |
| 6 { |
| 7 "namespace": "webNavigation", |
| 8 "types": [], |
| 9 "functions": [ |
| 10 { |
| 11 "name": "getFrame", |
| 12 "type": "function", |
| 13 "description": "Retrieves information about the given frame. A frame ref
ers to an <iframe> or a <frame> of a web page and is identified by a
tab ID and a frame ID.", |
| 14 "parameters": [ |
| 15 { |
| 16 "type": "object", |
| 17 "name": "details", |
| 18 "description": "Information about the frame to retrieve information
about.", |
| 19 "properties": { |
| 20 "tabId": { "type": "integer", "minimum": 0, "description": "The ID
of the tab in which the frame is." }, |
| 21 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 22 "frameId": { "type": "integer", "minimum": 0, "description": "The
ID of the frame in the given tab." } |
| 23 } |
| 24 }, |
| 25 { |
| 26 "type": "function", "name": "callback", "parameters": [ |
| 27 { |
| 28 "type": "object", |
| 29 "name": "details", |
| 30 "optional": true, |
| 31 "description": "Information about the requested frame, null if t
he specified frame ID and/or tab ID are invalid.", |
| 32 "properties": { |
| 33 "errorOccurred": { |
| 34 "type": "boolean", |
| 35 "description": "True if the last navigation in this frame wa
s interrupted by an error, i.e. the onErrorOccurred event fired." |
| 36 }, |
| 37 "url": { |
| 38 "type": "string", |
| 39 "description": "The URL currently associated with this frame
, if the frame identified by the frameId existed at one point in the given tab.
The fact that an URL is associated with a given frameId does not imply that the
corresponding frame still exists." |
| 40 }, |
| 41 "parentFrameId": { |
| 42 "type": "integer", |
| 43 "description": "ID of frame that wraps the frame. Set to -1
of no parent frame exists." |
| 44 } |
| 45 } |
| 46 } |
| 47 ] |
| 48 } |
| 49 ] |
| 50 }, |
| 51 { |
| 52 "name": "getAllFrames", |
| 53 "type": "function", |
| 54 "description": "Retrieves information about all frames of a given tab.", |
| 55 "parameters": [ |
| 56 { |
| 57 "type": "object", |
| 58 "name": "details", |
| 59 "description": "Information about the tab to retrieve all frames fro
m.", |
| 60 "properties": { |
| 61 "tabId": { "type": "integer", "minimum": 0, "description": "The ID
of the tab." } |
| 62 } |
| 63 }, |
| 64 { |
| 65 "type": "function", "name": "callback", "parameters": [ |
| 66 { |
| 67 "name": "details", |
| 68 "type": "array", |
| 69 "description": "A list of frames in the given tab, null if the s
pecified tab ID is invalid.", |
| 70 "optional": true, |
| 71 "items": { |
| 72 "type": "object", |
| 73 "properties": { |
| 74 "errorOccurred": { |
| 75 "type": "boolean", |
| 76 "description": "True if the last navigation in this frame
was interrupted by an error, i.e. the onErrorOccurred event fired." |
| 77 }, |
| 78 "processId": { |
| 79 "type": "integer", |
| 80 "description": "The ID of the process runs the renderer fo
r this tab." |
| 81 }, |
| 82 "frameId": { |
| 83 "type": "integer", |
| 84 "description": "The ID of the frame. 0 indicates that this
is the main frame; a positive value indicates the ID of a subframe." |
| 85 }, |
| 86 "parentFrameId": { |
| 87 "type": "integer", |
| 88 "description": "ID of frame that wraps the frame. Set to -
1 of no parent frame exists." |
| 89 }, |
| 90 "url": { |
| 91 "type": "string", |
| 92 "description": "The URL currently associated with this fra
me." |
| 93 } |
| 94 } |
| 95 } |
| 96 } |
| 97 ] |
| 98 } |
| 99 ] |
| 100 } |
| 101 ], |
| 102 "events": [ |
| 103 { |
| 104 "name": "onBeforeNavigate", |
| 105 "type": "function", |
| 106 "description": "Fired when a navigation is about to occur.", |
| 107 "filters": [ |
| 108 { |
| 109 "name": "url", |
| 110 "type": "array", |
| 111 "items": { "$ref": "events.UrlFilter" }, |
| 112 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 113 } |
| 114 ], |
| 115 "parameters": [ |
| 116 { |
| 117 "type": "object", |
| 118 "name": "details", |
| 119 "properties": { |
| 120 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation is about to occur."}, |
| 121 "url": {"type": "string"}, |
| 122 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 123 "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."}, |
| 124 "parentFrameId": {"type": "integer", "description": "ID of frame t
hat wraps the frame. Set to -1 of no parent frame exists."}, |
| 125 "timeStamp": {"type": "number", "description": "The time when the
browser was about to start the navigation, in milliseconds since the epoch."} |
| 126 } |
| 127 } |
| 128 ] |
| 129 }, |
| 130 { |
| 131 "name": "onCommitted", |
| 132 "type": "function", |
| 133 "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.", |
| 134 "filters": [ |
| 135 { |
| 136 "name": "url", |
| 137 "type": "array", |
| 138 "items": { "$ref": "events.UrlFilter" }, |
| 139 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 140 } |
| 141 ], |
| 142 "parameters": [ |
| 143 { |
| 144 "type": "object", |
| 145 "name": "details", |
| 146 "properties": { |
| 147 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, |
| 148 "url": {"type": "string"}, |
| 149 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 150 "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."}, |
| 151 "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
."}, |
| 152 "transitionQualifiers": {"type": "array", "description": "A list o
f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect
", "server_redirect", "forward_back", "from_address_bar"]}}, |
| 153 "timeStamp": {"type": "number", "description": "The time when the
navigation was committed, in milliseconds since the epoch."} |
| 154 } |
| 155 } |
| 156 ] |
| 157 }, |
| 158 { |
| 159 "name": "onDOMContentLoaded", |
| 160 "type": "function", |
| 161 "description": "Fired when the page's DOM is fully constructed, but the
referenced resources may not finish loading.", |
| 162 "filters": [ |
| 163 { |
| 164 "name": "url", |
| 165 "type": "array", |
| 166 "items": { "$ref": "events.UrlFilter" }, |
| 167 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 168 } |
| 169 ], |
| 170 "parameters": [ |
| 171 { |
| 172 "type": "object", |
| 173 "name": "details", |
| 174 "properties": { |
| 175 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, |
| 176 "url": {"type": "string"}, |
| 177 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 178 "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."}, |
| 179 "timeStamp": {"type": "number", "description": "The time when the
page's DOM was fully constructed, in milliseconds since the epoch."} |
| 180 } |
| 181 } |
| 182 ] |
| 183 }, |
| 184 { |
| 185 "name": "onCompleted", |
| 186 "type": "function", |
| 187 "description": "Fired when a document, including the resources it refers
to, is completely loaded and initialized.", |
| 188 "filters": [ |
| 189 { |
| 190 "name": "url", |
| 191 "type": "array", |
| 192 "items": { "$ref": "events.UrlFilter" }, |
| 193 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 194 } |
| 195 ], |
| 196 "parameters": [ |
| 197 { |
| 198 "type": "object", |
| 199 "name": "details", |
| 200 "properties": { |
| 201 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, |
| 202 "url": {"type": "string"}, |
| 203 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 204 "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."}, |
| 205 "timeStamp": {"type": "number", "description": "The time when the
document finished loading, in milliseconds since the epoch."} |
| 206 } |
| 207 } |
| 208 ] |
| 209 }, |
| 210 { |
| 211 "name": "onErrorOccurred", |
| 212 "type": "function", |
| 213 "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.", |
| 214 "filters": [ |
| 215 { |
| 216 "name": "url", |
| 217 "type": "array", |
| 218 "items": { "$ref": "events.UrlFilter" }, |
| 219 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 220 } |
| 221 ], |
| 222 "parameters": [ |
| 223 { |
| 224 "type": "object", |
| 225 "name": "details", |
| 226 "properties": { |
| 227 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, |
| 228 "url": {"type": "string"}, |
| 229 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 230 "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."}, |
| 231 "error": {"type": "string", "description": "The error description.
"}, |
| 232 "timeStamp": {"type": "number", "description": "The time when the
error occurred, in milliseconds since the epoch."} |
| 233 } |
| 234 } |
| 235 ] |
| 236 }, |
| 237 { |
| 238 "name": "onCreatedNavigationTarget", |
| 239 "type": "function", |
| 240 "description": "Fired when a new window, or a new tab in an existing win
dow, is created to host a navigation.", |
| 241 "filters": [ |
| 242 { |
| 243 "name": "url", |
| 244 "type": "array", |
| 245 "items": { "$ref": "events.UrlFilter" }, |
| 246 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 247 } |
| 248 ], |
| 249 "parameters": [ |
| 250 { |
| 251 "type": "object", |
| 252 "name": "details", |
| 253 "properties": { |
| 254 "sourceTabId": {"type": "integer", "description": "The ID of the t
ab in which the navigation is triggered."}, |
| 255 "sourceProcessId": {"type": "integer", "description": "The ID of t
he process runs the renderer for the source tab."}, |
| 256 "sourceFrameId": {"type": "integer", "description": "The ID of the
frame with sourceTabId in which the navigation is triggered. 0 indicates the ma
in frame."}, |
| 257 "url": {"type": "string", "description": "The URL to be opened in
the new window."}, |
| 258 "tabId": {"type": "integer", "description": "The ID of the tab in
which the url is opened"}, |
| 259 "timeStamp": {"type": "number", "description": "The time when the
browser was about to create a new view, in milliseconds since the epoch."} |
| 260 } |
| 261 } |
| 262 ] |
| 263 }, |
| 264 { |
| 265 "name": "onReferenceFragmentUpdated", |
| 266 "type": "function", |
| 267 "description": "Fired when the reference fragment of a frame was updated
. All future events for that frame will use the updated URL.", |
| 268 "filters": [ |
| 269 { |
| 270 "name": "url", |
| 271 "type": "array", |
| 272 "items": { "$ref": "events.UrlFilter" }, |
| 273 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 274 } |
| 275 ], |
| 276 "parameters": [ |
| 277 { |
| 278 "type": "object", |
| 279 "name": "details", |
| 280 "properties": { |
| 281 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, |
| 282 "url": {"type": "string"}, |
| 283 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 284 "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."}, |
| 285 "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
."}, |
| 286 "transitionQualifiers": {"type": "array", "description": "A list o
f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect
", "server_redirect", "forward_back", "from_address_bar"]}}, |
| 287 "timeStamp": {"type": "number", "description": "The time when the
navigation was committed, in milliseconds since the epoch."} |
| 288 } |
| 289 } |
| 290 ] |
| 291 }, |
| 292 { |
| 293 "name": "onTabReplaced", |
| 294 "type": "function", |
| 295 "description": "Fired when the contents of the tab is replaced by a diff
erent (usually previously pre-rendered) tab.", |
| 296 "parameters": [ |
| 297 { |
| 298 "type": "object", |
| 299 "name": "details", |
| 300 "properties": { |
| 301 "replacedTabId": {"type": "integer", "description": "The ID of the
tab that was replaced."}, |
| 302 "tabId": {"type": "integer", "description": "The ID of the tab tha
t replaced the old tab."}, |
| 303 "timeStamp": {"type": "number", "description": "The time when the
replacement happened, in milliseconds since the epoch."} |
| 304 } |
| 305 } |
| 306 ] |
| 307 }, |
| 308 { |
| 309 "name": "onHistoryStateUpdated", |
| 310 "type": "function", |
| 311 "description": "Fired when the frame's history was updated to a new URL.
All future events for that frame will use the updated URL.", |
| 312 "filters": [ |
| 313 { |
| 314 "name": "url", |
| 315 "type": "array", |
| 316 "items": { "$ref": "events.UrlFilter" }, |
| 317 "description": "Conditions that the URL being navigated to must sati
sfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event." |
| 318 } |
| 319 ], |
| 320 "parameters": [ |
| 321 { |
| 322 "type": "object", |
| 323 "name": "details", |
| 324 "properties": { |
| 325 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, |
| 326 "url": {"type": "string"}, |
| 327 "processId": {"type": "integer", "description": "The ID of the pro
cess runs the renderer for this tab."}, |
| 328 "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."}, |
| 329 "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
."}, |
| 330 "transitionQualifiers": {"type": "array", "description": "A list o
f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect
", "server_redirect", "forward_back", "from_address_bar"]}}, |
| 331 "timeStamp": {"type": "number", "description": "The time when the
navigation was committed, in milliseconds since the epoch."} |
| 332 } |
| 333 } |
| 334 ] |
| 335 } |
| 336 ] |
| 337 } |
| 338 ] |
| OLD | NEW |