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, "description": "The ID of the
tab. Tab IDs are unique within a browser session."}, | 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 from the $ref:sessions API, in which case sessionId may be present."}, |
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 will only be p
resent 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 will only be p
resent if the opener tab still exists."}, |
19 "selected": {"type": "boolean", "description": "Whether the tab is sel
ected.", "nodoc": true}, | 19 "selected": {"type": "boolean", "description": "Whether the tab is sel
ected.", "nodoc": true}, |
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 "url": {"type": "string", "optional": true, "description": "The URL th
e tab is displaying. This will only be present if the extension has the 'tabs' o
r 'webNavigation' permission."}, | 23 "url": {"type": "string", "optional": true, "description": "The URL th
e tab is displaying. This will only be present if the extension has the 'tabs' o
r 'webNavigation' permission."}, |
24 "title": {"type": "string", "optional": true, "optional": true, "descr
iption": "The title of the tab. This will only be present if the extension has t
he 'tabs' or 'webNavigation' permission. It may also be an empty string if the t
ab is loading."}, | 24 "title": {"type": "string", "optional": true, "optional": true, "descr
iption": "The title of the tab. This will only be present if the extension has t
he 'tabs' or 'webNavigation' permission. It may also be an empty string if the t
ab is loading."}, |
25 "favIconUrl": {"type": "string", "optional": true, "optional": true, "
description": "The URL of the tab's favicon. This will only be present if the ex
tension has the 'tabs' or 'webNavigation' permission. It may also be an empty st
ring if the tab is loading."}, | 25 "favIconUrl": {"type": "string", "optional": true, "optional": true, "
description": "The URL of the tab's favicon. This will only be present if the ex
tension has the 'tabs' or 'webNavigation' permission. It may also be an empty st
ring if the tab is loading."}, |
26 "status": {"type": "string", "optional": true, "description": "Either
<em>loading</em> or <em>complete</em>."}, | 26 "status": {"type": "string", "optional": true, "description": "Either
<em>loading</em> or <em>complete</em>."}, |
27 "incognito": {"type": "boolean", "description": "Whether the tab is in
an incognito window."} | 27 "incognito": {"type": "boolean", "description": "Whether the tab is in
an incognito window."}, |
| 28 "sessionId": {"type": "string", "optional": true, "description": "The
session ID used to uniquely identify a Tab from the $ref:sessions API."} |
28 } | 29 } |
29 }, | 30 }, |
30 { | 31 { |
31 "id": "InjectDetails", | 32 "id": "InjectDetails", |
32 "type": "object", | 33 "type": "object", |
33 "description": "Details of the script or CSS to inject. Either the code
or the file property must be set, but both may not be set at the same time.", | 34 "description": "Details of the script or CSS to inject. Either the code
or the file property must be set, but both may not be set at the same time.", |
34 "properties": { | 35 "properties": { |
35 "code": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS code to inject."}, | 36 "code": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS code to inject."}, |
36 "file": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS file to inject."}, | 37 "file": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS file to inject."}, |
37 "allFrames": {"type": "boolean", "optional": true, "description": "If
allFrames is <code>true</code>, implies that the JavaScript or CSS should be inj
ected into all frames of current page. By default, it's <code>false</code> and w
ill only be injected into the top frame."}, | 38 "allFrames": {"type": "boolean", "optional": true, "description": "If
allFrames is <code>true</code>, implies that the JavaScript or CSS should be inj
ected into all frames of current page. By default, it's <code>false</code> and w
ill only be injected into the top frame."}, |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 "type": "function", | 931 "type": "function", |
931 "description": "Fired when a tab is replaced with another tab due to pre
rendering or instant.", | 932 "description": "Fired when a tab is replaced with another tab due to pre
rendering or instant.", |
932 "parameters": [ | 933 "parameters": [ |
933 {"type": "integer", "name": "addedTabId", "minimum": 0}, | 934 {"type": "integer", "name": "addedTabId", "minimum": 0}, |
934 {"type": "integer", "name": "removedTabId", "minimum": 0} | 935 {"type": "integer", "name": "removedTabId", "minimum": 0} |
935 ] | 936 ] |
936 } | 937 } |
937 ] | 938 ] |
938 } | 939 } |
939 ] | 940 ] |
OLD | NEW |