| 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_CORE_COMMON_FORM_FIELD_DATA_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 bool operator<(const FormFieldData& field) const; | 46 bool operator<(const FormFieldData& field) const; |
| 47 | 47 |
| 48 // If you add more, be sure to update the comparison operator, SameFieldAs, | 48 // If you add more, be sure to update the comparison operator, SameFieldAs, |
| 49 // serializing functions (in the .cc file) and the constructor. | 49 // serializing functions (in the .cc file) and the constructor. |
| 50 base::string16 label; | 50 base::string16 label; |
| 51 base::string16 name; | 51 base::string16 name; |
| 52 base::string16 value; | 52 base::string16 value; |
| 53 std::string form_control_type; | 53 std::string form_control_type; |
| 54 std::string autocomplete_attribute; | 54 std::string autocomplete_attribute; |
| 55 base::string16 placeholder; | 55 base::string16 placeholder; |
| 56 base::string16 css_classes; |
| 56 // Note: we use uint64_t instead of size_t because this struct is sent over | 57 // Note: we use uint64_t instead of size_t because this struct is sent over |
| 57 // IPC which could span 32 & 64 bit processes. We chose uint64_t instead of | 58 // IPC which could span 32 & 64 bit processes. We chose uint64_t instead of |
| 58 // uint32_t to maintain compatibility with old code which used size_t | 59 // uint32_t to maintain compatibility with old code which used size_t |
| 59 // (base::Pickle used to serialize that as 64 bit). | 60 // (base::Pickle used to serialize that as 64 bit). |
| 60 uint64_t max_length; | 61 uint64_t max_length; |
| 61 bool is_autofilled; | 62 bool is_autofilled; |
| 62 CheckStatus check_status; | 63 CheckStatus check_status; |
| 63 bool is_focusable; | 64 bool is_focusable; |
| 64 bool should_autocomplete; | 65 bool should_autocomplete; |
| 65 RoleAttribute role; | 66 RoleAttribute role; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 91 // |FormFieldData|s in test code. | 92 // |FormFieldData|s in test code. |
| 92 #define EXPECT_FORM_FIELD_DATA_EQUALS(expected, actual) \ | 93 #define EXPECT_FORM_FIELD_DATA_EQUALS(expected, actual) \ |
| 93 do { \ | 94 do { \ |
| 94 EXPECT_EQ(expected.label, actual.label); \ | 95 EXPECT_EQ(expected.label, actual.label); \ |
| 95 EXPECT_EQ(expected.name, actual.name); \ | 96 EXPECT_EQ(expected.name, actual.name); \ |
| 96 EXPECT_EQ(expected.value, actual.value); \ | 97 EXPECT_EQ(expected.value, actual.value); \ |
| 97 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \ | 98 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \ |
| 98 EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \ | 99 EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \ |
| 99 EXPECT_EQ(expected.placeholder, actual.placeholder); \ | 100 EXPECT_EQ(expected.placeholder, actual.placeholder); \ |
| 100 EXPECT_EQ(expected.max_length, actual.max_length); \ | 101 EXPECT_EQ(expected.max_length, actual.max_length); \ |
| 102 EXPECT_EQ(expected.css_classes, actual.css_classes); \ |
| 101 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ | 103 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ |
| 102 EXPECT_EQ(expected.check_status, actual.check_status); \ | 104 EXPECT_EQ(expected.check_status, actual.check_status); \ |
| 103 } while (0) | 105 } while (0) |
| 104 | 106 |
| 105 } // namespace autofill | 107 } // namespace autofill |
| 106 | 108 |
| 107 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ | 109 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ |
| OLD | NEW |