1/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.webkit;
18
19import android.net.http.SslError;
20
21/**
22 * Adds WebViewClassic specific extension methods to the WebViewClient callback class.
23 * These are not part of the public WebView API, so the class is hidden.
24 * @hide
25 */
26public class WebViewClientClassicExt extends WebViewClient {
27
28    /**
29     * Notify the host application that an SSL error occurred while loading a
30     * resource, but the WebView chose to proceed anyway based on a
31     * decision retained from a previous response to onReceivedSslError().
32     */
33    public void onProceededAfterSslError(WebView view, SslError error) {
34    }
35
36    /**
37     * Notify the host application to handle a SSL client certificate
38     * request (display the request to the user and ask whether to
39     * proceed with a client certificate or not). The host application
40     * has to call either handler.cancel() or handler.proceed() as the
41     * connection is suspended and waiting for the response. The
42     * default behavior is to cancel, returning no client certificate.
43     *
44     * @param view The WebView that is initiating the callback.
45     * @param handler A ClientCertRequestHandler object that will
46     *            handle the user's response.
47     * @param host_and_port The host and port of the requesting server.
48     */
49    public void onReceivedClientCertRequest(WebView view,
50            ClientCertRequestHandler handler, String host_and_port) {
51        handler.cancel();
52    }
53}
54