Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Side by Side Diff: components/autofill/content/renderer/form_autofill_util.h

Issue 2704503002: [Autofill] Add Chrome flag that annotates web forms with form and field signatures (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Returns true if |element| is a textarea element. 120 // Returns true if |element| is a textarea element.
121 bool IsTextAreaElement(const blink::WebFormControlElement& element); 121 bool IsTextAreaElement(const blink::WebFormControlElement& element);
122 122
123 // Returns true if |element| is a checkbox or a radio button element. 123 // Returns true if |element| is a checkbox or a radio button element.
124 bool IsCheckableElement(const blink::WebInputElement* element); 124 bool IsCheckableElement(const blink::WebInputElement* element);
125 125
126 // Returns true if |element| is one of the input element types that can be 126 // Returns true if |element| is one of the input element types that can be
127 // autofilled. {Text, Radiobutton, Checkbox}. 127 // autofilled. {Text, Radiobutton, Checkbox}.
128 bool IsAutofillableInputElement(const blink::WebInputElement* element); 128 bool IsAutofillableInputElement(const blink::WebInputElement* element);
129 129
130 // Returns true if |element| is one of the element types that can be autofilled.
131 // {Text, Radiobutton, Checkbox, Select, TextArea}.
132 bool IsAutofillableElement(const blink::WebFormControlElement& element);
133
130 // True if this node takes up space in the layout, ie. this node or a descendant 134 // True if this node takes up space in the layout, ie. this node or a descendant
131 // has a non-empty bounding bounding client rect. 135 // has a non-empty bounding bounding client rect.
132 // 136 //
133 // TODO(esprehn): This isn't really about visibility, it's about the size. 137 // TODO(esprehn): This isn't really about visibility, it's about the size.
134 // We should remove this function and just call hasNonEmptyLayoutSize() 138 // We should remove this function and just call hasNonEmptyLayoutSize()
135 // directly. 139 // directly.
136 bool IsWebNodeVisible(const blink::WebNode& node); 140 bool IsWebNodeVisible(const blink::WebNode& node);
137 141
138 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| 142 // Returns the form's |name| attribute if non-empty; otherwise the form's |id|
139 // attribute. 143 // attribute.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // |input_element|. Note that |user_input| cannot be easily derived from 272 // |input_element|. Note that |user_input| cannot be easily derived from
269 // |input_element| by calling value(), because of http://crbug.com/507714. 273 // |input_element| by calling value(), because of http://crbug.com/507714.
270 void PreviewSuggestion(const base::string16& suggestion, 274 void PreviewSuggestion(const base::string16& suggestion,
271 const base::string16& user_input, 275 const base::string16& user_input,
272 blink::WebFormControlElement* input_element); 276 blink::WebFormControlElement* input_element);
273 277
274 } // namespace form_util 278 } // namespace form_util
275 } // namespace autofill 279 } // namespace autofill
276 280
277 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ 281 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698