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

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

Issue 261983005: Stop firing orientationchange events at pages that are not visible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify test case 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
Index: Source/modules/screen_orientation/ScreenOrientation.h
diff --git a/Source/modules/screen_orientation/ScreenOrientation.h b/Source/modules/screen_orientation/ScreenOrientation.h
index aaae462c2dda426426eabab804ccfbe66cd6df44..5afa8f6788ef0f7984f192794ee4ef55ccccdb3d 100644
--- a/Source/modules/screen_orientation/ScreenOrientation.h
+++ b/Source/modules/screen_orientation/ScreenOrientation.h
@@ -5,6 +5,7 @@
#ifndef ScreenOrientation_h
#define ScreenOrientation_h
+#include "core/dom/FullscreenObserver.h"
#include "core/frame/DOMWindowProperty.h"
#include "platform/Supplementable.h"
#include "platform/Timer.h"
@@ -18,7 +19,7 @@ namespace WebCore {
class Document;
class Screen;
-class ScreenOrientation FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientation>, public WillBeHeapSupplement<Screen>, DOMWindowProperty {
+class ScreenOrientation FINAL : public NoBaseWillBeGarbageCollectedFinalized<ScreenOrientation>, public WillBeHeapSupplement<Screen>, public DOMWindowProperty, public FullscreenObserver {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientation);
public:
static ScreenOrientation& from(Screen&);
@@ -32,10 +33,17 @@ public:
private:
explicit ScreenOrientation(Screen&);
+ bool isOrientationLockingAllowed(Document&) const;
void lockOrientationAsync(blink::WebScreenOrientationLockType);
void orientationLockTimerFired(Timer<ScreenOrientation>*);
+ void startListeningForFullscreenExit();
+ void stopListeningForFullscreenExit();
+
+ // FullscreenObserver API.
+ virtual void didFullyExitFullscreen() OVERRIDE;
+
static const char* supplementName();
Document* document() const;

Powered by Google App Engine
This is Rietveld 408576698