Chromium Code Reviews| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 "type": "function", | 71 "type": "function", |
| 72 "description": "Gets details about a window.", | 72 "description": "Gets details about a window.", |
| 73 "parameters": [ | 73 "parameters": [ |
| 74 {"type": "integer", "name": "windowId", "minimum": -2}, | 74 {"type": "integer", "name": "windowId", "minimum": -2}, |
| 75 { | 75 { |
| 76 "type": "object", | 76 "type": "object", |
| 77 "name": "getInfo", | 77 "name": "getInfo", |
| 78 "optional": true, | 78 "optional": true, |
| 79 "description": "", | 79 "description": "", |
| 80 "properties": { | 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." } | 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 "windowTypes": {"type": "array", "items": { "$ref": "WindowType" } , "optional": true, "description": "If set, the $(ref:windows.Window) returned w ill be filtered based on its type. If unset the default filter is set to <code>[ 'normal', 'panel', 'popup']</code>." } | |
| 82 } | 83 } |
| 83 }, | 84 }, |
| 84 { | 85 { |
| 85 "type": "function", | 86 "type": "function", |
| 86 "name": "callback", | 87 "name": "callback", |
| 87 "parameters": [ | 88 "parameters": [ |
| 88 { | 89 { |
| 89 "name": "window", "$ref": "Window" | 90 "name": "window", "$ref": "Window" |
| 90 } | 91 } |
| 91 ] | 92 ] |
| 92 } | 93 } |
| 93 ] | 94 ] |
| 94 }, | 95 }, |
| 95 { | 96 { |
| 96 "name": "getCurrent", | 97 "name": "getCurrent", |
| 97 "type": "function", | 98 "type": "function", |
| 98 "description": "Gets the <a href='#current-window'>current window</a>.", | 99 "description": "Gets the <a href='#current-window'>current window</a>.", |
| 99 "parameters": [ | 100 "parameters": [ |
| 100 { | 101 { |
| 101 "type": "object", | 102 "type": "object", |
| 102 "name": "getInfo", | 103 "name": "getInfo", |
| 103 "optional": true, | 104 "optional": true, |
| 104 "description": "", | 105 "description": "", |
| 105 "properties": { | 106 "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 "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." }, |
| 108 "windowTypes": {"type": "array", "items": { "$ref": "WindowType" } , "optional": true, "description": "If set, the $(ref:windows.Window) returned w ill be filtered based on its type. If unset the default filter is set to <code>[ 'normal', 'panel', 'popup']</code>." } | |
| 107 } | 109 } |
| 108 }, | 110 }, |
| 109 { | 111 { |
| 110 "type": "function", | 112 "type": "function", |
| 111 "name": "callback", | 113 "name": "callback", |
| 112 "parameters": [ | 114 "parameters": [ |
| 113 { | 115 { |
| 114 "name": "window", "$ref": "Window" | 116 "name": "window", "$ref": "Window" |
| 115 } | 117 } |
| 116 ] | 118 ] |
| 117 } | 119 } |
| 118 ] | 120 ] |
| 119 }, | 121 }, |
| 120 { | 122 { |
| 121 "name": "getLastFocused", | 123 "name": "getLastFocused", |
| 122 "type": "function", | 124 "type": "function", |
| 123 "description": "Gets the window that was most recently focused — t ypically the window 'on top'.", | 125 "description": "Gets the window that was most recently focused — t ypically the window 'on top'.", |
| 124 "parameters": [ | 126 "parameters": [ |
| 125 { | 127 { |
| 126 "type": "object", | 128 "type": "object", |
| 127 "name": "getInfo", | 129 "name": "getInfo", |
| 128 "optional": true, | 130 "optional": true, |
| 129 "description": "", | 131 "description": "", |
| 130 "properties": { | 132 "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." } | 133 "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." }, |
| 134 "windowTypes": {"type": "array", "items": { "$ref": "WindowType" } , "optional": true, "description": "If set, the $(ref:windows.Window) returned w ill be filtered based on its type. If unset the default filter is set to <code>[ 'normal', 'panel', 'popup']</code>." } | |
| 132 } | 135 } |
| 133 }, | 136 }, |
| 134 { | 137 { |
| 135 "type": "function", | 138 "type": "function", |
| 136 "name": "callback", | 139 "name": "callback", |
| 137 "parameters": [ | 140 "parameters": [ |
| 138 { | 141 { |
| 139 "name": "window", "$ref": "Window" | 142 "name": "window", "$ref": "Window" |
| 140 } | 143 } |
| 141 ] | 144 ] |
| 142 } | 145 } |
| 143 ] | 146 ] |
| 144 }, | 147 }, |
| 145 { | 148 { |
| 146 "name": "getAll", | 149 "name": "getAll", |
| 147 "type": "function", | 150 "type": "function", |
| 148 "description": "Gets all windows.", | 151 "description": "Gets all windows.", |
| 149 "parameters": [ | 152 "parameters": [ |
| 150 { | 153 { |
| 151 "type": "object", | 154 "type": "object", |
| 152 "name": "getInfo", | 155 "name": "getInfo", |
| 153 "optional": true, | 156 "optional": true, |
| 154 "description": "", | 157 "description": "", |
| 155 "properties": { | 158 "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." } | 159 "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." }, |
| 160 "windowTypes": {"type": "array", "items": { "$ref": "WindowType" } , "optional": true, "description": "If set, the $(ref:windows.Window) returned w ill be filtered based on its type. If unset the default filter is set to <code>[ 'normal', 'panel', 'popup']</code>." } | |
| 157 } | 161 } |
| 158 }, | 162 }, |
| 159 { | 163 { |
| 160 "type": "function", | 164 "type": "function", |
| 161 "name": "callback", | 165 "name": "callback", |
| 162 "parameters": [ | 166 "parameters": [ |
| 163 { | 167 { |
| 164 "name": "windows", "type": "array", "items": { "$ref": "Window" } | 168 "name": "windows", "type": "array", "items": { "$ref": "Window" } |
| 165 } | 169 } |
| 166 ] | 170 ] |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 {"type": "integer", "name": "windowId", "minimum": 0}, | 264 {"type": "integer", "name": "windowId", "minimum": 0}, |
| 261 {"type": "function", "name": "callback", "optional": true, "parameters ": []} | 265 {"type": "function", "name": "callback", "optional": true, "parameters ": []} |
| 262 ] | 266 ] |
| 263 } | 267 } |
| 264 ], | 268 ], |
| 265 "events": [ | 269 "events": [ |
| 266 { | 270 { |
| 267 "name": "onCreated", | 271 "name": "onCreated", |
| 268 "type": "function", | 272 "type": "function", |
| 269 "description": "Fired when a window is created.", | 273 "description": "Fired when a window is created.", |
| 274 "filters": [ | |
| 275 { | |
| 276 "name": "windowTypes", | |
| 277 "type": "array", | |
| 278 "items": { "$ref": "WindowType" }, | |
| 279 "description": "Conditions that the window's type being created must satisfy." | |
|
not at google - send to devlin
2015/07/31 21:48:03
"By default it will satisfy...."
and same for the
llandwerlin-old
2015/08/03 10:11:54
Done.
| |
| 280 } | |
| 281 ], | |
| 270 "parameters": [ | 282 "parameters": [ |
| 271 { | 283 { |
| 272 "$ref": "Window", | 284 "$ref": "Window", |
| 273 "name": "window", | 285 "name": "window", |
| 274 "description": "Details of the window that was created." | 286 "description": "Details of the window that was created." |
| 275 } | 287 } |
| 276 ] | 288 ] |
| 277 }, | 289 }, |
| 278 { | 290 { |
| 279 "name": "onRemoved", | 291 "name": "onRemoved", |
| 280 "type": "function", | 292 "type": "function", |
| 281 "description": "Fired when a window is removed (closed).", | 293 "description": "Fired when a window is removed (closed).", |
| 294 "filters": [ | |
| 295 { | |
| 296 "name": "windowTypes", | |
| 297 "type": "array", | |
| 298 "items": { "$ref": "WindowType" }, | |
| 299 "description": "Conditions that the window's type being removed must satisfy." | |
| 300 } | |
| 301 ], | |
| 282 "parameters": [ | 302 "parameters": [ |
| 283 {"type": "integer", "name": "windowId", "minimum": 0, "description": " ID of the removed window."} | 303 {"type": "integer", "name": "windowId", "minimum": 0, "description": " ID of the removed window."} |
| 284 ] | 304 ] |
| 285 }, | 305 }, |
| 286 { | 306 { |
| 287 "name": "onFocusChanged", | 307 "name": "onFocusChanged", |
| 288 "type": "function", | 308 "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.", | 309 "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.", |
| 310 "filters": [ | |
| 311 { | |
| 312 "name": "windowTypes", | |
| 313 "type": "array", | |
| 314 "items": { "$ref": "WindowType" }, | |
| 315 "description": "Conditions that the window's type being removed must satisfy." | |
| 316 } | |
| 317 ], | |
| 290 "parameters": [ | 318 "parameters": [ |
| 291 {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly focused window."} | 319 {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly focused window."} |
| 292 ] | 320 ] |
| 293 } | 321 } |
| 294 ] | 322 ] |
| 295 } | 323 } |
| 296 ] | 324 ] |
| OLD | NEW |