Bug 952043 - Part 2: DOM changes for providing the network types supported by platform. r=smaug, a=1.3+
authorEdgar Chen <echen@mozilla.com>
Thu, 02 Jan 2014 16:01:15 +0800
changeset 175750 86df5d094ae54c95e9366c92950ddbf096443e6e
parent 175749 0a54809f94a156f3b8d0dce93b651c52de49dadb
child 175751 054bb6f1eef527fb1a1d11863a0a99fa2d2225f1
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, 1
bugs952043
milestone28.0a2
Bug 952043 - Part 2: DOM changes for providing the network types supported by platform. r=smaug, a=1.3+
dom/network/src/MobileConnection.cpp
--- a/dom/network/src/MobileConnection.cpp
+++ b/dom/network/src/MobileConnection.cpp
@@ -10,16 +10,17 @@
 #include "nsIDOMCFStateChangeEvent.h"
 #include "nsIDOMClassInfo.h"
 #include "nsIDOMDOMRequest.h"
 #include "nsIDOMDataErrorEvent.h"
 #include "nsIDOMMozEmergencyCbModeEvent.h"
 #include "nsIDOMMozOtaStatusEvent.h"
 #include "nsIDOMUSSDReceivedEvent.h"
 #include "nsIPermissionManager.h"
+#include "nsIVariant.h"
 
 #include "nsJSUtils.h"
 #include "nsJSON.h"
 #include "mozilla/Services.h"
 
 #define NS_RILCONTENTHELPER_CONTRACTID "@mozilla.org/ril/content-helper;1"
 
 using namespace mozilla::dom::network;
@@ -216,16 +217,28 @@ MobileConnection::GetRadioState(nsAStrin
 
   if (!mProvider || !CheckPermission("mobileconnection")) {
      return NS_OK;
   }
   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)
 {
   *aRequest = nullptr;
 
   if (!CheckPermission("mobileconnection")) {
     return NS_OK;
   }