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

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

Issue 2065303002: Modifying Autofill Agent to use synthetic form (i.e., formless elements) when no form is present on… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding browser test Created 4 years, 6 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_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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Clears the values of all input elements in the form that contains 45 // Clears the values of all input elements in the form that contains
46 // |element|. Returns false if the form is not found. 46 // |element|. Returns false if the form is not found.
47 bool ClearFormWithElement(const blink::WebFormControlElement& element); 47 bool ClearFormWithElement(const blink::WebFormControlElement& element);
48 48
49 // For each field in the |form|, sets the title to include the field's 49 // For each field in the |form|, sets the title to include the field's
50 // heuristic type, server type, and signature; as well as the form's signature 50 // heuristic type, server type, and signature; as well as the form's signature
51 // and the experiment id for the server predictions. 51 // and the experiment id for the server predictions.
52 bool ShowPredictions(const FormDataPredictions& form); 52 bool ShowPredictions(const FormDataPredictions& form);
53 53
54 // Returns a copy of the current state of SyntheticForm, which contains the
55 // input elements not contained inside a <form> tag.
56 FormData GetSyntheticForm();
57
54 private: 58 private:
55 // Scans |control_elements| and returns the number of editable elements. 59 // Scans |control_elements| and returns the number of editable elements.
56 // Also remembers the initial <select> and <input> element states, and 60 // Also remembers the initial <select> and <input> element states, and
57 // logs warning messages for deprecated attribute if 61 // logs warning messages for deprecated attribute if
58 // |log_deprecation_messages| is set. 62 // |log_deprecation_messages| is set.
59 size_t ScanFormControlElements( 63 size_t ScanFormControlElements(
60 const std::vector<blink::WebFormControlElement>& control_elements, 64 const std::vector<blink::WebFormControlElement>& control_elements,
61 bool log_deprecation_messages); 65 bool log_deprecation_messages);
62 66
63 // Saves initial state of checkbox and select elements. 67 // Saves initial state of checkbox and select elements.
(...skipping 16 matching lines...) Expand all
80 84
81 // The cached initial values for checkable <input> elements. 85 // The cached initial values for checkable <input> elements.
82 std::map<const blink::WebInputElement, bool> initial_checked_state_; 86 std::map<const blink::WebInputElement, bool> initial_checked_state_;
83 87
84 DISALLOW_COPY_AND_ASSIGN(FormCache); 88 DISALLOW_COPY_AND_ASSIGN(FormCache);
85 }; 89 };
86 90
87 } // namespace autofill 91 } // namespace autofill
88 92
89 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_ 93 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698