OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_CERTIFICATE_ERROR_HANDLER_BASE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_CERTIFICATE_ERROR_HANDLER_BASE_H_ |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 |
| 10 class GURL; |
| 11 |
| 12 namespace net { |
| 13 class X509Certificate; |
| 14 } |
| 15 |
| 16 namespace android_webview { |
| 17 |
| 18 // browser/ layer interface for AwCertificateErrorHandler, which is implemented |
| 19 // in the native/ layer, due to layering. The implementor of the base class |
| 20 // plumbs the request to the Java side and eventually to the webviewclient. This |
| 21 // layering hides the details of native/ from browser/ layer. |
| 22 class AwCertificateErrorHandlerBase { |
| 23 public: |
| 24 static AwCertificateErrorHandlerBase* FromID(int render_process_id, |
| 25 int render_view_id); |
| 26 virtual ~AwCertificateErrorHandlerBase(); |
| 27 |
| 28 virtual void AllowCertificateError(int cert_error, |
| 29 net::X509Certificate* cert, |
| 30 const GURL& request_url, |
| 31 const base::Callback<void(bool)>& callback, |
| 32 bool* cancel_request) = 0; |
| 33 }; |
| 34 |
| 35 } // namespace android_webview |
| 36 |
| 37 #endif // ANDROID_WEBVIEW_BROWSER_AW_CERTIFICATE_ERROR_HANDLER_BASE_H_ |
OLD | NEW |