Bug 1331742 - Part 1 - Create and register browser_action.json r?mixedpuppy draft
authorMatthew Wein <mwein@mozilla.com>
Wed, 15 Mar 2017 21:02:56 -0400
changeset 579232 1de5b9586b207da69e92eb2810f00af2d0cfe20e
parent 579118 41958333867b0f537271dbd4cb4ba9e8a67a85a8
child 579233 1f857d907e2432858d22f85f7222e35ada3b4a8e
push id59171
push usermwein@mozilla.com
push dateWed, 17 May 2017 03:56:37 +0000
reviewersmixedpuppy
bugs1331742
milestone55.0a1
Bug 1331742 - Part 1 - Create and register browser_action.json r?mixedpuppy MozReview-Commit-ID: AwYuTDU3Ki4
mobile/android/components/extensions/extensions-mobile.manifest
mobile/android/components/extensions/schemas/browser_action.json
mobile/android/components/extensions/schemas/jar.mn
--- a/mobile/android/components/extensions/extensions-mobile.manifest
+++ b/mobile/android/components/extensions/extensions-mobile.manifest
@@ -1,4 +1,4 @@
-# scripts
+# modules
 category webextension-scripts android chrome://browser/content/ext-android.js
 category webextension-scripts utils chrome://browser/content/ext-utils.js
 category webextension-scripts-addon android chrome://browser/content/ext-c-android.js
copy from browser/components/extensions/schemas/browser_action.json
copy to mobile/android/components/extensions/schemas/browser_action.json
--- a/browser/components/extensions/schemas/browser_action.json
+++ b/mobile/android/components/extensions/schemas/browser_action.json
@@ -15,32 +15,36 @@
             "properties": {
               "default_title": {
                 "type": "string",
                 "optional": true,
                 "preprocess": "localize"
               },
               "default_icon": {
                 "$ref": "IconPath",
+                "unsupported": true,
                 "optional": true
               },
               "default_popup": {
                 "type": "string",
                 "format": "relativeUrl",
+                "unsupported": true,
                 "optional": true,
                 "preprocess": "localize"
               },
               "browser_style": {
                 "type": "boolean",
+                "unsupported": true,
                 "optional": true
               },
               "default_area": {
                 "description": "Defines the location the browserAction will appear by default.  The default location is navbar.",
                 "type": "string",
                 "enum": ["navbar", "menupanel", "tabstrip", "personaltoolbar"],
+                "unsupported": true,
                 "optional": true
               }
             },
             "optional": true
           }
         }
       }
     ]
@@ -68,16 +72,17 @@
         "additionalProperties": { "type": "any" },
         "postprocess": "convertImageDataToURL",
         "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)."
       }
     ],
     "functions": [
       {
         "name": "setTitle",
+        "unsupported": true,
         "type": "function",
         "description": "Sets the title of the browser action. This shows up in the tooltip.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -97,16 +102,17 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "getTitle",
+        "unsupported": true,
         "type": "function",
         "description": "Gets the title of the browser action.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -126,16 +132,17 @@
                 "type": "string"
               }
             ]
           }
         ]
       },
       {
         "name": "setIcon",
+        "unsupported": true,
         "type": "function",
         "description": "Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -173,16 +180,17 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "setPopup",
+        "unsupported": true,
         "type": "function",
         "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -203,16 +211,17 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "getPopup",
+        "unsupported": true,
         "type": "function",
         "description": "Gets the html document set as the popup for this browser action.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -232,16 +241,17 @@
                 "type": "string"
               }
             ]
           }
         ]
       },
       {
         "name": "setBadgeText",
+        "unsupported": true,
         "type": "function",
         "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -261,16 +271,17 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "getBadgeText",
+        "unsupported": true,
         "type": "function",
         "description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -290,16 +301,17 @@
                 "type": "string"
               }
             ]
           }
         ]
       },
       {
         "name": "setBadgeBackgroundColor",
+        "unsupported": true,
         "type": "function",
         "description": "Sets the background color for the badge.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -322,16 +334,17 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "getBadgeBackgroundColor",
+        "unsupported": true,
         "type": "function",
         "description": "Gets the background color of the browser action.",
         "async": "callback",
         "parameters": [
           {
             "name": "details",
             "type": "object",
             "properties": {
@@ -351,16 +364,17 @@
                 "$ref": "ColorArray"
               }
             ]
           }
         ]
       },
       {
         "name": "enable",
+        "unsupported": true,
         "type": "function",
         "description": "Enables the browser action for a tab. By default, browser actions are enabled.",
         "async": "callback",
         "parameters": [
           {
             "type": "integer",
             "optional": true,
             "name": "tabId",
@@ -372,16 +386,17 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "disable",
+        "unsupported": true,
         "type": "function",
         "description": "Disables the browser action for a tab.",
         "async": "callback",
         "parameters": [
           {
             "type": "integer",
             "optional": true,
             "name": "tabId",
@@ -393,19 +408,19 @@
             "name": "callback",
             "optional": true,
             "parameters": []
           }
         ]
       },
       {
         "name": "openPopup",
+        "unsupported": true,
         "type": "function",
         "description": "Opens the extension popup window in the active window but does not grant tab permissions.",
-        "unsupported": true,
         "async": "callback",
         "parameters": [
           {
             "type": "function",
             "name": "callback",
             "parameters": [
               {
                 "name": "popupView",
--- a/mobile/android/components/extensions/schemas/jar.mn
+++ b/mobile/android/components/extensions/schemas/jar.mn
@@ -1,7 +1,8 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 chrome.jar:
+    content/schemas/browser_action.json
     content/schemas/page_action.json
     content/schemas/tabs.json