Bug 1524688: Part 49 - Convert AndroidCastDataProvider to static registration. r=snorp

Differential Revision: https://phabricator.services.mozilla.com/D18459

--HG--
rename : dom/presentation/provider/AndroidCastDeviceProvider.js => dom/presentation/provider/AndroidCastDeviceProvider.jsm
extra : rebase_source : d48edac2c7aaa621edbeea2e32000641b205bd94
This commit is contained in:
Kris Maglione 2019-01-30 11:22:18 -08:00
Родитель d07a8dc03a
Коммит 1adbb5c86d
5 изменённых файлов: 14 добавлений и 11 удалений

Просмотреть файл

@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; "use strict";
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {EventDispatcher} = ChromeUtils.import("resource://gre/modules/Messaging.jsm"); const {EventDispatcher} = ChromeUtils.import("resource://gre/modules/Messaging.jsm");
@ -460,4 +459,4 @@ AndroidCastDeviceProvider.prototype = {
Ci.nsIPresentationDeviceProvider]), Ci.nsIPresentationDeviceProvider]),
}; };
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AndroidCastDeviceProvider]); var EXPORTED_SYMBOLS = ["AndroidCastDeviceProvider"];

Просмотреть файл

@ -1,4 +0,0 @@
# AndroidCastDeviceProvider.js
component {7394f24c-dbc3-48c8-8a47-cd10169b7c6b} AndroidCastDeviceProvider.js
contract @mozilla.org/presentation-device/android-cast-device-provider;1 {7394f24c-dbc3-48c8-8a47-cd10169b7c6b}
category presentation-device-provider AndroidCastDeviceProvider @mozilla.org/presentation-device/android-cast-device-provider;1

Просмотреть файл

@ -24,3 +24,14 @@ Classes = [
'constructor': 'PresentationControlService', 'constructor': 'PresentationControlService',
}, },
] ]
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'android':
Classes += [
{
'cid': '{7394f24c-dbc3-48c8-8a47-cd10169b7c6b}',
'contract_ids': ['@mozilla.org/presentation-device/android-cast-device-provider;1'],
'jsm': 'resource://gre/modules/AndroidCastDeviceProvider.jsm',
'constructor': 'AndroidCastDeviceProvider',
'categories': {'presentation-device-provider': 'AndroidCastDeviceProvider'},
},
]

Просмотреть файл

@ -24,10 +24,9 @@ EXTRA_JS_MODULES.presentation += [
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
EXTRA_COMPONENTS += [ EXTRA_JS_MODULES += [
# For android presentation device # For android presentation device
'AndroidCastDeviceProvider.js', 'AndroidCastDeviceProvider.jsm',
'AndroidCastDeviceProvider.manifest',
] ]
include('/ipc/chromium/chromium-config.mozbuild') include('/ipc/chromium/chromium-config.mozbuild')

Просмотреть файл

@ -152,8 +152,6 @@
#ifndef MOZ_GECKOVIEW_JAR #ifndef MOZ_GECKOVIEW_JAR
@BINPATH@/components/PresentationNetworkHelper.js @BINPATH@/components/PresentationNetworkHelper.js
@BINPATH@/components/PresentationNetworkHelper.manifest @BINPATH@/components/PresentationNetworkHelper.manifest
@BINPATH@/components/AndroidCastDeviceProvider.manifest
@BINPATH@/components/AndroidCastDeviceProvider.js
#endif #endif
; Modules ; Modules