Bug 842782 - p2: introduce attributes for orientation lock to video element. r=jwwang,smaug

MozReview-Commit-ID: odq1y9qH1
This commit is contained in:
John Lin
2017-08-25 14:23:03 +08:00
parent 3af2386c4f
commit 09e4a53cee
3 changed files with 28 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "MediaPrefs.h"
namespace mozilla {
@@ -139,6 +140,22 @@ public:
already_AddRefed<VideoPlaybackQuality> GetVideoPlaybackQuality();
bool MozOrientationLockEnabled() const
{
return MediaPrefs::VideoOrientationLockEnabled();
}
bool MozIsOrientationLocked() const
{
return mIsOrientationLocked;
}
void SetMozIsOrientationLocked(bool aLock)
{
mIsOrientationLocked = aLock;
}
protected:
virtual ~HTMLVideoElement();
@@ -151,6 +168,8 @@ protected:
bool mUseScreenWakeLock;
RefPtr<WakeLock> mScreenWakeLock;
bool mIsOrientationLocked;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
GenericSpecifiedValues* aGenericData);