| Index: ios/chrome/browser/ui/payments/region_data_loader.h
|
| diff --git a/ios/chrome/browser/ui/payments/region_data_loader.h b/ios/chrome/browser/ui/payments/region_data_loader.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..452293afc30259e76c9224a7162f1e9c4b0aef41
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/payments/region_data_loader.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_
|
| +#define IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_
|
| +
|
| +#import <Foundation/Foundation.h>
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/autofill/core/browser/region_combobox_model.h"
|
| +#include "ui/base/models/combobox_model_observer.h"
|
| +
|
| +namespace autofill {
|
| +class RegionDataLoader;
|
| +} // namespace autofill
|
| +
|
| +namespace ui {
|
| +class ComboboxModel;
|
| +} // namespace ui
|
| +
|
| +@protocol RegionDataLoaderConsumer
|
| +
|
| +- (void)regionDataLoaderDidSucceedWithRegions:(NSArray<NSString*>*)regions;
|
| +
|
| +@end
|
| +
|
| +class RegionDataLoader : public ui::ComboboxModelObserver {
|
| + public:
|
| + explicit RegionDataLoader(id<RegionDataLoaderConsumer> consumer);
|
| + ~RegionDataLoader() override;
|
| +
|
| + void LoadRegionData(const std::string& country_code,
|
| + autofill::RegionDataLoader* autofill_region_data_loader);
|
| +
|
| + // ui::ComboboxModelObserver
|
| + void OnComboboxModelChanged(ui::ComboboxModel* model) override;
|
| +
|
| + private:
|
| + __weak id<RegionDataLoaderConsumer> consumer_;
|
| + autofill::RegionComboboxModel region_model_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RegionDataLoader);
|
| +};
|
| +
|
| +#endif // IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_
|
|
|