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..fc0bad10473541adb0020b7f2cdf4dd36fe45118 |
--- /dev/null |
+++ b/ios/chrome/browser/ui/payments/region_data_loader.h |
@@ -0,0 +1,48 @@ |
+// 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 <memory> |
+ |
+#include "base/macros.h" |
+#include "ui/base/models/combobox_model_observer.h" |
+ |
+namespace autofill { |
+class RegionComboboxModel; |
+class RegionDataLoader; |
+} // namespace autofill |
+ |
+namespace ui { |
+class ComboboxModel; |
+} // namespace ui |
+ |
+@protocol RegionDataLoaderConsumer |
+ |
+- (void)regionDataLoaderDidSucceedWithRegions:(NSArray<NSString*>*)regions; |
+ |
+@end |
+ |
+class RegionDataLoader : public ui::ComboboxModelObserver { |
+ public: |
+ RegionDataLoader(id<RegionDataLoaderConsumer> consumer); |
please use gerrit instead
2017/05/22 14:04:20
explicit
Moe
2017/05/22 15:57:53
Done.
|
+ ~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_; |
+ std::unique_ptr<autofill::RegionComboboxModel> region_model_; |
please use gerrit instead
2017/05/22 14:04:19
It appears that you instantiate region_model_ in t
Moe
2017/05/22 15:57:53
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(RegionDataLoader); |
+}; |
+ |
+#endif // IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_ |