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 <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 | 78 |
79 // Called when an AJAX has succesfully completed. Used to determine if | 79 // Called when an AJAX has succesfully completed. Used to determine if |
80 // a form has been submitted by AJAX without navigation. | 80 // a form has been submitted by AJAX without navigation. |
81 void AJAXSucceeded(); | 81 void AJAXSucceeded(); |
82 | 82 |
83 // Called when the user first interacts with the page after a load. This is a | 83 // Called when the user first interacts with the page after a load. This is a |
84 // signal to make autofilled values of password input elements accessible to | 84 // signal to make autofilled values of password input elements accessible to |
85 // JavaScript. | 85 // JavaScript. |
86 void FirstUserGestureObserved(); | 86 void FirstUserGestureObserved(); |
87 | 87 |
88 void GetFillableElementFromFormData( | |
vabr (Chromium)
2016/06/10 14:19:51
nit: Please add a comment explaining the effect of
jww
2016/06/10 23:06:54
Done. I've also refactored the code for this a bit
vabr (Chromium)
2016/06/13 08:46:41
Acknowledged, that sounds like an improvement to m
| |
89 int key, | |
90 const PasswordFormFillData& form_data, | |
91 bool should_fill_forms, | |
92 std::vector<blink::WebInputElement>* elements); | |
93 | |
88 protected: | 94 protected: |
89 virtual bool OriginCanAccessPasswordManager( | 95 virtual bool OriginCanAccessPasswordManager( |
90 const blink::WebSecurityOrigin& origin); | 96 const blink::WebSecurityOrigin& origin); |
91 | 97 |
92 private: | 98 private: |
93 // Ways to restrict which passwords are saved in ProvisionallySavePassword. | 99 // Ways to restrict which passwords are saved in ProvisionallySavePassword. |
94 enum ProvisionallySaveRestriction { | 100 enum ProvisionallySaveRestriction { |
95 RESTRICTION_NONE, | 101 RESTRICTION_NONE, |
96 RESTRICTION_NON_EMPTY_PASSWORD | 102 RESTRICTION_NON_EMPTY_PASSWORD |
97 }; | 103 }; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 // Contains server predictions for username, password and/or new password | 245 // Contains server predictions for username, password and/or new password |
240 // fields for individual forms. | 246 // fields for individual forms. |
241 FormsPredictionsMap form_predictions_; | 247 FormsPredictionsMap form_predictions_; |
242 | 248 |
243 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 249 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
244 }; | 250 }; |
245 | 251 |
246 } // namespace autofill | 252 } // namespace autofill |
247 | 253 |
248 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 254 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
OLD | NEW |