summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClientClassicExt.java
diff options
context:
space:
mode:
authorJonathan Dixon <joth@google.com>2012-06-08 09:46:57 -0700
committerJonathan Dixon <joth@google.com>2012-06-08 11:33:39 -0700
commit73eeb7b5ed5f88750156b787c665f7d3769fc56a (patch)
tree6db93d36c2d30f7f26d5627b99d0112e37045fdf /core/java/android/webkit/WebViewClientClassicExt.java
parent0cd655ad2dcc16035f26300001ac2b3bd62d1c46 (diff)
Extract WebView Classic details from API classes.
Last remaining bits: - push JNUUtil.setContext call down into WebViewDatabaseClassic - remove references to hidden ClientCertRequestHandler from the public API classes. Change-Id: I9605dc2493b73fe8f22c7bb38c73d36632e0c7fa
Diffstat (limited to 'core/java/android/webkit/WebViewClientClassicExt.java')
-rw-r--r--core/java/android/webkit/WebViewClientClassicExt.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewClientClassicExt.java b/core/java/android/webkit/WebViewClientClassicExt.java
new file mode 100644
index 000000000000..a87358552017
--- /dev/null
+++ b/core/java/android/webkit/WebViewClientClassicExt.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.webkit;
+
+import android.net.http.SslError;
+
+/**
+ * Adds WebViewClassic specific extension methods to the WebViewClient callback class.
+ * These are not part of the public WebView API, so the class is hidden.
+ * @hide
+ */
+public class WebViewClientClassicExt extends WebViewClient {
+
+ /**
+ * Notify the host application that an SSL error occurred while loading a
+ * resource, but the WebView chose to proceed anyway based on a
+ * decision retained from a previous response to onReceivedSslError().
+ */
+ public void onProceededAfterSslError(WebView view, SslError error) {
+ }
+
+ /**
+ * 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 A ClientCertRequestHandler object that will
+ * handle the user's response.
+ * @param host_and_port The host and port of the requesting server.
+ */
+ public void onReceivedClientCertRequest(WebView view,
+ ClientCertRequestHandler handler, String host_and_port) {
+ handler.cancel();
+ }
+}