OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_POPUP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // The user has choosen the selected line. | 85 // The user has choosen the selected line. |
86 bool AcceptSelectedLine(); | 86 bool AcceptSelectedLine(); |
87 | 87 |
88 // The user has removed a suggestion. | 88 // The user has removed a suggestion. |
89 bool RemoveSelectedLine(); | 89 bool RemoveSelectedLine(); |
90 | 90 |
91 // Return true if the index is the first element of a new section and should | 91 // Return true if the index is the first element of a new section and should |
92 // have a separator above it. | 92 // have a separator above it. |
93 bool IsSeparatorIndex(int index); | 93 bool IsSeparatorIndex(int index); |
94 | 94 |
| 95 // Get the resource value for the given resource, returning -1 if the |
| 96 // resource isn't recognized. |
| 97 int GetIconResourceID(const string16& resource_name); |
| 98 |
95 private: | 99 private: |
96 // Returns true if the given id refers to an element that can be deleted. | 100 // Returns true if the given id refers to an element that can be deleted. |
97 bool CanDelete(int id); | 101 bool CanDelete(int id); |
98 | 102 |
99 // Returns true if the popup still has non-options entries to show the user. | 103 // Returns true if the popup still has non-options entries to show the user. |
100 bool HasAutofillEntries(); | 104 bool HasAutofillEntries(); |
101 | 105 |
102 // content::NotificationObserver method override. | 106 // content::NotificationObserver method override. |
103 virtual void Observe(int type, | 107 virtual void Observe(int type, |
104 const content::NotificationSource& source, | 108 const content::NotificationSource& source, |
(...skipping 12 matching lines...) Expand all Loading... |
117 std::vector<string16> autofill_labels_; | 121 std::vector<string16> autofill_labels_; |
118 std::vector<string16> autofill_icons_; | 122 std::vector<string16> autofill_icons_; |
119 std::vector<int> autofill_unique_ids_; | 123 std::vector<int> autofill_unique_ids_; |
120 | 124 |
121 // The line that is currently selected by the user. | 125 // The line that is currently selected by the user. |
122 // |kNoSelection| indicates that no line is currently selected. | 126 // |kNoSelection| indicates that no line is currently selected. |
123 int selected_line_; | 127 int selected_line_; |
124 }; | 128 }; |
125 | 129 |
126 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 130 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
OLD | NEW |