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

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

Issue 382243002: Cleanup return values in autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Returns true if |element| is one of the input element types that can be 70 // Returns true if |element| is one of the input element types that can be
71 // autofilled. {Text, Radiobutton, Checkbox}. 71 // autofilled. {Text, Radiobutton, Checkbox}.
72 bool IsAutofillableInputElement(const blink::WebInputElement* element); 72 bool IsAutofillableInputElement(const blink::WebInputElement* element);
73 73
74 // Recursively checks whether |node| or any of its children have a non-empty 74 // Recursively checks whether |node| or any of its children have a non-empty
75 // bounding box. 75 // bounding box.
76 bool IsWebNodeVisible(const blink::WebNode& node); 76 bool IsWebNodeVisible(const blink::WebNode& node);
77 77
78 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| 78 // Returns the form's |name| attribute if non-empty; otherwise the form's |id|
79 // attribute. 79 // attribute.
80 const base::string16 GetFormIdentifier(const blink::WebFormElement& form); 80 const base::string16& GetFormIdentifier(const blink::WebFormElement& form);
vabr (Chromium) 2014/07/11 13:37:43 Could this method be const?
Ilya Sherman 2014/07/11 19:11:10 This is a free function, not a method.
vabr (Chromium) 2014/07/11 19:24:47 Ah thanks, my bad for missing that. I take my earl
lucinka.brozkova 2014/07/11 21:05:57 Acknowledged.
81 81
82 // Returns true if the element specified by |click_element| was successfully 82 // Returns true if the element specified by |click_element| was successfully
83 // clicked. 83 // clicked.
84 bool ClickElement(const blink::WebDocument& document, 84 bool ClickElement(const blink::WebDocument& document,
85 const WebElementDescriptor& element_descriptor); 85 const WebElementDescriptor& element_descriptor);
86 86
87 // Fills |autofillable_elements| with all the auto-fillable form control 87 // Fills |autofillable_elements| with all the auto-fillable form control
88 // elements in |form_element|. 88 // elements in |form_element|.
89 void ExtractAutofillableElements( 89 void ExtractAutofillableElements(
90 const blink::WebFormElement& form_element, 90 const blink::WebFormElement& form_element,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // are of the type <script>, <meta>, or <title>. 169 // are of the type <script>, <meta>, or <title>.
170 bool IsWebElementEmpty(const blink::WebElement& element); 170 bool IsWebElementEmpty(const blink::WebElement& element);
171 171
172 // 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|.
173 gfx::RectF GetScaledBoundingBox(float scale, 173 gfx::RectF GetScaledBoundingBox(float scale,
174 blink::WebFormControlElement* element); 174 blink::WebFormControlElement* element);
175 175
176 } // namespace autofill 176 } // namespace autofill
177 177
178 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ 178 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698