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

Unified Diff: chrome/browser/android/location_settings_impl.cc

Issue 2721293002: Show the Android Location Settings Dialog when sites want permission. (Closed)
Patch Set: Updated 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_impl.cc
diff --git a/chrome/browser/android/location_settings_impl.cc b/chrome/browser/android/location_settings_impl.cc
index 32232db88efe08df72614a2a956166937e8fee72..683d22ccb6eaaa2b45abdc8995eea2431e81056d 100644
--- a/chrome/browser/android/location_settings_impl.cc
+++ b/chrome/browser/android/location_settings_impl.cc
@@ -19,13 +19,23 @@ LocationSettingsImpl::LocationSettingsImpl() {}
LocationSettingsImpl::~LocationSettingsImpl() {}
-bool LocationSettingsImpl::CanSitesRequestLocationPermission(
+bool LocationSettingsImpl::HasAndroidLocationPermission() {
+ JNIEnv* env = AttachCurrentThread();
+ return Java_LocationSettings_hasAndroidLocationPermission(env);
+}
+
+bool LocationSettingsImpl::CanPromptForAndroidLocationPermission(
content::WebContents* web_contents) {
JNIEnv* env = AttachCurrentThread();
- return Java_LocationSettings_canSitesRequestLocationPermission(
+ return Java_LocationSettings_canPromptForAndroidLocationPermission(
env, web_contents->GetJavaWebContents());
}
+bool LocationSettingsImpl::IsSystemLocationSettingEnabled() {
+ JNIEnv* env = AttachCurrentThread();
+ return Java_LocationSettings_isSystemLocationSettingEnabled(env);
+}
+
bool LocationSettingsImpl::CanPromptToEnableSystemLocationSetting() {
JNIEnv* env = AttachCurrentThread();
return Java_LocationSettings_canPromptToEnableSystemLocationSetting(env);

Powered by Google App Engine
This is Rietveld 408576698