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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwSettings.java

Issue 12211047: Implementing geolocation for the Android Webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added const Created 7 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: android_webview/java/src/org/chromium/android_webview/AwSettings.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
index cb91126972e3bd2824676eae2133e94984b9ff9a..65b0c34918ecc104450ae947f33f426bf58ac0e0 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
@@ -26,6 +26,7 @@ public class AwSettings {
private boolean mAllowFileUrlAccess = true;
private int mCacheMode = WebSettings.LOAD_DEFAULT;
private boolean mShouldFocusFirstNode = true;
+ private boolean mGeolocationEnabled = true;
public AwSettings(Context context) {
mContext = context;
@@ -137,4 +138,24 @@ public class AwSettings {
return mShouldFocusFirstNode;
}
}
+
+ /**
+ * See {@link android.webkit.WebSettings#setGeolocationEnabled}.
+ */
+ public void setGeolocationEnabled(boolean flag) {
+ synchronized (mAwSettingsLock) {
+ if (mGeolocationEnabled != flag) {
+ mGeolocationEnabled = flag;
+ }
+ }
+ }
+
+ /**
+ * @return Returns if geolocation is currently enabled.
+ */
+ boolean getGeolocationEnabled() {
+ synchronized (mAwSettingsLock) {
+ return mGeolocationEnabled;
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698