Index: Source/modules/screen_orientation/ScreenOrientation.cpp |
diff --git a/Source/modules/screen_orientation/ScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenOrientation.cpp |
index d8e40ed08b5a21b4b8042667a1b58c3352577fe7..05aefe438599e13ec765d731da48e9590d50108b 100644 |
--- a/Source/modules/screen_orientation/ScreenOrientation.cpp |
+++ b/Source/modules/screen_orientation/ScreenOrientation.cpp |
@@ -14,6 +14,7 @@ |
#include "modules/EventTargetModules.h" |
#include "modules/screen_orientation/LockOrientationCallback.h" |
#include "modules/screen_orientation/ScreenOrientationController.h" |
+#include "public/platform/Platform.h" |
#include "public/platform/WebScreenOrientationType.h" |
// This code assumes that WebScreenOrientationType values are included in WebScreenOrientationLockType. |
@@ -107,10 +108,13 @@ ScreenOrientation::ScreenOrientation(LocalFrame* frame) |
, m_angle(0) |
{ |
ScriptWrappable::init(this); |
+ |
+ blink::Platform::current()->startScreenOrientationListening(); |
} |
ScreenOrientation::~ScreenOrientation() |
{ |
+ blink::Platform::current()->stopScreenOrientationListening(); |
Michael van Ouwerkerk
2014/07/17 10:36:27
Shouldn't this also be called when page visibility
|
} |
const WTF::AtomicString& ScreenOrientation::interfaceName() const |