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

Unified Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp

Issue 2388693002: Make DOMWindowProperty a thin wrapper of ContextLifecycleObserver
Patch Set: temp Created 4 years 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: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
index 6414baef66c55afa760a044a6f1d2ab093455023..225d9fd589e9e2793c3aeeabc8026c2a14e9eb25 100644
--- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
+++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
@@ -157,7 +157,7 @@ void ScreenOrientationControllerImpl::notifyOrientationChanged() {
void ScreenOrientationControllerImpl::setOrientation(
ScreenOrientation* orientation) {
m_orientation = orientation;
- if (m_orientation)
+ if (isActiveAndVisible())
updateOrientation();
notifyDispatcher();
}
@@ -208,9 +208,9 @@ bool ScreenOrientationControllerImpl::hasLastData() {
return true;
}
-void ScreenOrientationControllerImpl::frameDestroyed() {
+void ScreenOrientationControllerImpl::contextDestroyed() {
m_client = nullptr;
- DOMWindowProperty::frameDestroyed();
+ DOMWindowProperty::contextDestroyed();
m_activeLock = false;
}

Powered by Google App Engine
This is Rietveld 408576698