OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "modules/serviceworkers/ServiceWorkerMessageEvent.h" |
| 7 |
| 8 #include "bindings/core/v8/ExceptionMessages.h" |
| 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 ServiceWorkerMessageEventInit::ServiceWorkerMessageEventInit() |
| 14 { |
| 15 } |
| 16 |
| 17 ServiceWorkerMessageEvent::ServiceWorkerMessageEvent() |
| 18 { |
| 19 } |
| 20 |
| 21 ServiceWorkerMessageEvent::ServiceWorkerMessageEvent(const AtomicString& type, c
onst ServiceWorkerMessageEventInit& initializer) |
| 22 : Event(type, initializer) |
| 23 , m_origin(initializer.origin) |
| 24 , m_lastEventId(initializer.lastEventId) |
| 25 , m_source(initializer.source) |
| 26 , m_ports(adoptPtrWillBeNoop(new MessagePortArray(initializer.ports))) |
| 27 { |
| 28 } |
| 29 |
| 30 ServiceWorkerMessageEvent::~ServiceWorkerMessageEvent() |
| 31 { |
| 32 } |
| 33 |
| 34 void ServiceWorkerMessageEvent::initServiceWorkerMessageEvent(const AtomicString
& type, bool canBubble, bool cancelable, const String& origin, const String& las
tEventId, const ServiceWorkerOrMessagePort& source, PassOwnPtrWillBeRawPtr<Messa
gePortArray> ports) |
| 35 { |
| 36 if (dispatched()) |
| 37 return; |
| 38 |
| 39 initEvent(type, canBubble, cancelable); |
| 40 |
| 41 m_origin = origin; |
| 42 m_lastEventId = lastEventId; |
| 43 m_source = source; |
| 44 m_ports = ports; |
| 45 } |
| 46 |
| 47 const AtomicString& ServiceWorkerMessageEvent::interfaceName() const |
| 48 { |
| 49 return EventNames::ServiceWorkerMessageEvent; |
| 50 } |
| 51 |
| 52 DEFINE_TRACE(ServiceWorkerMessageEvent) |
| 53 { |
| 54 #if ENABLE(OILPAN) |
| 55 visitor->trace(m_ports); |
| 56 #endif |
| 57 Event::trace(visitor); |
| 58 } |
| 59 |
| 60 } // namespace blink |
OLD | NEW |