diff --git a/api/current.xml b/api/current.xml
index 065176b073445..a60c3a1fb8c31 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -174063,7 +174063,7 @@
deprecated="not deprecated"
visibility="public"
>
-
+
@@ -175159,23 +175159,6 @@
visibility="public"
>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
callback = (ValueCallback) values.get(CALLBACK);
+ Set origins = (Set) values.get(ORIGINS);
+ ValueCallback > callback = (ValueCallback >) values.get(CALLBACK);
callback.onReceiveValue(origins);
} break;
case RETURN_ALLOWED: {
@@ -122,10 +136,9 @@ public final class GeolocationPermissions {
case GET_ORIGINS: {
getOriginsImpl();
ValueCallback callback = (ValueCallback) msg.obj;
- Set origins = new HashSet(mOrigins);
Map values = new HashMap();
values.put(CALLBACK, callback);
- values.put(ORIGINS, origins);
+ values.put(ORIGINS, mOrigins);
postUIMessage(Message.obtain(null, RETURN_ORIGINS, values));
} break;
case GET_ALLOWED: {
@@ -185,15 +198,17 @@ public final class GeolocationPermissions {
* Gets the set of origins for which Geolocation permissions are stored.
* Note that we represent the origins as strings. These are created using
* WebCore::SecurityOrigin::toString(). As long as all 'HTML 5 modules'
- * (Database, Geolocation etc) do so, it's safe to match up origins for the
- * purposes of displaying UI.
+ * (Database, Geolocation etc) do so, it's safe to match up origins based
+ * on this string.
+ *
+ * Callback is a ValueCallback object whose onReceiveValue method will be
+ * called asynchronously with the set of origins.
*/
- public void getOrigins(ValueCallback callback) {
+ public void getOrigins(ValueCallback > callback) {
if (callback != null) {
if (WebViewCore.THREAD_NAME.equals(Thread.currentThread().getName())) {
getOriginsImpl();
- Set origins = new HashSet(mOrigins);
- callback.onReceiveValue(origins);
+ callback.onReceiveValue(mOrigins);
} else {
postMessage(Message.obtain(null, GET_ORIGINS, callback));
}
@@ -210,6 +225,9 @@ public final class GeolocationPermissions {
/**
* Gets the permission state for the specified origin.
+ *
+ * Callback is a ValueCallback object whose onReceiveValue method will be
+ * called asynchronously with the permission state for the origin.
*/
public void getAllowed(String origin, ValueCallback callback) {
if (callback == null) {
@@ -231,7 +249,7 @@ public final class GeolocationPermissions {
}
/**
- * Helper method to get the permission state.
+ * Helper method to get the permission state for the specified origin.
*/
private void getAllowedImpl(String origin) {
// Called on the WebKit thread.
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 92676aac8c766..8ca4142cc7fe0 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -256,29 +256,34 @@ public class WebChromeClient {
}
/**
- * Add a JavaScript error message to the console. Clients should override
- * this to process the log message as they see fit.
+ * Report a JavaScript error message to the host application. The ChromeClient
+ * should override this to process the log message as they see fit.
* @param message The error message to report.
* @param lineNumber The line number of the error.
* @param sourceID The name of the source file that caused the error.
*/
- public void addMessageToConsole(String message, int lineNumber, String sourceID) {}
+ public void onConsoleMessage(String message, int lineNumber, String sourceID) {}
/**
- * Ask the host application for an icon to represent a