| 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 #ifndef ExtendableMessageEvent_h | 5 #ifndef ExtendableMessageEvent_h |
| 6 #define ExtendableMessageEvent_h | 6 #define ExtendableMessageEvent_h |
| 7 | 7 |
| 8 #include "modules/EventModules.h" | 8 #include "modules/EventModules.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "modules/serviceworkers/ExtendableEvent.h" | 10 #include "modules/serviceworkers/ExtendableEvent.h" |
| 11 #include "modules/serviceworkers/ExtendableMessageEventInit.h" | 11 #include "modules/serviceworkers/ExtendableMessageEventInit.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class MODULES_EXPORT ExtendableMessageEvent final : public ExtendableEvent { | 15 class MODULES_EXPORT ExtendableMessageEvent final : public ExtendableEvent { |
| 16 DEFINE_WRAPPERTYPEINFO(); | 16 DEFINE_WRAPPERTYPEINFO(); |
| 17 | 17 |
| 18 public: | 18 public: |
| 19 static RawPtr<ExtendableMessageEvent> create(); | 19 static ExtendableMessageEvent* create(); |
| 20 static RawPtr<ExtendableMessageEvent> create(const AtomicString& type, const
ExtendableMessageEventInit& initializer); | 20 static ExtendableMessageEvent* create(const AtomicString& type, const Extend
ableMessageEventInit& initializer); |
| 21 static RawPtr<ExtendableMessageEvent> create(const AtomicString& type, const
ExtendableMessageEventInit& initializer, WaitUntilObserver*); | 21 static ExtendableMessageEvent* create(const AtomicString& type, const Extend
ableMessageEventInit& initializer, WaitUntilObserver*); |
| 22 static RawPtr<ExtendableMessageEvent> create(PassRefPtr<SerializedScriptValu
e> data, const String& origin, MessagePortArray* ports, WaitUntilObserver*); | 22 static ExtendableMessageEvent* create(PassRefPtr<SerializedScriptValue> data
, const String& origin, MessagePortArray* ports, WaitUntilObserver*); |
| 23 static RawPtr<ExtendableMessageEvent> create(PassRefPtr<SerializedScriptValu
e> data, const String& origin, MessagePortArray* ports, ServiceWorkerClient* sou
rce, WaitUntilObserver*); | 23 static ExtendableMessageEvent* create(PassRefPtr<SerializedScriptValue> data
, const String& origin, MessagePortArray* ports, ServiceWorkerClient* source, Wa
itUntilObserver*); |
| 24 static RawPtr<ExtendableMessageEvent> create(PassRefPtr<SerializedScriptValu
e> data, const String& origin, MessagePortArray* ports, ServiceWorker* source, W
aitUntilObserver*); | 24 static ExtendableMessageEvent* create(PassRefPtr<SerializedScriptValue> data
, const String& origin, MessagePortArray* ports, ServiceWorker* source, WaitUnti
lObserver*); |
| 25 | 25 |
| 26 SerializedScriptValue* serializedData() const { return m_serializedData.get(
); } | 26 SerializedScriptValue* serializedData() const { return m_serializedData.get(
); } |
| 27 void setSerializedData(PassRefPtr<SerializedScriptValue> serializedData) { m
_serializedData = serializedData; } | 27 void setSerializedData(PassRefPtr<SerializedScriptValue> serializedData) { m
_serializedData = serializedData; } |
| 28 const String& origin() const { return m_origin; } | 28 const String& origin() const { return m_origin; } |
| 29 const String& lastEventId() const { return m_lastEventId; } | 29 const String& lastEventId() const { return m_lastEventId; } |
| 30 MessagePortArray ports(bool& isNull) const; | 30 MessagePortArray ports(bool& isNull) const; |
| 31 MessagePortArray ports() const; | 31 MessagePortArray ports() const; |
| 32 void source(ClientOrServiceWorkerOrMessagePort& result) const; | 32 void source(ClientOrServiceWorkerOrMessagePort& result) const; |
| 33 | 33 |
| 34 const AtomicString& interfaceName() const override; | 34 const AtomicString& interfaceName() const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 46 String m_lastEventId; | 46 String m_lastEventId; |
| 47 Member<ServiceWorkerClient> m_sourceAsClient; | 47 Member<ServiceWorkerClient> m_sourceAsClient; |
| 48 Member<ServiceWorker> m_sourceAsServiceWorker; | 48 Member<ServiceWorker> m_sourceAsServiceWorker; |
| 49 Member<MessagePort> m_sourceAsMessagePort; | 49 Member<MessagePort> m_sourceAsMessagePort; |
| 50 Member<MessagePortArray> m_ports; | 50 Member<MessagePortArray> m_ports; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace blink | 53 } // namespace blink |
| 54 | 54 |
| 55 #endif // ExtendableMessageEvent_h | 55 #endif // ExtendableMessageEvent_h |
| OLD | NEW |