Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_models.h

Issue 14129005: Remove "Use billing for shipping" checkbox in favor of item in suggestions menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 44ff005aff809fce470e232470bd17e936d125c9..8b0a52e7c36590e551b0ce6a918d43e4dffd642a 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_models.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_models.h
@@ -27,7 +27,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,
+ const std::string& item_key) = 0;
};
// A model for the dropdowns that allow the user to select from different
@@ -71,6 +72,9 @@ 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);
+
int checked_item() { return checked_item_; }
// ui::SimpleMenuModel::Delegate implementation.
@@ -89,7 +93,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);

Powered by Google App Engine
This is Rietveld 408576698