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

Unified Diff: android_webview/native/aw_contents_client_bridge.h

Issue 235563005: Add client cert support to android_webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review phase 3 Created 6 years, 8 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_client_bridge.h
diff --git a/android_webview/native/aw_contents_client_bridge.h b/android_webview/native/aw_contents_client_bridge.h
index 4cd6c6caa130d8c18dbaac68fe876996bad320f1..69055fd22dcba4e185d79ad821142e655b796157 100644
--- a/android_webview/native/aw_contents_client_bridge.h
+++ b/android_webview/native/aw_contents_client_bridge.h
@@ -29,7 +29,6 @@ namespace android_webview {
// any references.
class AwContentsClientBridge : public AwContentsClientBridgeBase {
public:
-
AwContentsClientBridge(JNIEnv* env, jobject obj);
virtual ~AwContentsClientBridge();
@@ -39,6 +38,9 @@ class AwContentsClientBridge : public AwContentsClientBridgeBase {
const GURL& request_url,
const base::Callback<void(bool)>& callback,
bool* cancel_request) OVERRIDE;
+ virtual void SelectClientCertificate(
+ net::SSLCertRequestInfo* cert_request_info,
+ const SelectCertificateCallback& callback) OVERRIDE;
virtual void RunJavaScriptDialog(
content::JavaScriptMessageType message_type,
@@ -56,16 +58,23 @@ class AwContentsClientBridge : public AwContentsClientBridgeBase {
// Methods called from Java.
void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id);
+ void ProvideClientCertificateResponse(JNIEnv* env, jobject object,
+ jint request_id, jobjectArray encoded_chain_ref,
+ jobject private_key_ref);
void ConfirmJsResult(JNIEnv*, jobject, int id, jstring prompt);
void CancelJsResult(JNIEnv*, jobject, int id);
private:
+ void HandleErrorInClientCertificateResponse(int id);
+
JavaObjectWeakGlobalRef java_ref_;
typedef const base::Callback<void(bool)> CertErrorCallback;
IDMap<CertErrorCallback, IDMapOwnPointer> pending_cert_error_callbacks_;
IDMap<content::JavaScriptDialogManager::DialogClosedCallback, IDMapOwnPointer>
pending_js_dialog_callbacks_;
+ IDMap<SelectCertificateCallback, IDMapOwnPointer>
+ pending_client_cert_request_callbacks_;
};
bool RegisterAwContentsClientBridge(JNIEnv* env);

Powered by Google App Engine
This is Rietveld 408576698