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_LOGIN_LOGIN_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ | 6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // ResourceDispatcherHostLoginDelegate implementation: | 43 // ResourceDispatcherHostLoginDelegate implementation: |
44 virtual void OnRequestCancelled() OVERRIDE; | 44 virtual void OnRequestCancelled() OVERRIDE; |
45 | 45 |
46 // Initializes the underlying platform specific view. | 46 // Initializes the underlying platform specific view. |
47 virtual void BuildViewForPasswordManager(PasswordManager* manager, | 47 virtual void BuildViewForPasswordManager(PasswordManager* manager, |
48 const string16& explanation) = 0; | 48 const string16& explanation) = 0; |
49 | 49 |
50 // Sets information about the authentication type (|form|) and the | 50 // Sets information about the authentication type (|form|) and the |
51 // |password_manager| for this profile. | 51 // |password_manager| for this profile. |
52 void SetPasswordForm(const content::PasswordForm& form); | 52 void SetPasswordForm(const autofill::PasswordForm& form); |
53 void SetPasswordManager(PasswordManager* password_manager); | 53 void SetPasswordManager(PasswordManager* password_manager); |
54 | 54 |
55 // Returns the WebContents that needs authentication. | 55 // Returns the WebContents that needs authentication. |
56 content::WebContents* GetWebContentsForLogin() const; | 56 content::WebContents* GetWebContentsForLogin() const; |
57 | 57 |
58 // Resend the request with authentication credentials. | 58 // Resend the request with authentication credentials. |
59 // This function can be called from either thread. | 59 // This function can be called from either thread. |
60 void SetAuth(const string16& username, const string16& password); | 60 void SetAuth(const string16& username, const string16& password); |
61 | 61 |
62 // Display the error page without asking for credentials again. | 62 // Display the error page without asking for credentials again. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // This should only be accessed on the IO loop. | 130 // This should only be accessed on the IO loop. |
131 net::URLRequest* request_; | 131 net::URLRequest* request_; |
132 | 132 |
133 // The HttpNetworkSession |request_| is associated with. | 133 // The HttpNetworkSession |request_| is associated with. |
134 const net::HttpNetworkSession* http_network_session_; | 134 const net::HttpNetworkSession* http_network_session_; |
135 | 135 |
136 // The PasswordForm sent to the PasswordManager. This is so we can refer to it | 136 // The PasswordForm sent to the PasswordManager. This is so we can refer to it |
137 // when later notifying the password manager if the credentials were accepted | 137 // when later notifying the password manager if the credentials were accepted |
138 // or rejected. | 138 // or rejected. |
139 // This should only be accessed on the UI loop. | 139 // This should only be accessed on the UI loop. |
140 content::PasswordForm password_form_; | 140 autofill::PasswordForm password_form_; |
141 | 141 |
142 // Points to the password manager owned by the WebContents requesting auth. | 142 // Points to the password manager owned by the WebContents requesting auth. |
143 // This should only be accessed on the UI loop. | 143 // This should only be accessed on the UI loop. |
144 PasswordManager* password_manager_; | 144 PasswordManager* password_manager_; |
145 | 145 |
146 // Cached from the net::URLRequest, in case it goes NULL on us. | 146 // Cached from the net::URLRequest, in case it goes NULL on us. |
147 int render_process_host_id_; | 147 int render_process_host_id_; |
148 int tab_contents_id_; | 148 int tab_contents_id_; |
149 | 149 |
150 // If not null, points to a model we need to notify of our own destruction | 150 // If not null, points to a model we need to notify of our own destruction |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Helper to remove the ref from an net::URLRequest to the LoginHandler. | 211 // Helper to remove the ref from an net::URLRequest to the LoginHandler. |
212 // Should only be called from the IO thread, since it accesses an | 212 // Should only be called from the IO thread, since it accesses an |
213 // net::URLRequest. | 213 // net::URLRequest. |
214 void ResetLoginHandlerForRequest(net::URLRequest* request); | 214 void ResetLoginHandlerForRequest(net::URLRequest* request); |
215 | 215 |
216 // Get the signon_realm under which the identity should be saved. | 216 // Get the signon_realm under which the identity should be saved. |
217 std::string GetSignonRealm(const GURL& url, | 217 std::string GetSignonRealm(const GURL& url, |
218 const net::AuthChallengeInfo& auth_info); | 218 const net::AuthChallengeInfo& auth_info); |
219 | 219 |
220 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ | 220 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_PROMPT_H_ |
OLD | NEW |