| 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 are reloaded when activated.", |
| 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. If specified, the
tab will be discarded unless it's active or already discarded. If omitted, the
browser will discard the least important tab. This can fail if no discardable ta
bs exist." |
| 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 "optional": true, |
| 933 "description": "Discarded tab if it was successfully discarded.
Undefined otherwise." |
| 934 } |
| 935 ] |
| 936 } |
| 937 ] |
| 910 } | 938 } |
| 911 ], | 939 ], |
| 912 "events": [ | 940 "events": [ |
| 913 { | 941 { |
| 914 "name": "onCreated", | 942 "name": "onCreated", |
| 915 "type": "function", | 943 "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.", | 944 "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": [ | 945 "parameters": [ |
| 918 { | 946 { |
| 919 "$ref": "Tab", | 947 "$ref": "Tab", |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 "tabId": {"type": "integer", "minimum": 0}, | 1212 "tabId": {"type": "integer", "minimum": 0}, |
| 1185 "oldZoomFactor": {"type": "number"}, | 1213 "oldZoomFactor": {"type": "number"}, |
| 1186 "newZoomFactor": {"type": "number"}, | 1214 "newZoomFactor": {"type": "number"}, |
| 1187 "zoomSettings": {"$ref": "ZoomSettings"} | 1215 "zoomSettings": {"$ref": "ZoomSettings"} |
| 1188 } | 1216 } |
| 1189 }] | 1217 }] |
| 1190 } | 1218 } |
| 1191 ] | 1219 ] |
| 1192 } | 1220 } |
| 1193 ] | 1221 ] |
| OLD | NEW |