Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1976)

Unified Diff: android_webview/native/aw_contents.h

Issue 12091111: Implement Webviewclient.onReceivedSslError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address code review Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_contents.h
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index 347705a62b5ad4eb548d2ab2b8987d4f6e6006fd..19d00213ff66fee8fff3d0578dd4e5bca7e03a3c 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -8,12 +8,14 @@
#include <jni.h>
#include <string>
+#include "android_webview/browser/aw_certificate_error_handler_base.h"
#include "android_webview/browser/find_helper.h"
#include "android_webview/browser/icon_helper.h"
#include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
#include "android_webview/public/browser/draw_gl.h"
#include "base/android/scoped_java_ref.h"
#include "base/android/jni_helper.h"
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/android/compositor.h"
#include "content/public/browser/javascript_dialogs.h"
@@ -31,6 +33,10 @@ class Compositor;
class WebContents;
}
+namespace net {
+class X509Certificate;
+}
+
namespace android_webview {
class AwContentsContainer;
@@ -43,7 +49,8 @@ class AwWebContentsDelegate;
class AwContents : public FindHelper::Listener,
public IconHelper::Listener,
public content::Compositor::Client,
- public AwRenderViewHostExt::Client {
+ public AwRenderViewHostExt::Client,
+ public AwCertificateErrorHandlerBase {
public:
// Returns the AwContents instance associated with |web_contents|, or NULL.
static AwContents* FromWebContents(content::WebContents* web_contents);
@@ -141,6 +148,15 @@ class AwContents : public FindHelper::Listener,
// AwRenderViewHostExt::Client implementation.
virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE;
+ // AwCertificateErrorHandlerBase implementation
+ virtual void AllowCertificateError(int cert_error,
+ net::X509Certificate* cert,
+ const GURL& request_url,
+ const base::Callback<void(bool)>& callback,
+ bool* cancel_request) OVERRIDE;
boliu 2013/02/01 23:07:13 blank line between methods
sgurun-gerrit only 2013/02/02 01:01:10 Done.
+ // Method called from Java.
+ void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed);
+
private:
void Invalidate();
void SetWebContents(content::WebContents* web_contents);
@@ -155,6 +171,7 @@ class AwContents : public FindHelper::Listener,
scoped_ptr<FindHelper> find_helper_;
scoped_ptr<IconHelper> icon_helper_;
scoped_ptr<content::WebContents> pending_contents_;
+ base::Callback<void(bool)> ssl_error_callback_;
// Compositor-specific state.
scoped_ptr<content::Compositor> compositor_;

Powered by Google App Engine
This is Rietveld 408576698