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 "dependencies": [ "tabs" ], | 8 "dependencies": [ "tabs" ], |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
11 "id": "Window", | 11 "id": "Window", |
12 "type": "object", | 12 "type": "object", |
13 "properties": { | 13 "properties": { |
14 "id": {"type": "integer", "minimum": 0, "description": "The ID of the
window. Window IDs are unique within a browser session."}, | 14 "id": {"type": "integer", "minimum": 0, "description": "The ID of the
window. Window IDs are unique within a browser session."}, |
15 "focused": {"type": "boolean", "description": "Whether the window is c
urrently the focused window."}, | 15 "focused": {"type": "boolean", "description": "Whether the window is c
urrently the focused window."}, |
16 "top": {"type": "integer", "description": "The offset of the window fr
om the top edge of the screen in pixels."}, | 16 "top": {"type": "integer", "description": "The offset of the window fr
om the top edge of the screen in pixels."}, |
17 "left": {"type": "integer", "description": "The offset of the window f
rom the left edge of the screen in pixels."}, | 17 "left": {"type": "integer", "description": "The offset of the window f
rom the left edge of the screen in pixels."}, |
18 "width": {"type": "integer", "description": "The width of the window i
n pixels."}, | 18 "width": {"type": "integer", "description": "The width of the window i
n pixels."}, |
19 "height": {"type": "integer", "description": "The height of the window
in pixels."}, | 19 "height": {"type": "integer", "description": "The height of the window
in pixels."}, |
20 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional":
true, "description": "Array of $ref:tabs.Tab objects representing the current t
abs in the window."}, | 20 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional":
true, "description": "Array of $ref:tabs.Tab objects representing the current t
abs in the window."}, |
21 "incognito": {"type": "boolean", "description": "Whether the window is
incognito."}, | 21 "incognito": {"type": "boolean", "description": "Whether the window is
incognito."}, |
22 "type": { | 22 "type": { |
23 "type": "string", | 23 "type": "string", |
24 "description": "The type of browser window this is.", | 24 "description": "The type of browser window this is.", |
25 "enum": ["normal", "popup", "panel", "app", "shell"] | 25 "enum": ["normal", "popup", "panel", "app"] |
26 }, | 26 }, |
27 "state": { | 27 "state": { |
28 "type": "string", | 28 "type": "string", |
29 "description": "The state of this browser window.", | 29 "description": "The state of this browser window.", |
30 "enum": ["normal", "minimized", "maximized", "fullscreen"] | 30 "enum": ["normal", "minimized", "maximized", "fullscreen"] |
31 }, | 31 }, |
32 "alwaysOnTop": {"type": "boolean", "description": "Whether the window
is set to be always on top."} | 32 "alwaysOnTop": {"type": "boolean", "description": "Whether the window
is set to be always on top."} |
33 } | 33 } |
34 } | 34 } |
35 ], | 35 ], |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 "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."}, | 167 "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."}, |
168 "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."}, | 168 "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."}, |
169 "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."}, | 169 "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."}, |
170 "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."}, | 170 "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."}, |
171 "focused": {"type": "boolean", "optional": true, "description": "I
f true, opens an active window. If false, opens an inactive window."}, | 171 "focused": {"type": "boolean", "optional": true, "description": "I
f true, opens an active window. If false, opens an inactive window."}, |
172 "incognito": {"type": "boolean", "optional": true, "description":
"Whether the new window should be an incognito window."}, | 172 "incognito": {"type": "boolean", "optional": true, "description":
"Whether the new window should be an incognito window."}, |
173 "type": { | 173 "type": { |
174 "type": "string", | 174 "type": "string", |
175 "optional": true, | 175 "optional": true, |
176 "description": "Specifies what type of browser window to create.
The 'panel' type creates a popup unless the '--enable-panels' flag is set.", | 176 "description": "Specifies what type of browser window to create.
The 'panel' type creates a popup unless the '--enable-panels' flag is set.", |
177 "enum": ["normal", "popup", "panel", "shell"] | 177 "enum": ["normal", "popup", "panel"] |
178 } | 178 } |
179 }, | 179 }, |
180 "optional": true | 180 "optional": true |
181 }, | 181 }, |
182 { | 182 { |
183 "type": "function", | 183 "type": "function", |
184 "name": "callback", | 184 "name": "callback", |
185 "optional": true, | 185 "optional": true, |
186 "parameters": [ | 186 "parameters": [ |
187 { | 187 { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 "name": "onFocusChanged", | 263 "name": "onFocusChanged", |
264 "type": "function", | 264 "type": "function", |
265 "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.", | 265 "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.", |
266 "parameters": [ | 266 "parameters": [ |
267 {"type": "integer", "name": "windowId", "minimum": -1, "description":
"ID of the newly focused window."} | 267 {"type": "integer", "name": "windowId", "minimum": -1, "description":
"ID of the newly focused window."} |
268 ] | 268 ] |
269 } | 269 } |
270 ] | 270 ] |
271 } | 271 } |
272 ] | 272 ] |
OLD | NEW |