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 <memory> | |
11 | |
12 #include "base/macros.h" | |
13 #include "ui/base/models/combobox_model_observer.h" | |
14 | |
15 namespace autofill { | |
16 class RegionComboboxModel; | |
17 class RegionDataLoader; | |
18 } // namespace autofill | |
19 | |
20 namespace ui { | |
21 class ComboboxModel; | |
22 } // namespace ui | |
23 | |
24 @protocol RegionDataLoaderConsumer | |
25 | |
26 - (void)regionDataLoaderDidSucceedWithRegions:(NSArray<NSString*>*)regions; | |
27 | |
28 @end | |
29 | |
30 class RegionDataLoader : public ui::ComboboxModelObserver { | |
31 public: | |
32 RegionDataLoader(id<RegionDataLoaderConsumer> consumer); | |
please use gerrit instead
2017/05/22 14:04:20
explicit
Moe
2017/05/22 15:57:53
Done.
| |
33 ~RegionDataLoader() override; | |
34 | |
35 void LoadRegionData(const std::string& country_code, | |
36 autofill::RegionDataLoader* autofill_region_data_loader); | |
37 | |
38 // ui::ComboboxModelObserver | |
39 void OnComboboxModelChanged(ui::ComboboxModel* model) override; | |
40 | |
41 private: | |
42 __weak id<RegionDataLoaderConsumer> consumer_; | |
43 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.
| |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(RegionDataLoader); | |
46 }; | |
47 | |
48 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_REGION_DATA_LOADER_H_ | |
OLD | NEW |