From 6571d2ceb42930dab01677ef0e95e732d5076fb8 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 12 May 2018 16:19:33 +0200 Subject: Remove MOZ_WIDGET_GONK [1/2] Tag #288 --- dom/base/Navigator.cpp | 6 ------ dom/base/ScreenOrientation.cpp | 2 +- dom/base/nsContentPermissionHelper.cpp | 3 --- dom/base/nsGlobalWindow.cpp | 10 +++++----- dom/base/nsGlobalWindow.h | 8 ++++---- dom/base/nsPIDOMWindow.h | 2 +- 6 files changed, 11 insertions(+), 20 deletions(-) (limited to 'dom/base') 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 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 -#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 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 mEnabledSensors; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) nsAutoPtr 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 -- cgit v1.2.3