| 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 CHROME_BROWSER_UI_ANDROID_CHROME_HTTP_AUTH_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_CHROME_HTTP_AUTH_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_CHROME_HTTP_AUTH_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_CHROME_HTTP_AUTH_HANDLER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "chrome/browser/ui/login/login_prompt.h" | 12 #include "chrome/browser/ui/login/login_prompt.h" |
| 13 | 13 |
| 14 // This class facilitates communication between a native LoginHandler | 14 // This class facilitates communication between a native LoginHandler |
| 15 // and a Java land ChromeHttpAuthHandler, which is passed to a | 15 // and a Java land ChromeHttpAuthHandler, which is passed to a |
| 16 // ContentViewClient to allow it to respond to HTTP authentication requests | 16 // ContentViewClient to allow it to respond to HTTP authentication requests |
| 17 // by, e.g., showing the user a login dialog. | 17 // by, e.g., showing the user a login dialog. |
| 18 class ChromeHttpAuthHandler { | 18 class ChromeHttpAuthHandler { |
| 19 public: | 19 public: |
| 20 ChromeHttpAuthHandler(const string16& explanation); | 20 ChromeHttpAuthHandler(const string16& explanation); |
| 21 ~ChromeHttpAuthHandler(); | 21 ~ChromeHttpAuthHandler(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 private: | 66 private: |
| 67 LoginHandler* observer_; | 67 LoginHandler* observer_; |
| 68 base::android::ScopedJavaGlobalRef<jobject> java_chrome_http_auth_handler_; | 68 base::android::ScopedJavaGlobalRef<jobject> java_chrome_http_auth_handler_; |
| 69 // e.g. "The server example.com:80 requires a username and password." | 69 // e.g. "The server example.com:80 requires a username and password." |
| 70 string16 explanation_; | 70 string16 explanation_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(ChromeHttpAuthHandler); | 72 DISALLOW_COPY_AND_ASSIGN(ChromeHttpAuthHandler); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_UI_ANDROID_CHROME_HTTP_AUTH_HANDLER_H_ | 75 #endif // CHROME_BROWSER_UI_ANDROID_CHROME_HTTP_AUTH_HANDLER_H_ |
| OLD | NEW |