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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2637603002: [Payments] Use formatter currency code on desktop (Closed)
Patch Set: rebase Created 3 years, 11 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 | « components/payments/payment_request.mojom ('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 #include "modules/payments/PaymentRequest.h" 5 #include "modules/payments/PaymentRequest.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/V8StringResource.h" 10 #include "bindings/core/v8/V8StringResource.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 namespace mojo { 56 namespace mojo {
57 57
58 template <> 58 template <>
59 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { 59 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> {
60 static PaymentCurrencyAmountPtr Convert( 60 static PaymentCurrencyAmountPtr Convert(
61 const blink::PaymentCurrencyAmount& input) { 61 const blink::PaymentCurrencyAmount& input) {
62 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); 62 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New();
63 output->currency = input.currency(); 63 output->currency = input.currency();
64 output->value = input.value(); 64 output->value = input.value();
65 if (input.hasCurrencySystem()) 65 if (input.hasCurrencySystem())
66 output->currencySystem = input.currencySystem(); 66 output->currency_system = input.currencySystem();
67 return output; 67 return output;
68 } 68 }
69 }; 69 };
70 70
71 template <> 71 template <>
72 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { 72 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> {
73 static PaymentItemPtr Convert(const blink::PaymentItem& input) { 73 static PaymentItemPtr Convert(const blink::PaymentItem& input) {
74 PaymentItemPtr output = payments::mojom::blink::PaymentItem::New(); 74 PaymentItemPtr output = payments::mojom::blink::PaymentItem::New();
75 output->label = input.label(); 75 output->label = input.label();
76 output->amount = PaymentCurrencyAmount::From(input.amount()); 76 output->amount = PaymentCurrencyAmount::From(input.amount());
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 m_completeResolver.clear(); 997 m_completeResolver.clear();
998 m_showResolver.clear(); 998 m_showResolver.clear();
999 m_abortResolver.clear(); 999 m_abortResolver.clear();
1000 m_canMakePaymentResolver.clear(); 1000 m_canMakePaymentResolver.clear();
1001 if (m_clientBinding.is_bound()) 1001 if (m_clientBinding.is_bound())
1002 m_clientBinding.Close(); 1002 m_clientBinding.Close();
1003 m_paymentProvider.reset(); 1003 m_paymentProvider.reset();
1004 } 1004 }
1005 1005
1006 } // namespace blink 1006 } // namespace blink
OLDNEW
« no previous file with comments | « components/payments/payment_request.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698