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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 900 "description": "Called with the tab's current zoom settings.", | 900 "description": "Called with the tab's current zoom settings.", |
| 901 "parameters": [ | 901 "parameters": [ |
| 902 { | 902 { |
| 903 "$ref": "ZoomSettings", | 903 "$ref": "ZoomSettings", |
| 904 "name": "zoomSettings", | 904 "name": "zoomSettings", |
| 905 "description": "The tab's current zoom settings." | 905 "description": "The tab's current zoom settings." |
| 906 } | 906 } |
| 907 ] | 907 ] |
| 908 } | 908 } |
| 909 ] | 909 ] |
| 910 }, | |
| 911 { | |
| 912 "name": "discard", | |
| 913 "type": "function", | |
| 914 "description": "Discards a tab from memory. Discarded tabs are still vis ible on the tab strip and get reloaded when clicked on.", | |
|
Devlin
2016/07/19 22:49:12
s/clicked on/activated.
Anderson Silva
2016/07/20 16:24:01
Done.
| |
| 915 "parameters": [ | |
| 916 { | |
| 917 "type": "integer", | |
| 918 "name": "tabId", | |
| 919 "optional": true, | |
| 920 "minimum": 0, | |
| 921 "description": "The ID of the tab to be discarded; defaults to the l east important tab." | |
| 922 }, | |
| 923 { | |
| 924 "type": "function", | |
| 925 "name": "callback", | |
| 926 "optional": true, | |
| 927 "description": "Called after the operation is completed.", | |
| 928 "parameters": [ | |
| 929 { | |
| 930 "name": "tab", | |
| 931 "$ref": "Tab", | |
| 932 "description": "Discarded tab if it was successfully discarded." | |
| 933 }, | |
| 934 { | |
| 935 "name": "success", | |
| 936 "type": "boolean", | |
| 937 "description": "Status describing if the tab was successfully di scarded or not." | |
|
Devlin
2016/07/19 22:49:12
Is there a reason for this boolean rather than usi
Anderson Silva
2016/07/20 16:24:01
The idea is that the boolean is related to the Tab
| |
| 938 } | |
| 939 ] | |
| 940 } | |
| 941 ] | |
| 910 } | 942 } |
| 911 ], | 943 ], |
| 912 "events": [ | 944 "events": [ |
| 913 { | 945 { |
| 914 "name": "onCreated", | 946 "name": "onCreated", |
| 915 "type": "function", | 947 "type": "function", |
| 916 "description": "Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.", | 948 "description": "Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.", |
| 917 "parameters": [ | 949 "parameters": [ |
| 918 { | 950 { |
| 919 "$ref": "Tab", | 951 "$ref": "Tab", |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1184 "tabId": {"type": "integer", "minimum": 0}, | 1216 "tabId": {"type": "integer", "minimum": 0}, |
| 1185 "oldZoomFactor": {"type": "number"}, | 1217 "oldZoomFactor": {"type": "number"}, |
| 1186 "newZoomFactor": {"type": "number"}, | 1218 "newZoomFactor": {"type": "number"}, |
| 1187 "zoomSettings": {"$ref": "ZoomSettings"} | 1219 "zoomSettings": {"$ref": "ZoomSettings"} |
| 1188 } | 1220 } |
| 1189 }] | 1221 }] |
| 1190 } | 1222 } |
| 1191 ] | 1223 ] |
| 1192 } | 1224 } |
| 1193 ] | 1225 ] |
| OLD | NEW |