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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated."}, | 54 "discarded": {"type": "boolean", "description": "Whether the tab is di scarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated."}, |
| 55 "autoDiscardable": {"type": "boolean", "description": "Whether the ta b is auto-discardable. An auto-discardable tab is eligible for discarding when m emory resources are low."}, | |
|
Devlin
2016/08/02 22:48:14
Saying "whether the tab is auto-discardable. <defi
Anderson Silva
2016/08/03 14:47:41
Yes, you're right, non-auto-discardable tabs can b
| |
| 55 "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "C urrent tab muted state and the reason for the last state change."}, | 56 "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "C urrent tab muted state and the reason for the last state change."}, |
| 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."}, | 57 "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."}, |
| 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."}, | 58 "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."}, |
| 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."}, | 59 "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."}, |
| 59 "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}, | 60 "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}, |
| 60 "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, | 61 "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}, |
| 61 "width": {"type": "integer", "optional": true, "description": "The wid th of the tab in pixels."}, | 62 "width": {"type": "integer", "optional": true, "description": "The wid th of the tab in pixels."}, |
| 62 "height": {"type": "integer", "optional": true, "description": "The he ight of the tab in pixels."}, | 63 "height": {"type": "integer", "optional": true, "description": "The he ight of the tab in pixels."}, |
| 63 "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API ."} | 64 "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API ."} |
| 64 } | 65 } |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 "description": "Whether the tabs are muted." | 445 "description": "Whether the tabs are muted." |
| 445 }, | 446 }, |
| 446 "highlighted": { | 447 "highlighted": { |
| 447 "type": "boolean", | 448 "type": "boolean", |
| 448 "optional": true, | 449 "optional": true, |
| 449 "description": "Whether the tabs are highlighted." | 450 "description": "Whether the tabs are highlighted." |
| 450 }, | 451 }, |
| 451 "discarded": { | 452 "discarded": { |
| 452 "type": "boolean", | 453 "type": "boolean", |
| 453 "optional": true, | 454 "optional": true, |
| 454 "description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the ta b strip. Its content gets reloaded the next time it's activated." | 455 "description": "Whether the tabs are discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated." |
| 456 }, | |
| 457 "autoDiscardable": { | |
| 458 "type": "boolean", | |
| 459 "optional": true, | |
| 460 "description": "Whether the tabs are auto-discardable. An auto-d iscardable tab is eligible for discarding when memory resources are low." | |
| 455 }, | 461 }, |
| 456 "currentWindow": { | 462 "currentWindow": { |
| 457 "type": "boolean", | 463 "type": "boolean", |
| 458 "optional": true, | 464 "optional": true, |
| 459 "description": "Whether the tabs are in the <a href='windows#cur rent-window'>current window</a>." | 465 "description": "Whether the tabs are in the <a href='windows#cur rent-window'>current window</a>." |
| 460 }, | 466 }, |
| 461 "lastFocusedWindow": { | 467 "lastFocusedWindow": { |
| 462 "type": "boolean", | 468 "type": "boolean", |
| 463 "optional": true, | 469 "optional": true, |
| 464 "description": "Whether the tabs are in the last focused window. " | 470 "description": "Whether the tabs are in the last focused window. " |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 598 "muted": { | 604 "muted": { |
| 599 "type": "boolean", | 605 "type": "boolean", |
| 600 "optional": true, | 606 "optional": true, |
| 601 "description": "Whether the tab should be muted." | 607 "description": "Whether the tab should be muted." |
| 602 }, | 608 }, |
| 603 "openerTabId": { | 609 "openerTabId": { |
| 604 "type": "integer", | 610 "type": "integer", |
| 605 "minimum": 0, | 611 "minimum": 0, |
| 606 "optional": true, | 612 "optional": true, |
| 607 "description": "The ID of the tab that opened this tab. If speci fied, the opener tab must be in the same window as this tab." | 613 "description": "The ID of the tab that opened this tab. If speci fied, the opener tab must be in the same window as this tab." |
| 614 }, | |
| 615 "autoDiscardable": { | |
| 616 "type": "boolean", | |
| 617 "optional": true, | |
| 618 "description": "Whether the tab should be auto-discardable. An a uto-discardable tab is eligible for discarding when memory resources are low." | |
| 608 } | 619 } |
| 609 } | 620 } |
| 610 }, | 621 }, |
| 611 { | 622 { |
| 612 "type": "function", | 623 "type": "function", |
| 613 "name": "callback", | 624 "name": "callback", |
| 614 "optional": true, | 625 "optional": true, |
| 615 "parameters": [ | 626 "parameters": [ |
| 616 { | 627 { |
| 617 "name": "tab", | 628 "name": "tab", |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 979 "audible": { | 990 "audible": { |
| 980 "type": "boolean", | 991 "type": "boolean", |
| 981 "optional": true, | 992 "optional": true, |
| 982 "description": "The tab's new audible state." | 993 "description": "The tab's new audible state." |
| 983 }, | 994 }, |
| 984 "discarded": { | 995 "discarded": { |
| 985 "type": "boolean", | 996 "type": "boolean", |
| 986 "optional": true, | 997 "optional": true, |
| 987 "description": "The tab's new discarded state." | 998 "description": "The tab's new discarded state." |
| 988 }, | 999 }, |
| 1000 "autoDiscardable": { | |
| 1001 "type": "boolean", | |
| 1002 "optional": true, | |
| 1003 "description": "The tab's new auto-discardable state." | |
| 1004 }, | |
| 989 "mutedInfo": { | 1005 "mutedInfo": { |
| 990 "$ref": "MutedInfo", | 1006 "$ref": "MutedInfo", |
| 991 "optional": true, | 1007 "optional": true, |
| 992 "description": "The tab's new muted state and the reason for the change." | 1008 "description": "The tab's new muted state and the reason for the change." |
| 993 }, | 1009 }, |
| 994 "favIconUrl": { | 1010 "favIconUrl": { |
| 995 "type": "string", | 1011 "type": "string", |
| 996 "optional": true, | 1012 "optional": true, |
| 997 "description": "The tab's new favicon URL." | 1013 "description": "The tab's new favicon URL." |
| 998 }, | 1014 }, |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1217 "tabId": {"type": "integer", "minimum": 0}, | 1233 "tabId": {"type": "integer", "minimum": 0}, |
| 1218 "oldZoomFactor": {"type": "number"}, | 1234 "oldZoomFactor": {"type": "number"}, |
| 1219 "newZoomFactor": {"type": "number"}, | 1235 "newZoomFactor": {"type": "number"}, |
| 1220 "zoomSettings": {"$ref": "ZoomSettings"} | 1236 "zoomSettings": {"$ref": "ZoomSettings"} |
| 1221 } | 1237 } |
| 1222 }] | 1238 }] |
| 1223 } | 1239 } |
| 1224 ] | 1240 ] |
| 1225 } | 1241 } |
| 1226 ] | 1242 ] |
| OLD | NEW |