Backout 6a4c4cb828a8 for bustage on windows.

This commit is contained in:
Scott Johnson 2012-01-30 18:47:43 -06:00
parent c43be1e05e
commit 2e97d9bcda
10 changed files with 2 additions and 130 deletions

View File

@ -729,7 +729,6 @@ sys/pstat.h
sys/ptrace.h
sys/queue.h
sys/quota.h
sys/reboot.h
sys/reg.h
sys/regset.h
sys/resource.h

View File

@ -372,17 +372,5 @@ NotifyNetworkChange(const NetworkInformation& aInfo)
sNetworkObservers.BroadcastCachedInformation();
}
void Reboot()
{
AssertMainThread();
PROXY_IF_SANDBOXED(Reboot());
}
void PowerOff()
{
AssertMainThread();
PROXY_IF_SANDBOXED(PowerOff());
}
} // namespace hal
} // namespace mozilla

View File

@ -192,16 +192,6 @@ void GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo);
*/
void NotifyNetworkChange(const hal::NetworkInformation& aNetworkInfo);
/**
* Reboot the device.
*/
void Reboot();
/**
* Power off the device.
*/
void PowerOff();
} // namespace MOZ_HAL_NAMESPACE
} // namespace mozilla

View File

@ -72,9 +72,9 @@ CPPSRCS = \
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
CPPSRCS += AndroidHal.cpp
else ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
CPPSRCS += GonkHal.cpp Power.cpp
CPPSRCS += GonkHal.cpp
else ifeq (Linux,$(OS_TARGET))
CPPSRCS += LinuxHal.cpp Power.cpp
CPPSRCS += LinuxHal.cpp
ifdef MOZ_ENABLE_DBUS
CPPSRCS += UPowerClient.cpp
endif

View File

@ -173,14 +173,6 @@ GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo)
bridge->GetCurrentNetworkInformation(aNetworkInfo);
}
void
Reboot()
{}
void
PowerOff()
{}
} // hal_impl
} // mozilla

View File

@ -105,13 +105,5 @@ GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo)
aNetworkInfo->canBeMetered() = dom::network::kDefaultCanBeMetered;
}
void
Reboot()
{}
void
PowerOff()
{}
} // hal_impl
} // namespace mozilla

View File

@ -1,59 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Mozilla Foundation
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Kan-Ru Chen <kchen@mozilla.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "Hal.h"
#include <unistd.h>
#include <sys/reboot.h>
namespace mozilla {
namespace hal_impl {
void
Reboot()
{
reboot(RB_AUTOBOOT);
}
void
PowerOff()
{
reboot(RB_POWER_OFF);
}
} // hal_impl
} // mozilla

View File

@ -86,9 +86,6 @@ parent:
sync GetScreenBrightness() returns (double brightness);
SetScreenBrightness(double brightness);
Reboot();
PowerOff();
__delete__();
};

View File

@ -152,18 +152,6 @@ SetScreenBrightness(double brightness)
Hal()->SendSetScreenBrightness(brightness);
}
void
Reboot()
{
Hal()->SendReboot();
}
void
PowerOff()
{
Hal()->SendPowerOff();
}
class HalParent : public PHalParent
, public BatteryObserver
, public NetworkObserver
@ -279,20 +267,6 @@ public:
hal::SetScreenBrightness(brightness);
return true;
}
NS_OVERRIDE virtual bool
RecvReboot()
{
hal::Reboot();
return true;
}
NS_OVERRIDE virtual bool
RecvPowerOff()
{
hal::PowerOff();
return true;
}
};
class HalChild : public PHalChild {

View File

@ -729,7 +729,6 @@ sys/pstat.h
sys/ptrace.h
sys/queue.h
sys/quota.h
sys/reboot.h
sys/reg.h
sys/regset.h
sys/resource.h