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 { | 10 { |
11 "id": "Tab", | 11 "id": "Tab", |
12 "type": "object", | 12 "type": "object", |
13 "properties": { | 13 "properties": { |
14 "id": {"type": "integer", "minimum": 0, "optional": true, "description
": "The ID of the tab. Tab IDs are unique within a browser session. Under some c
ircumstances 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."}
, | 14 "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.
"}, |
15 // TODO(kalman): Investigate how this is ending up as -1 (based on win
dow type? a bug?) and whether it should be optional instead. | 15 // TODO(kalman): Investigate how this is ending up as -1 (based on win
dow type? a bug?) and whether it should be optional instead. |
16 "index": {"type": "integer", "minimum": -1, "description": "The zero-b
ased index of the tab within its window."}, | 16 "index": {"type": "integer", "minimum": -1, "description": "The zero-b
ased index of the tab within its window."}, |
17 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o
f the window the tab is contained within."}, | 17 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o
f the window the tab is contained within."}, |
18 "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."}, | 18 "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."}, |
19 "selected": {"type": "boolean", "description": "Whether the tab is sel
ected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."}, | 19 "selected": {"type": "boolean", "description": "Whether the tab is sel
ected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."}, |
20 "highlighted": {"type": "boolean", "description": "Whether the tab is
highlighted."}, | 20 "highlighted": {"type": "boolean", "description": "Whether the tab is
highlighted."}, |
21 "active": {"type": "boolean", "description": "Whether the tab is activ
e in its window. (Does not necessarily mean the window is focused.)"}, | 21 "active": {"type": "boolean", "description": "Whether the tab is activ
e in its window. (Does not necessarily mean the window is focused.)"}, |
22 "pinned": {"type": "boolean", "description": "Whether the tab is pinne
d."}, | 22 "pinned": {"type": "boolean", "description": "Whether the tab is pinne
d."}, |
23 "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."}, | 23 "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."}, |
24 "muted": {"type": "boolean", "optional": true, "description": "Whether
the tab is prevented from playing sound (but hasn't necessarily recently produc
ed sound). Equivalent to whether the muted audio indicator is showing."}, | 24 "muted": {"type": "boolean", "optional": true, "description": "Whether
the tab is prevented from playing sound (but hasn't necessarily recently produc
ed sound). Equivalent to whether the muted audio indicator is showing."}, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 "enum": ["loading", "complete"], | 95 "enum": ["loading", "complete"], |
96 "description": "Whether the tabs have completed loading." | 96 "description": "Whether the tabs have completed loading." |
97 }, | 97 }, |
98 { | 98 { |
99 "id": "WindowType", | 99 "id": "WindowType", |
100 "type": "string", | 100 "type": "string", |
101 "enum": ["normal", "popup", "panel", "app", "devtools"], | 101 "enum": ["normal", "popup", "panel", "app", "devtools"], |
102 "description": "The type of window." | 102 "description": "The type of window." |
103 } | 103 } |
104 ], | 104 ], |
| 105 "properties": { |
| 106 "TAB_ID_NONE": { |
| 107 "value": -1, |
| 108 "description": "An ID which represents the absence of a browser tab." |
| 109 } |
| 110 }, |
105 "functions": [ | 111 "functions": [ |
106 { | 112 { |
107 "name": "get", | 113 "name": "get", |
108 "type": "function", | 114 "type": "function", |
109 "description": "Retrieves details about the specified tab.", | 115 "description": "Retrieves details about the specified tab.", |
110 "parameters": [ | 116 "parameters": [ |
111 { | 117 { |
112 "type": "integer", | 118 "type": "integer", |
113 "name": "tabId", | 119 "name": "tabId", |
114 "minimum": 0 | 120 "minimum": 0 |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 "tabId": {"type": "integer", "minimum": 0}, | 1148 "tabId": {"type": "integer", "minimum": 0}, |
1143 "oldZoomFactor": {"type": "number"}, | 1149 "oldZoomFactor": {"type": "number"}, |
1144 "newZoomFactor": {"type": "number"}, | 1150 "newZoomFactor": {"type": "number"}, |
1145 "zoomSettings": {"$ref": "ZoomSettings"} | 1151 "zoomSettings": {"$ref": "ZoomSettings"} |
1146 } | 1152 } |
1147 }] | 1153 }] |
1148 } | 1154 } |
1149 ] | 1155 ] |
1150 } | 1156 } |
1151 ] | 1157 ] |
OLD | NEW |