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 // Contains constants specific to the Autofill component. | 5 // Contains constants specific to the Autofill component. |
6 | 6 |
7 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ | 7 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ |
8 #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ | 8 #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ |
9 | 9 |
10 #include <stddef.h> // For size_t | 10 #include <stddef.h> // For size_t |
11 | 11 |
12 namespace autofill { | 12 namespace autofill { |
13 | 13 |
| 14 // A bit field mask for form or form element requirements. |
| 15 enum RequirementsMask { |
| 16 REQUIRE_NONE = 0, // No requirements. |
| 17 REQUIRE_AUTOCOMPLETE = 1, // Require that autocomplete != off. |
| 18 }; |
| 19 |
14 // Help URL for the Autofill dialog. | 20 // Help URL for the Autofill dialog. |
15 extern const char kHelpURL[]; | 21 extern const char kHelpURL[]; |
16 | 22 |
17 // The number of fields required by Autofill. Ideally we could send the forms | 23 // The number of fields required by Autofill. Ideally we could send the forms |
18 // to Autofill no matter how many fields are in the forms; however, finding the | 24 // to Autofill no matter how many fields are in the forms; however, finding the |
19 // label for each field is a costly operation and we can't spare the cycles if | 25 // label for each field is a costly operation and we can't spare the cycles if |
20 // it's not necessary. | 26 // it's not necessary. |
21 extern const size_t kRequiredAutofillFields; | 27 extern const size_t kRequiredAutofillFields; |
22 | 28 |
23 // Options bitmask values for AutofillHostMsg_ShowPasswordSuggestions IPC | 29 // Options bitmask values for AutofillHostMsg_ShowPasswordSuggestions IPC |
24 enum ShowPasswordSuggestionsOptions { | 30 enum ShowPasswordSuggestionsOptions { |
25 SHOW_ALL = 1 << 0 /* show all credentials, not just ones matching username */, | 31 SHOW_ALL = 1 << 0 /* show all credentials, not just ones matching username */, |
26 IS_PASSWORD_FIELD = 1 << 1 /* input field is a password field */ | 32 IS_PASSWORD_FIELD = 1 << 1 /* input field is a password field */ |
27 }; | 33 }; |
28 | 34 |
29 } // namespace autofill | 35 } // namespace autofill |
30 | 36 |
31 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ | 37 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_CONSTANTS_H_ |
OLD | NEW |