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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.h

Issue 124533003: Add country combobox to change country and rebuild address inputs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 6 years, 11 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/views/autofill/autofill_dialog_views.h
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.h b/chrome/browser/ui/views/autofill/autofill_dialog_views.h
index 7149fd7ecb69315612d73ae564f37a8a3ccdeb03..5d7b58083ccbc947549322e77e050b3c316cb91f 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.h
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.h
@@ -463,9 +463,9 @@ class AutofillDialogViews : public AutofillDialogView,
SectionContainer* container;
// The view that allows manual input.
views::View* manual_input;
- // The textfields in |manual_input|, tracked by their DetailInput.
+ // The textfields in |manual_input|, tracked by their ServerFieldType.
TextfieldMap textfields;
- // The comboboxes in |manual_input|, tracked by their DetailInput.
+ // The comboboxes in |manual_input|, tracked by their ServerFieldType.
ComboboxMap comboboxes;
// The view that holds the text of the suggested data. This will be
// visible IFF |manual_input| is not visible.
@@ -507,10 +507,8 @@ class AutofillDialogViews : public AutofillDialogView,
// a given section.
views::View* CreateInputsContainer(DialogSection section);
- // Creates a grid of textfield views for the given section, and stores them
- // in the appropriate DetailsGroup. The top level View in the hierarchy is
- // returned.
- views::View* InitInputsView(DialogSection section);
+ // Creates a grid of inputs for the given section.
+ void InitInputsView(DialogSection section);
// Changes the function of the whole dialog. Currently this can show a loading
// shield, an embedded sign in web view, or the more typical detail input mode
@@ -533,6 +531,9 @@ class AutofillDialogViews : public AutofillDialogView,
// Returns NULL if no DetailsGroup was found.
DetailsGroup* GroupForView(views::View* view);
+ // Erases all views in |group| from |validity_map_|.
+ void EraseInvalidViewsInGroup(const DetailsGroup* group);
+
// Explicitly focuses the initially focusable view.
void FocusInitialView();
@@ -563,11 +564,13 @@ class AutofillDialogViews : public AutofillDialogView,
// ones and returns true if all were valid.
bool ValidateForm();
- // When an input textfield is edited (its contents change) or activated
- // (clicked while focused), this function will inform the delegate that it's
- // time to show a suggestion popup and possibly reset the validity state of
- // the input.
- void TextfieldEditedOrActivated(views::Textfield* textfield, bool was_edit);
+ // When an input is edited (its contents change) or activated (clicked while
+ // focused), this function will inform the delegate to take the appropriate
+ // action (textfields may show a suggestion popup, comboboxes may rebuild the
+ // section inputs). May also reset the validity state of the input.
+ void InputEditedOrActivated(ServerFieldType type,
+ const gfx::Rect& bounds,
+ bool was_edit);
// Updates the views in the button strip.
void UpdateButtonStripExtraView();
@@ -577,11 +580,17 @@ class AutofillDialogViews : public AutofillDialogView,
void DoContentsPreferredSizeChanged();
// Gets the textfield view that is shown for the given |type| or NULL.
- views::Textfield* TextfieldForType(ServerFieldType type);
+ DecoratedTextfield* TextfieldForType(ServerFieldType type);
+
+ // Returns the associated ServerFieldType for |textfield|.
+ ServerFieldType TypeForTextfield(const views::Textfield* textfield);
// Gets the combobox view that is shown for the given |type|, or NULL.
views::Combobox* ComboboxForType(ServerFieldType type);
+ // Returns the associated ServerFieldType for |combobox|.
+ ServerFieldType TypeForCombobox(const views::Combobox* combobox) const;
+
// Called when the details container changes in size or position.
void DetailsContainerBoundsChanged();

Powered by Google App Engine
This is Rietveld 408576698