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

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

Issue 11428071: support CC expiration dates in imperative autocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 1 month 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_controller.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller.h b/chrome/browser/ui/autofill/autofill_dialog_controller.h
index e6faaf0f85aaf9b1906730e80bd1150fbd14d90f..f6934f4880f9351b0129e6200b13c0ecbb5ed80f 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller.h
@@ -14,6 +14,7 @@
#include "base/string16.h"
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_structure.h"
+#include "chrome/browser/ui/autofill/autofill_dialog_comboboxes.h"
#include "ui/base/models/combobox_model.h"
class Profile;
@@ -89,6 +90,7 @@ class AutofillDialogController {
// Returns the set of inputs the page has requested which fall under
// |section|.
const DetailInputs& RequestedFieldsForSection(DialogSection section) const;
+ ui::ComboboxModel* ComboboxModelForAutofillType(AutofillFieldType type);
// Returns the model for suggestions for fields that fall under |section|.
ui::ComboboxModel* ComboboxModelForSection(DialogSection section);
@@ -99,28 +101,6 @@ class AutofillDialogController {
content::WebContents* web_contents() { return contents_; }
private:
- // A model for the comboboxes that allow the user to select known data.
- class SuggestionsComboboxModel : public ui::ComboboxModel {
- public:
- SuggestionsComboboxModel();
- virtual ~SuggestionsComboboxModel();
-
- void AddItem(const string16& display_label, const std::string& key);
- std::string GetItemKeyAt(int index);
-
- // ui::Combobox implementation:
- virtual int GetItemCount() const OVERRIDE;
- virtual string16 GetItemAt(int index) OVERRIDE;
-
- private:
- // The items this model represents, in presentation order. The first
- // string is the "key" which identifies the item. The second is the
- // display string for the item.
- std::vector<std::pair<std::string, string16> > items_;
-
- DISALLOW_COPY_AND_ASSIGN(SuggestionsComboboxModel);
- };
-
// Determines whether |input| and |field| match.
typedef base::Callback<bool(const DetailInput& input,
const AutofillField& field)> InputFieldComparator;
@@ -160,6 +140,10 @@ class AutofillDialogController {
DetailInputs requested_billing_fields_;
DetailInputs requested_shipping_fields_;
+ // Models for the credit card expiration inputs.
+ MonthComboboxModel cc_exp_month_combobox_model_;
+ YearComboboxModel cc_exp_year_combobox_model_;
+
// Models for the suggestion views.
SuggestionsComboboxModel suggested_email_;
SuggestionsComboboxModel suggested_cc_;
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_comboboxes.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698