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

Side by Side Diff: components/payments/content/payment_request.h

Issue 2725963002: [Payments] Only show the required rows in the Payment Request dialog (Closed)
Patch Set: Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 autofill::PersonalDataManager* personal_data_manager() { 123 autofill::PersonalDataManager* personal_data_manager() {
124 return delegate_->GetPersonalDataManager(); 124 return delegate_->GetPersonalDataManager();
125 } 125 }
126 126
127 payments::mojom::PaymentDetails* details() { return details_.get(); } 127 payments::mojom::PaymentDetails* details() { return details_.get(); }
128 const std::vector<std::string>& supported_card_networks() { 128 const std::vector<std::string>& supported_card_networks() {
129 return supported_card_networks_; 129 return supported_card_networks_;
130 } 130 }
131 content::WebContents* web_contents() { return web_contents_; } 131 content::WebContents* web_contents() { return web_contents_; }
132 132
133 bool request_shipping() const { return options_->request_shipping; }
134 bool request_payer_name() const { return options_->request_payer_name; }
135 bool request_payer_phone() const { return options_->request_payer_phone; }
136 bool request_payer_email() const { return options_->request_payer_email; }
137
133 bool is_ready_to_pay() { return is_ready_to_pay_; } 138 bool is_ready_to_pay() { return is_ready_to_pay_; }
134 139
135 private: 140 private:
136 // Fetches the Autofill Profiles for this user from the PersonalDataManager, 141 // Fetches the Autofill Profiles for this user from the PersonalDataManager,
137 // and stores copies of them, owned by this Request, in profile_cache_. 142 // and stores copies of them, owned by this Request, in profile_cache_.
138 void PopulateProfileCache(); 143 void PopulateProfileCache();
139 144
140 // Sets the default values for the selected Shipping and Contact profiles, as 145 // Sets the default values for the selected Shipping and Contact profiles, as
141 // well as the selected Credit Card. 146 // well as the selected Credit Card.
142 void SetDefaultProfileSelections(); 147 void SetDefaultProfileSelections();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_; 190 std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_;
186 std::vector<autofill::CreditCard*> credit_cards_; 191 std::vector<autofill::CreditCard*> credit_cards_;
187 autofill::CreditCard* selected_credit_card_; 192 autofill::CreditCard* selected_credit_card_;
188 193
189 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); 194 DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
190 }; 195 };
191 196
192 } // namespace payments 197 } // namespace payments
193 198
194 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 199 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698