| 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/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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 V8AndroidPayMethodData::toImpl(input.isolate(), input.v8Value(), androidPay, | 245 V8AndroidPayMethodData::toImpl(input.isolate(), input.v8Value(), androidPay, |
| 246 dummyExceptionState); | 246 dummyExceptionState); |
| 247 if (dummyExceptionState.hadException()) | 247 if (dummyExceptionState.hadException()) |
| 248 return; | 248 return; |
| 249 | 249 |
| 250 if (androidPay.hasEnvironment() && androidPay.environment() == "TEST") | 250 if (androidPay.hasEnvironment() && androidPay.environment() == "TEST") |
| 251 output->environment = payments::mojom::blink::AndroidPayEnvironment::TEST; | 251 output->environment = payments::mojom::blink::AndroidPayEnvironment::TEST; |
| 252 | 252 |
| 253 output->merchant_name = androidPay.merchantName(); | 253 output->merchant_name = androidPay.merchantName(); |
| 254 output->merchant_id = androidPay.merchantId(); | 254 output->merchant_id = androidPay.merchantId(); |
| 255 output->min_google_play_services_version = |
| 256 androidPay.minGooglePlayServicesVersion(); |
| 255 | 257 |
| 256 if (androidPay.hasAllowedCardNetworks()) { | 258 if (androidPay.hasAllowedCardNetworks()) { |
| 257 for (const String& allowedCardNetwork : androidPay.allowedCardNetworks()) { | 259 for (const String& allowedCardNetwork : androidPay.allowedCardNetworks()) { |
| 258 for (size_t i = 0; i < arraysize(kAndroidPayNetwork); ++i) { | 260 for (size_t i = 0; i < arraysize(kAndroidPayNetwork); ++i) { |
| 259 if (allowedCardNetwork == kAndroidPayNetwork[i].name) { | 261 if (allowedCardNetwork == kAndroidPayNetwork[i].name) { |
| 260 output->allowed_card_networks.append(kAndroidPayNetwork[i].code); | 262 output->allowed_card_networks.append(kAndroidPayNetwork[i].code); |
| 261 break; | 263 break; |
| 262 } | 264 } |
| 263 } | 265 } |
| 264 } | 266 } |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 m_completeResolver.clear(); | 918 m_completeResolver.clear(); |
| 917 m_showResolver.clear(); | 919 m_showResolver.clear(); |
| 918 m_abortResolver.clear(); | 920 m_abortResolver.clear(); |
| 919 m_canMakePaymentResolver.clear(); | 921 m_canMakePaymentResolver.clear(); |
| 920 if (m_clientBinding.is_bound()) | 922 if (m_clientBinding.is_bound()) |
| 921 m_clientBinding.Close(); | 923 m_clientBinding.Close(); |
| 922 m_paymentProvider.reset(); | 924 m_paymentProvider.reset(); |
| 923 } | 925 } |
| 924 | 926 |
| 925 } // namespace blink | 927 } // namespace blink |
| OLD | NEW |