| 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/PaymentResponse.h" | 5 #include "modules/payments/PaymentResponse.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 7 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 8 #include "bindings/core/v8/V8ObjectBuilder.h" | 8 #include "bindings/core/v8/V8ObjectBuilder.h" |
| 9 #include "modules/payments/PaymentAddress.h" | 9 #include "modules/payments/PaymentAddress.h" |
| 10 #include "modules/payments/PaymentCompleter.h" | 10 #include "modules/payments/PaymentCompleter.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 result.add("shippingAddress", | 39 result.add("shippingAddress", |
| 40 shippingAddress()->toJSONForBinding(scriptState)); | 40 shippingAddress()->toJSONForBinding(scriptState)); |
| 41 else | 41 else |
| 42 result.addNull("shippingAddress"); | 42 result.addNull("shippingAddress"); |
| 43 | 43 |
| 44 if (shippingOption().isNull()) | 44 if (shippingOption().isNull()) |
| 45 result.addNull("shippingOption"); | 45 result.addNull("shippingOption"); |
| 46 else | 46 else |
| 47 result.addString("shippingOption", shippingOption()); | 47 result.addString("shippingOption", shippingOption()); |
| 48 | 48 |
| 49 if (payerName().isNull()) |
| 50 result.addNull("payerName"); |
| 51 else |
| 52 result.addString("payerName", payerName()); |
| 53 |
| 49 if (payerEmail().isNull()) | 54 if (payerEmail().isNull()) |
| 50 result.addNull("payerEmail"); | 55 result.addNull("payerEmail"); |
| 51 else | 56 else |
| 52 result.addString("payerEmail", payerEmail()); | 57 result.addString("payerEmail", payerEmail()); |
| 53 | 58 |
| 54 if (payerPhone().isNull()) | 59 if (payerPhone().isNull()) |
| 55 result.addNull("payerPhone"); | 60 result.addNull("payerPhone"); |
| 56 else | 61 else |
| 57 result.addString("payerPhone", payerPhone()); | 62 result.addString("payerPhone", payerPhone()); |
| 58 | 63 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 75 convertedResult = PaymentCompleter::Fail; | 80 convertedResult = PaymentCompleter::Fail; |
| 76 return m_paymentCompleter->complete(scriptState, convertedResult); | 81 return m_paymentCompleter->complete(scriptState, convertedResult); |
| 77 } | 82 } |
| 78 | 83 |
| 79 DEFINE_TRACE(PaymentResponse) { | 84 DEFINE_TRACE(PaymentResponse) { |
| 80 visitor->trace(m_shippingAddress); | 85 visitor->trace(m_shippingAddress); |
| 81 visitor->trace(m_paymentCompleter); | 86 visitor->trace(m_paymentCompleter); |
| 82 } | 87 } |
| 83 | 88 |
| 84 } // namespace blink | 89 } // namespace blink |
| OLD | NEW |