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

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

Issue 2466513002: Deprecate ServiceWorkerMessageEvent in favor of MessageEvent (Closed)
Patch Set: Rebase and update cross-origin-objects-exceptions-expected.txt Created 4 years 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 "wtf/Compiler.h" 40 #include "wtf/Compiler.h"
42 #include <memory> 41 #include <memory>
43 42
44 namespace blink { 43 namespace blink {
45 44
46 class CORE_EXPORT MessageEvent final : public Event { 45 class CORE_EXPORT MessageEvent final : public Event {
47 DEFINE_WRAPPERTYPEINFO(); 46 DEFINE_WRAPPERTYPEINFO();
48 47
49 public: 48 public:
50 static MessageEvent* create() { return new MessageEvent; } 49 static MessageEvent* create() { return new MessageEvent; }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const MessageEventInit& initializer, 91 const MessageEventInit& initializer,
93 ExceptionState&); 92 ExceptionState&);
94 ~MessageEvent() override; 93 ~MessageEvent() override;
95 94
96 void initMessageEvent(const AtomicString& type, 95 void initMessageEvent(const AtomicString& type,
97 bool canBubble, 96 bool canBubble,
98 bool cancelable, 97 bool cancelable,
99 ScriptValue data, 98 ScriptValue data,
100 const String& origin, 99 const String& origin,
101 const String& lastEventId, 100 const String& lastEventId,
102 DOMWindow* source, 101 EventTarget* source,
103 MessagePortArray*); 102 MessagePortArray*);
104 void initMessageEvent(const AtomicString& type, 103 void initMessageEvent(const AtomicString& type,
105 bool canBubble, 104 bool canBubble,
106 bool cancelable, 105 bool cancelable,
107 PassRefPtr<SerializedScriptValue> data, 106 PassRefPtr<SerializedScriptValue> data,
108 const String& origin, 107 const String& origin,
109 const String& lastEventId, 108 const String& lastEventId,
110 DOMWindow* source, 109 EventTarget* source,
111 MessagePortArray*); 110 MessagePortArray*);
112 111
113 const String& origin() const { return m_origin; } 112 const String& origin() const { return m_origin; }
114 const String& suborigin() const { return m_suborigin; } 113 const String& suborigin() const { return m_suborigin; }
115 const String& lastEventId() const { return m_lastEventId; } 114 const String& lastEventId() const { return m_lastEventId; }
116 EventTarget* source() const { return m_source.get(); } 115 EventTarget* source() const { return m_source.get(); }
117 MessagePortArray ports(bool& isNull) const; 116 MessagePortArray ports(bool& isNull) const;
118 MessagePortArray ports() const; 117 MessagePortArray ports() const;
119 MessagePortChannelArray* channels() const { 118 MessagePortChannelArray* channels() const {
120 return m_channels ? m_channels.get() : nullptr; 119 return m_channels ? m_channels.get() : nullptr;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // the MessageChannels in a disentangled state. Only one of them can be 206 // the MessageChannels in a disentangled state. Only one of them can be
208 // non-empty at a time. entangleMessagePorts() moves between the states. 207 // non-empty at a time. entangleMessagePorts() moves between the states.
209 Member<MessagePortArray> m_ports; 208 Member<MessagePortArray> m_ports;
210 std::unique_ptr<MessagePortChannelArray> m_channels; 209 std::unique_ptr<MessagePortChannelArray> m_channels;
211 String m_suborigin; 210 String m_suborigin;
212 }; 211 };
213 212
214 } // namespace blink 213 } // namespace blink
215 214
216 #endif // MessageEvent_h 215 #endif // MessageEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/events/MessageEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698