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

Unified Diff: third_party/WebKit/Source/core/events/MessageEvent.h

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add missing ScopedAsyncTaskScheduler instance for the new unit tests; required by a recent change t… Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/MessageEvent.h
diff --git a/third_party/WebKit/Source/core/events/MessageEvent.h b/third_party/WebKit/Source/core/events/MessageEvent.h
index f497a4840375e384cdc10206de70758d2fe39dc5..836e814206f21087a1d064df8e9e4cb7a9e411f7 100644
--- a/third_party/WebKit/Source/core/events/MessageEvent.h
+++ b/third_party/WebKit/Source/core/events/MessageEvent.h
@@ -63,7 +63,7 @@ class CORE_EXPORT MessageEvent final : public Event {
return new MessageEvent(std::move(data), origin, lastEventId, source, ports,
suborigin);
}
- static MessageEvent* create(std::unique_ptr<MessagePortChannelArray> channels,
+ static MessageEvent* create(MessagePortChannelArray channels,
PassRefPtr<SerializedScriptValue> data,
const String& origin = String(),
const String& lastEventId = String(),
@@ -123,9 +123,8 @@ class CORE_EXPORT MessageEvent final : public Event {
EventTarget* source() const { return m_source.get(); }
MessagePortArray ports(bool& isNull) const;
MessagePortArray ports() const;
- MessagePortChannelArray* channels() const {
- return m_channels ? m_channels.get() : nullptr;
- }
+
+ MessagePortChannelArray releaseChannels() { return std::move(m_channels); }
const AtomicString& interfaceName() const override;
@@ -190,7 +189,7 @@ class CORE_EXPORT MessageEvent final : public Event {
const String& origin,
const String& lastEventId,
EventTarget* source,
- std::unique_ptr<MessagePortChannelArray>,
+ MessagePortChannelArray,
const String& suborigin);
MessageEvent(const String& data,
@@ -210,11 +209,11 @@ class CORE_EXPORT MessageEvent final : public Event {
String m_origin;
String m_lastEventId;
Member<EventTarget> m_source;
- // m_ports are the MessagePorts in an engtangled state, and m_channels are
+ // m_ports are the MessagePorts in an entangled state, and m_channels are
// the MessageChannels in a disentangled state. Only one of them can be
// non-empty at a time. entangleMessagePorts() moves between the states.
Member<MessagePortArray> m_ports;
- std::unique_ptr<MessagePortChannelArray> m_channels;
+ MessagePortChannelArray m_channels;
String m_suborigin;
};
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessagePort.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