| 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/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/JSONValuesForV8.h" | 8 #include "bindings/core/v8/JSONValuesForV8.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 using blink::mojom::blink::PaymentShippingOptionPtr; | 51 using blink::mojom::blink::PaymentShippingOptionPtr; |
| 52 using blink::mojom::blink::PaymentShippingType; | 52 using blink::mojom::blink::PaymentShippingType; |
| 53 | 53 |
| 54 template <> | 54 template <> |
| 55 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { | 55 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { |
| 56 static PaymentCurrencyAmountPtr Convert( | 56 static PaymentCurrencyAmountPtr Convert( |
| 57 const blink::PaymentCurrencyAmount& input) { | 57 const blink::PaymentCurrencyAmount& input) { |
| 58 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); | 58 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); |
| 59 output->currency = input.currency(); | 59 output->currency = input.currency(); |
| 60 output->value = input.value(); | 60 output->value = input.value(); |
| 61 if (input.hasCurrencySystem()) |
| 62 output->system = input.currencySystem(); |
| 61 return output; | 63 return output; |
| 62 } | 64 } |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 template <> | 67 template <> |
| 66 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { | 68 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { |
| 67 static PaymentItemPtr Convert(const blink::PaymentItem& input) { | 69 static PaymentItemPtr Convert(const blink::PaymentItem& input) { |
| 68 PaymentItemPtr output = PaymentItem::New(); | 70 PaymentItemPtr output = PaymentItem::New(); |
| 69 output->label = input.label(); | 71 output->label = input.label(); |
| 70 output->amount = PaymentCurrencyAmount::From(input.amount()); | 72 output->amount = PaymentCurrencyAmount::From(input.amount()); |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 m_completeTimer.stop(); | 847 m_completeTimer.stop(); |
| 846 m_completeResolver.clear(); | 848 m_completeResolver.clear(); |
| 847 m_showResolver.clear(); | 849 m_showResolver.clear(); |
| 848 m_abortResolver.clear(); | 850 m_abortResolver.clear(); |
| 849 if (m_clientBinding.is_bound()) | 851 if (m_clientBinding.is_bound()) |
| 850 m_clientBinding.Close(); | 852 m_clientBinding.Close(); |
| 851 m_paymentProvider.reset(); | 853 m_paymentProvider.reset(); |
| 852 } | 854 } |
| 853 | 855 |
| 854 } // namespace blink | 856 } // namespace blink |
| OLD | NEW |