mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 790393 - Add MozPower.factoryReset() for factory reset. r=cjones, r=vingtetun, sr=sicking
This commit is contained in:
parent
8e09a03964
commit
6b7b4abb12
@ -16,6 +16,10 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsError.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "b2g.h"
|
||||
#endif
|
||||
|
||||
DOMCI_DATA(MozPowerManager, mozilla::dom::power::PowerManager)
|
||||
|
||||
namespace mozilla {
|
||||
@ -70,6 +74,21 @@ PowerManager::Reboot()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PowerManager::FactoryReset()
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
nsCOMPtr<nsIRecoveryService> recoveryService =
|
||||
do_GetService("@mozilla.org/recovery-service;1");
|
||||
NS_ENSURE_STATE(recoveryService);
|
||||
|
||||
recoveryService->FactoryReset();
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PowerManager::PowerOff()
|
||||
{
|
||||
|
@ -10,11 +10,12 @@ interface nsIDOMMozWakeLockListener;
|
||||
/**
|
||||
* This interface implements navigator.mozPower
|
||||
*/
|
||||
[scriptable, uuid(256a3287-f528-45b5-9ba8-2b3650c056e6)]
|
||||
[scriptable, uuid(7b181fef-2757-4198-89a0-8c426b8439ea)]
|
||||
interface nsIDOMMozPowerManager : nsISupports
|
||||
{
|
||||
void powerOff();
|
||||
void reboot();
|
||||
void factoryReset();
|
||||
|
||||
/**
|
||||
* The listeners are notified when a resource changes its lock state to:
|
||||
|
@ -173,6 +173,11 @@ ifdef ENABLE_TESTS
|
||||
tier_platform_dirs += testing/specialpowers
|
||||
endif
|
||||
|
||||
# b2g headers need to be built before dom headers
|
||||
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
tier_platform_dirs += b2g
|
||||
endif
|
||||
|
||||
tier_platform_dirs += \
|
||||
uriloader \
|
||||
caps \
|
||||
|
Loading…
Reference in New Issue
Block a user