Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: chrome/browser/ui/views/payments/profile_list_view_controller.h

Issue 2923533002: [Merge M60][Payments] Do not select an address if the merchant doesn't support it (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698