summaryrefslogtreecommitdiffstats
path: root/dom/presentation
diff options
context:
space:
mode:
Diffstat (limited to 'dom/presentation')
-rw-r--r--dom/presentation/PresentationSessionInfo.cpp49
-rw-r--r--dom/presentation/provider/PresentationDeviceProviderModule.cpp5
2 files changed, 2 insertions, 52 deletions
diff --git a/dom/presentation/PresentationSessionInfo.cpp b/dom/presentation/PresentationSessionInfo.cpp
index f93909864..1dd92ab69 100644
--- a/dom/presentation/PresentationSessionInfo.cpp
+++ b/dom/presentation/PresentationSessionInfo.cpp
@@ -31,11 +31,6 @@
#include "nsIPresentationNetworkHelper.h"
#endif // MOZ_WIDGET_ANDROID
-#ifdef MOZ_WIDGET_GONK
-#include "nsINetworkInterface.h"
-#include "nsINetworkManager.h"
-#endif
-
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::services;
@@ -647,49 +642,7 @@ PresentationControllingInfo::Shutdown(nsresult aReason)
nsresult
PresentationControllingInfo::GetAddress()
{
-#if defined(MOZ_WIDGET_GONK)
- nsCOMPtr<nsINetworkManager> networkManager =
- do_GetService("@mozilla.org/network/manager;1");
- if (NS_WARN_IF(!networkManager)) {
- return NS_ERROR_NOT_AVAILABLE;
- }
-
- nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
- networkManager->GetActiveNetworkInfo(getter_AddRefs(activeNetworkInfo));
- if (NS_WARN_IF(!activeNetworkInfo)) {
- return NS_ERROR_FAILURE;
- }
-
- char16_t** ips = nullptr;
- uint32_t* prefixes = nullptr;
- uint32_t count = 0;
- activeNetworkInfo->GetAddresses(&ips, &prefixes, &count);
- if (NS_WARN_IF(!count)) {
- NS_Free(prefixes);
- NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, ips);
- return NS_ERROR_FAILURE;
- }
-
- // TODO bug 1228504 Take all IP addresses in PresentationChannelDescription
- // into account. And at the first stage Presentation API is only exposed on
- // Firefox OS where the first IP appears enough for most scenarios.
-
- nsAutoString ip;
- ip.Assign(ips[0]);
-
- // On Android platform, the IP address is retrieved from a callback function.
- // To make consistent code sequence, following function call is dispatched
- // into main thread instead of calling it directly.
- NS_DispatchToMainThread(
- NewRunnableMethod<nsCString>(
- this,
- &PresentationControllingInfo::OnGetAddress,
- NS_ConvertUTF16toUTF8(ip)));
-
- NS_Free(prefixes);
- NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, ips);
-
-#elif defined(MOZ_WIDGET_ANDROID)
+#if defined(MOZ_WIDGET_ANDROID)
RefPtr<PresentationNetworkHelper> networkHelper =
new PresentationNetworkHelper(this,
&PresentationControllingInfo::OnGetAddress);
diff --git a/dom/presentation/provider/PresentationDeviceProviderModule.cpp b/dom/presentation/provider/PresentationDeviceProviderModule.cpp
index 9100fa49b..9c084e7db 100644
--- a/dom/presentation/provider/PresentationDeviceProviderModule.cpp
+++ b/dom/presentation/provider/PresentationDeviceProviderModule.cpp
@@ -68,12 +68,9 @@ static const mozilla::Module::ContractIDEntry kPresentationDeviceProviderContrac
};
static const mozilla::Module::CategoryEntry kPresentationDeviceProviderCategories[] = {
-#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16)
+#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID)
{ PRESENTATION_DEVICE_PROVIDER_CATEGORY, "MulticastDNSDeviceProvider", MULTICAST_DNS_PROVIDER_CONTRACT_ID },
#endif
-#if defined(MOZ_WIDGET_GONK)
- { PRESENTATION_DEVICE_PROVIDER_CATEGORY, "DisplayDeviceProvider", DISPLAY_DEVICE_PROVIDER_CONTRACT_ID },
-#endif
#ifdef MOZ_WIDGET_ANDROID
{ PRESENTATION_DEVICE_PROVIDER_CATEGORY, "LegacyMDNSDeviceProvider", LEGACY_MDNS_PROVIDER_CONTRACT_ID },
#endif //MOZ_WIDGET_ANDROID