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: content/browser/geolocation/location_api_adapter_android.h

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.h
diff --git a/content/browser/geolocation/location_api_adapter_android.h b/content/browser/geolocation/location_api_adapter_android.h
index f81ac93826b4584c6058b9cee277d4a12a3d70bd..6dbc3e795ef665c4514107544087b986e6a59230 100644
--- a/content/browser/geolocation/location_api_adapter_android.h
+++ b/content/browser/geolocation/location_api_adapter_android.h
@@ -37,6 +37,15 @@ class AndroidLocationApiAdapter {
// Called on the Geolocation thread.
void Stop();
+ // Pauses the underlying location provider, preventing it from firing new
+ // updates. This is intended as a lighter weight alternative to Stop() that
+ // can be easily resumed without needing to call Start() again.
+ void Pause();
+
+ // Resumes the underlying location provider. Should not be invoked unless
+ // the location provider has already been paused.
+ void Resume();
+
// Returns our singleton.
static AndroidLocationApiAdapter* GetInstance();

Powered by Google App Engine
This is Rietveld 408576698