summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/WebViewClassic.java
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-05-16 12:41:18 +0100
committerSteve Block <steveblock@google.com>2012-05-22 12:07:55 +0100
commitf3f60d9328d8acfedf987a73631fc90c39bf5447 (patch)
tree1df1425cd3c08ef1e29dee80877406332eafa873 /core/java/android/webkit/WebViewClassic.java
parent32a85291efb1b5ef0c3dbd7b581df27f1d03305a (diff)
downloadframeworks_base-f3f60d9328d8acfedf987a73631fc90c39bf5447.zip
frameworks_base-f3f60d9328d8acfedf987a73631fc90c39bf5447.tar.gz
frameworks_base-f3f60d9328d8acfedf987a73631fc90c39bf5447.tar.bz2
Switch Geolocation DRT methods to control client-based mock
Note that we plumb DRT Geolocation mock calls via WebView. This is required because the WebCore client-based mock is not a static but is tied to the Page. See WebKit change Ib74a3c05991593e75c3138415d4ac0bf0c9aefa9. Bug: 6511338 Change-Id: I6d88d5dce5c2148812b191a5b452718bf0854aeb
Diffstat (limited to 'core/java/android/webkit/WebViewClassic.java')
-rw-r--r--core/java/android/webkit/WebViewClassic.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 7786564..520d45c 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -4818,6 +4818,43 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
}
/**
+ * Sets use of the Geolocation mock client. Also resets that client. Called
+ * by DRT on UI thread, need to proxy to WebCore thread.
+ *
+ * debug only
+ */
+ public void setUseMockGeolocation() {
+ mWebViewCore.sendMessage(EventHub.SET_USE_MOCK_GEOLOCATION);
+ }
+
+ /**
+ * Called by DRT on WebCore thread.
+ *
+ * debug only
+ */
+ public void setMockGeolocationPosition(double latitude, double longitude, double accuracy) {
+ mWebViewCore.setMockGeolocationPosition(latitude, longitude, accuracy);
+ }
+
+ /**
+ * Called by DRT on WebCore thread.
+ *
+ * debug only
+ */
+ public void setMockGeolocationError(int code, String message) {
+ mWebViewCore.setMockGeolocationError(code, message);
+ }
+
+ /**
+ * Called by DRT on WebCore thread.
+ *
+ * debug only
+ */
+ public void setMockGeolocationPermission(boolean allow) {
+ mWebViewCore.setMockGeolocationPermission(allow);
+ }
+
+ /**
* Called by DRT on WebCore thread.
*
* debug only