Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h |
index 3f48f734d2bc86f08d716893bdc41de25e270963..f57efd0939ecf36d494ddf11c0f5bdc694db4166 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h |
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h |
@@ -35,6 +35,8 @@ |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/common/ssl_status.h" |
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_validator.h" |
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/load_rules_delegate.h" |
#include "third_party/skia/include/core/SkColor.h" |
#include "ui/base/models/simple_menu_model.h" |
#include "ui/base/ui_base_types.h" |
@@ -66,17 +68,19 @@ class WalletSigninHelper; |
// This class drives the dialog that appears when a site uses the imperative |
// autocomplete API to fill out a form. |
-class AutofillDialogControllerImpl : public AutofillDialogViewDelegate, |
- public AutofillDialogController, |
- public AutofillPopupDelegate, |
- public content::NotificationObserver, |
- public content::WebContentsObserver, |
- public SuggestionsMenuModelDelegate, |
- public wallet::WalletClientDelegate, |
- public wallet::WalletSigninHelperDelegate, |
- public PersonalDataManagerObserver, |
- public AccountChooserModelDelegate, |
- public gfx::AnimationDelegate { |
+class AutofillDialogControllerImpl |
+ : public AutofillDialogViewDelegate, |
+ public AutofillDialogController, |
+ public AutofillPopupDelegate, |
+ public content::NotificationObserver, |
+ public content::WebContentsObserver, |
+ public SuggestionsMenuModelDelegate, |
+ public wallet::WalletClientDelegate, |
+ public wallet::WalletSigninHelperDelegate, |
+ public PersonalDataManagerObserver, |
+ public AccountChooserModelDelegate, |
+ public gfx::AnimationDelegate, |
+ public ::i18n::addressinput::LoadRulesDelegate { |
public: |
virtual ~AutofillDialogControllerImpl(); |
@@ -221,6 +225,10 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate, |
virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; |
virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; |
+ // ::i18n::addressinput::LoadRulesDelegate implementation. |
+ virtual void OnAddressValidationRulesLoaded(const std::string& country_code, |
+ bool success) OVERRIDE; |
+ |
protected: |
enum DialogSignedInState { |
NOT_CHECKED, |
@@ -696,8 +704,6 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate, |
// A NotificationRegistrar for tracking the completion of sign-in. |
content::NotificationRegistrar signin_registrar_; |
- base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; |
- |
// Set to true when the user presses the sign in link, until we're ready to |
// show the normal dialog again. This is used to hide the buttons while |
// the spinner is showing after an explicit sign in. |
@@ -710,6 +716,9 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate, |
// continue to be true while processing required actions. |
bool is_submitting_; |
+ // A helper to validate interntional address input. |
+ scoped_ptr< ::i18n::addressinput::AddressValidator> validator_; |
+ |
// True if the last call to |GetFullWallet()| returned a |
// CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS required action, indicating that the |
// selected instrument or address had become invalid since it was originally |
@@ -774,6 +783,8 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate, |
// A username string we display in the card scrambling/generated overlay. |
base::string16 submitted_cardholder_name_; |
+ base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
}; |