summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClient.java
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2011-02-11 13:39:56 -0800
committerBrian Carlstrom <bdc@google.com>2011-06-09 05:01:56 -0700
commita14775949c97a616196f5293209b092ee3d4e9a9 (patch)
tree326ecb8585e34a3ad674a26ca617709616903c24 /core/java/android/webkit/WebViewClient.java
parent6276814a67e633c342acc7bf3d982b091bfe9f08 (diff)
Implement android.webkit.BrowserFrame.requestClientCert
Following the example of reportSslCertError, implement requestClientCert ERROR CASE CLIENT CERT CASE <... From external/webkit ...> <... From external/webkit ...> android.webkit.BrowserFrame.reportSslCertError android.webkit.BrowserFrame.requestClientCert CallbackProxy.onReceivedSslError CallbackProxy.onReceivedClientCertRequest WebViewClient.onReceivedSslError WebViewClient.onReceivedClientCertRequest <... See packages/apps/Browser ...> <... See packages/apps/Browser ...> SslErrorHandler.proceed (with SslCertLookupTable) ClientCertRequestHandler.proceed (with SslClientCertLookupTable) android.webkit.BrowserFrame.nativeSslCertErrorProceed android.webkit.BrowserFrame.nativeSslClientCert <... To external/webkit ...> <... To external/webkit ...> Change-Id: I2ba6007ad9b2ee520a0a6b17f3a767679b1664de
Diffstat (limited to 'core/java/android/webkit/WebViewClient.java')
-rw-r--r--core/java/android/webkit/WebViewClient.java46
1 files changed, 33 insertions, 13 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index 65026a5d02ac..d3be2bf1a8d6 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -30,7 +30,7 @@ public class WebViewClient {
* proper handler for the url. If WebViewClient is provided, return true
* means the host application handles the url, while return false means the
* current WebView handles the url.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param url The url to be loaded.
* @return True if the host application wants to leave the current WebView
@@ -46,7 +46,7 @@ public class WebViewClient {
* framesets will call onPageStarted one time for the main frame. This also
* means that onPageStarted will not be called when the contents of an
* embedded frame changes, i.e. clicking a link whose target is an iframe.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param url The url to be loaded.
* @param favicon The favicon for this page if it already exists in the
@@ -60,7 +60,7 @@ public class WebViewClient {
* is called only for main frame. When onPageFinished() is called, the
* rendering picture may not be updated yet. To get the notification for the
* new Picture, use {@link WebView.PictureListener#onNewPicture}.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param url The url of the page.
*/
@@ -70,7 +70,7 @@ public class WebViewClient {
/**
* Notify the host application that the WebView will load the resource
* specified by the given url.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param url The url of the resource the WebView will load.
*/
@@ -102,7 +102,7 @@ public class WebViewClient {
* HTTP redirects. As the host application if it would like to continue
* trying to load the resource. The default behavior is to send the cancel
* message.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param cancelMsg The message to send if the host wants to cancel
* @param continueMsg The message to send if the host wants to continue
@@ -164,7 +164,7 @@ public class WebViewClient {
* As the host application if the browser should resend data as the
* requested page was a result of a POST. The default is to not resend the
* data.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param dontResend The message to send if the browser should not resend
* @param resend The message to send if the browser should resend data
@@ -176,7 +176,7 @@ public class WebViewClient {
/**
* Notify the host application to update its visited links database.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param url The url being visited.
* @param isReload True if this url is being reloaded.
@@ -186,12 +186,12 @@ public class WebViewClient {
}
/**
- * Notify the host application to handle a ssl certificate error request
+ * Notify the host application to handle a SSL certificate error request
* (display the error to the user and ask whether to proceed or not). The
* host application has to call either handler.cancel() or handler.proceed()
* as the connection is suspended and waiting for the response. The default
* behavior is to cancel the load.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param handler An SslErrorHandler object that will handle the user's
* response.
@@ -203,9 +203,29 @@ public class WebViewClient {
}
/**
+ * Notify the host application to handle a SSL client certificate
+ * request (display the request to the user and ask whether to
+ * proceed with a client certificate or not). The host application
+ * has to call either handler.cancel() or handler.proceed() as the
+ * connection is suspended and waiting for the response. The
+ * default behavior is to cancel, returning no client certificate.
+ *
+ * @param view The WebView that is initiating the callback.
+ * @param handler An ClientCertRequestHandler object that will
+ * handle the user's response.
+ * @param host_and_port The host and port of the requesting server.
+ *
+ * @hide
+ */
+ public void onReceivedClientCertRequest(WebView view,
+ ClientCertRequestHandler handler, String host_and_port) {
+ handler.cancel();
+ }
+
+ /**
* Notify the host application to handle an authentication request. The
* default behavior is to cancel the request.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param handler The HttpAuthHandler that will handle the user's response.
* @param host The host requiring authentication.
@@ -223,7 +243,7 @@ public class WebViewClient {
* true, WebView will not handle the key event. If return false, WebView
* will always handle the key event, so none of the super in the view chain
* will see the key event. The default behavior returns false.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param event The key event.
* @return True if the host application wants to handle the key event
@@ -239,7 +259,7 @@ public class WebViewClient {
* or if shouldOverrideKeyEvent returns true. This is called asynchronously
* from where the key is dispatched. It gives the host application an chance
* to handle the unhandled key events.
- *
+ *
* @param view The WebView that is initiating the callback.
* @param event The key event.
*/
@@ -249,7 +269,7 @@ public class WebViewClient {
/**
* Notify the host application that the scale applied to the WebView has
* changed.
- *
+ *
* @param view he WebView that is initiating the callback.
* @param oldScale The old scale factor
* @param newScale The new scale factor