Index: chrome/browser/ui/autofill/autofill_dialog_models.h |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_models.h b/chrome/browser/ui/autofill/autofill_dialog_models.h |
index 0b36b2ace84b222a6d74cb8d63422a026d2690e0..705a0d30f750a90eb61c0e2b20349ce89faf8de9 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_models.h |
+++ b/chrome/browser/ui/autofill/autofill_dialog_models.h |
@@ -23,7 +23,8 @@ class SuggestionsMenuModelDelegate { |
virtual ~SuggestionsMenuModelDelegate(); |
// Called when a menu item has been activated. |
- virtual void SuggestionItemSelected(const SuggestionsMenuModel& model) = 0; |
+ virtual void SuggestionItemSelected(SuggestionsMenuModel* model, |
+ size_t index) = 0; |
}; |
// A model for the dropdowns that allow the user to select from different |
@@ -67,6 +68,10 @@ class SuggestionsMenuModel : public ui::SimpleMenuModel, |
// there are no items. |
std::string GetItemKeyForCheckedItem() const; |
+ // Sets which item is checked. |
+ void SetCheckedItem(const std::string& item_key); |
+ void SetCheckedIndex(size_t index); |
+ |
int checked_item() { return checked_item_; } |
// ui::SimpleMenuModel::Delegate implementation. |
@@ -85,7 +90,8 @@ class SuggestionsMenuModel : public ui::SimpleMenuModel, |
SuggestionsMenuModelDelegate* delegate_; |
- // The command id (and index) of the item which is currently checked. |
+ // The command id (and index) of the item which is currently checked. Only one |
+ // item is checked at a time. |
int checked_item_; |
DISALLOW_COPY_AND_ASSIGN(SuggestionsMenuModel); |