Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/common/extensions/api/windows.json

Issue 1015123003: Extension window.create API accepts state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make manually minimized if initial_state == minizized Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 }, 11 },
12 "types": [ 12 "types": [
13 { 13 {
14 "id": "State",
15 "type": "string",
16 "enum": ["normal", "minimized", "maximized", "fullscreen"],
17 "description": "The state of this browser window. Under some circumstanc es a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API."
18 },
19 {
14 "id": "Window", 20 "id": "Window",
15 "type": "object", 21 "type": "object",
16 "properties": { 22 "properties": {
17 "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 windows using the $(ref:sessions) API, in which case a session ID may be presen t."}, 23 "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 windows using the $(ref:sessions) API, in which case a session ID may be presen t."},
18 "focused": {"type": "boolean", "description": "Whether the window is c urrently the focused window."}, 24 "focused": {"type": "boolean", "description": "Whether the window is c urrently the focused window."},
19 "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:sessions) API."}, 25 "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:sessions) API."},
20 "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:sessions) API."}, 26 "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:sessions) API."},
21 "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:sessions) API."}, 27 "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:sessions) API."},
22 "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:sessions) API."}, 28 "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:sessions) API."},
23 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional": true, "description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window."}, 29 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional": true, "description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window."},
24 "incognito": {"type": "boolean", "description": "Whether the window is incognito."}, 30 "incognito": {"type": "boolean", "description": "Whether the window is incognito."},
25 "type": { 31 "type": {
26 "type": "string", 32 "type": "string",
27 "optional": true, 33 "optional": true,
28 "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:sessions) API.", 34 "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:sessions) API.",
29 "enum": ["normal", "popup", "panel", "app"] 35 "enum": ["normal", "popup", "panel", "app"]
30 }, 36 },
31 "state": { 37 "state": {
32 "type": "string", 38 "$ref": "State",
33 "optional": true, 39 "optional": true,
34 "description": "The state of this browser window. Under some circums tances a Window may not be assigned state property, for example when querying cl osed windows from the $(ref:sessions) API.", 40 "description": "The state of this browser window. Under some circums tances a Window may not be assigned state property, for example when querying cl osed windows from the $(ref:sessions) API."
35 "enum": ["normal", "minimized", "maximized", "fullscreen"]
36 }, 41 },
37 "alwaysOnTop": {"type": "boolean", "description": "Whether the window is set to be always on top."}, 42 "alwaysOnTop": {"type": "boolean", "description": "Whether the window is set to be always on top."},
38 "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API."} 43 "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API."}
39 } 44 }
40 } 45 }
41 ], 46 ],
42 "properties": { 47 "properties": {
43 "WINDOW_ID_NONE": { 48 "WINDOW_ID_NONE": {
44 "value": -1, 49 "value": -1,
45 "description": "The windowId value that represents the absence of a chro me browser window." 50 "description": "The windowId value that represents the absence of a chro me browser window."
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 "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."}, 178 "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."},
174 "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."}, 179 "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."},
175 "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."}, 180 "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."},
176 "focused": {"type": "boolean", "optional": true, "description": "I f true, opens an active window. If false, opens an inactive window."}, 181 "focused": {"type": "boolean", "optional": true, "description": "I f true, opens an active window. If false, opens an inactive window."},
177 "incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."}, 182 "incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."},
178 "type": { 183 "type": {
179 "type": "string", 184 "type": "string",
180 "optional": true, 185 "optional": true,
181 "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.", 186 "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.",
182 "enum": ["normal", "popup", "panel", "detached_panel"] 187 "enum": ["normal", "popup", "panel", "detached_panel"]
188 },
189 "state": {
190 "$ref": "State",
191 "optional": true,
192 "description": "The initial state of the window. The 'minimized' , 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'wi dth' or 'height'."
183 } 193 }
184 }, 194 },
185 "optional": true 195 "optional": true
186 }, 196 },
187 { 197 {
188 "type": "function", 198 "type": "function",
189 "name": "callback", 199 "name": "callback",
190 "optional": true, 200 "optional": true,
191 "parameters": [ 201 "parameters": [
192 { 202 {
(...skipping 14 matching lines...) Expand all
207 "type": "object", 217 "type": "object",
208 "name": "updateInfo", 218 "name": "updateInfo",
209 "properties": { 219 "properties": {
210 "left": {"type": "integer", "optional": true, "description": "The offset from the left edge of the screen to move the window to in pixels. This va lue is ignored for panels."}, 220 "left": {"type": "integer", "optional": true, "description": "The offset from the left edge of the screen to move the window to in pixels. This va lue is ignored for panels."},
211 "top": {"type": "integer", "optional": true, "description": "The o ffset from the top edge of the screen to move the window to in pixels. This valu e is ignored for panels."}, 221 "top": {"type": "integer", "optional": true, "description": "The o ffset from the top edge of the screen to move the window to in pixels. This valu e is ignored for panels."},
212 "width": {"type": "integer", "minimum": 0, "optional": true, "desc ription": "The width to resize the window to in pixels. This value is ignored fo r panels."}, 222 "width": {"type": "integer", "minimum": 0, "optional": true, "desc ription": "The width to resize the window to in pixels. This value is ignored fo r panels."},
213 "height": {"type": "integer", "minimum": 0, "optional": true, "des cription": "The height to resize the window to in pixels. This value is ignored for panels."}, 223 "height": {"type": "integer", "minimum": 0, "optional": true, "des cription": "The height to resize the window to in pixels. This value is ignored for panels."},
214 "focused": {"type": "boolean", "optional": true, "description": "I f true, brings the window to the front. If false, brings the next window in the z-order to the front."}, 224 "focused": {"type": "boolean", "optional": true, "description": "I f true, brings the window to the front. If false, brings the next window in the z-order to the front."},
215 "drawAttention": {"type": "boolean", "optional": true, "descriptio n": "If true, causes the window to be displayed in a manner that draws the user' s attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the wi ndow already has focus. Set to false to cancel a previous draw attention request ."}, 225 "drawAttention": {"type": "boolean", "optional": true, "descriptio n": "If true, causes the window to be displayed in a manner that draws the user' s attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the wi ndow already has focus. Set to false to cancel a previous draw attention request ."},
216 "state": { 226 "state": {
217 "type": "string", 227 "$ref": "State",
218 "optional": true, 228 "optional": true,
219 "description": "The new state of the window. The 'minimized', 'm aximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.", 229 "description": "The new state of the window. The 'minimized', 'm aximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
220 "enum": ["normal", "minimized", "maximized", "fullscreen"]
221 } 230 }
222 } 231 }
223 }, 232 },
224 { 233 {
225 "type": "function", 234 "type": "function",
226 "name": "callback", 235 "name": "callback",
227 "optional": true, 236 "optional": true,
228 "parameters": [ 237 "parameters": [
229 { 238 {
230 "name": "window", "$ref": "Window" 239 "name": "window", "$ref": "Window"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 "name": "onFocusChanged", 277 "name": "onFocusChanged",
269 "type": "function", 278 "type": "function",
270 "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.", 279 "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.",
271 "parameters": [ 280 "parameters": [
272 {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly focused window."} 281 {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly focused window."}
273 ] 282 ]
274 } 283 }
275 ] 284 ]
276 } 285 }
277 ] 286 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698