| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 return m_completeResolver->promise(); | 215 return m_completeResolver->promise(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 DEFINE_TRACE(PaymentRequest) | 218 DEFINE_TRACE(PaymentRequest) |
| 219 { | 219 { |
| 220 visitor->trace(m_details); | 220 visitor->trace(m_details); |
| 221 visitor->trace(m_options); | 221 visitor->trace(m_options); |
| 222 visitor->trace(m_shippingAddress); | 222 visitor->trace(m_shippingAddress); |
| 223 visitor->trace(m_showResolver); | 223 visitor->trace(m_showResolver); |
| 224 visitor->trace(m_completeResolver); | 224 visitor->trace(m_completeResolver); |
| 225 RefCountedGarbageCollectedEventTargetWithInlineData<PaymentRequest>::trace(v
isitor); | 225 EventTargetWithInlineData::trace(visitor); |
| 226 } | 226 } |
| 227 | 227 |
| 228 PaymentRequest::PaymentRequest(ScriptState* scriptState, const Vector<String>& s
upportedMethods, const PaymentDetails& details, const PaymentOptions& options, c
onst ScriptValue& data, ExceptionState& exceptionState) | 228 PaymentRequest::PaymentRequest(ScriptState* scriptState, const Vector<String>& s
upportedMethods, const PaymentDetails& details, const PaymentOptions& options, c
onst ScriptValue& data, ExceptionState& exceptionState) |
| 229 : m_scriptState(scriptState) | 229 : m_scriptState(scriptState) |
| 230 , m_supportedMethods(supportedMethods) | 230 , m_supportedMethods(supportedMethods) |
| 231 , m_details(details) | 231 , m_details(details) |
| 232 , m_options(options) | 232 , m_options(options) |
| 233 , m_clientBinding(this) | 233 , m_clientBinding(this) |
| 234 { | 234 { |
| 235 // TODO(rouslan): Also check for a top-level browsing context. | 235 // TODO(rouslan): Also check for a top-level browsing context. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 void PaymentRequest::cleanUp() | 359 void PaymentRequest::cleanUp() |
| 360 { | 360 { |
| 361 m_completeResolver.clear(); | 361 m_completeResolver.clear(); |
| 362 m_showResolver.clear(); | 362 m_showResolver.clear(); |
| 363 m_clientBinding.Close(); | 363 m_clientBinding.Close(); |
| 364 m_paymentProvider.reset(); | 364 m_paymentProvider.reset(); |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace blink | 367 } // namespace blink |
| OLD | NEW |