| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 PassRefPtrWillBeRawPtr<ExtendableEvent> ExtendableEvent::create(const AtomicStri
ng& type, const ExtendableEventInit& eventInit, WaitUntilObserver* observer) | 49 PassRefPtrWillBeRawPtr<ExtendableEvent> ExtendableEvent::create(const AtomicStri
ng& type, const ExtendableEventInit& eventInit, WaitUntilObserver* observer) |
| 50 { | 50 { |
| 51 return adoptRefWillBeNoop(new ExtendableEvent(type, eventInit, observer)); | 51 return adoptRefWillBeNoop(new ExtendableEvent(type, eventInit, observer)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 ExtendableEvent::~ExtendableEvent() | 54 ExtendableEvent::~ExtendableEvent() |
| 55 { | 55 { |
| 56 } | 56 } |
| 57 | 57 |
| 58 void ExtendableEvent::waitUntil(ScriptState* scriptState, const ScriptValue& val
ue, ExceptionState& exceptionState) | 58 void ExtendableEvent::waitUntil(ScriptState* scriptState, ScriptPromise scriptPr
omise, ExceptionState& exceptionState) |
| 59 { | 59 { |
| 60 if (m_observer) | 60 if (m_observer) |
| 61 m_observer->waitUntil(scriptState, value, exceptionState); | 61 m_observer->waitUntil(scriptState, scriptPromise, exceptionState); |
| 62 } | 62 } |
| 63 | 63 |
| 64 ExtendableEvent::ExtendableEvent() | 64 ExtendableEvent::ExtendableEvent() |
| 65 { | 65 { |
| 66 } | 66 } |
| 67 | 67 |
| 68 ExtendableEvent::ExtendableEvent(const AtomicString& type, const ExtendableEvent
Init& initializer) | 68 ExtendableEvent::ExtendableEvent(const AtomicString& type, const ExtendableEvent
Init& initializer) |
| 69 : Event(type, initializer) | 69 : Event(type, initializer) |
| 70 { | 70 { |
| 71 } | 71 } |
| 72 | 72 |
| 73 ExtendableEvent::ExtendableEvent(const AtomicString& type, const ExtendableEvent
Init& initializer, WaitUntilObserver* observer) | 73 ExtendableEvent::ExtendableEvent(const AtomicString& type, const ExtendableEvent
Init& initializer, WaitUntilObserver* observer) |
| 74 : Event(type, initializer) | 74 : Event(type, initializer) |
| 75 , m_observer(observer) | 75 , m_observer(observer) |
| 76 { | 76 { |
| 77 } | 77 } |
| 78 | 78 |
| 79 const AtomicString& ExtendableEvent::interfaceName() const | 79 const AtomicString& ExtendableEvent::interfaceName() const |
| 80 { | 80 { |
| 81 return EventNames::ExtendableEvent; | 81 return EventNames::ExtendableEvent; |
| 82 } | 82 } |
| 83 | 83 |
| 84 DEFINE_TRACE(ExtendableEvent) | 84 DEFINE_TRACE(ExtendableEvent) |
| 85 { | 85 { |
| 86 visitor->trace(m_observer); | 86 visitor->trace(m_observer); |
| 87 Event::trace(visitor); | 87 Event::trace(visitor); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |