OLD | NEW |
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/ConditionalFeatures.h" | 7 #include "bindings/core/v8/ConditionalFeatures.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 namespace mojo { | 58 namespace mojo { |
59 | 59 |
60 template <> | 60 template <> |
61 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { | 61 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { |
62 static PaymentCurrencyAmountPtr Convert( | 62 static PaymentCurrencyAmountPtr Convert( |
63 const blink::PaymentCurrencyAmount& input) { | 63 const blink::PaymentCurrencyAmount& input) { |
64 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); | 64 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); |
65 output->currency = input.currency(); | 65 output->currency = input.currency(); |
66 output->value = input.value(); | 66 output->value = input.value(); |
67 if (input.hasCurrencySystem()) | 67 output->currency_system = input.currencySystem(); |
68 output->currency_system = input.currencySystem(); | |
69 return output; | 68 return output; |
70 } | 69 } |
71 }; | 70 }; |
72 | 71 |
73 template <> | 72 template <> |
74 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { | 73 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { |
75 static PaymentItemPtr Convert(const blink::PaymentItem& input) { | 74 static PaymentItemPtr Convert(const blink::PaymentItem& input) { |
76 PaymentItemPtr output = payments::mojom::blink::PaymentItem::New(); | 75 PaymentItemPtr output = payments::mojom::blink::PaymentItem::New(); |
77 output->label = input.label(); | 76 output->label = input.label(); |
78 output->amount = PaymentCurrencyAmount::From(input.amount()); | 77 output->amount = PaymentCurrencyAmount::From(input.amount()); |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 m_completeResolver.clear(); | 1036 m_completeResolver.clear(); |
1038 m_showResolver.clear(); | 1037 m_showResolver.clear(); |
1039 m_abortResolver.clear(); | 1038 m_abortResolver.clear(); |
1040 m_canMakePaymentResolver.clear(); | 1039 m_canMakePaymentResolver.clear(); |
1041 if (m_clientBinding.is_bound()) | 1040 if (m_clientBinding.is_bound()) |
1042 m_clientBinding.Close(); | 1041 m_clientBinding.Close(); |
1043 m_paymentProvider.reset(); | 1042 m_paymentProvider.reset(); |
1044 } | 1043 } |
1045 | 1044 |
1046 } // namespace blink | 1045 } // namespace blink |
OLD | NEW |