Index: android_webview/browser/aw_contents_client_bridge_base.h |
diff --git a/android_webview/browser/aw_contents_client_bridge_base.h b/android_webview/browser/aw_contents_client_bridge_base.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a45e12ce7e91b5d1ee5913827410df91900b637c |
--- /dev/null |
+++ b/android_webview/browser/aw_contents_client_bridge_base.h |
@@ -0,0 +1,48 @@ |
+// Copyright (c) 2013 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. |
+ |
+#ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ |
+#define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ |
+ |
+#include "base/callback_forward.h" |
+#include "base/supports_user_data.h" |
+ |
+class GURL; |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace net { |
+class X509Certificate; |
+} |
+ |
+namespace android_webview { |
+ |
+// browser/ layer interface for AwContensClientBridge, which is implemented |
+// in the native/ layer, due to layering. The implementor of the base class |
benm (inactive)
2013/02/25 12:16:38
does "browser/ layer interface for AwContentsClien
sgurun-gerrit only
2013/02/25 19:45:22
yep. done.
On 2013/02/25 12:16:38, benm wrote:
|
+// plumbs the request to the Java side and eventually to the webviewclient. This |
+// layering hides the details of native/ from browser/ layer. |
+class AwContentsClientBridgeBase { |
+ public: |
+ // Adds the handler to the UserData registry. |
+ static void Associate(content::WebContents* web_contents, |
+ AwContentsClientBridgeBase* handler); |
+ static AwContentsClientBridgeBase* FromWebContents( |
+ content::WebContents* web_contents); |
+ static AwContentsClientBridgeBase* FromID(int render_process_id, |
+ int render_view_id); |
+ |
+ virtual ~AwContentsClientBridgeBase(); |
+ |
+ virtual void AllowCertificateError(int cert_error, |
+ net::X509Certificate* cert, |
+ const GURL& request_url, |
+ const base::Callback<void(bool)>& callback, |
+ bool* cancel_request) = 0; |
+}; |
+ |
+} // namespace android_webview |
+ |
+#endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ |