diff options
author | georgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 20:59:59 +0000 |
---|---|---|
committer | georgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 20:59:59 +0000 |
commit | be82dced35dab699b978c6b9f256f78b3ee99900 (patch) | |
tree | a629ccf652344bede3385c17e2622dd8f079ffbb /chrome/browser/views/autofill_profiles_view_win.h | |
parent | 7b679d3131ec3c94ef9d8a6a7d89516b43e81a35 (diff) | |
download | chromium_src-be82dced35dab699b978c6b9f256f78b3ee99900.zip chromium_src-be82dced35dab699b978c6b9f256f78b3ee99900.tar.gz chromium_src-be82dced35dab699b978c6b9f256f78b3ee99900.tar.bz2 |
Added validation for non-emptiness of the label.
TEST=If any label (in address or credit card) is empty, the save button is disabled. Otherwise it is enabled.
BUG=33026
Review URL: http://codereview.chromium.org/575027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/autofill_profiles_view_win.h')
-rw-r--r-- | chrome/browser/views/autofill_profiles_view_win.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/views/autofill_profiles_view_win.h b/chrome/browser/views/autofill_profiles_view_win.h index 3eac54e..6345869 100644 --- a/chrome/browser/views/autofill_profiles_view_win.h +++ b/chrome/browser/views/autofill_profiles_view_win.h @@ -73,6 +73,9 @@ class AutoFillProfilesView : public views::View, // being changed. void CollapseStateChanged( std::vector<EditableSetInfo>::iterator field_set_iterator); + // Validates data and sets data_valid_, to allow or deny save. + void ValidateDataAndUpdateButtons(); + bool data_valid() const { return data_valid_; } // views::View methods: virtual void Layout(); @@ -84,6 +87,8 @@ class AutoFillProfilesView : public views::View, virtual int GetDialogButtons() const; virtual std::wstring GetDialogButtonLabel( MessageBoxFlags::DialogButton button) const; + virtual bool IsDialogButtonEnabled( + MessageBoxFlags::DialogButton button) const; virtual bool CanResize() const { return true; } virtual bool CanMaximize() const { return true; } virtual bool IsAlwaysOnTop() const { return false; } @@ -351,6 +356,7 @@ class AutoFillProfilesView : public views::View, AutoFillDialogObserver* observer_; std::vector<EditableSetInfo> profiles_set_; std::vector<EditableSetInfo> credit_card_set_; + bool data_valid_; views::Button* save_changes_; AutoFillScrollView* scroll_view_; |