OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HTTP_AUTH_HANDLER_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_HTTP_AUTH_HANDLER_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_HTTP_AUTH_HANDLER_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_HTTP_AUTH_HANDLER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 class AwHttpAuthHandler : public AwHttpAuthHandlerBase { | 30 class AwHttpAuthHandler : public AwHttpAuthHandlerBase { |
31 public: | 31 public: |
32 AwHttpAuthHandler(AwLoginDelegate* login_delegate, | 32 AwHttpAuthHandler(AwLoginDelegate* login_delegate, |
33 net::AuthChallengeInfo* auth_info, | 33 net::AuthChallengeInfo* auth_info, |
34 bool first_auth_attempt); | 34 bool first_auth_attempt); |
35 ~AwHttpAuthHandler() override; | 35 ~AwHttpAuthHandler() override; |
36 | 36 |
37 // from AwHttpAuthHandler | 37 // from AwHttpAuthHandler |
38 bool HandleOnUIThread(content::WebContents* web_contents) override; | 38 bool HandleOnUIThread(content::WebContents* web_contents) override; |
39 | 39 |
40 void Proceed(JNIEnv* env, jobject obj, jstring username, jstring password); | 40 void Proceed(JNIEnv* env, |
41 void Cancel(JNIEnv* env, jobject obj); | 41 const base::android::JavaParamRef<jobject>& obj, |
| 42 const base::android::JavaParamRef<jstring>& username, |
| 43 const base::android::JavaParamRef<jstring>& password); |
| 44 void Cancel(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
42 | 45 |
43 private: | 46 private: |
44 scoped_refptr<AwLoginDelegate> login_delegate_; | 47 scoped_refptr<AwLoginDelegate> login_delegate_; |
45 base::android::ScopedJavaGlobalRef<jobject> http_auth_handler_; | 48 base::android::ScopedJavaGlobalRef<jobject> http_auth_handler_; |
46 std::string host_; | 49 std::string host_; |
47 std::string realm_; | 50 std::string realm_; |
48 }; | 51 }; |
49 | 52 |
50 bool RegisterAwHttpAuthHandler(JNIEnv* env); | 53 bool RegisterAwHttpAuthHandler(JNIEnv* env); |
51 | 54 |
52 } // namespace android_webview | 55 } // namespace android_webview |
53 | 56 |
54 #endif // ANDROID_WEBVIEW_NATIVE_AW_HTTP_AUTH_HANDLER_H_ | 57 #endif // ANDROID_WEBVIEW_NATIVE_AW_HTTP_AUTH_HANDLER_H_ |
OLD | NEW |