--- a/browser/components/extensions/schemas/windows.json
+++ b/browser/components/extensions/schemas/windows.json
@@ -89,16 +89,37 @@
}
}
},
{
"id": "CreateType",
"type": "string",
"description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.",
"enum": ["normal", "popup", "panel", "detached_panel"]
+ },
+ {
+ "id": "GetInfo",
+ "type": "object",
+ "description": "Specifies whether the $(ref:windows.Window) returned should contain a list of the $(ref:tabs.Tab) objects.",
+ "properties": {
+ "populate": {
+ "type": "boolean",
+ "optional": true,
+ "description": "If true, the $(ref:windows.Window) returned will have a <var>tabs</var> property that 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</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
+ },
+ "windowTypes": {
+ "type": "array",
+ "items": {
+ "$ref": "WindowType"
+ },
+ "optional": true,
+ "deprecated": true,
+ "description": "<code>windowTypes</code> is deprecated and ignored on Firefox."
+ }
+ }
}
],
"properties": {
"WINDOW_ID_NONE": {
"value": -1,
"description": "The windowId value that represents the absence of a browser window."
},
"WINDOW_ID_CURRENT": {
@@ -114,35 +135,19 @@
"async": "callback",
"parameters": [
{
"type": "integer",
"name": "windowId",
"minimum": -2
},
{
- "type": "object",
+ "$ref": "GetInfo",
"name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that 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</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": {
- "$ref": "WindowType"
- },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
+ "optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "window",
"$ref": "Window"
@@ -153,33 +158,19 @@
},
{
"name": "getCurrent",
"type": "function",
"description": "Gets the $(topic:current-window)[current window].",
"async": "callback",
"parameters": [
{
- "type": "object",
+ "$ref": "GetInfo",
"name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that 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</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": { "$ref": "WindowType" },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
+ "optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "window",
"$ref": "Window"
@@ -190,33 +181,19 @@
},
{
"name": "getLastFocused",
"type": "function",
"description": "Gets the window that was most recently focused — typically the window 'on top'.",
"async": "callback",
"parameters": [
{
- "type": "object",
+ "$ref": "GetInfo",
"name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {
- "type": "boolean",
- "optional": true,
- "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that 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</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
- "windowTypes": {
- "type": "array",
- "items": { "$ref": "WindowType" },
- "optional": true,
- "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
- }
- }
+ "optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "window",
"$ref": "Window"
@@ -228,25 +205,21 @@
{
"name": "getAll",
"type": "function",
"description": "Gets all windows.",
"async": "callback",
"parameters": [
{
"type": "object",
+ "$import": "GetInfo",
"name": "getInfo",
"optional": true,
- "description": "",
+ "description": "Specifies properties used to filter the $(ref:windows.Window) returned and to determine whether they should contain a list of the $(ref:tabs.Tab) objects.",
"properties": {
- "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>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
- },
"windowTypes": {
"type": "array",
"items": { "$ref": "WindowType" },
"optional": true,
"description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
}
}
},