OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 autofill::AutofillProfile* profile) = 0; | 58 autofill::AutofillProfile* profile) = 0; |
59 | 59 |
60 virtual void SelectProfile(autofill::AutofillProfile* profile) = 0; | 60 virtual void SelectProfile(autofill::AutofillProfile* profile) = 0; |
61 | 61 |
62 // Shows an editor for modifying |profile|, or for creating a new profile | 62 // Shows an editor for modifying |profile|, or for creating a new profile |
63 // if |profile| is null. | 63 // if |profile| is null. |
64 virtual void ShowEditor(autofill::AutofillProfile* profile) = 0; | 64 virtual void ShowEditor(autofill::AutofillProfile* profile) = 0; |
65 | 65 |
66 virtual autofill::AutofillProfile* GetSelectedProfile() = 0; | 66 virtual autofill::AutofillProfile* GetSelectedProfile() = 0; |
67 | 67 |
| 68 virtual bool IsValidProfile(const autofill::AutofillProfile& profile) = 0; |
| 69 |
68 protected: | 70 protected: |
69 // Does not take ownership of the arguments, which should outlive this object. | 71 // Does not take ownership of the arguments, which should outlive this object. |
70 ProfileListViewController(PaymentRequestSpec* spec, | 72 ProfileListViewController(PaymentRequestSpec* spec, |
71 PaymentRequestState* state, | 73 PaymentRequestState* state, |
72 PaymentRequestDialogView* dialog); | 74 PaymentRequestDialogView* dialog); |
73 | 75 |
74 // Returns the profiles cached by |request| which are appropriate for display | 76 // Returns the profiles cached by |request| which are appropriate for display |
75 // in this context. | 77 // in this context. |
76 virtual std::vector<autofill::AutofillProfile*> GetProfiles() = 0; | 78 virtual std::vector<autofill::AutofillProfile*> GetProfiles() = 0; |
77 | 79 |
(...skipping 12 matching lines...) Expand all Loading... |
90 private: | 92 private: |
91 std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); | 93 std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); |
92 PaymentRequestItemList list_; | 94 PaymentRequestItemList list_; |
93 | 95 |
94 DISALLOW_COPY_AND_ASSIGN(ProfileListViewController); | 96 DISALLOW_COPY_AND_ASSIGN(ProfileListViewController); |
95 }; | 97 }; |
96 | 98 |
97 } // namespace payments | 99 } // namespace payments |
98 | 100 |
99 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ | 101 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ |
OLD | NEW |