зеркало из https://github.com/mozilla/gecko-dev.git
Backout 10b455909e94 for bustage on windows.
This commit is contained in:
Родитель
52158f7aba
Коммит
869cd7c9c0
|
@ -68,6 +68,4 @@ ifdef ENABLE_TESTS
|
|||
DIRS += test
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -35,11 +35,9 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "PowerManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsIPowerManagerService.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
#include "PowerManager.h"
|
||||
|
||||
DOMCI_DATA(MozPowerManager, mozilla::dom::power::PowerManager)
|
||||
|
||||
|
@ -59,29 +57,13 @@ NS_IMPL_RELEASE(PowerManager)
|
|||
NS_IMETHODIMP
|
||||
PowerManager::Reboot()
|
||||
{
|
||||
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_DOM_SECURITY_ERR);
|
||||
|
||||
nsCOMPtr<nsIPowerManagerService> pmService =
|
||||
do_GetService(POWERMANAGERSERVICE_CONTRACTID);
|
||||
NS_ENSURE_TRUE(pmService, NS_OK);
|
||||
|
||||
pmService->Reboot();
|
||||
|
||||
return NS_OK;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PowerManager::PowerOff()
|
||||
{
|
||||
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_DOM_SECURITY_ERR);
|
||||
|
||||
nsCOMPtr<nsIPowerManagerService> pmService =
|
||||
do_GetService(POWERMANAGERSERVICE_CONTRACTID);
|
||||
NS_ENSURE_TRUE(pmService, NS_OK);
|
||||
|
||||
pmService->PowerOff();
|
||||
|
||||
return NS_OK;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
} // power
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "mozilla/Hal.h"
|
||||
#include "PowerManagerService.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -57,15 +56,13 @@ PowerManagerService::GetInstance()
|
|||
NS_IMETHODIMP
|
||||
PowerManagerService::Reboot()
|
||||
{
|
||||
hal::Reboot();
|
||||
return NS_OK;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PowerManagerService::PowerOff()
|
||||
{
|
||||
hal::PowerOff();
|
||||
return NS_OK;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
} // power
|
||||
|
|
Загрузка…
Ссылка в новой задаче