Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Unified Diff: Source/modules/screen_orientation/ScreenOrientationController.h

Issue 280283002: Stop firing orientationchange events at pages that are not visible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take feedback into consideration Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/screen_orientation/ScreenOrientationController.h
diff --git a/Source/modules/screen_orientation/ScreenOrientationController.h b/Source/modules/screen_orientation/ScreenOrientationController.h
index b5f8de70869c5961b30f91390bf6b1852267b379..975da074686f9a542282baae08f6365f903800ca 100644
--- a/Source/modules/screen_orientation/ScreenOrientationController.h
+++ b/Source/modules/screen_orientation/ScreenOrientationController.h
@@ -6,13 +6,14 @@
#define ScreenOrientationController_h
#include "core/dom/DocumentSupplementable.h"
+#include "core/page/PageLifecycleObserver.h"
#include "public/platform/WebScreenOrientationType.h"
namespace WebCore {
class FrameView;
-class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollected<ScreenOrientationController>, public DocumentSupplement {
+class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollected<ScreenOrientationController>, public DocumentSupplement, public PageLifecycleObserver {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController);
DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(ScreenOrientationController);
public:
@@ -26,7 +27,11 @@ private:
explicit ScreenOrientationController(Document&);
static blink::WebScreenOrientationType computeOrientation(FrameView*);
+ // Inherited from PageLifecycleObserver.
+ virtual void pageVisibilityChanged() OVERRIDE;
+
Document& m_document;
+ blink::WebScreenOrientationType m_overrideOrientation;
};
} // namespace WebCore
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/modules/screen_orientation/ScreenOrientationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698