mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 5d81f5f84779
This commit is contained in:
parent
198c79f60d
commit
6156151bb3
@ -68,4 +68,6 @@ ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -35,9 +35,11 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDOMClassInfoID.h"
|
||||
|
||||
#include "PowerManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsIPowerManagerService.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
DOMCI_DATA(MozPowerManager, mozilla::dom::power::PowerManager)
|
||||
|
||||
@ -57,13 +59,29 @@ NS_IMPL_RELEASE(PowerManager)
|
||||
NS_IMETHODIMP
|
||||
PowerManager::Reboot()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
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;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PowerManager::PowerOff()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
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;
|
||||
}
|
||||
|
||||
} // power
|
||||
|
@ -35,6 +35,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "mozilla/Hal.h"
|
||||
#include "PowerManagerService.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -56,13 +57,15 @@ PowerManagerService::GetInstance()
|
||||
NS_IMETHODIMP
|
||||
PowerManagerService::Reboot()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
hal::Reboot();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PowerManagerService::PowerOff()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
hal::PowerOff();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // power
|
||||
|
Loading…
Reference in New Issue
Block a user