| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 using payments::mojom::blink::BasicCardNetwork; | 325 using payments::mojom::blink::BasicCardNetwork; |
| 326 | 326 |
| 327 const struct { | 327 const struct { |
| 328 const BasicCardNetwork code; | 328 const BasicCardNetwork code; |
| 329 const char* const name; | 329 const char* const name; |
| 330 } basicCardNetworks[] = {{BasicCardNetwork::AMEX, "amex"}, | 330 } basicCardNetworks[] = {{BasicCardNetwork::AMEX, "amex"}, |
| 331 {BasicCardNetwork::DINERS, "diners"}, | 331 {BasicCardNetwork::DINERS, "diners"}, |
| 332 {BasicCardNetwork::DISCOVER, "discover"}, | 332 {BasicCardNetwork::DISCOVER, "discover"}, |
| 333 {BasicCardNetwork::JCB, "jcb"}, | 333 {BasicCardNetwork::JCB, "jcb"}, |
| 334 {BasicCardNetwork::MASTERCARD, "mastercard"}, | 334 {BasicCardNetwork::MASTERCARD, "mastercard"}, |
| 335 {BasicCardNetwork::MIR, "mir"}, |
| 335 {BasicCardNetwork::UNIONPAY, "unionpay"}, | 336 {BasicCardNetwork::UNIONPAY, "unionpay"}, |
| 336 {BasicCardNetwork::VISA, "visa"}}; | 337 {BasicCardNetwork::VISA, "visa"}}; |
| 337 | 338 |
| 338 for (const String& network : basicCard.supportedNetworks()) { | 339 for (const String& network : basicCard.supportedNetworks()) { |
| 339 for (size_t i = 0; i < arraysize(basicCardNetworks); ++i) { | 340 for (size_t i = 0; i < arraysize(basicCardNetworks); ++i) { |
| 340 if (network == basicCardNetworks[i].name) { | 341 if (network == basicCardNetworks[i].name) { |
| 341 output->supported_networks.append(basicCardNetworks[i].code); | 342 output->supported_networks.append(basicCardNetworks[i].code); |
| 342 break; | 343 break; |
| 343 } | 344 } |
| 344 } | 345 } |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 m_completeResolver.clear(); | 998 m_completeResolver.clear(); |
| 998 m_showResolver.clear(); | 999 m_showResolver.clear(); |
| 999 m_abortResolver.clear(); | 1000 m_abortResolver.clear(); |
| 1000 m_canMakePaymentResolver.clear(); | 1001 m_canMakePaymentResolver.clear(); |
| 1001 if (m_clientBinding.is_bound()) | 1002 if (m_clientBinding.is_bound()) |
| 1002 m_clientBinding.Close(); | 1003 m_clientBinding.Close(); |
| 1003 m_paymentProvider.reset(); | 1004 m_paymentProvider.reset(); |
| 1004 } | 1005 } |
| 1005 | 1006 |
| 1006 } // namespace blink | 1007 } // namespace blink |
| OLD | NEW |