| 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/PaymentRequestUpdateEvent.h" | 5 #include "modules/payments/PaymentRequestUpdateEvent.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptFunction.h" | 8 #include "bindings/core/v8/ScriptFunction.h" |
| 9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
| 10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 Member<PaymentUpdater> m_updater; | 79 Member<PaymentUpdater> m_updater; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace | 82 } // namespace |
| 83 | 83 |
| 84 PaymentRequestUpdateEvent::~PaymentRequestUpdateEvent() | 84 PaymentRequestUpdateEvent::~PaymentRequestUpdateEvent() |
| 85 { | 85 { |
| 86 } | 86 } |
| 87 | 87 |
| 88 PaymentRequestUpdateEvent* PaymentRequestUpdateEvent::create() | |
| 89 { | |
| 90 return new PaymentRequestUpdateEvent(); | |
| 91 } | |
| 92 | |
| 93 PaymentRequestUpdateEvent* PaymentRequestUpdateEvent::create(const AtomicString&
type, const PaymentRequestUpdateEventInit& init) | 88 PaymentRequestUpdateEvent* PaymentRequestUpdateEvent::create(const AtomicString&
type, const PaymentRequestUpdateEventInit& init) |
| 94 { | 89 { |
| 95 return new PaymentRequestUpdateEvent(type, init); | 90 return new PaymentRequestUpdateEvent(type, init); |
| 96 } | 91 } |
| 97 | 92 |
| 98 void PaymentRequestUpdateEvent::setPaymentDetailsUpdater(PaymentUpdater* updater
) | 93 void PaymentRequestUpdateEvent::setPaymentDetailsUpdater(PaymentUpdater* updater
) |
| 99 { | 94 { |
| 100 DCHECK(!m_abortTimer.isActive()); | 95 DCHECK(!m_abortTimer.isActive()); |
| 101 m_abortTimer.startOneShot(abortTimeout, BLINK_FROM_HERE); | 96 m_abortTimer.startOneShot(abortTimeout, BLINK_FROM_HERE); |
| 102 m_updater = updater; | 97 m_updater = updater; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 132 | 127 |
| 133 m_updater->onUpdatePaymentDetailsFailure("Timed out as the page didn't resol
ve the promise from change event"); | 128 m_updater->onUpdatePaymentDetailsFailure("Timed out as the page didn't resol
ve the promise from change event"); |
| 134 } | 129 } |
| 135 | 130 |
| 136 DEFINE_TRACE(PaymentRequestUpdateEvent) | 131 DEFINE_TRACE(PaymentRequestUpdateEvent) |
| 137 { | 132 { |
| 138 visitor->trace(m_updater); | 133 visitor->trace(m_updater); |
| 139 Event::trace(visitor); | 134 Event::trace(visitor); |
| 140 } | 135 } |
| 141 | 136 |
| 142 PaymentRequestUpdateEvent::PaymentRequestUpdateEvent() | |
| 143 : m_waitForUpdate(false) | |
| 144 , m_abortTimer(this, &PaymentRequestUpdateEvent::onTimerFired) | |
| 145 { | |
| 146 } | |
| 147 | |
| 148 PaymentRequestUpdateEvent::PaymentRequestUpdateEvent(const AtomicString& type, c
onst PaymentRequestUpdateEventInit& init) | 137 PaymentRequestUpdateEvent::PaymentRequestUpdateEvent(const AtomicString& type, c
onst PaymentRequestUpdateEventInit& init) |
| 149 : Event(type, init) | 138 : Event(type, init) |
| 150 , m_waitForUpdate(false) | 139 , m_waitForUpdate(false) |
| 151 , m_abortTimer(this, &PaymentRequestUpdateEvent::onTimerFired) | 140 , m_abortTimer(this, &PaymentRequestUpdateEvent::onTimerFired) |
| 152 { | 141 { |
| 153 } | 142 } |
| 154 | 143 |
| 155 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |