Chromium Code Reviews| OLD | NEW |
|---|---|
| 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": "tabs", | 7 "namespace": "tabs", |
| 8 "description": "Use the <code>chrome.tabs</code> API to interact with the br owser's tab system. You can use this API to create, modify, and rearrange tabs i n the browser.", | 8 "description": "Use the <code>chrome.tabs</code> API to interact with the br owser's tab system. You can use this API to create, modify, and rearrange tabs i n the browser.", |
| 9 "types": [ | 9 "types": [ |
| 10 { "id": "MutedInfoReason", | 10 { "id": "MutedInfoReason", |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 "id": {"type": "integer", "minimum": -1, "optional": true, "descriptio n": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows. "}, | 44 "id": {"type": "integer", "minimum": -1, "optional": true, "descriptio n": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows. "}, |
| 45 // TODO(kalman): Investigate how this is ending up as -1 (based on win dow type? a bug?) and whether it should be optional instead. | 45 // TODO(kalman): Investigate how this is ending up as -1 (based on win dow type? a bug?) and whether it should be optional instead. |
| 46 "index": {"type": "integer", "minimum": -1, "description": "The zero-b ased index of the tab within its window."}, | 46 "index": {"type": "integer", "minimum": -1, "description": "The zero-b ased index of the tab within its window."}, |
| 47 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o f the window the tab is contained within."}, | 47 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o f the window the tab is contained within."}, |
| 48 "openerTabId": {"type": "integer", "minimum": 0, "optional": true, "de scription": "The ID of the tab that opened this tab, if any. This property is on ly present if the opener tab still exists."}, | 48 "openerTabId": {"type": "integer", "minimum": 0, "optional": true, "de scription": "The ID of the tab that opened this tab, if any. This property is on ly present if the opener tab still exists."}, |
| 49 "selected": {"type": "boolean", "description": "Whether the tab is sel ected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."}, | 49 "selected": {"type": "boolean", "description": "Whether the tab is sel ected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."}, |
| 50 "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."}, | 50 "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."}, |
| 51 "active": {"type": "boolean", "description": "Whether the tab is activ e in its window. (Does not necessarily mean the window is focused.)"}, | 51 "active": {"type": "boolean", "description": "Whether the tab is activ e in its window. (Does not necessarily mean the window is focused.)"}, |
| 52 "pinned": {"type": "boolean", "description": "Whether the tab is pinne d."}, | 52 "pinned": {"type": "boolean", "description": "Whether the tab is pinne d."}, |
| 53 "audible": {"type": "boolean", "optional": true, "description": "Wheth er the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is sh owing."}, | 53 "audible": {"type": "boolean", "optional": true, "description": "Wheth er the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is sh owing."}, |
| 54 "discarded": {"type": "boolean", "description": "Whether the tab is di scarded, meaning that its content has been unloaded from memory but the tab stil l exists in the tab-strip. The content will be reloaded if the tab gets activate d."}, | |
|
Georges Khalil
2016/06/21 15:31:20
nit: I would rephrase this like this:
Whether the
Anderson Silva
2016/06/27 18:21:53
Done.
| |
| 54 "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "C urrent tab muted state and the reason for the last state change."}, | 55 "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "C urrent tab muted state and the reason for the last state change."}, |
| 55 "url": {"type": "string", "optional": true, "description": "The URL th e tab is displaying. This property is only present if the extension's manifest i ncludes the <code>\"tabs\"</code> permission."}, | 56 "url": {"type": "string", "optional": true, "description": "The URL th e tab is displaying. This property is only present if the extension's manifest i ncludes the <code>\"tabs\"</code> permission."}, |
| 56 "title": {"type": "string", "optional": true, "description": "The titl e of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."}, | 57 "title": {"type": "string", "optional": true, "description": "The titl e of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."}, |
| 57 "favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This property is only present if the extension's mani fest includes the <code>\"tabs\"</code> permission. It may also be an empty stri ng if the tab is loading."}, | 58 "favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This property is only present if the extension's mani fest includes the <code>\"tabs\"</code> permission. It may also be an empty stri ng if the tab is loading."}, |
| 58 "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}, | 59 "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}, |
| 59 "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, | 60 "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, |
| 60 "width": {"type": "integer", "optional": true, "description": "The wid th of the tab in pixels."}, | 61 "width": {"type": "integer", "optional": true, "description": "The wid th of the tab in pixels."}, |
| 61 "height": {"type": "integer", "optional": true, "description": "The he ight of the tab in pixels."}, | 62 "height": {"type": "integer", "optional": true, "description": "The he ight of the tab in pixels."}, |
| 62 "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API ."} | 63 "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API ."} |
| 63 } | 64 } |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 "muted": { | 441 "muted": { |
| 441 "type": "boolean", | 442 "type": "boolean", |
| 442 "optional": true, | 443 "optional": true, |
| 443 "description": "Whether the tabs are muted." | 444 "description": "Whether the tabs are muted." |
| 444 }, | 445 }, |
| 445 "highlighted": { | 446 "highlighted": { |
| 446 "type": "boolean", | 447 "type": "boolean", |
| 447 "optional": true, | 448 "optional": true, |
| 448 "description": "Whether the tabs are highlighted." | 449 "description": "Whether the tabs are highlighted." |
| 449 }, | 450 }, |
| 451 "discarded": { | |
| 452 "type": "boolean", | |
| 453 "optional": true, | |
| 454 "description": "Whether the tabs are discarded, meaning that its content has been unloaded from memory but the tabs still exists in the tab-stri p. The content will be reloaded if the tab gets activated." | |
| 455 }, | |
|
Georges Khalil
2016/06/21 15:31:20
nit: same as above.
Anderson Silva
2016/06/27 18:21:53
Done.
| |
| 450 "currentWindow": { | 456 "currentWindow": { |
| 451 "type": "boolean", | 457 "type": "boolean", |
| 452 "optional": true, | 458 "optional": true, |
| 453 "description": "Whether the tabs are in the <a href='windows#cur rent-window'>current window</a>." | 459 "description": "Whether the tabs are in the <a href='windows#cur rent-window'>current window</a>." |
| 454 }, | 460 }, |
| 455 "lastFocusedWindow": { | 461 "lastFocusedWindow": { |
| 456 "type": "boolean", | 462 "type": "boolean", |
| 457 "optional": true, | 463 "optional": true, |
| 458 "description": "Whether the tabs are in the last focused window. " | 464 "description": "Whether the tabs are in the last focused window. " |
| 459 }, | 465 }, |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1178 "tabId": {"type": "integer", "minimum": 0}, | 1184 "tabId": {"type": "integer", "minimum": 0}, |
| 1179 "oldZoomFactor": {"type": "number"}, | 1185 "oldZoomFactor": {"type": "number"}, |
| 1180 "newZoomFactor": {"type": "number"}, | 1186 "newZoomFactor": {"type": "number"}, |
| 1181 "zoomSettings": {"$ref": "ZoomSettings"} | 1187 "zoomSettings": {"$ref": "ZoomSettings"} |
| 1182 } | 1188 } |
| 1183 }] | 1189 }] |
| 1184 } | 1190 } |
| 1185 ] | 1191 ] |
| 1186 } | 1192 } |
| 1187 ] | 1193 ] |
| OLD | NEW |