From 77bb63790bbd7639e31d3eee7e9053979b6d53c7 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Wed, 9 May 2018 23:32:39 +0200 Subject: [PATCH] Bug 1419132 - Deprecate windowTypes for windows.get, windows.getCurrent and windows.getLastFocused r=mixedpuppy MozReview-Commit-ID: DsaZy3EnXs6 --HG-- extra : rebase_source : dcacbfa86ce8cb07ec05c882e7b13689c72c794e --- .../extensions/schemas/windows.json | 85 +++++++------------ 1 file changed, 29 insertions(+), 56 deletions(-) diff --git a/browser/components/extensions/schemas/windows.json b/browser/components/extensions/schemas/windows.json index 789bb5c59b0d..2ffdfb3367c7 100644 --- a/browser/components/extensions/schemas/windows.json +++ b/browser/components/extensions/schemas/windows.json @@ -94,6 +94,27 @@ "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 tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the \"tabs\" permission." + }, + "windowTypes": { + "type": "array", + "items": { + "$ref": "WindowType" + }, + "optional": true, + "deprecated": true, + "description": "windowTypes is deprecated and ignored on Firefox." + } + } } ], "properties": { @@ -119,25 +140,9 @@ "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 tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the \"tabs\" 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 ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows." - } - } + "optional": true }, { "type": "function", @@ -158,23 +163,9 @@ "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 tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the \"tabs\" 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 ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows." - } - } + "optional": true }, { "type": "function", @@ -195,23 +186,9 @@ "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 tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the \"tabs\" 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 ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows." - } - } + "optional": true }, { "type": "function", @@ -233,15 +210,11 @@ "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 tabs property that contains a list of the $(ref:tabs.Tab) objects for that window. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the \"tabs\" permission." - }, "windowTypes": { "type": "array", "items": { "$ref": "WindowType" },