| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 PaymentRequestDialogView* dialog); | 48 PaymentRequestDialogView* dialog); |
| 49 | 49 |
| 50 // PaymentRequestSheetController: | 50 // PaymentRequestSheetController: |
| 51 std::unique_ptr<views::View> CreateView() override; | 51 std::unique_ptr<views::View> CreateView() override; |
| 52 | 52 |
| 53 // Returns a representation of the given profile appropriate for display | 53 // Returns a representation of the given profile appropriate for display |
| 54 // in this context. | 54 // in this context. |
| 55 virtual std::unique_ptr<views::View> GetLabel( | 55 virtual std::unique_ptr<views::View> GetLabel( |
| 56 autofill::AutofillProfile* profile) = 0; | 56 autofill::AutofillProfile* profile) = 0; |
| 57 | 57 |
| 58 virtual void SelectProfile(autofill::AutofillProfile* profile) = 0; |
| 59 |
| 60 virtual autofill::AutofillProfile* GetSelectedProfile() = 0; |
| 61 |
| 58 protected: | 62 protected: |
| 59 // Does not take ownership of the arguments, which should outlive this object. | 63 // Does not take ownership of the arguments, which should outlive this object. |
| 60 ProfileListViewController(PaymentRequestSpec* spec, | 64 ProfileListViewController(PaymentRequestSpec* spec, |
| 61 PaymentRequestState* state, | 65 PaymentRequestState* state, |
| 62 PaymentRequestDialogView* dialog); | 66 PaymentRequestDialogView* dialog); |
| 63 | 67 |
| 64 // Returns the profiles cached by |request| which are appropriate for display | 68 // Returns the profiles cached by |request| which are appropriate for display |
| 65 // in this context. | 69 // in this context. |
| 66 virtual std::vector<autofill::AutofillProfile*> GetProfiles() = 0; | 70 virtual std::vector<autofill::AutofillProfile*> GetProfiles() = 0; |
| 67 | 71 |
| 68 // Returns the string displayed at the top of the view. | 72 // Returns the string displayed at the top of the view. |
| 69 virtual base::string16 GetHeaderString() = 0; | 73 virtual base::string16 GetHeaderString() = 0; |
| 70 | 74 |
| 71 private: | 75 private: |
| 72 std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); | 76 std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); |
| 73 PaymentRequestItemList list_; | 77 PaymentRequestItemList list_; |
| 74 | 78 |
| 75 DISALLOW_COPY_AND_ASSIGN(ProfileListViewController); | 79 DISALLOW_COPY_AND_ASSIGN(ProfileListViewController); |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace payments | 82 } // namespace payments |
| 79 | 83 |
| 80 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ | 84 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PROFILE_LIST_VIEW_CONTROLLER_H_ |
| OLD | NEW |