| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return output; | 60 return output; |
| 61 } | 61 } |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 template <> | 64 template <> |
| 65 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { | 65 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { |
| 66 static PaymentItemPtr Convert(const blink::PaymentItem& input) { | 66 static PaymentItemPtr Convert(const blink::PaymentItem& input) { |
| 67 PaymentItemPtr output = PaymentItem::New(); | 67 PaymentItemPtr output = PaymentItem::New(); |
| 68 output->label = input.label(); | 68 output->label = input.label(); |
| 69 output->amount = PaymentCurrencyAmount::From(input.amount()); | 69 output->amount = PaymentCurrencyAmount::From(input.amount()); |
| 70 output->pending = input.pending(); |
| 70 return output; | 71 return output; |
| 71 } | 72 } |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 template <> | 75 template <> |
| 75 struct TypeConverter<PaymentShippingOptionPtr, blink::PaymentShippingOption> { | 76 struct TypeConverter<PaymentShippingOptionPtr, blink::PaymentShippingOption> { |
| 76 static PaymentShippingOptionPtr Convert( | 77 static PaymentShippingOptionPtr Convert( |
| 77 const blink::PaymentShippingOption& input) { | 78 const blink::PaymentShippingOption& input) { |
| 78 PaymentShippingOptionPtr output = PaymentShippingOption::New(); | 79 PaymentShippingOptionPtr output = PaymentShippingOption::New(); |
| 79 output->id = input.id(); | 80 output->id = input.id(); |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 m_completeTimer.stop(); | 836 m_completeTimer.stop(); |
| 836 m_completeResolver.clear(); | 837 m_completeResolver.clear(); |
| 837 m_showResolver.clear(); | 838 m_showResolver.clear(); |
| 838 m_abortResolver.clear(); | 839 m_abortResolver.clear(); |
| 839 if (m_clientBinding.is_bound()) | 840 if (m_clientBinding.is_bound()) |
| 840 m_clientBinding.Close(); | 841 m_clientBinding.Close(); |
| 841 m_paymentProvider.reset(); | 842 m_paymentProvider.reset(); |
| 842 } | 843 } |
| 843 | 844 |
| 844 } // namespace blink | 845 } // namespace blink |
| OLD | NEW |