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

Unified Diff: third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp

Issue 1631063002: Add isPageVisible to Page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Remove unnecessary variable Created 4 years, 11 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: third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
diff --git a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
index 2cfef2f8ff05f6e5eee2e9e525e91242f4f5fadc..c3fe625ed72b0ad1ca69806c5853994426a82a86 100644
--- a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
+++ b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.cpp
@@ -104,8 +104,7 @@ void ScreenWakeLock::notifyClient()
if (!m_client)
return;
- bool visible = page() && page()->visibilityState() == PageVisibilityStateVisible;
- m_client->requestKeepScreenAwake(m_keepAwake && visible);
+ m_client->requestKeepScreenAwake(m_keepAwake && page() && page()->isPageVisible());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698