Chromium Code Reviews| 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_FORM_CONVERSION_UTILS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | |
|
vabr (Chromium)
2015/03/25 10:12:33
Seems unused.
dvadym
2015/03/25 16:34:08
Done.
| |
| 9 | 10 |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 class WebFormElement; | 14 class WebFormElement; |
| 14 class WebInputElement; | 15 class WebInputElement; |
| 15 class WebString; | 16 class WebString; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace autofill { | 19 namespace autofill { |
| 19 | 20 |
| 21 struct FormData; | |
| 22 struct FormFieldData; | |
| 20 struct PasswordForm; | 23 struct PasswordForm; |
| 21 | 24 |
| 22 // Create a PasswordForm from DOM form. Webkit doesn't allow storing | 25 // Create a PasswordForm from DOM form. Webkit doesn't allow storing |
| 23 // custom metadata to DOM nodes, so we have to do this every time an event | 26 // custom metadata to DOM nodes, so we have to do this every time an event |
| 24 // happens with a given form and compare against previously Create'd forms | 27 // happens with a given form and compare against previously Create'd forms |
| 25 // to identify..which sucks. | 28 // to identify..which sucks. |
| 26 // If an element of |form| has an entry in |nonscript_modified_values|, the | 29 // If an element of |form| has an entry in |nonscript_modified_values|, the |
| 27 // associated string is used instead of the element's value to create | 30 // associated string is used instead of the element's value to create |
| 28 // the PasswordForm. | 31 // the PasswordForm. |
| 32 // |form_predictions| is Autofill server response, if present it's used for | |
| 33 // overwriting default username element selection. | |
| 29 scoped_ptr<PasswordForm> CreatePasswordForm( | 34 scoped_ptr<PasswordForm> CreatePasswordForm( |
| 30 const blink::WebFormElement& form, | 35 const blink::WebFormElement& form, |
| 31 const std::map<const blink::WebInputElement, blink::WebString>* | 36 const std::map<const blink::WebInputElement, blink::WebString>* |
| 32 nonscript_modified_values); | 37 nonscript_modified_values, |
| 38 const std::map<autofill::FormData, autofill::FormFieldData>* | |
| 39 form_predictions); | |
| 33 | 40 |
| 34 } // namespace autofill | 41 } // namespace autofill |
| 35 | 42 |
| 36 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H __ | 43 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H __ |
| OLD | NEW |