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

Unified Diff: android_webview/native/aw_certificate_error_handler_base.cc

Issue 12091111: Implement Webviewclient.onReceivedSslError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix 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_certificate_error_handler_base.cc
diff --git a/android_webview/native/aw_certificate_error_handler_base.cc b/android_webview/native/aw_certificate_error_handler_base.cc
new file mode 100644
index 0000000000000000000000000000000000000000..77b2f7c7929ea9d2e1d317d8bbaa4376a13255c0
--- /dev/null
+++ b/android_webview/native/aw_certificate_error_handler_base.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/browser/aw_certificate_error_handler_base.h"
+
+#include "android_webview/native/aw_contents.h"
+#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/web_contents.h"
+
+namespace android_webview {
+
+AwCertificateErrorHandlerBase::~AwCertificateErrorHandlerBase() {
+}
+
+//static
+AwCertificateErrorHandlerBase* AwCertificateErrorHandlerBase::FromID(
+ int render_process_id,
+ int render_view_id) {
+
+ const content::RenderViewHost* host =
+ content::RenderViewHost::FromID(render_process_id, render_view_id);
+ content::WebContents* web_contents =
+ content::WebContents::FromRenderViewHost(host);
+ return static_cast<AwCertificateErrorHandlerBase*>
+ (AwContents::FromWebContents(web_contents));
+}
+
+} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698