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 "compiler_options": { | 8 "compiler_options": { |
9 "implemented_in": "chrome/browser/extensions/api/tabs/tabs_api.h" | 9 "implemented_in": "chrome/browser/extensions/api/tabs/tabs_api.h" |
10 }, | 10 }, |
11 "types": [ | 11 "types": [ |
12 { | 12 { |
13 "id": "Window", | 13 "id": "Window", |
14 "type": "object", | 14 "type": "object", |
15 "properties": { | 15 "properties": { |
16 "id": {"type": "integer", "optional": true, "minimum": 0, "description
": "The ID of the window. Window IDs are unique within a browser session. Under
some circumstances a Window may not be assigned an ID, for example when querying
closed windows from the $ref:sessionRestore API."}, | 16 "id": {"type": "integer", "optional": true, "minimum": 0, "description
": "The ID of the window. Window IDs are unique within a browser session. Under
some circumstances a Window may not be assigned an ID, for example when querying
closed windows from the $ref:sessionRestore API."}, |
17 "focused": {"type": "boolean", "description": "Whether the window is c
urrently the focused window."}, | 17 "focused": {"type": "boolean", "description": "Whether the window is c
urrently the focused window."}, |
18 "top": {"type": "integer", "optional": true, "description": "The offse
t of the window from the top edge of the screen in pixels. Under some circumstan
ces a Window may not be assigned top property, for example when querying closed
windows from the $ref:sessionRestore API."}, | 18 "top": {"type": "integer", "optional": true, "description": "The offse
t of the window from the top edge of the screen in pixels. Under some circumstan
ces a Window may not be assigned top property, for example when querying closed
windows from the $ref:sessionRestore API."}, |
19 "left": {"type": "integer", "optional": true, "description": "The offs
et of the window from the left edge of the screen in pixels. Under some circumst
ances a Window may not be assigned left property, for example when querying clos
ed windows from the $ref:sessionRestore API."}, | 19 "left": {"type": "integer", "optional": true, "description": "The offs
et of the window from the left edge of the screen in pixels. Under some circumst
ances a Window may not be assigned left property, for example when querying clos
ed windows from the $ref:sessionRestore API."}, |
20 "width": {"type": "integer", "optional": true, "description": "The wid
th of the window in pixels. Under some circumstances a Window may not be assigne
d width property, for example when querying closed windows from the $ref:session
Restore API."}, | 20 "width": {"type": "integer", "optional": true, "description": "The wid
th of the window, including the frame, in pixels. Under some circumstances a Win
dow may not be assigned width property, for example when querying closed windows
from the $ref:sessionRestore API."}, |
21 "height": {"type": "integer", "optional": true, "description": "The he
ight of the window in pixels. Under some circumstances a Window may not be assig
ned height property, for example when querying closed windows from the $ref:sess
ionRestore API."}, | 21 "height": {"type": "integer", "optional": true, "description": "The he
ight of the window, including the frame, in pixels. Under some circumstances a W
indow may not be assigned height property, for example when querying closed wind
ows from the $ref:sessionRestore API."}, |
22 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional":
true, "description": "Array of $ref:tabs.Tab objects representing the current t
abs in the window."}, | 22 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional":
true, "description": "Array of $ref:tabs.Tab objects representing the current t
abs in the window."}, |
23 "incognito": {"type": "boolean", "description": "Whether the window is
incognito."}, | 23 "incognito": {"type": "boolean", "description": "Whether the window is
incognito."}, |
24 "type": { | 24 "type": { |
25 "type": "string", | 25 "type": "string", |
26 "optional": true, | 26 "optional": true, |
27 "description": "The type of browser window this is. Under some circu
mstances a Window may not be assigned type property, for example when querying c
losed windows from the $ref:sessionRestore API.", | 27 "description": "The type of browser window this is. Under some circu
mstances a Window may not be assigned type property, for example when querying c
losed windows from the $ref:sessionRestore API.", |
28 "enum": ["normal", "popup", "panel", "app"] | 28 "enum": ["normal", "popup", "panel", "app"] |
29 }, | 29 }, |
30 "state": { | 30 "state": { |
31 "type": "string", | 31 "type": "string", |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 "description": "A URL or list of URLs to open as tabs in the win
dow. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', n
ot 'www.google.com'). Relative URLs will be relative to the current page within
the extension. Defaults to the New Tab Page.", | 163 "description": "A URL or list of URLs to open as tabs in the win
dow. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', n
ot 'www.google.com'). Relative URLs will be relative to the current page within
the extension. Defaults to the New Tab Page.", |
164 "optional": true, | 164 "optional": true, |
165 "choices": [ | 165 "choices": [ |
166 {"type": "string"}, | 166 {"type": "string"}, |
167 {"type": "array", "items": {"type": "string"}} | 167 {"type": "array", "items": {"type": "string"}} |
168 ] | 168 ] |
169 }, | 169 }, |
170 "tabId": {"type": "integer", "minimum": 0, "optional": true, "desc
ription": "The id of the tab for which you want to adopt to the new window."}, | 170 "tabId": {"type": "integer", "minimum": 0, "optional": true, "desc
ription": "The id of the tab for which you want to adopt to the new window."}, |
171 "left": {"type": "integer", "optional": true, "description": "The
number of pixels to position the new window from the left edge of the screen. If
not specified, the new window is offset naturally from the last focused window.
This value is ignored for panels."}, | 171 "left": {"type": "integer", "optional": true, "description": "The
number of pixels to position the new window from the left edge of the screen. If
not specified, the new window is offset naturally from the last focused window.
This value is ignored for panels."}, |
172 "top": {"type": "integer", "optional": true, "description": "The n
umber of pixels to position the new window from the top edge of the screen. If n
ot specified, the new window is offset naturally from the last focused window. T
his value is ignored for panels."}, | 172 "top": {"type": "integer", "optional": true, "description": "The n
umber of pixels to position the new window from the top edge of the screen. If n
ot specified, the new window is offset naturally from the last focused window. T
his value is ignored for panels."}, |
173 "width": {"type": "integer", "minimum": 0, "optional": true, "desc
ription": "The width in pixels of the new window. If not specified defaults to a
natural width."}, | 173 "width": {"type": "integer", "minimum": 0, "optional": true, "desc
ription": "The width in pixels of the new window, including the frame. If not sp
ecified defaults to a natural width."}, |
174 "height": {"type": "integer", "minimum": 0, "optional": true, "des
cription": "The height in pixels of the new window. If not specified defaults to
a natural height."}, | 174 "height": {"type": "integer", "minimum": 0, "optional": true, "des
cription": "The height in pixels of the new window, including the frame. If not
specified defaults to a natural height."}, |
175 "focused": {"type": "boolean", "optional": true, "description": "I
f true, opens an active window. If false, opens an inactive window."}, | 175 "focused": {"type": "boolean", "optional": true, "description": "I
f true, opens an active window. If false, opens an inactive window."}, |
176 "incognito": {"type": "boolean", "optional": true, "description":
"Whether the new window should be an incognito window."}, | 176 "incognito": {"type": "boolean", "optional": true, "description":
"Whether the new window should be an incognito window."}, |
177 "type": { | 177 "type": { |
178 "type": "string", | 178 "type": "string", |
179 "optional": true, | 179 "optional": true, |
180 "description": "Specifies what type of browser window to create.
The 'panel' and 'detached_panel' types create a popup unless the '--enable-pane
ls' flag is set.", | 180 "description": "Specifies what type of browser window to create.
The 'panel' and 'detached_panel' types create a popup unless the '--enable-pane
ls' flag is set.", |
181 "enum": ["normal", "popup", "panel", "detached_panel"] | 181 "enum": ["normal", "popup", "panel", "detached_panel"] |
182 } | 182 } |
183 }, | 183 }, |
184 "optional": true | 184 "optional": true |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 "name": "onFocusChanged", | 267 "name": "onFocusChanged", |
268 "type": "function", | 268 "type": "function", |
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.", | 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.", |
270 "parameters": [ | 270 "parameters": [ |
271 {"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."} |
272 ] | 272 ] |
273 } | 273 } |
274 ] | 274 ] |
275 } | 275 } |
276 ] | 276 ] |
OLD | NEW |