OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void FillFormOnPasswordRecieved(const PasswordFormFillData& fill_data, | 173 void FillFormOnPasswordRecieved(const PasswordFormFillData& fill_data, |
174 blink::WebInputElement username_element, | 174 blink::WebInputElement username_element, |
175 blink::WebInputElement password_element); | 175 blink::WebInputElement password_element); |
176 | 176 |
177 bool FillUserNameAndPassword(blink::WebInputElement* username_element, | 177 bool FillUserNameAndPassword(blink::WebInputElement* username_element, |
178 blink::WebInputElement* password_element, | 178 blink::WebInputElement* password_element, |
179 const PasswordFormFillData& fill_data, | 179 const PasswordFormFillData& fill_data, |
180 bool exact_username_match, | 180 bool exact_username_match, |
181 bool set_selection); | 181 bool set_selection); |
182 | 182 |
| 183 // Helper function to check additional names for a match in login collection. |
| 184 void CheckLoginCollectionForMatch(const PasswordFormFillData& fill_data, |
| 185 const base::string16 current_username, |
| 186 const bool exact_username_match, |
| 187 base::string16& username, |
| 188 base::string16& password); |
| 189 |
| 190 // Helper function to check names for a match in usernames collection. |
| 191 void CheckUsernamesCollectionForMatch(const PasswordFormFillData& fill_data, |
| 192 const base::string16 current_username, |
| 193 const bool exact_username_match, |
| 194 base::string16& username, |
| 195 base::string16& password); |
| 196 |
183 // Fills |login_input| and |password| with the most relevant suggestion from | 197 // Fills |login_input| and |password| with the most relevant suggestion from |
184 // |fill_data| and shows a popup with other suggestions. | 198 // |fill_data| and shows a popup with other suggestions. |
185 void PerformInlineAutocomplete( | 199 void PerformInlineAutocomplete( |
186 const blink::WebInputElement& username, | 200 const blink::WebInputElement& username, |
187 const blink::WebInputElement& password, | 201 const blink::WebInputElement& password, |
188 const PasswordFormFillData& fill_data); | 202 const PasswordFormFillData& fill_data); |
189 | 203 |
190 // Invoked when the passed frame is closing. Gives us a chance to clear any | 204 // Invoked when the passed frame is closing. Gives us a chance to clear any |
191 // reference we may have to elements in that frame. | 205 // reference we may have to elements in that frame. |
192 void FrameClosing(const blink::WebFrame* frame); | 206 void FrameClosing(const blink::WebFrame* frame); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 bool did_stop_loading_; | 259 bool did_stop_loading_; |
246 | 260 |
247 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; | 261 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
248 | 262 |
249 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 263 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
250 }; | 264 }; |
251 | 265 |
252 } // namespace autofill | 266 } // namespace autofill |
253 | 267 |
254 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 268 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
OLD | NEW |