diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 4ad54f1315c2..8f5792ec2514 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -233,10 +233,6 @@ @RESPATH@/components/HandlerService.js @RESPATH@/components/nsWebHandlerApp.manifest @RESPATH@/components/nsWebHandlerApp.js -@RESPATH@/components/satchel.manifest -@RESPATH@/components/nsFormAutoComplete.js -@RESPATH@/components/FormHistoryStartup.js -@RESPATH@/components/nsInputListAutoComplete.js @RESPATH@/components/contentAreaDropListener.manifest @RESPATH@/components/contentAreaDropListener.js #ifdef XP_MACOSX diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index 0db47e570c89..a6844537da7a 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -165,10 +165,6 @@ @BINPATH@/components/HandlerService.js @BINPATH@/components/nsWebHandlerApp.manifest @BINPATH@/components/nsWebHandlerApp.js -@BINPATH@/components/satchel.manifest -@BINPATH@/components/nsFormAutoComplete.js -@BINPATH@/components/FormHistoryStartup.js -@BINPATH@/components/nsInputListAutoComplete.js @BINPATH@/components/contentAreaDropListener.manifest @BINPATH@/components/contentAreaDropListener.js @BINPATH@/components/servicesComponents.manifest diff --git a/toolkit/components/satchel/nsFormAutoComplete.js b/toolkit/components/satchel/FormAutoComplete.jsm similarity index 99% rename from toolkit/components/satchel/nsFormAutoComplete.js rename to toolkit/components/satchel/FormAutoComplete.jsm index db674bde4807..993584fe4ec5 100644 --- a/toolkit/components/satchel/nsFormAutoComplete.js +++ b/toolkit/components/satchel/FormAutoComplete.jsm @@ -5,7 +5,6 @@ "use strict"; -const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); function isAutocompleteDisabled(aField) { @@ -622,4 +621,4 @@ FormAutoCompleteResult.prototype = { }, }; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FormAutoComplete]); +var EXPORTED_SYMBOLS = ["FormAutoComplete"]; diff --git a/toolkit/components/satchel/FormHistoryStartup.js b/toolkit/components/satchel/FormHistoryStartup.jsm similarity index 96% rename from toolkit/components/satchel/FormHistoryStartup.js rename to toolkit/components/satchel/FormHistoryStartup.jsm index a13dbbccfea8..f1453b7219ec 100644 --- a/toolkit/components/satchel/FormHistoryStartup.js +++ b/toolkit/components/satchel/FormHistoryStartup.jsm @@ -2,7 +2,6 @@ * 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/. */ -const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.defineModuleGetter(this, "FormHistory", @@ -134,4 +133,4 @@ FormHistoryStartup.prototype = { }, }; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FormHistoryStartup]); +var EXPORTED_SYMBOLS = ["FormHistoryStartup"]; diff --git a/toolkit/components/satchel/nsInputListAutoComplete.js b/toolkit/components/satchel/InputListAutoComplete.jsm similarity index 91% rename from toolkit/components/satchel/nsInputListAutoComplete.js rename to toolkit/components/satchel/InputListAutoComplete.jsm index 120dea45bc17..780d68feb310 100644 --- a/toolkit/components/satchel/nsInputListAutoComplete.js +++ b/toolkit/components/satchel/InputListAutoComplete.jsm @@ -2,7 +2,6 @@ * 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/. */ -const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); const {FormAutoCompleteResult} = ChromeUtils.import("resource://gre/modules/nsFormAutoCompleteResult.jsm"); @@ -62,5 +61,4 @@ InputListAutoComplete.prototype = { }, }; -var component = [InputListAutoComplete]; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory(component); +var EXPORTED_SYMBOLS = ["InputListAutoComplete"]; diff --git a/toolkit/components/satchel/components.conf b/toolkit/components/satchel/components.conf index 4fa16ac0c945..2702230abec4 100644 --- a/toolkit/components/satchel/components.conf +++ b/toolkit/components/satchel/components.conf @@ -14,4 +14,24 @@ Classes = [ 'type': 'nsFormFillController', 'headers': ['/toolkit/components/satchel/nsFormFillController.h'], }, + + { + 'cid': '{c11c21b2-71c9-4f87-a0f8-5e13f50495fd}', + 'contract_ids': ['@mozilla.org/satchel/form-autocomplete;1'], + 'jsm': 'resource://gre/modules/FormAutoComplete.jsm', + 'constructor': 'FormAutoComplete', + }, + { + 'cid': '{bf1e01d0-953e-11df-981c-0800200c9a66}', + 'contract_ids': ['@mozilla.org/satchel/inputlist-autocomplete;1'], + 'jsm': 'resource://gre/modules/InputListAutoComplete.jsm', + 'constructor': 'InputListAutoComplete', + }, + { + 'cid': '{3a0012eb-007f-4bb8-aa81-a07385f77a25}', + 'contract_ids': ['@mozilla.org/satchel/form-history-startup;1'], + 'jsm': 'resource://gre/modules/FormHistoryStartup.jsm', + 'constructor': 'FormHistoryStartup', + 'categories': {'profile-after-change': 'formHistoryStartup'}, + }, ] diff --git a/toolkit/components/satchel/moz.build b/toolkit/components/satchel/moz.build index d184a756a597..ecdf1be5922a 100644 --- a/toolkit/components/satchel/moz.build +++ b/toolkit/components/satchel/moz.build @@ -27,16 +27,12 @@ LOCAL_INCLUDES += [ '../build', ] -EXTRA_COMPONENTS += [ - 'FormHistoryStartup.js', - 'nsFormAutoComplete.js', - 'nsInputListAutoComplete.js', - 'satchel.manifest', -] - EXTRA_JS_MODULES += [ 'AutoCompletePopup.jsm', + 'FormAutoComplete.jsm', 'FormHistory.jsm', + 'FormHistoryStartup.jsm', + 'InputListAutoComplete.jsm', 'nsFormAutoCompleteResult.jsm', ] diff --git a/toolkit/components/satchel/satchel.manifest b/toolkit/components/satchel/satchel.manifest deleted file mode 100644 index a435f780b4ab..000000000000 --- a/toolkit/components/satchel/satchel.manifest +++ /dev/null @@ -1,7 +0,0 @@ -component {c11c21b2-71c9-4f87-a0f8-5e13f50495fd} nsFormAutoComplete.js -contract @mozilla.org/satchel/form-autocomplete;1 {c11c21b2-71c9-4f87-a0f8-5e13f50495fd} -component {bf1e01d0-953e-11df-981c-0800200c9a66} nsInputListAutoComplete.js -contract @mozilla.org/satchel/inputlist-autocomplete;1 {bf1e01d0-953e-11df-981c-0800200c9a66} -component {3a0012eb-007f-4bb8-aa81-a07385f77a25} FormHistoryStartup.js -contract @mozilla.org/satchel/form-history-startup;1 {3a0012eb-007f-4bb8-aa81-a07385f77a25} -category profile-after-change formHistoryStartup @mozilla.org/satchel/form-history-startup;1