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_FORM_AUTOFILL_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // initiated the auto-fill process. | 126 // initiated the auto-fill process. |
127 void FillForm(const FormData& form, | 127 void FillForm(const FormData& form, |
128 const blink::WebFormControlElement& element); | 128 const blink::WebFormControlElement& element); |
129 | 129 |
130 // Fills focusable and non-focusable form control elements within |form_element| | 130 // Fills focusable and non-focusable form control elements within |form_element| |
131 // with field data from |form_data|. | 131 // with field data from |form_data|. |
132 void FillFormIncludingNonFocusableElements( | 132 void FillFormIncludingNonFocusableElements( |
133 const FormData& form_data, | 133 const FormData& form_data, |
134 const blink::WebFormElement& form_element); | 134 const blink::WebFormElement& form_element); |
135 | 135 |
| 136 // Fills all (including disabled, read-only and non-focusable) form control |
| 137 // elements within |form_element| with field data from |form_data|. |
| 138 void FillFormForAllElements( |
| 139 const FormData& form_data, |
| 140 const blink::WebFormElement& form_element); |
| 141 |
136 // Previews the form represented by |form|. |element| is the input element that | 142 // Previews the form represented by |form|. |element| is the input element that |
137 // initiated the preview process. | 143 // initiated the preview process. |
138 void PreviewForm(const FormData& form, | 144 void PreviewForm(const FormData& form, |
139 const blink::WebFormControlElement& element); | 145 const blink::WebFormControlElement& element); |
140 | 146 |
141 // Clears the placeholder values and the auto-filled background for any fields | 147 // Clears the placeholder values and the auto-filled background for any fields |
142 // in the form containing |node| that have been previewed. Resets the | 148 // in the form containing |node| that have been previewed. Resets the |
143 // autofilled state of |node| to |was_autofilled|. Returns false if the form is | 149 // autofilled state of |node| to |was_autofilled|. Returns false if the form is |
144 // not found. | 150 // not found. |
145 bool ClearPreviewedFormWithElement(const blink::WebFormControlElement& element, | 151 bool ClearPreviewedFormWithElement(const blink::WebFormControlElement& element, |
(...skipping 17 matching lines...) Expand all Loading... |
163 // are of the type <script>, <meta>, or <title>. | 169 // are of the type <script>, <meta>, or <title>. |
164 bool IsWebElementEmpty(const blink::WebElement& element); | 170 bool IsWebElementEmpty(const blink::WebElement& element); |
165 | 171 |
166 // Return a gfx::RectF that is the bounding box for |element| scaled by |scale|. | 172 // Return a gfx::RectF that is the bounding box for |element| scaled by |scale|. |
167 gfx::RectF GetScaledBoundingBox(float scale, | 173 gfx::RectF GetScaledBoundingBox(float scale, |
168 blink::WebFormControlElement* element); | 174 blink::WebFormControlElement* element); |
169 | 175 |
170 } // namespace autofill | 176 } // namespace autofill |
171 | 177 |
172 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 178 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
OLD | NEW |