mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 15:27:30 +09:00
parent
9195e9e4e3
commit
b586913598
53 changed files with 60 additions and 750 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue