Chromium Code Reviews| Index: chrome/browser/autofill/autofill_popup_view.h |
| diff --git a/chrome/browser/autofill/autofill_popup_view.h b/chrome/browser/autofill/autofill_popup_view.h |
| index 4fac0240a26086872c4a5ead883635471a20b587..55c5c270a4f2b538d47bae86c4a8a7ec7bc4b980 100644 |
| --- a/chrome/browser/autofill/autofill_popup_view.h |
| +++ b/chrome/browser/autofill/autofill_popup_view.h |
| @@ -71,6 +71,8 @@ class AutofillPopupView : public content::NotificationObserver { |
| return autofill_unique_ids_; |
| } |
| + int row_count() const { return row_count_; } |
| + |
| int selected_line() const { return selected_line_; } |
| // Change which line is currently selected by the user. |
| @@ -88,14 +90,17 @@ class AutofillPopupView : public content::NotificationObserver { |
| // The user has removed a suggestion. |
| bool RemoveSelectedLine(); |
| - // Return true if the index is the first element of a new section and should |
| - // have a separator above it. |
| - bool IsSeparatorIndex(int index); |
| - |
| // Get the resource value for the given resource, returning -1 if the |
| // resource isn't recognized. |
| int GetIconResourceID(const string16& resource_name); |
| + // Get the number of rows this popup will display. |
| + int GetRowCount(); |
| + |
| + // Convert the given row to its index value. A return value of -1 indicates |
| + // the given row was out of bounds. |
| + int RowToIndex(size_t row); |
|
Ilya Sherman
2012/05/22 20:44:03
This seems much more complex than just storing the
|
| + |
| private: |
| // Returns true if the given id refers to an element that can be deleted. |
| bool CanDelete(int id); |
| @@ -122,6 +127,12 @@ class AutofillPopupView : public content::NotificationObserver { |
| std::vector<string16> autofill_icons_; |
| std::vector<int> autofill_unique_ids_; |
| + // The number of rows that will be displayed in the popup. |
| + int row_count_; |
| + |
| + // Mapping to allow conversion between the row and the old index values. |
| + std::vector<int> row_to_index_mapping_; |
| + |
| // The line that is currently selected by the user. |
| // |kNoSelection| indicates that no line is currently selected. |
| int selected_line_; |