diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 1a5bf5358de6..fa0f3abeba1e 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -232,9 +232,6 @@ @RESPATH@/defaults/pref/marionette.js #endif -@RESPATH@/components/BuiltinProviders.manifest -@RESPATH@/components/PresentationControlService.js - #if defined(ENABLE_TESTS) && defined(MOZ_DEBUG) @RESPATH@/components/TestInterfaceJS.js @RESPATH@/components/TestInterfaceJS.manifest diff --git a/dom/presentation/provider/BuiltinProviders.manifest b/dom/presentation/provider/BuiltinProviders.manifest deleted file mode 100644 index 0ba7bcaa704f..000000000000 --- a/dom/presentation/provider/BuiltinProviders.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {f4079b8b-ede5-4b90-a112-5b415a931deb} PresentationControlService.js -contract @mozilla.org/presentation/control-service;1 {f4079b8b-ede5-4b90-a112-5b415a931deb} diff --git a/dom/presentation/provider/PresentationControlService.js b/dom/presentation/provider/PresentationControlService.jsm similarity index 99% rename from dom/presentation/provider/PresentationControlService.js rename to dom/presentation/provider/PresentationControlService.jsm index 44f4c101d547..8bff617d28ae 100644 --- a/dom/presentation/provider/PresentationControlService.js +++ b/dom/presentation/provider/PresentationControlService.jsm @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); const {clearTimeout, setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm"); @@ -947,4 +946,4 @@ TCPControlChannel.prototype = { Ci.nsIStreamListener]), }; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PresentationControlService]); // jshint ignore:line +var EXPORTED_SYMBOLS = ["PresentationControlService"]; diff --git a/dom/presentation/provider/components.conf b/dom/presentation/provider/components.conf index 4ab5cbaad421..0e170aafb1bd 100644 --- a/dom/presentation/provider/components.conf +++ b/dom/presentation/provider/components.conf @@ -17,4 +17,10 @@ Classes = [ 'headers': ['/dom/presentation/provider/MulticastDNSDeviceProvider.h'], 'categories': categories, }, + { + 'cid': '{f4079b8b-ede5-4b90-a112-5b415a931deb}', + 'contract_ids': ['@mozilla.org/presentation/control-service;1'], + 'jsm': 'resource://gre/modules/PresentationControlService.jsm', + 'constructor': 'PresentationControlService', + }, ] diff --git a/dom/presentation/provider/moz.build b/dom/presentation/provider/moz.build index bae962a95ed5..d791d4a5e300 100644 --- a/dom/presentation/provider/moz.build +++ b/dom/presentation/provider/moz.build @@ -4,9 +4,8 @@ # 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/. -EXTRA_COMPONENTS += [ - 'BuiltinProviders.manifest', - 'PresentationControlService.js' +EXTRA_JS_MODULES += [ + 'PresentationControlService.jsm' ] UNIFIED_SOURCES += [ diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index f03b2e12c5b0..10a5f308183d 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -150,8 +150,6 @@ #endif #ifndef MOZ_GECKOVIEW_JAR -@BINPATH@/components/BuiltinProviders.manifest -@BINPATH@/components/PresentationControlService.js @BINPATH@/components/PresentationNetworkHelper.js @BINPATH@/components/PresentationNetworkHelper.manifest @BINPATH@/components/AndroidCastDeviceProvider.manifest