Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_CACHE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 | 41 |
| 42 // Clears the values of all input elements in the form that contains | 42 // Clears the values of all input elements in the form that contains |
| 43 // |element|. Returns false if the form is not found. | 43 // |element|. Returns false if the form is not found. |
| 44 bool ClearFormWithElement(const blink::WebFormControlElement& element); | 44 bool ClearFormWithElement(const blink::WebFormControlElement& element); |
| 45 | 45 |
| 46 // For each field in the |form|, sets the title to include the field's | 46 // For each field in the |form|, sets the title to include the field's |
| 47 // heuristic type, server type, and signature; as well as the form's signature | 47 // heuristic type, server type, and signature; as well as the form's signature |
| 48 // and the experiment id for the server predictions. | 48 // and the experiment id for the server predictions. |
| 49 bool ShowPredictions(const FormDataPredictions& form); | 49 bool ShowPredictions(const FormDataPredictions& form); |
| 50 | 50 |
| 51 // Determines whether the form is interesting enough to send to the browser | |
| 52 // for further operations. Exposed for testing. | |
| 53 static bool IsFormInteresting(FormData form); | |
|
Evan Stade
2015/11/04 17:15:18
this doesn't belong here because it's not actually
sebsg
2015/11/10 19:04:51
Done.
| |
| 54 | |
| 51 private: | 55 private: |
| 52 // Scans |control_elements| and returns the number of editable elements. | 56 // Scans |control_elements| and returns the number of editable elements. |
| 53 // Also remembers the initial <select> and <input> element states, and | 57 // Also remembers the initial <select> and <input> element states, and |
| 54 // logs warning messages for deprecated attribute if | 58 // logs warning messages for deprecated attribute if |
| 55 // |log_deprecation_messages| is set. | 59 // |log_deprecation_messages| is set. |
| 56 size_t ScanFormControlElements( | 60 size_t ScanFormControlElements( |
| 57 const std::vector<blink::WebFormControlElement>& control_elements, | 61 const std::vector<blink::WebFormControlElement>& control_elements, |
| 58 bool log_deprecation_messages); | 62 bool log_deprecation_messages); |
| 59 | 63 |
| 60 // Saves initial state of checkbox and select elements. | 64 // Saves initial state of checkbox and select elements. |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 77 | 81 |
| 78 // The cached initial values for checkable <input> elements. | 82 // The cached initial values for checkable <input> elements. |
| 79 std::map<const blink::WebInputElement, bool> initial_checked_state_; | 83 std::map<const blink::WebInputElement, bool> initial_checked_state_; |
| 80 | 84 |
| 81 DISALLOW_COPY_AND_ASSIGN(FormCache); | 85 DISALLOW_COPY_AND_ASSIGN(FormCache); |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 } // namespace autofill | 88 } // namespace autofill |
| 85 | 89 |
| 86 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ | 90 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ |
| OLD | NEW |