Bug 1615926 - Update windows API documentation to reflect unused window type arguments. r=mkmelin a=wsmwk
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 18 Jun 2020 13:56:32 +0300
changeset 39423 19d051a4e20875f2ba9f2b43516d5bf4e850ac4f
parent 39422 bdc39dddf821f2c0c1a716f3d2051d176cae935a
child 39424 3c83aafae22feafa3dacae5ce17c84977c24a80e
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersmkmelin, wsmwk
bugs1615926
Bug 1615926 - Update windows API documentation to reflect unused window type arguments. r=mkmelin a=wsmwk
mail/components/extensions/schemas/windows.json
--- a/mail/components/extensions/schemas/windows.json
+++ b/mail/components/extensions/schemas/windows.json
@@ -93,16 +93,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 Thunderbird."
+          }
+        }
       }
     ],
     "properties": {
       "WINDOW_ID_NONE": {
         "value": -1,
         "description": "The windowId value that represents the absence of a window."
       },
       "WINDOW_ID_CURRENT": {
@@ -118,35 +139,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"
@@ -157,33 +162,19 @@
       },
       {
         "name": "getCurrent",
         "type": "function",
         "description": "Gets the 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"
@@ -194,33 +185,19 @@
       },
       {
         "name": "getLastFocused",
         "type": "function",
         "description": "Gets the window that was most recently focused &mdash; 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"
@@ -232,30 +209,26 @@
       {
         "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."
+                "description": "If set, the :ref:`windows.Window` returned will be filtered based on its type."
               }
             }
           },
           {
             "type": "function",
             "name": "callback",
             "parameters": [
               {