| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   52 using blink::mojom::blink::PaymentShippingOptionPtr; |   52 using blink::mojom::blink::PaymentShippingOptionPtr; | 
|   53 using blink::mojom::blink::PaymentShippingType; |   53 using blink::mojom::blink::PaymentShippingType; | 
|   54  |   54  | 
|   55 template <> |   55 template <> | 
|   56 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { |   56 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { | 
|   57   static PaymentCurrencyAmountPtr Convert( |   57   static PaymentCurrencyAmountPtr Convert( | 
|   58       const blink::PaymentCurrencyAmount& input) { |   58       const blink::PaymentCurrencyAmount& input) { | 
|   59     PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); |   59     PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); | 
|   60     output->currency = input.currency(); |   60     output->currency = input.currency(); | 
|   61     output->value = input.value(); |   61     output->value = input.value(); | 
 |   62     if (input.hasCurrencySystem()) | 
 |   63       output->currencySystem = input.currencySystem(); | 
|   62     return output; |   64     return output; | 
|   63   } |   65   } | 
|   64 }; |   66 }; | 
|   65  |   67  | 
|   66 template <> |   68 template <> | 
|   67 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { |   69 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { | 
|   68   static PaymentItemPtr Convert(const blink::PaymentItem& input) { |   70   static PaymentItemPtr Convert(const blink::PaymentItem& input) { | 
|   69     PaymentItemPtr output = PaymentItem::New(); |   71     PaymentItemPtr output = PaymentItem::New(); | 
|   70     output->label = input.label(); |   72     output->label = input.label(); | 
|   71     output->amount = PaymentCurrencyAmount::From(input.amount()); |   73     output->amount = PaymentCurrencyAmount::From(input.amount()); | 
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  851   m_completeTimer.stop(); |  853   m_completeTimer.stop(); | 
|  852   m_completeResolver.clear(); |  854   m_completeResolver.clear(); | 
|  853   m_showResolver.clear(); |  855   m_showResolver.clear(); | 
|  854   m_abortResolver.clear(); |  856   m_abortResolver.clear(); | 
|  855   if (m_clientBinding.is_bound()) |  857   if (m_clientBinding.is_bound()) | 
|  856     m_clientBinding.Close(); |  858     m_clientBinding.Close(); | 
|  857   m_paymentProvider.reset(); |  859   m_paymentProvider.reset(); | 
|  858 } |  860 } | 
|  859  |  861  | 
|  860 }  // namespace blink |  862 }  // namespace blink | 
| OLD | NEW |