Bug 952043 - Part 2: DOM changes for providing the network types supported by platform. r=smaug

This commit is contained in:
Edgar Chen 2014-01-02 16:01:15 +08:00
parent be657baaaf
commit d424d6160c

View File

@ -15,6 +15,7 @@
#include "nsIDOMClassInfo.h"
#include "nsIDOMDOMRequest.h"
#include "nsIPermissionManager.h"
#include "nsIVariant.h"
#include "nsJSUtils.h"
#include "nsJSON.h"
@ -220,6 +221,18 @@ MobileConnection::GetRadioState(nsAString& aRadioState)
return mProvider->GetRadioState(mClientId, aRadioState);
}
NS_IMETHODIMP
MobileConnection::GetSupportedNetworkTypes(nsIVariant** aSupportedNetworkTypes)
{
*aSupportedNetworkTypes = nullptr;
if (!mProvider || !CheckPermission("mobileconnection")) {
return NS_OK;
}
return mProvider->GetSupportedNetworkTypes(mClientId, aSupportedNetworkTypes);
}
NS_IMETHODIMP
MobileConnection::GetNetworks(nsIDOMDOMRequest** aRequest)
{