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

Unified Diff: chrome/browser/android/location_settings.h

Issue 2721293002: Show the Android Location Settings Dialog when sites want permission. (Closed)
Patch Set: Feedback Created 3 years, 10 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: chrome/browser/android/location_settings.h
diff --git a/chrome/browser/android/location_settings.h b/chrome/browser/android/location_settings.h
index 5dc407f1f6d6d6d79ca424d8790f4ddb9ac77b4c..6f9d599ca24c979838513fb3154dd53a073d844a 100644
--- a/chrome/browser/android/location_settings.h
+++ b/chrome/browser/android/location_settings.h
@@ -20,13 +20,16 @@ class LocationSettings {
public:
virtual ~LocationSettings() {}
- // Returns true if:
- // - Location is enabled system-wide (in Android settings)
- // - The necessary location permission are granted to Chrome, or if Chrome
- // still has the ability to request the permissions to be granted.
- virtual bool CanSitesRequestLocationPermission(
+ // Returns true if Chrome has location permission.
+ virtual bool HasAndroidLocationPermission() = 0;
+
+ // Returns true if Chrome can prompt to get location permission.
+ virtual bool CanPromptForAndroidLocationPermission(
content::WebContents* web_contents) = 0;
+ // Returns true if the system location is enabled.
+ virtual bool IsSystemLocationSettingEnabled() = 0;
+
// Returns true iff a prompt can be triggered to ask the user to turn on the
// system location setting on their device.
// In particular, returns false if the system location setting is already

Powered by Google App Engine
This is Rietveld 408576698