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

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

Issue 2730123002: [Web Payments] Add inline items to the Order Summary section. (Closed)
Patch Set: Address comments. 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Returns the CurrencyFormatter instance for this PaymentRequest. 80 // Returns the CurrencyFormatter instance for this PaymentRequest.
81 // |locale_name| should be the result of the browser's GetApplicationLocale(). 81 // |locale_name| should be the result of the browser's GetApplicationLocale().
82 // Note: Having multiple currencies per PaymentRequest is not supported; hence 82 // Note: Having multiple currencies per PaymentRequest is not supported; hence
83 // the CurrencyFormatter is cached here. 83 // the CurrencyFormatter is cached here.
84 CurrencyFormatter* GetOrCreateCurrencyFormatter( 84 CurrencyFormatter* GetOrCreateCurrencyFormatter(
85 const std::string& currency_code, 85 const std::string& currency_code,
86 const std::string& currency_system, 86 const std::string& currency_system,
87 const std::string& locale_name); 87 const std::string& locale_name);
88 88
89 // Uses CurrencyFormatter to format |amount| with the currency symbol for this
90 // request's currency.
91 base::string16 GetFormattedCurrencyAmount(const std::string& amount);
92
93 // Uses CurrencyFormatter to get the formatted currency code for this
94 // request's currency.
95 std::string GetFormattedCurrencyCode();
96
89 // Returns the appropriate Autofill Profiles for this user. On the first 97 // Returns the appropriate Autofill Profiles for this user. On the first
90 // invocation of either getter, the profiles are fetched from the 98 // invocation of either getter, the profiles are fetched from the
91 // PersonalDataManager; on subsequent invocations, a cached version is 99 // PersonalDataManager; on subsequent invocations, a cached version is
92 // returned. The profiles returned are owned by the request object. 100 // returned. The profiles returned are owned by the request object.
93 const std::vector<autofill::AutofillProfile*>& shipping_profiles() { 101 const std::vector<autofill::AutofillProfile*>& shipping_profiles() {
94 return shipping_profiles_; 102 return shipping_profiles_;
95 } 103 }
96 const std::vector<autofill::AutofillProfile*>& contact_profiles() { 104 const std::vector<autofill::AutofillProfile*>& contact_profiles() {
97 return contact_profiles_; 105 return contact_profiles_;
98 } 106 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_; 198 std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_;
191 std::vector<autofill::CreditCard*> credit_cards_; 199 std::vector<autofill::CreditCard*> credit_cards_;
192 autofill::CreditCard* selected_credit_card_; 200 autofill::CreditCard* selected_credit_card_;
193 201
194 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); 202 DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
195 }; 203 };
196 204
197 } // namespace payments 205 } // namespace payments
198 206
199 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 207 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/payments/payment_sheet_view_controller.cc ('k') | components/payments/content/payment_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698