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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return adoptRef(new MessageEvent(type, initializer)); | 81 return adoptRef(new MessageEvent(type, initializer)); |
82 } | 82 } |
83 virtual ~MessageEvent(); | 83 virtual ~MessageEvent(); |
84 | 84 |
85 void initMessageEvent(const AtomicString& type, bool canBubble, bool cancela
ble, const ScriptValue& data, const String& origin, const String& lastEventId, D
OMWindow* source, PassOwnPtr<MessagePortArray>); | 85 void initMessageEvent(const AtomicString& type, bool canBubble, bool cancela
ble, const ScriptValue& data, const String& origin, const String& lastEventId, D
OMWindow* source, PassOwnPtr<MessagePortArray>); |
86 void initMessageEvent(const AtomicString& type, bool canBubble, bool cancela
ble, PassRefPtr<SerializedScriptValue> data, const String& origin, const String&
lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray>); | 86 void initMessageEvent(const AtomicString& type, bool canBubble, bool cancela
ble, PassRefPtr<SerializedScriptValue> data, const String& origin, const String&
lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray>); |
87 | 87 |
88 const String& origin() const { return m_origin; } | 88 const String& origin() const { return m_origin; } |
89 const String& lastEventId() const { return m_lastEventId; } | 89 const String& lastEventId() const { return m_lastEventId; } |
90 DOMWindow* source() const { return m_source.get(); } | 90 DOMWindow* source() const { return m_source.get(); } |
91 MessagePortArray* ports() const { return m_ports.get(); } | 91 MessagePortArray ports() const { return m_ports ? *m_ports : MessagePortArra
y(); } |
92 | 92 |
93 virtual const AtomicString& interfaceName() const; | 93 virtual const AtomicString& interfaceName() const; |
94 | 94 |
95 enum DataType { | 95 enum DataType { |
96 DataTypeScriptValue, | 96 DataTypeScriptValue, |
97 DataTypeSerializedScriptValue, | 97 DataTypeSerializedScriptValue, |
98 DataTypeString, | 98 DataTypeString, |
99 DataTypeBlob, | 99 DataTypeBlob, |
100 DataTypeArrayBuffer | 100 DataTypeArrayBuffer |
101 }; | 101 }; |
(...skipping 22 matching lines...) Expand all Loading... |
124 RefPtr<ArrayBuffer> m_dataAsArrayBuffer; | 124 RefPtr<ArrayBuffer> m_dataAsArrayBuffer; |
125 String m_origin; | 125 String m_origin; |
126 String m_lastEventId; | 126 String m_lastEventId; |
127 RefPtr<DOMWindow> m_source; | 127 RefPtr<DOMWindow> m_source; |
128 OwnPtr<MessagePortArray> m_ports; | 128 OwnPtr<MessagePortArray> m_ports; |
129 }; | 129 }; |
130 | 130 |
131 } // namespace WebCore | 131 } // namespace WebCore |
132 | 132 |
133 #endif // MessageEvent_h | 133 #endif // MessageEvent_h |
OLD | NEW |