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": "windows", | 7 "namespace": "windows", |
8 "description": "Use the <code>chrome.windows</code> API to interact with bro
wser windows. You can use this API to create, modify, and rearrange windows in t
he browser.", | 8 "description": "Use the <code>chrome.windows</code> API to interact with bro
wser windows. You can use this API to create, modify, and rearrange windows in t
he browser.", |
9 "compiler_options": { | 9 "compiler_options": { |
10 "implemented_in": "chrome/browser/extensions/api/tabs/tabs_api.h" | 10 "implemented_in": "chrome/browser/extensions/api/tabs/tabs_api.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 }, | 46 }, |
47 "alwaysOnTop": {"type": "boolean", "description": "Whether the window
is set to be always on top."}, | 47 "alwaysOnTop": {"type": "boolean", "description": "Whether the window
is set to be always on top."}, |
48 "sessionId": {"type": "string", "optional": true, "description": "The
session ID used to uniquely identify a Window obtained from the $(ref:sessions)
API."} | 48 "sessionId": {"type": "string", "optional": true, "description": "The
session ID used to uniquely identify a Window obtained from the $(ref:sessions)
API."} |
49 } | 49 } |
50 }, | 50 }, |
51 { | 51 { |
52 "id": "CreateType", | 52 "id": "CreateType", |
53 "type": "string", | 53 "type": "string", |
54 "description": "Specifies what type of browser window to create. The 'pa
nel' and 'detached_panel' types create a popup unless the '--enable-panels' flag
is set.", | 54 "description": "Specifies what type of browser window to create. The 'pa
nel' and 'detached_panel' types create a popup unless the '--enable-panels' flag
is set.", |
55 "enum": ["normal", "popup", "panel", "detached_panel"] | 55 "enum": ["normal", "popup", "panel", "detached_panel"] |
| 56 }, |
| 57 { |
| 58 "id": "GetInfo", |
| 59 "type": "object", |
| 60 "description": "Additional options given to the family of get functions:
$(ref:windows.get), $(ref:windows.getCurrent), $(ref:windows.getLastFocused), a
nd $(ref:windows.getAll).", |
| 61 "properties": { |
| 62 "populate": { |
| 63 "type": "boolean", |
| 64 "optional": true, |
| 65 "description": "If true, the $(ref:windows.Window) object will have
a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects.
The <code>Tab</code> objects only contain the <code>url</code>, <code>title</cod
e> and <code>favIconUrl</code> properties if the extension's manifest file inclu
des the <code>\"tabs\"</code> permission." |
| 66 } |
| 67 } |
56 } | 68 } |
57 ], | 69 ], |
58 "properties": { | 70 "properties": { |
59 "WINDOW_ID_NONE": { | 71 "WINDOW_ID_NONE": { |
60 "value": -1, | 72 "value": -1, |
61 "description": "The windowId value that represents the absence of a chro
me browser window." | 73 "description": "The windowId value that represents the absence of a chro
me browser window." |
62 }, | 74 }, |
63 "WINDOW_ID_CURRENT": { | 75 "WINDOW_ID_CURRENT": { |
64 "value": -2, | 76 "value": -2, |
65 "description": "The windowId value that represents the <a href='windows#
current-window'>current window</a>." | 77 "description": "The windowId value that represents the <a href='windows#
current-window'>current window</a>." |
66 } | 78 } |
67 }, | 79 }, |
68 "functions": [ | 80 "functions": [ |
69 { | 81 { |
70 "name": "get", | 82 "name": "get", |
71 "type": "function", | 83 "type": "function", |
72 "description": "Gets details about a window.", | 84 "description": "Gets details about a window.", |
73 "parameters": [ | 85 "parameters": [ |
74 {"type": "integer", "name": "windowId", "minimum": -2}, | 86 {"type": "integer", "name": "windowId", "minimum": -2}, |
75 { | 87 {"$ref": "GetInfo", "name": "getInfo", "optional": true}, |
76 "type": "object", | |
77 "name": "getInfo", | |
78 "optional": true, | |
79 "description": "", | |
80 "properties": { | |
81 "populate": {"type": "boolean", "optional": true, "description": "
If true, the $(ref:windows.Window) object will have a <var>tabs</var> property t
hat contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects
only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</cod
e> properties if the extension's manifest file includes the <code>\"tabs\"</code
> permission." } | |
82 } | |
83 }, | |
84 { | 88 { |
85 "type": "function", | 89 "type": "function", |
86 "name": "callback", | 90 "name": "callback", |
87 "parameters": [ | 91 "parameters": [ |
88 { | 92 { |
89 "name": "window", "$ref": "Window" | 93 "name": "window", "$ref": "Window" |
90 } | 94 } |
91 ] | 95 ] |
92 } | 96 } |
93 ] | 97 ] |
94 }, | 98 }, |
95 { | 99 { |
96 "name": "getCurrent", | 100 "name": "getCurrent", |
97 "type": "function", | 101 "type": "function", |
98 "description": "Gets the <a href='#current-window'>current window</a>.", | 102 "description": "Gets the <a href='#current-window'>current window</a>.", |
99 "parameters": [ | 103 "parameters": [ |
100 { | 104 {"$ref": "GetInfo", "name": "getInfo", "optional": true}, |
101 "type": "object", | |
102 "name": "getInfo", | |
103 "optional": true, | |
104 "description": "", | |
105 "properties": { | |
106 "populate": {"type": "boolean", "optional": true, "description": "
If true, the $(ref:windows.Window) object will have a <var>tabs</var> property t
hat contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects
only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</cod
e> properties if the extension's manifest file includes the <code>\"tabs\"</code
> permission." } | |
107 } | |
108 }, | |
109 { | 105 { |
110 "type": "function", | 106 "type": "function", |
111 "name": "callback", | 107 "name": "callback", |
112 "parameters": [ | 108 "parameters": [ |
113 { | 109 { |
114 "name": "window", "$ref": "Window" | 110 "name": "window", "$ref": "Window" |
115 } | 111 } |
116 ] | 112 ] |
117 } | 113 } |
118 ] | 114 ] |
119 }, | 115 }, |
120 { | 116 { |
121 "name": "getLastFocused", | 117 "name": "getLastFocused", |
122 "type": "function", | 118 "type": "function", |
123 "description": "Gets the window that was most recently focused — t
ypically the window 'on top'.", | 119 "description": "Gets the window that was most recently focused — t
ypically the window 'on top'.", |
124 "parameters": [ | 120 "parameters": [ |
125 { | 121 {"$ref": "GetInfo", "name": "getInfo", "optional": true}, |
126 "type": "object", | |
127 "name": "getInfo", | |
128 "optional": true, | |
129 "description": "", | |
130 "properties": { | |
131 "populate": {"type": "boolean", "optional": true, "description": "
If true, the $(ref:windows.Window) object will have a <var>tabs</var> property t
hat contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects
only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</cod
e> properties if the extension's manifest file includes the <code>\"tabs\"</code
> permission." } | |
132 } | |
133 }, | |
134 { | 122 { |
135 "type": "function", | 123 "type": "function", |
136 "name": "callback", | 124 "name": "callback", |
137 "parameters": [ | 125 "parameters": [ |
138 { | 126 { |
139 "name": "window", "$ref": "Window" | 127 "name": "window", "$ref": "Window" |
140 } | 128 } |
141 ] | 129 ] |
142 } | 130 } |
143 ] | 131 ] |
144 }, | 132 }, |
145 { | 133 { |
146 "name": "getAll", | 134 "name": "getAll", |
147 "type": "function", | 135 "type": "function", |
148 "description": "Gets all windows.", | 136 "description": "Gets all windows.", |
149 "parameters": [ | 137 "parameters": [ |
150 { | 138 {"$ref": "GetInfo", "name": "getInfo", "optional": true}, |
151 "type": "object", | |
152 "name": "getInfo", | |
153 "optional": true, | |
154 "description": "", | |
155 "properties": { | |
156 "populate": {"type": "boolean", "optional": true, "description": "
If true, each $(ref:windows.Window) object will have a <var>tabs</var> property
that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>T
ab</code> objects only contain the <code>url</code>, <code>title</code> and <cod
e>favIconUrl</code> properties if the extension's manifest file includes the <co
de>\"tabs\"</code> permission." } | |
157 } | |
158 }, | |
159 { | 139 { |
160 "type": "function", | 140 "type": "function", |
161 "name": "callback", | 141 "name": "callback", |
162 "parameters": [ | 142 "parameters": [ |
163 { | 143 { |
164 "name": "windows", "type": "array", "items": { "$ref": "Window"
} | 144 "name": "windows", "type": "array", "items": { "$ref": "Window"
} |
165 } | 145 } |
166 ] | 146 ] |
167 } | 147 } |
168 ] | 148 ] |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 "name": "onFocusChanged", | 267 "name": "onFocusChanged", |
288 "type": "function", | 268 "type": "function", |
289 "description": "Fired when the currently focused window changes. Will be
chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus. Note: On s
ome Linux window managers, WINDOW_ID_NONE will always be sent immediately preced
ing a switch from one chrome window to another.", | 269 "description": "Fired when the currently focused window changes. Will be
chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus. Note: On s
ome Linux window managers, WINDOW_ID_NONE will always be sent immediately preced
ing a switch from one chrome window to another.", |
290 "parameters": [ | 270 "parameters": [ |
291 {"type": "integer", "name": "windowId", "minimum": -1, "description":
"ID of the newly focused window."} | 271 {"type": "integer", "name": "windowId", "minimum": -1, "description":
"ID of the newly focused window."} |
292 ] | 272 ] |
293 } | 273 } |
294 ] | 274 ] |
295 } | 275 } |
296 ] | 276 ] |
OLD | NEW |