| OLD | NEW |
| 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 reserv
ed. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 static MessageEvent* create() | 47 static MessageEvent* create() |
| 48 { | 48 { |
| 49 return new MessageEvent; | 49 return new MessageEvent; |
| 50 } | 50 } |
| 51 static MessageEvent* create(MessagePortArray* ports, const String& origin =
String(), const String& lastEventId = String(), EventTarget* source = nullptr, c
onst String& suborigin = String()) | 51 static MessageEvent* create(MessagePortArray* ports, const String& origin =
String(), const String& lastEventId = String(), EventTarget* source = nullptr, c
onst String& suborigin = String()) |
| 52 { | 52 { |
| 53 return new MessageEvent(origin, lastEventId, source, ports, suborigin); | 53 return new MessageEvent(origin, lastEventId, source, ports, suborigin); |
| 54 } | 54 } |
| 55 static MessageEvent* create(MessagePortArray* ports, PassRefPtr<SerializedSc
riptValue> data, const String& origin = String(), const String& lastEventId = St
ring(), EventTarget* source = nullptr, const String& suborigin = String()) | 55 static MessageEvent* create(MessagePortArray* ports, PassRefPtr<SerializedSc
riptValue> data, const String& origin = String(), const String& lastEventId = St
ring(), EventTarget* source = nullptr, const String& suborigin = String()) |
| 56 { | 56 { |
| 57 return new MessageEvent(data, origin, lastEventId, source, ports, subori
gin); | 57 return new MessageEvent(std::move(data), origin, lastEventId, source, po
rts, suborigin); |
| 58 } | 58 } |
| 59 static MessageEvent* create(std::unique_ptr<MessagePortChannelArray> channel
s, PassRefPtr<SerializedScriptValue> data, const String& origin = String(), cons
t String& lastEventId = String(), EventTarget* source = nullptr, const String& s
uborigin = String()) | 59 static MessageEvent* create(std::unique_ptr<MessagePortChannelArray> channel
s, PassRefPtr<SerializedScriptValue> data, const String& origin = String(), cons
t String& lastEventId = String(), EventTarget* source = nullptr, const String& s
uborigin = String()) |
| 60 { | 60 { |
| 61 return new MessageEvent(data, origin, lastEventId, source, std::move(cha
nnels), suborigin); | 61 return new MessageEvent(std::move(data), origin, lastEventId, source, st
d::move(channels), suborigin); |
| 62 } | 62 } |
| 63 static MessageEvent* create(const String& data, const String& origin = Strin
g(), const String& suborigin = String()) | 63 static MessageEvent* create(const String& data, const String& origin = Strin
g(), const String& suborigin = String()) |
| 64 { | 64 { |
| 65 return new MessageEvent(data, origin, suborigin); | 65 return new MessageEvent(data, origin, suborigin); |
| 66 } | 66 } |
| 67 static MessageEvent* create(Blob* data, const String& origin = String(), con
st String& suborigin = String()) | 67 static MessageEvent* create(Blob* data, const String& origin = String(), con
st String& suborigin = String()) |
| 68 { | 68 { |
| 69 return new MessageEvent(data, origin, suborigin); | 69 return new MessageEvent(data, origin, suborigin); |
| 70 } | 70 } |
| 71 static MessageEvent* create(DOMArrayBuffer* data, const String& origin = Str
ing(), const String& suborigin = String()) | 71 static MessageEvent* create(DOMArrayBuffer* data, const String& origin = Str
ing(), const String& suborigin = String()) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // the MessageChannels in a disentangled state. Only one of them can be | 138 // the MessageChannels in a disentangled state. Only one of them can be |
| 139 // non-empty at a time. entangleMessagePorts() moves between the states. | 139 // non-empty at a time. entangleMessagePorts() moves between the states. |
| 140 Member<MessagePortArray> m_ports; | 140 Member<MessagePortArray> m_ports; |
| 141 std::unique_ptr<MessagePortChannelArray> m_channels; | 141 std::unique_ptr<MessagePortChannelArray> m_channels; |
| 142 String m_suborigin; | 142 String m_suborigin; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| 146 | 146 |
| 147 #endif // MessageEvent_h | 147 #endif // MessageEvent_h |
| OLD | NEW |