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

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

Issue 2735803003: [WebPayments] Extracting common code from Shipping + Contact Info views. (Closed)
Patch Set: monday rebase 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
« no previous file with comments | « chrome/browser/ui/views/payments/shipping_list_view_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 // Sets the |profile| to be the selected one and will update state and notify 137 // Sets the |profile| to be the selected one and will update state and notify
138 // observers. 138 // observers.
139 void SetSelectedShippingProfile(autofill::AutofillProfile* profile); 139 void SetSelectedShippingProfile(autofill::AutofillProfile* profile);
140 void SetSelectedContactProfile(autofill::AutofillProfile* profile); 140 void SetSelectedContactProfile(autofill::AutofillProfile* profile);
141 void SetSelectedCreditCard(autofill::CreditCard* card); 141 void SetSelectedCreditCard(autofill::CreditCard* card);
142 142
143 autofill::PersonalDataManager* personal_data_manager() { 143 autofill::PersonalDataManager* personal_data_manager() {
144 return delegate_->GetPersonalDataManager(); 144 return delegate_->GetPersonalDataManager();
145 } 145 }
146 const std::string& locale() { return delegate_->GetApplicationLocale(); }
146 147
147 payments::mojom::PaymentDetails* details() { return details_.get(); } 148 payments::mojom::PaymentDetails* details() { return details_.get(); }
148 payments::mojom::PaymentOptions* options() { return options_.get(); } 149 payments::mojom::PaymentOptions* options() { return options_.get(); }
149 const std::vector<std::string>& supported_card_networks() { 150 const std::vector<std::string>& supported_card_networks() {
150 return supported_card_networks_; 151 return supported_card_networks_;
151 } 152 }
152 content::WebContents* web_contents() { return web_contents_; } 153 content::WebContents* web_contents() { return web_contents_; }
153 154
154 bool request_shipping() const { return options_->request_shipping; } 155 bool request_shipping() const { return options_->request_shipping; }
155 bool request_payer_name() const { return options_->request_payer_name; } 156 bool request_payer_name() const { return options_->request_payer_name; }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // This is owned by |details_|, which is owned by this object and lives until 222 // This is owned by |details_|, which is owned by this object and lives until
222 // |this| is destructed so it's safe to keep this raw pointer. 223 // |this| is destructed so it's safe to keep this raw pointer.
223 payments::mojom::PaymentShippingOption* selected_shipping_option_; 224 payments::mojom::PaymentShippingOption* selected_shipping_option_;
224 225
225 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); 226 DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
226 }; 227 };
227 228
228 } // namespace payments 229 } // namespace payments
229 230
230 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 231 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/payments/shipping_list_view_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698