OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "android_webview/browser/aw_contents_client_bridge_base.h" | 10 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const base::string16& message_text, | 48 const base::string16& message_text, |
49 const base::string16& default_prompt_text, | 49 const base::string16& default_prompt_text, |
50 const content::JavaScriptDialogManager::DialogClosedCallback& callback) | 50 const content::JavaScriptDialogManager::DialogClosedCallback& callback) |
51 OVERRIDE; | 51 OVERRIDE; |
52 virtual void RunBeforeUnloadDialog( | 52 virtual void RunBeforeUnloadDialog( |
53 const GURL& origin_url, | 53 const GURL& origin_url, |
54 const base::string16& message_text, | 54 const base::string16& message_text, |
55 const content::JavaScriptDialogManager::DialogClosedCallback& callback) | 55 const content::JavaScriptDialogManager::DialogClosedCallback& callback) |
56 OVERRIDE; | 56 OVERRIDE; |
57 virtual bool ShouldOverrideUrlLoading(const base::string16& url) OVERRIDE; | 57 virtual bool ShouldOverrideUrlLoading(const base::string16& url) OVERRIDE; |
| 58 virtual void RequestGeolocationPermission( |
| 59 content::WebContents* web_contents, |
| 60 const GURL& requesting_frame, |
| 61 base::Callback<void(bool)> result_callback, |
| 62 base::Closure* cancel_callback) OVERRIDE; |
58 | 63 |
59 // Methods called from Java. | 64 // Methods called from Java. |
60 void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id); | 65 void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id); |
61 void ProvideClientCertificateResponse(JNIEnv* env, jobject object, | 66 void ProvideClientCertificateResponse(JNIEnv* env, jobject object, |
62 jint request_id, jobjectArray encoded_chain_ref, | 67 jint request_id, jobjectArray encoded_chain_ref, |
63 jobject private_key_ref); | 68 jobject private_key_ref); |
64 void ConfirmJsResult(JNIEnv*, jobject, int id, jstring prompt); | 69 void ConfirmJsResult(JNIEnv*, jobject, int id, jstring prompt); |
65 void CancelJsResult(JNIEnv*, jobject, int id); | 70 void CancelJsResult(JNIEnv*, jobject, int id); |
66 | 71 |
67 private: | 72 private: |
68 void HandleErrorInClientCertificateResponse(int id); | 73 void HandleErrorInClientCertificateResponse(int id); |
69 | 74 |
70 JavaObjectWeakGlobalRef java_ref_; | 75 JavaObjectWeakGlobalRef java_ref_; |
71 | 76 |
72 typedef const base::Callback<void(bool)> CertErrorCallback; | 77 typedef const base::Callback<void(bool)> CertErrorCallback; |
73 IDMap<CertErrorCallback, IDMapOwnPointer> pending_cert_error_callbacks_; | 78 IDMap<CertErrorCallback, IDMapOwnPointer> pending_cert_error_callbacks_; |
74 IDMap<content::JavaScriptDialogManager::DialogClosedCallback, IDMapOwnPointer> | 79 IDMap<content::JavaScriptDialogManager::DialogClosedCallback, IDMapOwnPointer> |
75 pending_js_dialog_callbacks_; | 80 pending_js_dialog_callbacks_; |
76 IDMap<SelectCertificateCallback, IDMapOwnPointer> | 81 IDMap<SelectCertificateCallback, IDMapOwnPointer> |
77 pending_client_cert_request_callbacks_; | 82 pending_client_cert_request_callbacks_; |
78 }; | 83 }; |
79 | 84 |
80 bool RegisterAwContentsClientBridge(JNIEnv* env); | 85 bool RegisterAwContentsClientBridge(JNIEnv* env); |
81 | 86 |
82 } // namespace android_webview | 87 } // namespace android_webview |
83 | 88 |
84 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ | 89 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ |
OLD | NEW |