diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-11 06:56:30 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-11 06:56:30 -0500 |
commit | 14bfaf641a10699258070219fec13d48c56d2e62 (patch) | |
tree | e44411d04b319a984a6feb33c69416f2c97a6bf7 /browser | |
parent | f2cad418a7aa84993faae333481bf2d6e5574270 (diff) | |
download | UXP-14bfaf641a10699258070219fec13d48c56d2e62.tar UXP-14bfaf641a10699258070219fec13d48c56d2e62.tar.gz UXP-14bfaf641a10699258070219fec13d48c56d2e62.tar.lz UXP-14bfaf641a10699258070219fec13d48c56d2e62.tar.xz UXP-14bfaf641a10699258070219fec13d48c56d2e62.zip |
Make Basilisk function without WebExtensions
Diffstat (limited to 'browser')
-rw-r--r-- | browser/base/content/tab-content.js | 4 | ||||
-rw-r--r-- | browser/base/content/urlbarBindings.xml | 7 | ||||
-rw-r--r-- | browser/base/jar.mn | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js index 06fa3d9cc..05f8e00ab 100644 --- a/browser/base/content/tab-content.js +++ b/browser/base/content/tab-content.js @@ -9,7 +9,9 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); +#ifdef MOZ_WEBEXTENSIONS Cu.import("resource://gre/modules/ExtensionContent.jsm"); +#endif XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils", "resource:///modules/E10SUtils.jsm"); @@ -929,11 +931,13 @@ var UserContextIdNotifier = { UserContextIdNotifier.init(); +#ifdef MOZ_WEBEXTENSIONS ExtensionContent.init(this); addEventListener("unload", () => { ExtensionContent.uninit(this); RefreshBlocker.uninit(); }); +#endif addMessageListener("AllowScriptsToClose", () => { content.QueryInterface(Ci.nsIInterfaceRequestor) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 689c7c5a7..eb3150581 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -56,10 +56,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. <field name="AppConstants" readonly="true"> (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; </field> - +#ifdef MOZ_WEBEXTENSIONS <field name="ExtensionSearchHandler" readonly="true"> (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler; </field> +#endif <constructor><![CDATA[ this._prefs = Components.classes["@mozilla.org/preferences-service;1"] @@ -487,6 +488,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. actionDetails ); break; +#ifdef MOZ_WEBEXTENSIONS case "extension": this.handleRevert(); // Give the extension control of handling the command. @@ -494,6 +496,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. let keyword = action.params.keyword; this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where); return; +#endif } } else { // This is a fallback for add-ons and old testing code that directly @@ -1211,9 +1214,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. this._clearNoActions(); this.formatValue(); } +#ifdef MOZ_WEBEXTENSIONS if (ExtensionSearchHandler.hasActiveInputSession()) { ExtensionSearchHandler.handleInputCancelled(); } +#endif ]]></handler> <handler event="dragstart" phase="capturing"><![CDATA[ diff --git a/browser/base/jar.mn b/browser/base/jar.mn index 38b103c43..c9dbbbb9f 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -99,7 +99,7 @@ browser.jar: #endif content/browser/browser-thumbnails.js (content/browser-thumbnails.js) content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js) - content/browser/tab-content.js (content/tab-content.js) +* content/browser/tab-content.js (content/tab-content.js) content/browser/content.js (content/content.js) content/browser/social-content.js (content/social-content.js) content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg) @@ -166,7 +166,7 @@ browser.jar: content/browser/contentSearchUI.css (content/contentSearchUI.css) content/browser/tabbrowser.css (content/tabbrowser.css) content/browser/tabbrowser.xml (content/tabbrowser.xml) - content/browser/urlbarBindings.xml (content/urlbarBindings.xml) +* content/browser/urlbarBindings.xml (content/urlbarBindings.xml) content/browser/utilityOverlay.js (content/utilityOverlay.js) content/browser/usercontext.svg (content/usercontext.svg) content/browser/web-panels.js (content/web-panels.js) |