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

Side by Side Diff: chrome/renderer/form_manager.h

Issue 1380002: Label scraping for AutoFill.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/autofill/form_structure_unittest.cc ('k') | chrome/renderer/form_manager.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_RENDERER_FORM_MANAGER_H_ 5 #ifndef CHROME_RENDERER_FORM_MANAGER_H_
6 #define CHROME_RENDERER_FORM_MANAGER_H_ 6 #define CHROME_RENDERER_FORM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Converts a FormElement to FormData storage. 73 // Converts a FormElement to FormData storage.
74 // TODO(jhawkins): Modify FormElement so we don't need |frame|. 74 // TODO(jhawkins): Modify FormElement so we don't need |frame|.
75 void FormElementToFormData(WebKit::WebFrame* frame, 75 void FormElementToFormData(WebKit::WebFrame* frame,
76 const FormElement* form_element, 76 const FormElement* form_element,
77 RequirementsMask requirements, 77 RequirementsMask requirements,
78 webkit_glue::FormData* form); 78 webkit_glue::FormData* form);
79 79
80 // Returns the corresponding label for |element|. 80 // Returns the corresponding label for |element|.
81 static string16 LabelForElement(const WebKit::WebInputElement& element); 81 static string16 LabelForElement(const WebKit::WebInputElement& element);
82 82
83 // Infers corresponding label for |element| from surrounding context in the
84 // DOM. Contents of preceeding <p> tag or preceeding text element found in
85 // the form.
86 static string16 InferLabelForElement(const WebKit::WebInputElement& element);
87
83 // The map of form elements. 88 // The map of form elements.
84 WebFrameFormElementMap form_elements_map_; 89 WebFrameFormElementMap form_elements_map_;
85 90
86 DISALLOW_COPY_AND_ASSIGN(FormManager); 91 DISALLOW_COPY_AND_ASSIGN(FormManager);
87 }; 92 };
88 93
89 #endif // CHROME_RENDERER_FORM_MANAGER_H_ 94 #endif // CHROME_RENDERER_FORM_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/form_structure_unittest.cc ('k') | chrome/renderer/form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698