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

Unified Diff: content/browser/geolocation/location_api_adapter_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_api_adapter_android.cc
diff --git a/content/browser/geolocation/location_api_adapter_android.cc b/content/browser/geolocation/location_api_adapter_android.cc
index 3ab693b33d16b2c1c4c9f2fdaec0ee5475feafa2..e79e5352f2753540b9038821810d3ecc5843b189 100644
--- a/content/browser/geolocation/location_api_adapter_android.cc
+++ b/content/browser/geolocation/location_api_adapter_android.cc
@@ -160,4 +160,16 @@ void AndroidLocationApiAdapter::OnNewGeopositionInternal(
geoposition));
}
+void AndroidLocationApiAdapter::Pause() {
+ JNIEnv* env = AttachCurrentThread();
+ Java_LocationProvider_pause(env,
+ java_location_provider_android_object_.obj());
+}
+
+void AndroidLocationApiAdapter::Resume() {
+ JNIEnv* env = AttachCurrentThread();
+ Java_LocationProvider_resume(env,
+ java_location_provider_android_object_.obj());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698