| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | 68 virtual bool IsValidProfile(const autofill::AutofillProfile& profile) = 0; |
| 69 | 69 |
| 70 // Whether |profile| should be displayed in an enabled state and selectable. | 70 // Whether |profile| should be displayed in an enabled state and selectable. |
| 71 bool IsEnabled(autofill::AutofillProfile* profile); | 71 virtual bool IsEnabled(autofill::AutofillProfile* profile); |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 // Does not take ownership of the arguments, which should outlive this object. | 74 // Does not take ownership of the arguments, which should outlive this object. |
| 75 ProfileListViewController(PaymentRequestSpec* spec, | 75 ProfileListViewController(PaymentRequestSpec* spec, |
| 76 PaymentRequestState* state, | 76 PaymentRequestState* state, |
| 77 PaymentRequestDialogView* dialog); | 77 PaymentRequestDialogView* dialog); |
| 78 | 78 |
| 79 // Returns the profiles cached by |request| which are appropriate for display | 79 // Returns the profiles cached by |request| which are appropriate for display |
| 80 // in this context. | 80 // in this context. |
| 81 virtual std::vector<autofill::AutofillProfile*> GetProfiles() = 0; | 81 virtual std::vector<autofill::AutofillProfile*> GetProfiles() = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 99 private: | 99 private: |
| 100 std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); | 100 std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); |
| 101 PaymentRequestItemList list_; | 101 PaymentRequestItemList list_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(ProfileListViewController); | 103 DISALLOW_COPY_AND_ASSIGN(ProfileListViewController); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace payments | 106 } // namespace payments |
| 107 | 107 |
| 108 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ | 108 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ |
| OLD | NEW |