Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: third_party/WebKit/Source/core/events/MessageEvent.h

Issue 2466513002: Deprecate ServiceWorkerMessageEvent in favor of MessageEvent (Closed)
Patch Set: Remove ServiceWorkerMessageEvent codes; update layout tests Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Henry Mason (hmason@mac.com) 2 * Copyright (C) 2007 Henry Mason (hmason@mac.com)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 19 matching lines...) Expand all
30 #define MessageEvent_h 30 #define MessageEvent_h
31 31
32 #include "bindings/core/v8/SerializedScriptValue.h" 32 #include "bindings/core/v8/SerializedScriptValue.h"
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/dom/DOMArrayBuffer.h" 34 #include "core/dom/DOMArrayBuffer.h"
35 #include "core/dom/MessagePort.h" 35 #include "core/dom/MessagePort.h"
36 #include "core/events/Event.h" 36 #include "core/events/Event.h"
37 #include "core/events/EventTarget.h" 37 #include "core/events/EventTarget.h"
38 #include "core/events/MessageEventInit.h" 38 #include "core/events/MessageEventInit.h"
39 #include "core/fileapi/Blob.h" 39 #include "core/fileapi/Blob.h"
40 #include "core/frame/DOMWindow.h"
41 #include <memory> 40 #include <memory>
42 41
43 namespace blink { 42 namespace blink {
44 43
45 class CORE_EXPORT MessageEvent final : public Event { 44 class CORE_EXPORT MessageEvent final : public Event {
46 DEFINE_WRAPPERTYPEINFO(); 45 DEFINE_WRAPPERTYPEINFO();
47 46
48 public: 47 public:
49 static MessageEvent* create() { return new MessageEvent; } 48 static MessageEvent* create() { return new MessageEvent; }
50 static MessageEvent* create(MessagePortArray* ports, 49 static MessageEvent* create(MessagePortArray* ports,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const MessageEventInit& initializer, 90 const MessageEventInit& initializer,
92 ExceptionState&); 91 ExceptionState&);
93 ~MessageEvent() override; 92 ~MessageEvent() override;
94 93
95 void initMessageEvent(const AtomicString& type, 94 void initMessageEvent(const AtomicString& type,
96 bool canBubble, 95 bool canBubble,
97 bool cancelable, 96 bool cancelable,
98 ScriptValue data, 97 ScriptValue data,
99 const String& origin, 98 const String& origin,
100 const String& lastEventId, 99 const String& lastEventId,
101 DOMWindow* source, 100 EventTarget* source,
102 MessagePortArray*); 101 MessagePortArray*);
103 void initMessageEvent(const AtomicString& type, 102 void initMessageEvent(const AtomicString& type,
104 bool canBubble, 103 bool canBubble,
105 bool cancelable, 104 bool cancelable,
106 PassRefPtr<SerializedScriptValue> data, 105 PassRefPtr<SerializedScriptValue> data,
107 const String& origin, 106 const String& origin,
108 const String& lastEventId, 107 const String& lastEventId,
109 DOMWindow* source, 108 EventTarget* source,
110 MessagePortArray*); 109 MessagePortArray*);
111 110
112 const String& origin() const { return m_origin; } 111 const String& origin() const { return m_origin; }
113 const String& suborigin() const { return m_suborigin; } 112 const String& suborigin() const { return m_suborigin; }
114 const String& lastEventId() const { return m_lastEventId; } 113 const String& lastEventId() const { return m_lastEventId; }
115 EventTarget* source() const { return m_source.get(); } 114 EventTarget* source() const { return m_source.get(); }
116 MessagePortArray ports(bool& isNull) const; 115 MessagePortArray ports(bool& isNull) const;
117 MessagePortArray ports() const; 116 MessagePortArray ports() const;
118 MessagePortChannelArray* channels() const { 117 MessagePortChannelArray* channels() const {
119 return m_channels ? m_channels.get() : nullptr; 118 return m_channels ? m_channels.get() : nullptr;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // the MessageChannels in a disentangled state. Only one of them can be 205 // the MessageChannels in a disentangled state. Only one of them can be
207 // non-empty at a time. entangleMessagePorts() moves between the states. 206 // non-empty at a time. entangleMessagePorts() moves between the states.
208 Member<MessagePortArray> m_ports; 207 Member<MessagePortArray> m_ports;
209 std::unique_ptr<MessagePortChannelArray> m_channels; 208 std::unique_ptr<MessagePortChannelArray> m_channels;
210 String m_suborigin; 209 String m_suborigin;
211 }; 210 };
212 211
213 } // namespace blink 212 } // namespace blink
214 213
215 #endif // MessageEvent_h 214 #endif // MessageEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698