| 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 fb92f35cad97b7d2a9061310d15692d5e7a5761e..1c6eb184daa6dd407a1d6dcf1ee7b5cad2d31767 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
|
| @@ -5,9 +5,13 @@
|
| #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
|
| #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
|
|
|
| +// Use "base/basictyptes.h" instead.
|
| +#define I18N_ADDRESSINPUT_UTIL_BASICTYPES_H_
|
| +
|
| #include <set>
|
| #include <vector>
|
|
|
| +#include "base/basictypes.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| @@ -35,8 +39,6 @@
|
| #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"
|
| @@ -44,12 +46,21 @@
|
| #include "ui/gfx/animation/linear_animation.h"
|
| #include "url/gurl.h"
|
|
|
| +#define I18N_ADDRESSINPUT_UTIL_BASICTYPES_H_ // base/basictypes.h
|
| +#include "third_party/libaddressinput/chromium/preload_address_validator.h"
|
| +
|
| class Profile;
|
|
|
| namespace content {
|
| class WebContents;
|
| }
|
|
|
| +namespace i18n {
|
| +namespace addressinput {
|
| +struct AddressData;
|
| +} // namespace addressinput
|
| +} // namespace i18n
|
| +
|
| namespace autofill {
|
|
|
| class AutofillDataModel;
|
| @@ -78,8 +89,7 @@ class AutofillDialogControllerImpl
|
| public wallet::WalletSigninHelperDelegate,
|
| public PersonalDataManagerObserver,
|
| public AccountChooserModelDelegate,
|
| - public gfx::AnimationDelegate,
|
| - public ::i18n::addressinput::LoadRulesDelegate {
|
| + public gfx::AnimationDelegate {
|
| public:
|
| virtual ~AutofillDialogControllerImpl();
|
|
|
| @@ -218,9 +228,10 @@ class AutofillDialogControllerImpl
|
| 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;
|
| + // PreloadAddressValidator::Callback implementation.
|
| + void AddressValidationRulesLoaded(bool success,
|
| + const std::string& country_code,
|
| + const int& rule_count);
|
|
|
| protected:
|
| enum DialogSignedInState {
|
| @@ -250,7 +261,7 @@ class AutofillDialogControllerImpl
|
| virtual PersonalDataManager* GetManager() const;
|
|
|
| // Returns an address validation helper. May be NULL during tests.
|
| - virtual ::i18n::addressinput::AddressValidator* GetValidator();
|
| + virtual PreloadAddressValidator* GetValidator();
|
|
|
| // Returns the WalletClient* this class uses to talk to Online Wallet. Exposed
|
| // for testing.
|
| @@ -654,7 +665,7 @@ class AutofillDialogControllerImpl
|
| wallet::WalletClient wallet_client_;
|
|
|
| // A helper to validate international address input.
|
| - scoped_ptr< ::i18n::addressinput::AddressValidator> validator_;
|
| + scoped_ptr<PreloadAddressValidator> validator_;
|
|
|
| // True if |this| has ever called GetWalletItems().
|
| bool wallet_items_requested_;
|
| @@ -833,6 +844,9 @@ class AutofillDialogControllerImpl
|
|
|
| base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_;
|
|
|
| + const scoped_ptr<PreloadAddressValidator::Callback>
|
| + address_validation_rules_loaded_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
|
| };
|
|
|
|
|