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

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

Issue 208453002: Add "previewing on hover" support for password field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Previews the form represented by |form|. |element| is the input element that 141 // Previews the form represented by |form|. |element| is the input element that
142 // initiated the preview process. 142 // initiated the preview process.
143 void PreviewForm(const FormData& form, 143 void PreviewForm(const FormData& form,
144 const blink::WebInputElement& element); 144 const blink::WebInputElement& element);
145 145
146 // Clears the placeholder values and the auto-filled background for any fields 146 // Clears the placeholder values and the auto-filled background for any fields
147 // in the form containing |node| that have been previewed. Resets the 147 // in the form containing |node| that have been previewed. Resets the
148 // autofilled state of |node| to |was_autofilled|. Returns false if the form is 148 // autofilled state of |node| to |was_autofilled|. Returns false if the form is
149 // not found. 149 // not found.
150 bool ClearPreviewedFormWithElement(const blink::WebInputElement& element, 150 bool ClearPreviewedFormWithElement(const blink::WebInputElement& element,
151 bool was_autofilled); 151 RequirementsMask requirements,
152 bool was_autofilled,
153 bool was_password_autofilled);
152 154
153 // Returns true if |form| has any auto-filled fields. 155 // Returns true if |form| has any auto-filled fields.
154 bool FormWithElementIsAutofilled(const blink::WebInputElement& element); 156 bool FormWithElementIsAutofilled(const blink::WebInputElement& element);
155 157
156 // Checks if the webpage is empty. 158 // Checks if the webpage is empty.
157 // This kind of webpage is considered as empty: 159 // This kind of webpage is considered as empty:
158 // <html> 160 // <html>
159 // <head> 161 // <head>
160 // <head/> 162 // <head/>
161 // <body> 163 // <body>
162 // <body/> 164 // <body/>
163 // <html/> 165 // <html/>
164 // Meta, script and title tags don't influence the emptiness of a webpage. 166 // Meta, script and title tags don't influence the emptiness of a webpage.
165 bool IsWebpageEmpty(const blink::WebFrame* frame); 167 bool IsWebpageEmpty(const blink::WebFrame* frame);
166 168
167 // This function checks whether the children of |element| 169 // This function checks whether the children of |element|
168 // are of the type <script>, <meta>, or <title>. 170 // are of the type <script>, <meta>, or <title>.
169 bool IsWebElementEmpty(const blink::WebElement& element); 171 bool IsWebElementEmpty(const blink::WebElement& element);
170 172
171 // Return a gfx::RectF that is the bounding box for |element| scaled by |scale|. 173 // Return a gfx::RectF that is the bounding box for |element| scaled by |scale|.
172 gfx::RectF GetScaledBoundingBox(float scale, blink::WebInputElement* element); 174 gfx::RectF GetScaledBoundingBox(float scale, blink::WebInputElement* element);
173 175
174 } // namespace autofill 176 } // namespace autofill
175 177
176 #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