| 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 COMPONENTS_AUTOFILL_RENDERER_FORM_AUTOFILL_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| 6 #define COMPONENTS_AUTOFILL_RENDERER_FORM_AUTOFILL_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // Returns true if |element| is a checkbox or a radio button element. | 58 // Returns true if |element| is a checkbox or a radio button element. |
| 59 bool IsCheckableElement(const WebKit::WebInputElement* element); | 59 bool IsCheckableElement(const WebKit::WebInputElement* element); |
| 60 | 60 |
| 61 // Returns true if |element| is one of the input element types that can be | 61 // Returns true if |element| is one of the input element types that can be |
| 62 // autofilled. {Text, Radiobutton, Checkbox}. | 62 // autofilled. {Text, Radiobutton, Checkbox}. |
| 63 bool IsAutofillableInputElement(const WebKit::WebInputElement* element); | 63 bool IsAutofillableInputElement(const WebKit::WebInputElement* element); |
| 64 | 64 |
| 65 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| | 65 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| |
| 66 // attribute. | 66 // attribute. |
| 67 const string16 GetFormIdentifier(const WebKit::WebFormElement& form); | 67 const base::string16 GetFormIdentifier(const WebKit::WebFormElement& form); |
| 68 | 68 |
| 69 // Returns true if the element specified by |click_element| was successfully | 69 // Returns true if the element specified by |click_element| was successfully |
| 70 // clicked. | 70 // clicked. |
| 71 bool ClickElement(const WebKit::WebDocument& document, | 71 bool ClickElement(const WebKit::WebDocument& document, |
| 72 const WebElementDescriptor& element_descriptor); | 72 const WebElementDescriptor& element_descriptor); |
| 73 | 73 |
| 74 // Fills |autofillable_elements| with all the auto-fillable form control | 74 // Fills |autofillable_elements| with all the auto-fillable form control |
| 75 // elements in |form_element|. | 75 // elements in |form_element|. |
| 76 void ExtractAutofillableElements( | 76 void ExtractAutofillableElements( |
| 77 const WebKit::WebFormElement& form_element, | 77 const WebKit::WebFormElement& form_element, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // not found. | 130 // not found. |
| 131 bool ClearPreviewedFormWithElement(const WebKit::WebInputElement& element, | 131 bool ClearPreviewedFormWithElement(const WebKit::WebInputElement& element, |
| 132 bool was_autofilled); | 132 bool was_autofilled); |
| 133 | 133 |
| 134 // Returns true if |form| has any auto-filled fields. | 134 // Returns true if |form| has any auto-filled fields. |
| 135 bool FormWithElementIsAutofilled(const WebKit::WebInputElement& element); | 135 bool FormWithElementIsAutofilled(const WebKit::WebInputElement& element); |
| 136 | 136 |
| 137 } // namespace autofill | 137 } // namespace autofill |
| 138 | 138 |
| 139 #endif // COMPONENTS_AUTOFILL_RENDERER_FORM_AUTOFILL_UTIL_H_ | 139 #endif // COMPONENTS_AUTOFILL_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| OLD | NEW |