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_BROWSER_AUTOFILL_FORM_GROUP_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ |
6 #define CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ | 6 #define CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // matches given the type. This method is additive on |matched_text|. | 46 // matches given the type. This method is additive on |matched_text|. |
47 virtual void FindInfoMatches(const AutoFillType& type, | 47 virtual void FindInfoMatches(const AutoFillType& type, |
48 const string16& info, | 48 const string16& info, |
49 std::vector<string16>* matched_text) const = 0; | 49 std::vector<string16>* matched_text) const = 0; |
50 | 50 |
51 // Used to populate this FormGroup object with data. | 51 // Used to populate this FormGroup object with data. |
52 virtual void SetInfo(const AutoFillType& type, const string16& value) = 0; | 52 virtual void SetInfo(const AutoFillType& type, const string16& value) = 0; |
53 | 53 |
54 // Returns the label for this FormGroup item. This should be overridden for | 54 // Returns the label for this FormGroup item. This should be overridden for |
55 // form group items that implement a label. | 55 // form group items that implement a label. |
56 virtual const string16 Label() const; | 56 virtual string16 Label() const; |
57 | 57 |
58 // Returns true if the field data in |form_group| does not match the field | 58 // Returns true if the field data in |form_group| does not match the field |
59 // data in this FormGroup. | 59 // data in this FormGroup. |
60 virtual bool operator!=(const FormGroup& form_group) const; | 60 virtual bool operator!=(const FormGroup& form_group) const; |
61 | 61 |
62 // Returns true if the data in this FormGroup is a subset of the data in | 62 // Returns true if the data in this FormGroup is a subset of the data in |
63 // |form_group|. | 63 // |form_group|. |
64 bool IsSubsetOf(const FormGroup& form_group) const; | 64 bool IsSubsetOf(const FormGroup& form_group) const; |
65 | 65 |
66 // Returns true if the values of the intersection of the available field types | 66 // Returns true if the values of the intersection of the available field types |
67 // are equal. If the intersection is empty, the method returns false. | 67 // are equal. If the intersection is empty, the method returns false. |
68 bool IntersectionOfTypesHasEqualValues(const FormGroup& form_group) const; | 68 bool IntersectionOfTypesHasEqualValues(const FormGroup& form_group) const; |
69 | 69 |
70 // Merges the field data in |form_group| with this FormGroup. | 70 // Merges the field data in |form_group| with this FormGroup. |
71 void MergeWith(const FormGroup& form_group); | 71 void MergeWith(const FormGroup& form_group); |
72 | 72 |
73 // Overwrites the field data in |form_group| with this FormGroup. | 73 // Overwrites the field data in |form_group| with this FormGroup. |
74 void OverwriteWith(const FormGroup& form_group); | 74 void OverwriteWith(const FormGroup& form_group); |
75 }; | 75 }; |
76 | 76 |
77 #endif // CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ | 77 #endif // CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_ |
OLD | NEW |