3 "namespace": "windows",
4 "description": "The windows API.",
10 "id": {"type": "integer", "minimum": 0, "description": "The ID of the window. Window IDs are unique within a browser session."},
11 "focused": {"type": "boolean", "description": "Whether the window is currently the focused window."},
12 "top": {"type": "integer", "description": "The offset of the window from the top edge of the screen in pixels."},
13 "left": {"type": "integer", "description": "The offset of the window from the left edge of the screen in pixels."},
14 "width": {"type": "integer", "description": "The width of the window in pixels."},
15 "height": {"type": "integer", "description": "The height of the window in pixels."},
16 "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional": true, "description": "Array of $ref:Tab objects representing the current tabs in the window."},
17 "incognito": {"type": "boolean", "description": "Whether the window is incognito."},
20 "description": "The type of browser window this is.",
21 "enum": ["normal", "popup", "panel", "app"]
25 "description": "The state of this browser window.",
26 "enum": ["normal", "minimized", "maximized"]
35 "description": "The windowId value that represents the absence of a chrome browser window."
42 "description": "Gets details about a window.",
44 {"type": "integer", "name": "windowId", "minimum": 0},
51 "populate": {"type": "boolean", "optional": true, "description": "If true, the window object will have a <var>tabs</var> property that contains a list of the $ref:Tab objects" }
59 "name": "window", "$ref": "Window"
68 "description": "Gets the <a href='#current-window'>current window</a>.",
76 "populate": {"type": "boolean", "optional": true, "description": "If true, the window object will have a <var>tabs</var> property that contains a list of the $ref:Tab objects" }
84 "name": "window", "$ref": "Window"
91 "name": "getLastFocused",
93 "description": "Gets the window that was most recently focused — typically the window 'on top'.",
101 "populate": {"type": "boolean", "optional": true, "description": "If true, the window object will have a <var>tabs</var> property that contains a list of the $ref:Tab objects" }
109 "name": "window", "$ref": "Window"
118 "description": "Gets all windows.",
126 "populate": {"type": "boolean", "optional": true, "description": "If true, each window object will have a <var>tabs</var> property that contains a list of the $ref:Tab objects for that window." }
134 "name": "windows", "type": "array", "items": { "$ref": "Window" }
144 "description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.",
148 "name": "createData",
152 "description": "A URL or list of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.",
156 {"type": "array", "items": {"type": "string"}}
159 "tabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The id of the tab for which you want to adopt to the new window."},
160 "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 focusd window. This value is ignored for panels."},
161 "top": {"type": "integer", "optional": true, "description": "The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focusd window. This value is ignored for panels."},
162 "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width in pixels of the new window. If not specified defaults to a natural width."},
163 "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height in pixels of the new window. If not specified defaults to a natural height."},
164 "focused": {"type": "boolean", "optional": true, "description": "If true, opens an active window. If false, opens an inactive window."},
165 "incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."},
169 "description": "Specifies what type of browser window to create. The 'panel' type creates a popup unless the '--enable-panels' flag is set.",
170 "enum": ["normal", "popup", "panel"]
181 "name": "window", "$ref": "Window", "description": "Contains details about the created window.",
191 "description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.",
193 {"type": "integer", "name": "windowId", "minimum": 0},
196 "name": "updateInfo",
198 "left": {"type": "integer", "optional": true, "description": "The offset from the left edge of the screen to move the window to in pixels. This value is ignored for panels."},
199 "top": {"type": "integer", "optional": true, "description": "The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels."},
200 "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width to resize the window to in pixels. This value is ignored for panels."},
201 "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height to resize the window to in pixels. This value is ignored for panels."},
202 "focused": {"type": "boolean", "optional": true, "description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front."},
203 "drawAttention": {"type": "boolean", "optional": true, "description": "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 set to false or if the window already has focus."},
207 "description": "The new state of the window. The 'minimized' and 'maximized' states cannot be combined with 'left', 'top', 'width' or 'height'.",
208 "enum": ["normal", "minimized", "maximized"]
218 "name": "window", "$ref": "Window"
227 "description": "Removes (closes) a window, and all the tabs inside it.",
229 {"type": "integer", "name": "windowId", "minimum": 0},
230 {"type": "function", "name": "callback", "optional": true, "parameters": []}
238 "description": "Fired when a window is created.",
243 "description": "Details of the window that was created."
250 "description": "Fired when a window is removed (closed).",
252 {"type": "integer", "name": "windowId", "minimum": 0, "description": "ID of the removed window."}
256 "name": "onFocusChanged",
258 "description": "Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one chrome window to another.",
260 {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly focused window."}