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

Unified Diff: third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp

Issue 1631063002: Add isPageVisible to Page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Clean up 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/geolocation/GeolocationController.cpp
diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp b/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp
index e6522021aa0d96d8f4fe711562661881b70db2a5..88a65026da54ed47d54371c8f79176708f583de0 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp
@@ -90,7 +90,7 @@ void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc
if (m_client) {
if (enableHighAccuracy)
m_client->setEnableHighAccuracy(true);
- if (wasEmpty && page() && page()->visibilityState() == PageVisibilityStateVisible)
+ if (wasEmpty && page() && page()->isPageVisible())
startUpdatingIfNeeded();
}
}
@@ -170,7 +170,7 @@ void GeolocationController::pageVisibilityChanged()
if (m_observers.isEmpty() || !m_client)
return;
- if (page() && page()->visibilityState() == PageVisibilityStateVisible)
+ if (page() && page()->isPageVisible())
startUpdatingIfNeeded();
else
stopUpdatingIfNeeded();

Powered by Google App Engine
This is Rietveld 408576698