summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/apps/AppsUtils.jsm3
-rw-r--r--dom/audiochannel/AudioChannelService.cpp32
-rw-r--r--dom/audiochannel/AudioChannelService.h22
-rw-r--r--dom/base/Navigator.cpp6
-rw-r--r--dom/base/ScreenOrientation.cpp2
-rw-r--r--dom/base/nsContentPermissionHelper.cpp3
-rw-r--r--dom/base/nsGlobalWindow.cpp10
-rw-r--r--dom/base/nsGlobalWindow.h8
-rw-r--r--dom/base/nsPIDOMWindow.h2
-rw-r--r--dom/canvas/CanvasRenderingContext2D.cpp4
-rw-r--r--dom/canvas/WebGLContext.cpp28
-rw-r--r--dom/events/EventListenerManager.cpp8
-rw-r--r--dom/events/EventNameList.h2
-rw-r--r--dom/geolocation/nsGeolocation.cpp13
-rw-r--r--dom/html/nsIFormControl.h4
-rw-r--r--dom/indexedDB/ActorsParent.cpp2
-rw-r--r--dom/ipc/ContentChild.cpp52
-rw-r--r--dom/ipc/ContentParent.cpp137
-rw-r--r--dom/network/TCPSocket.cpp72
-rw-r--r--dom/network/TCPSocket.h17
-rw-r--r--dom/plugins/base/PluginPRLibrary.cpp6
-rw-r--r--dom/plugins/base/PluginPRLibrary.h2
-rw-r--r--dom/plugins/base/nsNPAPIPlugin.cpp1
-rw-r--r--dom/plugins/ipc/PluginLibrary.h2
-rwxr-xr-xdom/plugins/ipc/PluginModuleParent.cpp4
-rw-r--r--dom/plugins/ipc/PluginModuleParent.h4
-rw-r--r--dom/presentation/PresentationSessionInfo.cpp49
-rw-r--r--dom/presentation/provider/PresentationDeviceProviderModule.cpp5
-rw-r--r--dom/system/OSFileConstants.cpp11
-rw-r--r--dom/webidl/Window.webidl2
30 files changed, 33 insertions, 480 deletions
diff --git a/dom/apps/AppsUtils.jsm b/dom/apps/AppsUtils.jsm
index 3ca3f8552..2bd6a4133 100644
--- a/dom/apps/AppsUtils.jsm
+++ b/dom/apps/AppsUtils.jsm
@@ -312,9 +312,6 @@ this.AppsUtils = {
// Instead, we check if the app is installed under /system/b2g
let isCoreApp = false;
-#ifdef MOZ_WIDGET_GONK
- isCoreApp = app.basePath == this.getCoreAppsBasePath();
-#endif
debug(app.basePath + " isCoreApp: " + isCoreApp);
return { "path": app.basePath + "/" + app.id,
diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp
index 87cde41e9..db6f2037b 100644
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -27,11 +27,6 @@
#include "nsServiceManagerUtils.h"
#include "mozilla/dom/SettingChangeNotificationBinding.h"
-#ifdef MOZ_WIDGET_GONK
-#include "nsJSUtils.h"
-#include "SpeakerManagerService.h"
-#endif
-
#include "mozilla/Preferences.h"
using namespace mozilla;
@@ -237,20 +232,12 @@ AudioChannelService::Shutdown()
if (IsParentProcess()) {
obs->RemoveObserver(gAudioChannelService, "ipc:content-shutdown");
-
-#ifdef MOZ_WIDGET_GONK
- // To monitor the volume settings based on audio channel.
- obs->RemoveObserver(gAudioChannelService, "mozsettings-changed");
-#endif
}
}
gAudioChannelService->mWindows.Clear();
gAudioChannelService->mPlayingChildren.Clear();
gAudioChannelService->mTabParents.Clear();
-#ifdef MOZ_WIDGET_GONK
- gAudioChannelService->mSpeakerManager.Clear();
-#endif
gAudioChannelService = nullptr;
}
@@ -284,11 +271,6 @@ AudioChannelService::AudioChannelService()
obs->AddObserver(this, "outer-window-destroyed", false);
if (IsParentProcess()) {
obs->AddObserver(this, "ipc:content-shutdown", false);
-
-#ifdef MOZ_WIDGET_GONK
- // To monitor the volume settings based on audio channel.
- obs->AddObserver(this, "mozsettings-changed", false);
-#endif
}
}
@@ -342,13 +324,6 @@ AudioChannelService::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent)
RefPtr<AudioChannelAgent> kungFuDeathGrip(aAgent);
winData->RemoveAgent(aAgent);
-#ifdef MOZ_WIDGET_GONK
- bool active = AnyAudioChannelIsActive();
- for (uint32_t i = 0; i < mSpeakerManager.Length(); i++) {
- mSpeakerManager[i]->SetAudioChannelActive(active);
- }
-#endif
-
MaybeSendStatusUpdate();
}
@@ -573,13 +548,6 @@ AudioChannelService::Observe(nsISupports* aSubject, const char* aTopic,
iter.GetNext()->WindowVolumeChanged();
}
}
-
-#ifdef MOZ_WIDGET_GONK
- bool active = AnyAudioChannelIsActive();
- for (uint32_t i = 0; i < mSpeakerManager.Length(); i++) {
- mSpeakerManager[i]->SetAudioChannelActive(active);
- }
-#endif
} else if (!strcmp(aTopic, "ipc:content-shutdown")) {
nsCOMPtr<nsIPropertyBag2> props = do_QueryInterface(aSubject);
if (!props) {
diff --git a/dom/audiochannel/AudioChannelService.h b/dom/audiochannel/AudioChannelService.h
index b16832b5f..7d3de8a46 100644
--- a/dom/audiochannel/AudioChannelService.h
+++ b/dom/audiochannel/AudioChannelService.h
@@ -25,10 +25,6 @@ struct PRLogModuleInfo;
namespace mozilla {
namespace dom {
-#ifdef MOZ_WIDGET_GONK
-class SpeakerManagerService;
-#endif
-
class TabParent;
#define NUMBER_OF_AUDIO_CHANNELS (uint32_t)AudioChannel::EndGuard_
@@ -189,20 +185,6 @@ public:
uint64_t aInnerWindowID,
bool aCapture);
-#ifdef MOZ_WIDGET_GONK
- void RegisterSpeakerManager(SpeakerManagerService* aSpeakerManager)
- {
- if (!mSpeakerManager.Contains(aSpeakerManager)) {
- mSpeakerManager.AppendElement(aSpeakerManager);
- }
- }
-
- void UnregisterSpeakerManager(SpeakerManagerService* aSpeakerManager)
- {
- mSpeakerManager.RemoveElement(aSpeakerManager);
- }
-#endif
-
static const nsAttrValue::EnumTable* GetAudioChannelTable();
static AudioChannel GetAudioChannel(const nsAString& aString);
static AudioChannel GetDefaultAudioChannel();
@@ -347,10 +329,6 @@ private:
nsTObserverArray<nsAutoPtr<AudioChannelChildStatus>> mPlayingChildren;
-#ifdef MOZ_WIDGET_GONK
- nsTArray<SpeakerManagerService*> mSpeakerManager;
-#endif
-
// Raw pointers because TabParents must unregister themselves.
nsTArray<TabParent*> mTabParents;
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index 5c315517c..ed96ee23b 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -767,12 +767,6 @@ StaticRefPtr<VibrateWindowListener> gVibrateWindowListener;
static bool
MayVibrate(nsIDocument* doc) {
-#if MOZ_WIDGET_GONK
- if (XRE_IsParentProcess()) {
- return true; // The system app can always vibrate
- }
-#endif // MOZ_WIDGET_GONK
-
// Hidden documents cannot start or stop a vibration.
return (doc && !doc->Hidden());
}
diff --git a/dom/base/ScreenOrientation.cpp b/dom/base/ScreenOrientation.cpp
index bb3ccf5c3..ec9c4fa29 100644
--- a/dom/base/ScreenOrientation.cpp
+++ b/dom/base/ScreenOrientation.cpp
@@ -309,7 +309,7 @@ ScreenOrientation::LockInternal(ScreenOrientationInternal aOrientation, ErrorRes
return nullptr;
}
-#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_GONK)
+#if !defined(MOZ_WIDGET_ANDROID)
// User agent does not support locking the screen orientation.
p->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return p.forget();
diff --git a/dom/base/nsContentPermissionHelper.cpp b/dom/base/nsContentPermissionHelper.cpp
index fd04b1013..c57fc6233 100644
--- a/dom/base/nsContentPermissionHelper.cpp
+++ b/dom/base/nsContentPermissionHelper.cpp
@@ -5,9 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <map>
-#ifdef MOZ_WIDGET_GONK
-#include "GonkPermission.h"
-#endif // MOZ_WIDGET_GONK
#include "nsCOMPtr.h"
#include "nsIDOMElement.h"
#include "nsIPrincipal.h"
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 9663a6dbf..4e384c4d2 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -25,7 +25,7 @@
#include "mozilla/dom/Timeout.h"
#include "mozilla/dom/TimeoutHandler.h"
#include "mozilla/IntegerPrintfMacros.h"
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
#include "mozilla/dom/WindowOrientationObserver.h"
#endif
#include "nsDOMOfflineResourceList.h"
@@ -1948,7 +1948,7 @@ nsGlobalWindow::CleanUp()
mSpeechSynthesis = nullptr;
#endif
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
mOrientationChangeObserver = nullptr;
#endif
@@ -2076,7 +2076,7 @@ nsGlobalWindow::FreeInnerObjects()
mScreen = nullptr;
}
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
mOrientationChangeObserver = nullptr;
#endif
@@ -14009,7 +14009,7 @@ nsGlobalWindow::DisableDeviceSensor(uint32_t aType)
}
}
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
void
nsGlobalWindow::EnableOrientationChangeListener()
{
@@ -14902,7 +14902,7 @@ nsGlobalWindow::IsModalContentWindow(JSContext* aCx, JSObject* aGlobal)
return xpc::WindowOrNull(aGlobal)->IsModalContentWindow();
}
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
int16_t
nsGlobalWindow::Orientation(CallerType aCallerType) const
{
diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h
index 94d565bf3..467bc6796 100644
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -138,7 +138,7 @@ class U2F;
class VRDisplay;
class VREventObserver;
class WakeLock;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
class WindowOrientationObserver;
#endif
class Worklet;
@@ -631,7 +631,7 @@ public:
virtual void EnableDeviceSensor(uint32_t aType) override;
virtual void DisableDeviceSensor(uint32_t aType) override;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
virtual void EnableOrientationChangeListener() override;
virtual void DisableOrientationChangeListener() override;
#endif
@@ -905,7 +905,7 @@ public:
nsIDOMOfflineResourceList* GetApplicationCache(mozilla::ErrorResult& aError);
already_AddRefed<nsIDOMOfflineResourceList> GetApplicationCache() override;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
#endif
@@ -1971,7 +1971,7 @@ protected:
nsTArray<uint32_t> mEnabledSensors;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
nsAutoPtr<mozilla::dom::WindowOrientationObserver> mOrientationChangeObserver;
#endif
diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h
index 3fd666beb..47affbb06 100644
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -444,7 +444,7 @@ public:
*/
virtual void DisableDeviceSensor(uint32_t aType) = 0;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
virtual void EnableOrientationChangeListener() = 0;
virtual void DisableOrientationChangeListener() = 0;
#endif
diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
index a38c38293..f4c4259f6 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -141,10 +141,6 @@ using mozilla::gl::GLContextProvider;
#include "gfxWindowsPlatform.h"
#endif
-#ifdef MOZ_WIDGET_GONK
-#include "mozilla/layers/ShadowLayers.h"
-#endif
-
// windows.h (included by chromium code) defines this, in its infinite wisdom
#undef DrawText
diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp
index 176d56f8c..2a92084b4 100644
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -51,10 +51,6 @@
#include "VRManagerChild.h"
#include "mozilla/layers/TextureClientSharedSurface.h"
-#ifdef MOZ_WIDGET_GONK
-#include "mozilla/layers/ShadowLayers.h"
-#endif
-
// Local
#include "CanvasUtils.h"
#include "WebGL1Context.h"
@@ -545,30 +541,6 @@ BaseCaps(const WebGLContextOptions& options, WebGLContext* webgl)
// for now it's just behind a pref for testing/evaluation.
baseCaps.bpp16 = gfxPrefs::WebGLPrefer16bpp();
-#ifdef MOZ_WIDGET_GONK
- do {
- auto canvasElement = webgl->GetCanvas();
- if (!canvasElement)
- break;
-
- auto ownerDoc = canvasElement->OwnerDoc();
- nsIWidget* docWidget = nsContentUtils::WidgetForDocument(ownerDoc);
- if (!docWidget)
- break;
-
- layers::LayerManager* layerManager = docWidget->GetLayerManager();
- if (!layerManager)
- break;
-
- // XXX we really want "AsSurfaceAllocator" here for generality
- layers::ShadowLayerForwarder* forwarder = layerManager->AsShadowForwarder();
- if (!forwarder)
- break;
-
- baseCaps.surfaceAllocator = forwarder->GetTextureForwarder();
- } while (false);
-#endif
-
// Done with baseCaps construction.
if (!gfxPrefs::WebGLForceMSAA()) {
diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp
index ae8bf1b1a..fe896870c 100644
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -352,7 +352,7 @@ EventListenerManager::AddEventListenerInternal(
EnableDevice(eDeviceLight);
} else if (aTypeAtom == nsGkAtoms::ondevicemotion) {
EnableDevice(eDeviceMotion);
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
} else if (aTypeAtom == nsGkAtoms::onorientationchange) {
EnableDevice(eOrientationChange);
#endif
@@ -481,7 +481,7 @@ EventListenerManager::IsDeviceType(EventMessage aEventMessage)
case eDeviceLight:
case eDeviceProximity:
case eUserProximity:
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
case eOrientationChange:
#endif
return true;
@@ -529,7 +529,7 @@ EventListenerManager::EnableDevice(EventMessage aEventMessage)
window->EnableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
window->EnableDeviceSensor(SENSOR_GYROSCOPE);
break;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
case eOrientationChange:
window->EnableOrientationChangeListener();
break;
@@ -575,7 +575,7 @@ EventListenerManager::DisableDevice(EventMessage aEventMessage)
case eDeviceLight:
window->DisableDeviceSensor(SENSOR_LIGHT);
break;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
case eOrientationChange:
window->DisableOrientationChangeListener();
break;
diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h
index 3f0af9fe9..214b844e7 100644
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -563,7 +563,7 @@ WINDOW_EVENT(online,
eOnline,
EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
eBasicEventClass)
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
WINDOW_EVENT(orientationchange,
eOrientationChange,
EventNameType_HTMLBodyOrFramesetOnly,
diff --git a/dom/geolocation/nsGeolocation.cpp b/dom/geolocation/nsGeolocation.cpp
index 9fcdb350a..2d84a3e11 100644
--- a/dom/geolocation/nsGeolocation.cpp
+++ b/dom/geolocation/nsGeolocation.cpp
@@ -33,10 +33,6 @@ class nsIPrincipal;
#include "AndroidLocationProvider.h"
#endif
-#ifdef MOZ_WIDGET_GONK
-#include "GonkGPSGeolocationProvider.h"
-#endif
-
#ifdef MOZ_GPSD
#include "GpsdLocationProvider.h"
#endif
@@ -688,15 +684,6 @@ nsresult nsGeolocationService::Init()
mProvider = new AndroidLocationProvider();
#endif
-#ifdef MOZ_WIDGET_GONK
- // GonkGPSGeolocationProvider can be started at boot up time for initialization reasons.
- // do_getService gets hold of the already initialized component and starts
- // processing location requests immediately.
- // do_Createinstance will create multiple instances of the provider which is not right.
- // bug 993041
- mProvider = do_GetService(GONK_GPS_GEOLOCATION_PROVIDER_CONTRACTID);
-#endif
-
#ifdef MOZ_WIDGET_GTK
#ifdef MOZ_GPSD
if (Preferences::GetBool("geo.provider.use_gpsd", false)) {
diff --git a/dom/html/nsIFormControl.h b/dom/html/nsIFormControl.h
index e07f7c829..34380bc67 100644
--- a/dom/html/nsIFormControl.h
+++ b/dom/html/nsIFormControl.h
@@ -267,8 +267,8 @@ nsIFormControl::IsSingleLineTextControl(bool aExcludePassword, uint32_t aType)
aType == NS_FORM_INPUT_TEL ||
aType == NS_FORM_INPUT_URL ||
// TODO: those are temporary until bug 773205 is fixed.
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
- // On Android/B2G, date/time input appears as a normal text box.
+#if defined(MOZ_WIDGET_ANDROID)
+ // On Android, date/time input appears as a normal text box.
aType == NS_FORM_INPUT_TIME ||
aType == NS_FORM_INPUT_DATE ||
#endif
diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
index 39e039c0f..9678fb49f 100644
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -121,7 +121,7 @@
LogLevel::Debug, \
_args )
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
#define IDB_MOBILE
#endif
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
index d7068c6c3..9e1c7e8cb 100644
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -137,12 +137,6 @@
#include "APKOpen.h"
#endif
-#if defined(MOZ_WIDGET_GONK)
-#include "nsVolume.h"
-#include "nsVolumeService.h"
-#include "SpeakerManagerService.h"
-#endif
-
#ifdef XP_WIN
#include <process.h>
#define getpid _getpid
@@ -196,9 +190,6 @@ using namespace mozilla::net;
using namespace mozilla::jsipc;
using namespace mozilla::psm;
using namespace mozilla::widget;
-#if defined(MOZ_WIDGET_GONK)
-using namespace mozilla::system;
-#endif
using namespace mozilla::widget;
namespace mozilla {
@@ -585,15 +576,7 @@ ContentChild::Init(MessageLoop* aIOLoop,
void
ContentChild::InitProcessAttributes()
{
-#ifdef MOZ_WIDGET_GONK
- if (mIsForApp && !mIsForBrowser) {
- SetProcessName(NS_LITERAL_STRING("(Preallocated app)"), false);
- } else {
- SetProcessName(NS_LITERAL_STRING("Browser"), false);
- }
-#else
SetProcessName(NS_LITERAL_STRING("Web Content"), true);
-#endif
}
void
@@ -1257,15 +1240,6 @@ ContentChild::RecvNotifyLayerAllocated(const dom::TabId& aTabId, const uint64_t&
bool
ContentChild::RecvSpeakerManagerNotify()
{
-#ifdef MOZ_WIDGET_GONK
- // Only notify the process which has the SpeakerManager instance.
- RefPtr<SpeakerManagerService> service =
- SpeakerManagerService::GetSpeakerManagerService();
- if (service) {
- service->Notify();
- }
- return true;
-#endif
return false;
}
@@ -2284,12 +2258,6 @@ ContentChild::RecvLastPrivateDocShellDestroyed()
bool
ContentChild::RecvVolumes(nsTArray<VolumeInfo>&& aVolumes)
{
-#ifdef MOZ_WIDGET_GONK
- RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton();
- if (vs) {
- vs->RecvVolumesFromParent(aVolumes);
- }
-#endif
return true;
}
@@ -2306,17 +2274,6 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName,
const bool& aIsRemovable,
const bool& aIsHotSwappable)
{
-#ifdef MOZ_WIDGET_GONK
- RefPtr<nsVolume> volume = new nsVolume(aFsName, aVolumeName, aState,
- aMountGeneration, aIsMediaPresent,
- aIsSharing, aIsFormatting, aIsFake,
- aIsUnmounting, aIsRemovable, aIsHotSwappable);
-
- RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton();
- if (vs) {
- vs->UpdateVolume(volume);
- }
-#else
// Remove warnings about unused arguments
Unused << aFsName;
Unused << aVolumeName;
@@ -2329,22 +2286,15 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName,
Unused << aIsUnmounting;
Unused << aIsRemovable;
Unused << aIsHotSwappable;
-#endif
+
return true;
}
bool
ContentChild::RecvVolumeRemoved(const nsString& aFsName)
{
-#ifdef MOZ_WIDGET_GONK
- RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton();
- if (vs) {
- vs->RemoveVolumeByName(aFsName);
- }
-#else
// Remove warnings about unused arguments
Unused << aFsName;
-#endif
return true;
}
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
index 582490d7b..8b9ab4442 100644
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -16,11 +16,6 @@
# include <sys/resource.h>
#endif
-#ifdef MOZ_WIDGET_GONK
-#include <sys/types.h>
-#include <sys/wait.h>
-#endif
-
#include "chrome/common/process_watcher.h"
#include "mozilla/a11y/PDocAccessible.h"
@@ -210,14 +205,6 @@
# include "AndroidBridge.h"
#endif
-#ifdef MOZ_WIDGET_GONK
-#include "nsIVolume.h"
-#include "nsVolumeService.h"
-#include "nsIVolumeService.h"
-#include "SpeakerManagerService.h"
-using namespace mozilla::system;
-#endif
-
#ifdef MOZ_WIDGET_GTK
#include <gdk/gdk.h>
#endif
@@ -526,11 +513,6 @@ static const char* sObserverTopics[] = {
"child-mmu-request",
"last-pb-context-exited",
"file-watcher-update",
-#ifdef MOZ_WIDGET_GONK
- NS_VOLUME_STATE_CHANGED,
- NS_VOLUME_REMOVED,
- "phone-state-changed",
-#endif
#ifdef ACCESSIBILITY
"a11y-init-or-shutdown",
#endif
@@ -1355,14 +1337,6 @@ ContentParent::ForwardKnownInfo()
if (!mMetamorphosed) {
return;
}
-#ifdef MOZ_WIDGET_GONK
- InfallibleTArray<VolumeInfo> volumeInfo;
- RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton();
- if (vs) {
- vs->GetVolumesForIPC(&volumeInfo);
- Unused << SendVolumes(volumeInfo);
- }
-#endif /* MOZ_WIDGET_GONK */
}
namespace {
@@ -1410,23 +1384,6 @@ bool
ContentParent::SetPriorityAndCheckIsAlive(ProcessPriority aPriority)
{
ProcessPriorityManager::SetProcessPriority(this, aPriority);
-
- // Now that we've set this process's priority, check whether the process is
- // still alive. Hopefully we've set the priority to FOREGROUND*, so the
- // process won't unexpectedly crash after this point!
- //
- // Bug 943174: use waitid() with WNOWAIT so that, if the process
- // did exit, we won't consume its zombie and confuse the
- // GeckoChildProcessHost dtor.
-#ifdef MOZ_WIDGET_GONK
- siginfo_t info;
- info.si_pid = 0;
- if (waitid(P_PID, Pid(), &info, WNOWAIT | WNOHANG | WEXITED) == 0
- && info.si_pid != 0) {
- return false;
- }
-#endif
-
return true;
}
@@ -2686,50 +2643,6 @@ ContentParent::Observe(nsISupports* aSubject,
else if (!strcmp(aTopic, "last-pb-context-exited")) {
Unused << SendLastPrivateDocShellDestroyed();
}
-#ifdef MOZ_WIDGET_GONK
- else if(!strcmp(aTopic, NS_VOLUME_STATE_CHANGED)) {
- nsCOMPtr<nsIVolume> vol = do_QueryInterface(aSubject);
- if (!vol) {
- return NS_ERROR_NOT_AVAILABLE;
- }
-
- nsString volName;
- nsString mountPoint;
- int32_t state;
- int32_t mountGeneration;
- bool isMediaPresent;
- bool isSharing;
- bool isFormatting;
- bool isFake;
- bool isUnmounting;
- bool isRemovable;
- bool isHotSwappable;
-
- vol->GetName(volName);
- vol->GetMountPoint(mountPoint);
- vol->GetState(&state);
- vol->GetMountGeneration(&mountGeneration);
- vol->GetIsMediaPresent(&isMediaPresent);
- vol->GetIsSharing(&isSharing);
- vol->GetIsFormatting(&isFormatting);
- vol->GetIsFake(&isFake);
- vol->GetIsUnmounting(&isUnmounting);
- vol->GetIsRemovable(&isRemovable);
- vol->GetIsHotSwappable(&isHotSwappable);
-
- Unused << SendFileSystemUpdate(volName, mountPoint, state,
- mountGeneration, isMediaPresent,
- isSharing, isFormatting, isFake,
- isUnmounting, isRemovable, isHotSwappable);
- } else if (!strcmp(aTopic, "phone-state-changed")) {
- nsString state(aData);
- Unused << SendNotifyPhoneStateChange(state);
- }
- else if(!strcmp(aTopic, NS_VOLUME_REMOVED)) {
- nsString volName(aData);
- Unused << SendVolumeRemoved(volName);
- }
-#endif
#ifdef ACCESSIBILITY
else if (aData && !strcmp(aTopic, "a11y-init-or-shutdown")) {
if (*aData == '1') {
@@ -3398,29 +3311,12 @@ ContentParent::RecvPSpeechSynthesisConstructor(PSpeechSynthesisParent* aActor)
bool
ContentParent::RecvSpeakerManagerGetSpeakerStatus(bool* aValue)
{
-#ifdef MOZ_WIDGET_GONK
- *aValue = false;
- RefPtr<SpeakerManagerService> service =
- SpeakerManagerService::GetOrCreateSpeakerManagerService();
- MOZ_ASSERT(service);
-
- *aValue = service->GetSpeakerStatus();
- return true;
-#endif
return false;
}
bool
ContentParent::RecvSpeakerManagerForceSpeaker(const bool& aEnable)
{
-#ifdef MOZ_WIDGET_GONK
- RefPtr<SpeakerManagerService> service =
- SpeakerManagerService::GetOrCreateSpeakerManagerService();
- MOZ_ASSERT(service);
- service->ForceSpeaker(aEnable, mChildID);
-
- return true;
-#endif
return false;
}
@@ -3976,49 +3872,22 @@ bool
ContentParent::RecvCreateFakeVolume(const nsString& fsName,
const nsString& mountPoint)
{
-#ifdef MOZ_WIDGET_GONK
- nsresult rv;
- nsCOMPtr<nsIVolumeService> vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv);
- if (vs) {
- vs->CreateFakeVolume(fsName, mountPoint);
- }
- return true;
-#else
- NS_WARNING("ContentParent::RecvCreateFakeVolume shouldn't be called when MOZ_WIDGET_GONK is not defined");
+ NS_WARNING("ContentParent::RecvCreateFakeVolume shouldn't be called");
return false;
-#endif
}
bool
ContentParent::RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState)
{
-#ifdef MOZ_WIDGET_GONK
- nsresult rv;
- nsCOMPtr<nsIVolumeService> vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv);
- if (vs) {
- vs->SetFakeVolumeState(fsName, fsState);
- }
- return true;
-#else
- NS_WARNING("ContentParent::RecvSetFakeVolumeState shouldn't be called when MOZ_WIDGET_GONK is not defined");
+ NS_WARNING("ContentParent::RecvSetFakeVolumeState shouldn't be called");
return false;
-#endif
}
bool
ContentParent::RecvRemoveFakeVolume(const nsString& fsName)
{
-#ifdef MOZ_WIDGET_GONK
- nsresult rv;
- nsCOMPtr<nsIVolumeService> vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv);
- if (vs) {
- vs->RemoveFakeVolume(fsName);
- }
- return true;
-#else
- NS_WARNING("ContentParent::RecvRemoveFakeVolume shouldn't be called when MOZ_WIDGET_GONK is not defined");
+ NS_WARNING("ContentParent::RecvRemoveFakeVolume shouldn't be called");
return false;
-#endif
}
bool
diff --git a/dom/network/TCPSocket.cpp b/dom/network/TCPSocket.cpp
index 4eb2f72f6..38827a9ac 100644
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -33,11 +33,6 @@
#include "nsStringStream.h"
#include "secerr.h"
#include "sslerr.h"
-#ifdef MOZ_WIDGET_GONK
-#include "nsINetworkStatsServiceProxy.h"
-#include "nsINetworkManager.h"
-#include "nsINetworkInterface.h"
-#endif
#define BUFFER_SIZE 65536
#define NETWORK_STATS_THRESHOLD 65536
@@ -163,12 +158,6 @@ TCPSocket::TCPSocket(nsIGlobalObject* aGlobal, const nsAString& aHost, uint16_t
, mTrackingNumber(0)
, mWaitingForStartTLS(false)
, mObserversActive(false)
-#ifdef MOZ_WIDGET_GONK
- , mTxBytes(0)
- , mRxBytes(0)
- , mAppId(nsIScriptSecurityManager::UNKNOWN_APP_ID)
- , mInIsolatedMozBrowser(false)
-#endif
{
if (aGlobal) {
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal);
@@ -323,13 +312,6 @@ TCPSocket::InitWithTransport(nsISocketTransport* aTransport)
mTransport->GetPort(&port);
mPort = port;
-#ifdef MOZ_WIDGET_GONK
- nsCOMPtr<nsINetworkManager> networkManager = do_GetService("@mozilla.org/network/manager;1");
- if (networkManager) {
- networkManager->GetActiveNetworkInfo(getter_AddRefs(mActiveNetworkInfo));
- }
-#endif
-
return NS_OK;
}
@@ -651,12 +633,6 @@ TCPSocket::Resume(mozilla::ErrorResult& aRv)
nsresult
TCPSocket::MaybeReportErrorAndCloseIfOpen(nsresult status) {
-#ifdef MOZ_WIDGET_GONK
- // Save network statistics once the connection is closed.
- // For now this function is Gonk-specific.
- SaveNetworkStats(true);
-#endif
-
// If we're closed, we've already reported the error or just don't need to
// report the error.
if (mReadyState == TCPReadyState::Closed) {
@@ -941,12 +917,6 @@ TCPSocket::Send(nsIInputStream* aStream, uint32_t aByteLength)
EnsureCopying();
-#ifdef MOZ_WIDGET_GONK
- // Collect transmitted amount for network statistics.
- mTxBytes += aByteLength;
- SaveNetworkStats(false);
-#endif
-
return !bufferFull;
}
@@ -1069,12 +1039,6 @@ NS_IMETHODIMP
TCPSocket::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext, nsIInputStream* aStream,
uint64_t aOffset, uint32_t aCount)
{
-#ifdef MOZ_WIDGET_GONK
- // Collect received amount for network statistics.
- mRxBytes += aCount;
- SaveNetworkStats(false);
-#endif
-
if (mUseArrayBuffers) {
nsTArray<uint8_t> buffer;
buffer.SetCapacity(aCount);
@@ -1160,10 +1124,7 @@ TCPSocket::SetSocketBridgeParent(TCPSocketParent* aBridgeParent)
void
TCPSocket::SetAppIdAndBrowser(uint32_t aAppId, bool aInIsolatedMozBrowser)
{
-#ifdef MOZ_WIDGET_GONK
- mAppId = aAppId;
- mInIsolatedMozBrowser = aInIsolatedMozBrowser;
-#endif
+ /*** STUB ***/
}
NS_IMETHODIMP
@@ -1190,37 +1151,6 @@ TCPSocket::UpdateBufferedAmount(uint32_t aBufferedAmount, uint32_t aTrackingNumb
return NS_OK;
}
-#ifdef MOZ_WIDGET_GONK
-void
-TCPSocket::SaveNetworkStats(bool aEnforce)
-{
- if (!mTxBytes && !mRxBytes) {
- // There is no traffic at all. No need to save statistics.
- return;
- }
-
- // If "enforce" is false, the traffic amount is saved to NetworkStatsServiceProxy
- // only when the total amount exceeds the predefined threshold value.
- // The purpose is to avoid too much overhead for collecting statistics.
- uint32_t totalBytes = mTxBytes + mRxBytes;
- if (!aEnforce && totalBytes < NETWORK_STATS_THRESHOLD) {
- return;
- }
-
- nsCOMPtr<nsINetworkStatsServiceProxy> nssProxy =
- do_GetService("@mozilla.org/networkstatsServiceProxy;1");
- if (!nssProxy) {
- return;
- }
-
- nssProxy->SaveAppStats(mAppId, mInIsolatedMozBrowser, mActiveNetworkInfo,
- PR_Now(), mRxBytes, mTxBytes, false, nullptr);
-
- // Reset the counters once the statistics is saved to NetworkStatsServiceProxy.
- mTxBytes = mRxBytes = 0;
-}
-#endif
-
NS_IMETHODIMP
TCPSocket::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData)
{
diff --git a/dom/network/TCPSocket.h b/dom/network/TCPSocket.h
index e98c03ca5..4ad425b9e 100644
--- a/dom/network/TCPSocket.h
+++ b/dom/network/TCPSocket.h
@@ -179,10 +179,6 @@ private:
void ActivateTLS();
// Dispatch an error event if necessary, then dispatch a "close" event.
nsresult MaybeReportErrorAndCloseIfOpen(nsresult status);
-#ifdef MOZ_WIDGET_GONK
- // Store and reset any saved network stats for this socket.
- void SaveNetworkStats(bool aEnforce);
-#endif
// Helper for FireDataStringEvent/FireDataArrayEvent.
nsresult FireDataEvent(JSContext* aCx, const nsAString& aType,
@@ -246,19 +242,6 @@ private:
nsTArray<nsCOMPtr<nsIInputStream>> mPendingDataWhileCopierActive;
bool mObserversActive;
-
-#ifdef MOZ_WIDGET_GONK
- // Number of bytes sent.
- uint32_t mTxBytes;
- // Number of bytes received.
- uint32_t mRxBytes;
- // The app that owns this socket.
- uint32_t mAppId;
- // Was this socket created inside of an isolated browser frame?
- bool mInIsolatedMozBrowser;
- // The name of the active network used by this socket.
- nsCOMPtr<nsINetworkInfo> mActiveNetworkInfo;
-#endif
};
} // namespace dom
diff --git a/dom/plugins/base/PluginPRLibrary.cpp b/dom/plugins/base/PluginPRLibrary.cpp
index a7ad76ea4..ecc55d455 100644
--- a/dom/plugins/base/PluginPRLibrary.cpp
+++ b/dom/plugins/base/PluginPRLibrary.cpp
@@ -57,12 +57,6 @@ PluginPRLibrary::NP_Initialize(NPNetscapeFuncs* bFuncs,
mNPP_GetSitesWithData = pFuncs->getsiteswithdata;
return NS_OK;
}
-#elif defined(MOZ_WIDGET_GONK)
-nsresult
-PluginPRLibrary::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
-{
- return NS_OK;
-}
#elif defined(XP_UNIX) && !defined(XP_MACOSX)
nsresult
PluginPRLibrary::NP_Initialize(NPNetscapeFuncs* bFuncs,
diff --git a/dom/plugins/base/PluginPRLibrary.h b/dom/plugins/base/PluginPRLibrary.h
index 602ad8cf8..ffd3de934 100644
--- a/dom/plugins/base/PluginPRLibrary.h
+++ b/dom/plugins/base/PluginPRLibrary.h
@@ -81,7 +81,7 @@ public:
return true;
}
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
virtual nsresult NP_Initialize(NPNetscapeFuncs* aNetscapeFuncs,
NPPluginFuncs* aFuncs, NPError* aError) override;
#else
diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp
index 1bea269cd..697bfacd4 100644
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -320,7 +320,6 @@ nsNPAPIPlugin::CreatePlugin(nsPluginTag *aPluginTag, nsNPAPIPlugin** aResult)
if (rv != NS_OK || pluginCallError != NPERR_NO_ERROR) {
return NS_ERROR_FAILURE;
}
-#elif defined(MOZ_WIDGET_GONK)
#else
NPError pluginCallError;
nsresult rv = pluginLib->NP_Initialize(&sBrowserFuncs, &plugin->mPluginFuncs, &pluginCallError);
diff --git a/dom/plugins/ipc/PluginLibrary.h b/dom/plugins/ipc/PluginLibrary.h
index c9499ee0d..2f9a3f81b 100644
--- a/dom/plugins/ipc/PluginLibrary.h
+++ b/dom/plugins/ipc/PluginLibrary.h
@@ -57,7 +57,7 @@ public:
virtual bool HasRequiredFunctions() = 0;
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error) = 0;
#else
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) = 0;
diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp
index 73f9c1025..ae6da8787 100755
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -529,7 +529,7 @@ PluginModuleChromeParent::OnProcessLaunched(const bool aSucceeded)
if (NS_SUCCEEDED(mAsyncInitRv))
#endif
{
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
mAsyncInitRv = NP_Initialize(mNPNIface,
mNPPIface,
&mAsyncInitError);
@@ -1745,7 +1745,7 @@ PluginModuleChromeParent::CachedSettingChanged(const char* aPref, void* aModule)
module->CachedSettingChanged();
}
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
nsresult
PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error)
{
diff --git a/dom/plugins/ipc/PluginModuleParent.h b/dom/plugins/ipc/PluginModuleParent.h
index 946d4c236..d00a01401 100644
--- a/dom/plugins/ipc/PluginModuleParent.h
+++ b/dom/plugins/ipc/PluginModuleParent.h
@@ -267,7 +267,7 @@ protected:
const mozilla::NativeEventData& aNativeKeyData,
bool aIsConsumed) override;
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error) override;
#else
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) override;
@@ -517,7 +517,7 @@ private:
PluginProcessParent* Process() const { return mSubprocess; }
base::ProcessHandle ChildProcessHandle() { return mSubprocess->GetChildProcessHandle(); }
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error) override;
#else
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) override;
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
diff --git a/dom/system/OSFileConstants.cpp b/dom/system/OSFileConstants.cpp
index 945233f4c..86377e75a 100644
--- a/dom/system/OSFileConstants.cpp
+++ b/dom/system/OSFileConstants.cpp
@@ -924,16 +924,6 @@ bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
return false;
}
-#if defined(MOZ_WIDGET_GONK)
- JSString* strVersion = JS_NewStringCopyZ(cx, "Gonk");
- if (!strVersion){
- return false;
- }
- JS::Rooted<JS::Value> valVersion(cx, JS::StringValue(strVersion));
- if (!JS_SetProperty(cx, objSys, "Name", valVersion)) {
- return false;
- }
-#else
nsCOMPtr<nsIXULRuntime> runtime = do_GetService(XULRUNTIME_SERVICE_CONTRACTID);
if (runtime) {
nsAutoCString os;
@@ -950,7 +940,6 @@ bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
return false;
}
}
-#endif // defined(MOZ_WIDGET_GONK)
#if defined(DEBUG)
JS::Rooted<JS::Value> valDebug(cx, JS::TrueValue());
diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl
index 560313680..468f1cc8a 100644
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -379,7 +379,7 @@ Window implements TouchEventHandlers;
Window implements OnErrorEventHandlerForWindow;
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+#if defined(MOZ_WIDGET_ANDROID)
// https://compat.spec.whatwg.org/#windoworientation-interface
partial interface Window {
[NeedsCallerType]