OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 bool FillForm(const webkit_glue::FormData& form, const WebKit::WebNode& node); | 95 bool FillForm(const webkit_glue::FormData& form, const WebKit::WebNode& node); |
96 | 96 |
97 // Previews the form represented by |form|. Same conditions as FillForm. | 97 // Previews the form represented by |form|. Same conditions as FillForm. |
98 bool PreviewForm(const webkit_glue::FormData& form); | 98 bool PreviewForm(const webkit_glue::FormData& form); |
99 | 99 |
100 // Clears the values of all input elements in the form that contains |node|. | 100 // Clears the values of all input elements in the form that contains |node|. |
101 // Returns false if the form is not found. | 101 // Returns false if the form is not found. |
102 bool ClearFormWithNode(const WebKit::WebNode& node); | 102 bool ClearFormWithNode(const WebKit::WebNode& node); |
103 | 103 |
104 // Clears the placeholder values and the auto-filled background for any fields | 104 // Clears the placeholder values and the auto-filled background for any fields |
105 // in |form| that have been previewed. Returns false if the form is not | 105 // in the form containing |node| that have been previewed. Returns false if |
106 // found. | 106 // the form is not found. |
107 bool ClearPreviewedForm(const webkit_glue::FormData& form); | 107 bool ClearPreviewedFormWithNode(const WebKit::WebNode& node); |
108 | 108 |
109 // Resets the stored set of forms. | 109 // Resets the stored set of forms. |
110 void Reset(); | 110 void Reset(); |
111 | 111 |
112 // Resets the forms for the specified |frame|. | 112 // Resets the forms for the specified |frame|. |
113 void ResetFrame(const WebKit::WebFrame* frame); | 113 void ResetFrame(const WebKit::WebFrame* frame); |
114 | 114 |
115 // Returns true if |form| has any auto-filled fields. | 115 // Returns true if |form| has any auto-filled fields. |
116 bool FormWithNodeIsAutoFilled(const WebKit::WebNode& node); | 116 bool FormWithNodeIsAutoFilled(const WebKit::WebNode& node); |
117 | 117 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 void PreviewFormField(WebKit::WebFormControlElement* field, | 176 void PreviewFormField(WebKit::WebFormControlElement* field, |
177 const webkit_glue::FormField* data); | 177 const webkit_glue::FormField* data); |
178 | 178 |
179 // The map of form elements. | 179 // The map of form elements. |
180 WebFrameFormElementMap form_elements_map_; | 180 WebFrameFormElementMap form_elements_map_; |
181 | 181 |
182 DISALLOW_COPY_AND_ASSIGN(FormManager); | 182 DISALLOW_COPY_AND_ASSIGN(FormManager); |
183 }; | 183 }; |
184 | 184 |
185 #endif // CHROME_RENDERER_FORM_MANAGER_H_ | 185 #endif // CHROME_RENDERER_FORM_MANAGER_H_ |
OLD | NEW |