Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: ios/chrome/browser/ui/payments/region_data_loader.h

Issue 2893193002: [Payment Request] Region data loader (Closed)
Patch Set: Addressed comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/payments/BUILD.gn ('k') | ios/chrome/browser/ui/payments/region_data_loader.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49a5a051f48601f7d0e967ad25ca79d58f89c053
--- /dev/null
+++ b/ios/chrome/browser/ui/payments/region_data_loader.h
@@ -0,0 +1,47 @@
+// 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 RegionComboboxModel;
please use gerrit instead 2017/05/22 16:01:02 No longer need to forward declare this class.
Moe 2017/05/22 16:23:44 Done.
+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_
« no previous file with comments | « ios/chrome/browser/ui/payments/BUILD.gn ('k') | ios/chrome/browser/ui/payments/region_data_loader.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698