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

Side by Side Diff: android_webview/native/aw_contents_client_bridge.h

Issue 1424263003: Reland "Use resource throttle to implement shouldOverrideUrlLoading, core change" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary change for making XHR test thread-safe (it was safe before the change). Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const GURL& origin_url, 47 const GURL& origin_url,
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 void RunBeforeUnloadDialog( 52 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 bool ShouldOverrideUrlLoading(const base::string16& url,
58 bool has_user_gesture,
59 bool is_redirect,
60 bool is_main_frame) override;
61 57
62 // Methods called from Java. 58 // Methods called from Java.
63 void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id); 59 void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id);
64 void ProvideClientCertificateResponse(JNIEnv* env, jobject object, 60 void ProvideClientCertificateResponse(JNIEnv* env, jobject object,
65 jint request_id, jobjectArray encoded_chain_ref, 61 jint request_id, jobjectArray encoded_chain_ref,
66 jobject private_key_ref); 62 jobject private_key_ref);
67 void ConfirmJsResult(JNIEnv*, jobject, int id, jstring prompt); 63 void ConfirmJsResult(JNIEnv*, jobject, int id, jstring prompt);
68 void CancelJsResult(JNIEnv*, jobject, int id); 64 void CancelJsResult(JNIEnv*, jobject, int id);
69 65
70 private: 66 private:
71 void HandleErrorInClientCertificateResponse(int id); 67 void HandleErrorInClientCertificateResponse(int id);
72 68
73 JavaObjectWeakGlobalRef java_ref_; 69 JavaObjectWeakGlobalRef java_ref_;
74 70
75 typedef const base::Callback<void(bool)> CertErrorCallback; 71 typedef const base::Callback<void(bool)> CertErrorCallback;
76 IDMap<CertErrorCallback, IDMapOwnPointer> pending_cert_error_callbacks_; 72 IDMap<CertErrorCallback, IDMapOwnPointer> pending_cert_error_callbacks_;
77 IDMap<content::JavaScriptDialogManager::DialogClosedCallback, IDMapOwnPointer> 73 IDMap<content::JavaScriptDialogManager::DialogClosedCallback, IDMapOwnPointer>
78 pending_js_dialog_callbacks_; 74 pending_js_dialog_callbacks_;
79 // |pending_client_cert_request_delegates_| owns its pointers, but IDMap 75 // |pending_client_cert_request_delegates_| owns its pointers, but IDMap
80 // doesn't provide Release, so ownership is managed manually. 76 // doesn't provide Release, so ownership is managed manually.
81 IDMap<content::ClientCertificateDelegate> 77 IDMap<content::ClientCertificateDelegate>
82 pending_client_cert_request_delegates_; 78 pending_client_cert_request_delegates_;
83 }; 79 };
84 80
85 bool RegisterAwContentsClientBridge(JNIEnv* env); 81 bool RegisterAwContentsClientBridge(JNIEnv* env);
86 82
87 } // namespace android_webview 83 } // namespace android_webview
88 84
89 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_ 85 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_CLIENT_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698