mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset cbbd94e6ab32 (bug 861496) for mochitest-2 orange.
This commit is contained in:
parent
20552ff39b
commit
02895b907e
@ -518,8 +518,6 @@ pref("ui.click_hold_context_menus.delay", 750);
|
||||
// Enable device storage
|
||||
pref("device.storage.enabled", true);
|
||||
|
||||
// Enable system message
|
||||
pref("dom.sysmsg.enabled", true);
|
||||
pref("media.plugins.enabled", false);
|
||||
pref("media.omx.enabled", true);
|
||||
|
||||
|
@ -46,6 +46,7 @@ MOZ_MEDIA_NAVIGATOR=1
|
||||
MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61}
|
||||
MOZ_EXTENSION_MANAGER=1
|
||||
|
||||
MOZ_SYS_MSG=1
|
||||
MOZ_TIME_MANAGER=1
|
||||
|
||||
MOZ_B2G_CERTDATA=1
|
||||
|
@ -4264,6 +4264,7 @@ MOZ_WEBSMS_BACKEND=
|
||||
MOZ_ANDROID_WALLPAPER=
|
||||
MOZ_ANDROID_BEAM=
|
||||
ACCESSIBILITY=1
|
||||
MOZ_SYS_MSG=
|
||||
MOZ_TIME_MANAGER=
|
||||
MOZ_PAY=
|
||||
MOZ_AUDIO_CHANNEL_MANAGER=
|
||||
@ -7624,6 +7625,14 @@ if test -n "$MOZ_B2G_BT"; then
|
||||
fi
|
||||
AC_SUBST(MOZ_B2G_BT)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable Support for System Messages API
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_SYS_MSG"; then
|
||||
AC_DEFINE(MOZ_SYS_MSG)
|
||||
fi
|
||||
AC_SUBST(MOZ_SYS_MSG)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable Support for Time Manager API
|
||||
dnl ========================================================
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "DOMRequest.h"
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "nsIActivityProxy.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#define NS_DOMACTIVITY_CID \
|
||||
{0x1c5b0930, 0xc90c, 0x4e9c, {0xaf, 0x4e, 0xb0, 0xb7, 0xa6, 0x59, 0xb4, 0xed}}
|
||||
@ -29,7 +28,11 @@ public:
|
||||
|
||||
static bool PrefEnabled()
|
||||
{
|
||||
return Preferences::GetBool("dom.sysmsg.enabled", false);
|
||||
#ifdef MOZ_SYS_MSG
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static already_AddRefed<Activity>
|
||||
|
@ -25,14 +25,6 @@ function debug(aMsg) {
|
||||
//dump("-*-*- Webapps.jsm : " + aMsg + "\n");
|
||||
}
|
||||
|
||||
let cachedSysMsgPref = null;
|
||||
function supportSystemMessages() {
|
||||
if (_sysMsgPref === null) {
|
||||
cachedSysMsgPref = Services.prefs.getBoolPref("dom.sysmsg.enabled");
|
||||
}
|
||||
return cachedSysMsgPref;
|
||||
}
|
||||
|
||||
// Minimum delay between two progress events while downloading, in ms.
|
||||
const MIN_PROGRESS_EVENT_DELAY = 1000;
|
||||
|
||||
@ -188,21 +180,21 @@ this.DOMApplicationRegistry = {
|
||||
for (let id in this.webapps) {
|
||||
ids.push({ id: id });
|
||||
}
|
||||
if (supportSystemMessages()) {
|
||||
this._processManifestForIds(ids, aRunUpdate);
|
||||
} else {
|
||||
// Read the CSPs. If MOZ_SYS_MSG is defined this is done on
|
||||
// _processManifestForIds so as to not reading the manifests
|
||||
// twice
|
||||
this._readManifests(ids, (function readCSPs(aResults) {
|
||||
aResults.forEach(function registerManifest(aResult) {
|
||||
this.webapps[aResult.id].csp = aResult.manifest.csp || "";
|
||||
}, this);
|
||||
}).bind(this));
|
||||
#ifdef MOZ_SYS_MSG
|
||||
this._processManifestForIds(ids, aRunUpdate);
|
||||
#else
|
||||
// Read the CSPs. If MOZ_SYS_MSG is defined this is done on
|
||||
// _processManifestForIds so as to not reading the manifests
|
||||
// twice
|
||||
this._readManifests(ids, (function readCSPs(aResults) {
|
||||
aResults.forEach(function registerManifest(aResult) {
|
||||
this.webapps[aResult.id].csp = aResult.manifest.csp || "";
|
||||
}, this);
|
||||
}).bind(this));
|
||||
|
||||
// Nothing else to do but notifying we're ready.
|
||||
this.notifyAppsRegistryReady();
|
||||
}
|
||||
// Nothing else to do but notifying we're ready.
|
||||
this.notifyAppsRegistryReady();
|
||||
#endif
|
||||
},
|
||||
|
||||
updatePermissionsForApp: function updatePermissionsForApp(aId) {
|
||||
@ -447,6 +439,7 @@ this.DOMApplicationRegistry = {
|
||||
}).bind(this));
|
||||
},
|
||||
|
||||
#ifdef MOZ_SYS_MSG
|
||||
// |aEntryPoint| is either the entry_point name or the null in which case we
|
||||
// use the root of the manifest.
|
||||
_registerSystemMessagesForEntryPoint: function(aManifest, aApp, aEntryPoint) {
|
||||
@ -664,6 +657,7 @@ this.DOMApplicationRegistry = {
|
||||
this._registerActivitiesForApps(appsToRegister, aRunUpdate);
|
||||
}).bind(this));
|
||||
},
|
||||
#endif
|
||||
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
if (aTopic == "xpcom-shutdown") {
|
||||
@ -1290,17 +1284,16 @@ this.DOMApplicationRegistry = {
|
||||
updateAppHandlers: function(aOldManifest, aNewManifest, aApp) {
|
||||
debug("updateAppHandlers: old=" + aOldManifest + " new=" + aNewManifest);
|
||||
this.notifyAppsRegistryStart();
|
||||
|
||||
if (supportSystemMessages()) {
|
||||
if (aOldManifest) {
|
||||
this._unregisterActivities(aOldManifest, aApp);
|
||||
}
|
||||
this._registerSystemMessages(aNewManifest, aApp);
|
||||
this._registerActivities(aNewManifest, aApp, true);
|
||||
} else {
|
||||
// Nothing else to do but notifying we're ready.
|
||||
this.notifyAppsRegistryReady();
|
||||
#ifdef MOZ_SYS_MSG
|
||||
if (aOldManifest) {
|
||||
this._unregisterActivities(aOldManifest, aApp);
|
||||
}
|
||||
this._registerSystemMessages(aNewManifest, aApp);
|
||||
this._registerActivities(aNewManifest, aApp, true);
|
||||
#else
|
||||
// Nothing else to do but notifying we're ready.
|
||||
this.notifyAppsRegistryReady();
|
||||
#endif
|
||||
},
|
||||
|
||||
checkForUpdate: function(aData, aMm) {
|
||||
@ -2493,11 +2486,11 @@ this.DOMApplicationRegistry = {
|
||||
let appNote = JSON.stringify(AppsUtils.cloneAppObject(app));
|
||||
appNote.id = id;
|
||||
|
||||
if (supportSystemMessages()) {
|
||||
this._readManifests([{ id: id }], (function unregisterManifest(aResult) {
|
||||
this._unregisterActivities(aResult[0].manifest, app);
|
||||
}).bind(this));
|
||||
}
|
||||
#ifdef MOZ_SYS_MSG
|
||||
this._readManifests([{ id: id }], (function unregisterManifest(aResult) {
|
||||
this._unregisterActivities(aResult[0].manifest, app);
|
||||
}).bind(this));
|
||||
#endif
|
||||
|
||||
let dir = this._getAppDir(id);
|
||||
try {
|
||||
|
@ -225,9 +225,11 @@ Navigator::Invalidate()
|
||||
|
||||
mCameraManager = nullptr;
|
||||
|
||||
#ifdef MOZ_SYS_MSG
|
||||
if (mMessagesManager) {
|
||||
mMessagesManager = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
|
||||
if (mAudioChannelManager) {
|
||||
@ -1409,6 +1411,7 @@ Navigator::GetMozBluetooth(nsIDOMBluetoothManager** aBluetooth)
|
||||
//*****************************************************************************
|
||||
// nsNavigator::nsIDOMNavigatorSystemMessages
|
||||
//*****************************************************************************
|
||||
#ifdef MOZ_SYS_MSG
|
||||
nsresult
|
||||
Navigator::EnsureMessagesManager()
|
||||
{
|
||||
@ -1436,33 +1439,34 @@ Navigator::EnsureMessagesManager()
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
Navigator::MozHasPendingMessage(const nsAString& aType, bool *aResult)
|
||||
{
|
||||
if (!Preferences::GetBool("dom.sysmsg.enabled", false)) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#ifdef MOZ_SYS_MSG
|
||||
*aResult = false;
|
||||
nsresult rv = EnsureMessagesManager();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return mMessagesManager->MozHasPendingMessage(aType, aResult);
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Navigator::MozSetMessageHandler(const nsAString& aType,
|
||||
nsIDOMSystemMessageCallback *aCallback)
|
||||
{
|
||||
if (!Preferences::GetBool("dom.sysmsg.enabled", false)) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#ifdef MOZ_SYS_MSG
|
||||
nsresult rv = EnsureMessagesManager();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return mMessagesManager->MozSetMessageHandler(aType, aCallback);
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
|
@ -186,9 +186,10 @@ public:
|
||||
*/
|
||||
void OnNavigation();
|
||||
|
||||
#ifdef MOZ_SYS_MSG
|
||||
// Helper to initialize mMessagesManager.
|
||||
nsresult EnsureMessagesManager();
|
||||
|
||||
#endif
|
||||
NS_DECL_NSIDOMNAVIGATORCAMERA
|
||||
|
||||
private:
|
||||
|
@ -284,8 +284,6 @@ using mozilla::dom::workers::ResolveWorkerClasses;
|
||||
|
||||
#include "nsIDOMMediaQueryList.h"
|
||||
|
||||
#include "mozilla/dom/Activity.h"
|
||||
|
||||
#include "nsDOMTouchEvent.h"
|
||||
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
@ -1676,8 +1674,9 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigatorBluetooth)
|
||||
#endif
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigatorCamera)
|
||||
DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsIDOMNavigatorSystemMessages,
|
||||
Activity::PrefEnabled())
|
||||
#ifdef MOZ_SYS_MSG
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigatorSystemMessages)
|
||||
#endif
|
||||
#ifdef MOZ_TIME_MANAGER
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozNavigatorTime)
|
||||
#endif
|
||||
|
@ -740,9 +740,6 @@ pref("dom.experimental_forms", false);
|
||||
// Don't enable <input type=range> yet:
|
||||
pref("dom.experimental_forms_range", true);
|
||||
|
||||
// Enables system messages and activities
|
||||
pref("dom.sysmsg.enabled", false);
|
||||
|
||||
// Allocation Threshold for Workers
|
||||
pref("dom.workers.mem.gc_allocation_threshold_mb", 30);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user