[iOS] Suspend and resume device motion and device orientation updates when page is...
[WebKit-https.git] / Source / WebCore / dom / Document.h
index 4c202a26ea08f02142f3005eec6ed24c63e65719..319dc44ff3668c1cceadaf0f27882f37033c2aa1 100644 (file)
@@ -604,6 +604,9 @@ public:
     virtual void resumeActiveDOMObjects(ActiveDOMObject::ReasonForSuspension) override final;
     virtual void stopActiveDOMObjects() override final;
 
+    void suspendDeviceMotionAndOrientationUpdates();
+    void resumeDeviceMotionAndOrientationUpdates();
+
     RenderView* renderView() const { return m_renderView.get(); }
 
     bool renderTreeBeingDestroyed() const { return m_renderTreeBeingDestroyed; }
@@ -1775,6 +1778,7 @@ private:
 #if ENABLE(MEDIA_SESSION)
     RefPtr<MediaSession> m_defaultMediaSession;
 #endif
+    bool m_areDeviceMotionAndOrientationUpdatesSuspended { false };
 };
 
 inline void Document::notifyRemovePendingSheetIfNeeded()