OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_ | |
6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_ | |
7 | |
8 #import <Foundation/Foundation.h> | |
9 | |
10 #include "base/macros.h" | |
11 #include "components/autofill/core/browser/region_combobox_model.h" | |
12 #include "ui/base/models/combobox_model_observer.h" | |
13 | |
14 namespace autofill { | |
15 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.
| |
16 class RegionDataLoader; | |
17 } // namespace autofill | |
18 | |
19 namespace ui { | |
20 class ComboboxModel; | |
21 } // namespace ui | |
22 | |
23 @protocol RegionDataLoaderConsumer | |
24 | |
25 - (void)regionDataLoaderDidSucceedWithRegions:(NSArray<NSString*>*)regions; | |
26 | |
27 @end | |
28 | |
29 class RegionDataLoader : public ui::ComboboxModelObserver { | |
30 public: | |
31 explicit RegionDataLoader(id<RegionDataLoaderConsumer> consumer); | |
32 ~RegionDataLoader() override; | |
33 | |
34 void LoadRegionData(const std::string& country_code, | |
35 autofill::RegionDataLoader* autofill_region_data_loader); | |
36 | |
37 // ui::ComboboxModelObserver | |
38 void OnComboboxModelChanged(ui::ComboboxModel* model) override; | |
39 | |
40 private: | |
41 __weak id<RegionDataLoaderConsumer> consumer_; | |
42 autofill::RegionComboboxModel region_model_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(RegionDataLoader); | |
45 }; | |
46 | |
47 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_ | |
OLD | NEW |