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

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

Issue 1007813002: [iOS] Upstream autofill component code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added dconnelly to OWNERS Created 5 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
« no previous file with comments | « components/autofill.gypi ('k') | components/autofill/core/common/autofill_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "components/autofill/core/common/autofill_constants.h"
11 #include "third_party/WebKit/public/platform/WebVector.h" 12 #include "third_party/WebKit/public/platform/WebVector.h"
12 #include "third_party/WebKit/public/web/WebElementCollection.h" 13 #include "third_party/WebKit/public/web/WebElementCollection.h"
13 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
14 15
15 class GURL; 16 class GURL;
16 17
17 namespace blink { 18 namespace blink {
18 class WebDocument; 19 class WebDocument;
19 class WebElement; 20 class WebElement;
20 class WebFormElement; 21 class WebFormElement;
21 class WebFormControlElement; 22 class WebFormControlElement;
22 class WebFrame; 23 class WebFrame;
23 class WebInputElement; 24 class WebInputElement;
24 class WebNode; 25 class WebNode;
25 } 26 }
26 27
27 namespace autofill { 28 namespace autofill {
28 29
29 struct FormData; 30 struct FormData;
30 struct FormFieldData; 31 struct FormFieldData;
31 struct WebElementDescriptor; 32 struct WebElementDescriptor;
32 33
33 // A bit field mask for form or form element requirements.
34 enum RequirementsMask {
35 REQUIRE_NONE = 0, // No requirements.
36 REQUIRE_AUTOCOMPLETE = 1, // Require that autocomplete != off.
37 };
38
39 // A bit field mask to extract data from WebFormControlElement. 34 // A bit field mask to extract data from WebFormControlElement.
40 enum ExtractMask { 35 enum ExtractMask {
41 EXTRACT_NONE = 0, 36 EXTRACT_NONE = 0,
42 EXTRACT_VALUE = 1 << 0, // Extract value from WebFormControlElement. 37 EXTRACT_VALUE = 1 << 0, // Extract value from WebFormControlElement.
43 EXTRACT_OPTION_TEXT = 1 << 1, // Extract option text from 38 EXTRACT_OPTION_TEXT = 1 << 1, // Extract option text from
44 // WebFormSelectElement. Only valid when 39 // WebFormSelectElement. Only valid when
45 // |EXTRACT_VALUE| is set. 40 // |EXTRACT_VALUE| is set.
46 // This is used for form submission where 41 // This is used for form submission where
47 // human readable value is captured. 42 // human readable value is captured.
48 EXTRACT_OPTIONS = 1 << 2, // Extract options from 43 EXTRACT_OPTIONS = 1 << 2, // Extract options from
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // This function checks whether the children of |element| 179 // This function checks whether the children of |element|
185 // are of the type <script>, <meta>, or <title>. 180 // are of the type <script>, <meta>, or <title>.
186 bool IsWebElementEmpty(const blink::WebElement& element); 181 bool IsWebElementEmpty(const blink::WebElement& element);
187 182
188 // Return a gfx::RectF that is the bounding box for |element| scaled by |scale|. 183 // Return a gfx::RectF that is the bounding box for |element| scaled by |scale|.
189 gfx::RectF GetScaledBoundingBox(float scale, blink::WebElement* element); 184 gfx::RectF GetScaledBoundingBox(float scale, blink::WebElement* element);
190 185
191 } // namespace autofill 186 } // namespace autofill
192 187
193 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ 188 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_
OLDNEW
« no previous file with comments | « components/autofill.gypi ('k') | components/autofill/core/common/autofill_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698