| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57 | 57 | 
| 58   // Shows an Autofill popup with username suggestions for |element|. If | 58   // Shows an Autofill popup with username suggestions for |element|. If | 
| 59   // |show_all| is |true|, will show all possible suggestions for that element, | 59   // |show_all| is |true|, will show all possible suggestions for that element, | 
| 60   // otherwise shows suggestions based on current value of |element|. | 60   // otherwise shows suggestions based on current value of |element|. | 
| 61   // Returns true if any suggestions were shown, false otherwise. | 61   // Returns true if any suggestions were shown, false otherwise. | 
| 62   bool ShowSuggestions(const blink::WebInputElement& element, bool show_all); | 62   bool ShowSuggestions(const blink::WebInputElement& element, bool show_all); | 
| 63 | 63 | 
| 64   // Called when new form controls are inserted. | 64   // Called when new form controls are inserted. | 
| 65   void OnDynamicFormsSeen(); | 65   void OnDynamicFormsSeen(); | 
| 66 | 66 | 
|  | 67   // Called when an XHR has succesfully completed. Used to determine if | 
|  | 68   // a form has been submitted by XHR without navigation. | 
|  | 69   void XHRSucceeded(); | 
|  | 70 | 
| 67   // Called when the user first interacts with the page after a load. This is a | 71   // Called when the user first interacts with the page after a load. This is a | 
| 68   // signal to make autofilled values of password input elements accessible to | 72   // signal to make autofilled values of password input elements accessible to | 
| 69   // JavaScript. | 73   // JavaScript. | 
| 70   void FirstUserGestureObserved(); | 74   void FirstUserGestureObserved(); | 
| 71 | 75 | 
| 72  protected: | 76  protected: | 
| 73   virtual bool OriginCanAccessPasswordManager( | 77   virtual bool OriginCanAccessPasswordManager( | 
| 74       const blink::WebSecurityOrigin& origin); | 78       const blink::WebSecurityOrigin& origin); | 
| 75 | 79 | 
| 76  private: | 80  private: | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 219   // Clears the preview for the username and password fields, restoring both to | 223   // Clears the preview for the username and password fields, restoring both to | 
| 220   // their previous filled state. | 224   // their previous filled state. | 
| 221   void ClearPreview(blink::WebInputElement* username, | 225   void ClearPreview(blink::WebInputElement* username, | 
| 222                     blink::WebInputElement* password); | 226                     blink::WebInputElement* password); | 
| 223 | 227 | 
| 224   // Extracts a PasswordForm from |form| and saves it as | 228   // Extracts a PasswordForm from |form| and saves it as | 
| 225   // |provisionally_saved_form_|, as long as it satisfies |restriction|. | 229   // |provisionally_saved_form_|, as long as it satisfies |restriction|. | 
| 226   void ProvisionallySavePassword(const blink::WebFormElement& form, | 230   void ProvisionallySavePassword(const blink::WebFormElement& form, | 
| 227                                  ProvisionallySaveRestriction restriction); | 231                                  ProvisionallySaveRestriction restriction); | 
| 228 | 232 | 
|  | 233   // Returns true if |provisionally_saved_form_| has enough information that | 
|  | 234   // it is likely filled out. | 
|  | 235   bool ProvisionallySavedPasswordIsValid(); | 
|  | 236 | 
| 229   // Passes through |RenderViewObserver| method to |this|. | 237   // Passes through |RenderViewObserver| method to |this|. | 
| 230   LegacyPasswordAutofillAgent legacy_; | 238   LegacyPasswordAutofillAgent legacy_; | 
| 231 | 239 | 
| 232   // The logins we have filled so far with their associated info. | 240   // The logins we have filled so far with their associated info. | 
| 233   LoginToPasswordInfoMap login_to_password_info_; | 241   LoginToPasswordInfoMap login_to_password_info_; | 
| 234   // And the keys under which PasswordAutofillManager can find the same info. | 242   // And the keys under which PasswordAutofillManager can find the same info. | 
| 235   LoginToPasswordInfoKeyMap login_to_password_info_key_; | 243   LoginToPasswordInfoKeyMap login_to_password_info_key_; | 
| 236   // A (sort-of) reverse map to |login_to_password_info_|. | 244   // A (sort-of) reverse map to |login_to_password_info_|. | 
| 237   PasswordToLoginMap password_to_username_; | 245   PasswordToLoginMap password_to_username_; | 
| 238 | 246 | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 271   bool save_password_on_in_page_navigation_; | 279   bool save_password_on_in_page_navigation_; | 
| 272 | 280 | 
| 273   base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; | 281   base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; | 
| 274 | 282 | 
| 275   DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 283   DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 
| 276 }; | 284 }; | 
| 277 | 285 | 
| 278 }  // namespace autofill | 286 }  // namespace autofill | 
| 279 | 287 | 
| 280 #endif  // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 288 #endif  // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 
| OLD | NEW | 
|---|