Bug 1644000 - Enable browser.identity API. r=mkmelin a=wsmwk
authorGeoff Lankow <geoff@darktrojan.net>
Mon, 08 Jun 2020 16:28:07 +1200
changeset 39376 8e1be3cfb3bf7b79f773d4e892ca8108e56db44e
parent 39375 fe58bace9f3c314b821d30c7bb7228700489b8b6
child 39377 c528abeeaad329d57352c93dd4f39eefbda82016
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersmkmelin, wsmwk
bugs1644000
Bug 1644000 - Enable browser.identity API. r=mkmelin a=wsmwk
mail/components/customizableui/CustomizableUI.jsm
mail/components/enterprisepolicies/Policies.jsm
mail/components/extensions/child/ext-mail.js
mail/components/extensions/ext-mail.json
mail/confvars.sh
--- a/mail/components/customizableui/CustomizableUI.jsm
+++ b/mail/components/customizableui/CustomizableUI.jsm
@@ -45,17 +45,17 @@ const kPrefCustomizationState = "browser
 const kPrefCustomizationAutoAdd = "browser.uiCustomization.autoAdd";
 const kPrefCustomizationDebug = "browser.uiCustomization.debug";
 const kPrefDrawInTitlebar = "browser.tabs.drawInTitlebar";
 const kPrefExtraDragSpace = "browser.tabs.extraDragSpace";
 const kPrefUIDensity = "browser.uidensity";
 const kPrefAutoTouchMode = "browser.touchmode.auto";
 const kPrefAutoHideDownloadsButton = "browser.download.autohideButton";
 
-const kExpectedWindowURL = AppConstants.BROWSER_CHROME_URL;
+const kExpectedWindowURL = "chrome://messenger/content/messenger.xhtml";
 
 var gDefaultTheme;
 var gSelectedTheme;
 
 /**
  * The keys are the handlers that are fired when the event type (the value)
  * is fired on the subview. A widget that provides a subview has the option
  * of providing onViewShowing and onViewHiding event handlers.
--- a/mail/components/enterprisepolicies/Policies.jsm
+++ b/mail/components/enterprisepolicies/Policies.jsm
@@ -936,17 +936,16 @@ function blockAboutPage(manager, feature
 
 let ChromeURLBlockPolicy = {
   shouldLoad(contentLocation, loadInfo, mimeTypeGuess) {
     let contentType = loadInfo.externalContentPolicyType;
     if (
       contentLocation.scheme == "chrome" &&
       contentType == Ci.nsIContentPolicy.TYPE_DOCUMENT &&
       loadInfo.loadingContext &&
-      loadInfo.loadingContext.baseURI == AppConstants.BROWSER_CHROME_URL &&
       contentLocation.host != "mochitests" &&
       contentLocation.host != "devtools"
     ) {
       return Ci.nsIContentPolicy.REJECT_REQUEST;
     }
     return Ci.nsIContentPolicy.ACCEPT;
   },
   shouldProcess(contentLocation, loadInfo, mimeTypeGuess) {
--- a/mail/components/extensions/child/ext-mail.js
+++ b/mail/components/extensions/child/ext-mail.js
@@ -10,16 +10,21 @@ extensions.registerModules({
     scopes: ["addon_child"],
     paths: [["compose"]],
   },
   composeScripts: {
     url: "chrome://messenger/content/child/ext-composeScripts.js",
     scopes: ["addon_child"],
     paths: [["composeScripts"]],
   },
+  identity: {
+    url: "chrome://extensions/content/child/ext-identity.js",
+    scopes: ["addon_child"],
+    paths: [["identity"]],
+  },
   menus: {
     url: "chrome://messenger/content/child/ext-menus.js",
     scopes: ["addon_child"],
     paths: [["menus"]],
   },
   tabs: {
     url: "chrome://messenger/content/child/ext-tabs.js",
     scopes: ["addon_child"],
--- a/mail/components/extensions/ext-mail.json
+++ b/mail/components/extensions/ext-mail.json
@@ -88,16 +88,24 @@
   "geckoProfiler": {
     "url": "chrome://extensions/content/parent/ext-geckoProfiler.js",
     "schema": "chrome://extensions/content/schemas/geckoProfiler.json",
     "scopes": ["addon_parent"],
     "paths": [
       ["geckoProfiler"]
     ]
   },
+  "identity": {
+    "url": "chrome://extensions/content/parent/ext-identity.js",
+    "schema": "chrome://extensions/content/schemas/identity.json",
+    "scopes": ["addon_parent"],
+    "paths": [
+      ["identity"]
+    ]
+  },
   "mailTabs": {
     "url": "chrome://messenger/content/parent/ext-mailTabs.js",
     "schema": "chrome://messenger/content/schemas/mailTabs.json",
     "scopes": ["addon_parent"],
     "manifest": ["mailTabs"],
     "paths": [
       ["mailTabs"]
     ]
--- a/mail/confvars.sh
+++ b/mail/confvars.sh
@@ -8,17 +8,17 @@ MOZ_APP_NAME=thunderbird
 MOZ_UPDATER=1
 
 if test "$OS_ARCH" = "WINNT"; then
   if ! test "$HAVE_64BIT_BUILD"; then
     MOZ_VERIFY_MAR_SIGNATURE=1
   fi
 fi
 
-BROWSER_CHROME_URL=chrome://messenger/content/messengercompose/messengercompose.xhtml
+BROWSER_CHROME_URL=chrome://messenger/content/extensionPopup.xhtml
 
 MOZ_BRANDING_DIRECTORY=$commreltopsrcdir/mail/branding/nightly
 MOZ_OFFICIAL_BRANDING_DIRECTORY=$commreltopsrcdir/mail/branding/thunderbird
 
 MOZ_APP_ID={3550f703-e582-4d05-9a08-453d09bdfdc6}
 
 MOZ_PROFILE_MIGRATOR=1
 MOZ_BINARY_EXTENSIONS=1