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

Unified Diff: content/browser/geolocation/location_provider_android.cc

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wire up onPause/onResume Created 7 years, 1 month 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: content/browser/geolocation/location_provider_android.cc
diff --git a/content/browser/geolocation/location_provider_android.cc b/content/browser/geolocation/location_provider_android.cc
index 20e672f5e3df37ab521660e298a265222b86e463..5962734b7fe0276498508f81e5c1d113c18cb757 100644
--- a/content/browser/geolocation/location_provider_android.cc
+++ b/content/browser/geolocation/location_provider_android.cc
@@ -44,6 +44,14 @@ void LocationProviderAndroid::OnPermissionGranted() {
// Nothing to do here.
}
+void LocationProviderAndroid::PauseProvider() {
+ AndroidLocationApiAdapter::GetInstance()->Pause();
+}
+
+void LocationProviderAndroid::ResumeProvider() {
+ AndroidLocationApiAdapter::GetInstance()->Resume();
+}
+
LocationProvider* NewSystemLocationProvider() {
return new LocationProviderAndroid;
}

Powered by Google App Engine
This is Rietveld 408576698