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; |
+ } |
+ } |
} |