mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #65 - Remove AppConstants from dom/
This commit is contained in:
parent
598fe2fa1f
commit
6f34507144
5 changed files with 18 additions and 19 deletions
|
|
@ -13,8 +13,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PeerConnectionIdp",
|
|||
"resource://gre/modules/media/PeerConnectionIdp.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "convertToRTCStatsReport",
|
||||
"resource://gre/modules/media/RTCStatsReport.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
const PC_CONTRACT = "@mozilla.org/dom/peerconnection;1";
|
||||
const PC_OBS_CONTRACT = "@mozilla.org/dom/peerconnectionobserver;1";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ const Ci = Components.interfaces;
|
|||
const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
|
@ -145,13 +144,14 @@ PushRecord.prototype = {
|
|||
return Date.now();
|
||||
}
|
||||
|
||||
if (AppConstants.MOZ_ANDROID_HISTORY) {
|
||||
let result = yield Messaging.sendRequestForResult({
|
||||
type: "History:GetPrePathLastVisitedTimeMilliseconds",
|
||||
prePath: this.uri.prePath,
|
||||
});
|
||||
return result == 0 ? -Infinity : result;
|
||||
}
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
let result = yield Messaging.sendRequestForResult({
|
||||
type: "History:GetPrePathLastVisitedTimeMilliseconds",
|
||||
prePath: this.uri.prePath,
|
||||
});
|
||||
|
||||
return result == 0 ? -Infinity : result;
|
||||
#endif
|
||||
|
||||
// Places History transition types that can fire a
|
||||
// `pushsubscriptionchange` event when the user visits a site with expired push
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ const Ci = Components.interfaces;
|
|||
const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/Timer.jsm");
|
||||
|
|
@ -24,14 +23,14 @@ const {
|
|||
const {PushDB} = Cu.import("resource://gre/modules/PushDB.jsm");
|
||||
|
||||
const CONNECTION_PROTOCOLS = (function() {
|
||||
if ('android' != AppConstants.MOZ_WIDGET_TOOLKIT) {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
const {PushServiceAndroidGCM} = Cu.import("resource://gre/modules/PushServiceAndroidGCM.jsm");
|
||||
return [PushServiceAndroidGCM];
|
||||
#else
|
||||
const {PushServiceWebSocket} = Cu.import("resource://gre/modules/PushServiceWebSocket.jsm");
|
||||
const {PushServiceHttp2} = Cu.import("resource://gre/modules/PushServiceHttp2.jsm");
|
||||
return [PushServiceWebSocket, PushServiceHttp2];
|
||||
} else {
|
||||
const {PushServiceAndroidGCM} = Cu.import("resource://gre/modules/PushServiceAndroidGCM.jsm");
|
||||
return [PushServiceAndroidGCM];
|
||||
}
|
||||
#endif
|
||||
})();
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gPushNotifier",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ const Ci = Components.interfaces;
|
|||
const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
|||
|
|
@ -12,12 +12,15 @@ EXTRA_COMPONENTS += [
|
|||
EXTRA_JS_MODULES += [
|
||||
'PushCrypto.jsm',
|
||||
'PushDB.jsm',
|
||||
'PushRecord.jsm',
|
||||
'PushService.jsm',
|
||||
'PushServiceHttp2.jsm',
|
||||
'PushServiceWebSocket.jsm',
|
||||
]
|
||||
|
||||
EXTRA_PP_JS_MODULES += [
|
||||
'PushRecord.jsm',
|
||||
'PushService.jsm',
|
||||
]
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
'test/mochitest.ini',
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue