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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 const AtomicString& interfaceName() const override; | 88 const AtomicString& interfaceName() const override; |
89 | 89 |
90 enum DataType { | 90 enum DataType { |
91 DataTypeScriptValue, | 91 DataTypeScriptValue, |
92 DataTypeSerializedScriptValue, | 92 DataTypeSerializedScriptValue, |
93 DataTypeString, | 93 DataTypeString, |
94 DataTypeBlob, | 94 DataTypeBlob, |
95 DataTypeArrayBuffer | 95 DataTypeArrayBuffer |
96 }; | 96 }; |
97 DataType dataType() const { return m_dataType; } | 97 DataType getDataType() const { return m_dataType; } |
98 ScriptValue dataAsScriptValue() const { ASSERT(m_dataType == DataTypeScriptV
alue); return m_dataAsScriptValue; } | 98 ScriptValue dataAsScriptValue() const { ASSERT(m_dataType == DataTypeScriptV
alue); return m_dataAsScriptValue; } |
99 SerializedScriptValue* dataAsSerializedScriptValue() const { ASSERT(m_dataTy
pe == DataTypeSerializedScriptValue); return m_dataAsSerializedScriptValue.get()
; } | 99 SerializedScriptValue* dataAsSerializedScriptValue() const { ASSERT(m_dataTy
pe == DataTypeSerializedScriptValue); return m_dataAsSerializedScriptValue.get()
; } |
100 String dataAsString() const { ASSERT(m_dataType == DataTypeString); return m
_dataAsString; } | 100 String dataAsString() const { ASSERT(m_dataType == DataTypeString); return m
_dataAsString; } |
101 Blob* dataAsBlob() const { ASSERT(m_dataType == DataTypeBlob); return m_data
AsBlob.get(); } | 101 Blob* dataAsBlob() const { ASSERT(m_dataType == DataTypeBlob); return m_data
AsBlob.get(); } |
102 DOMArrayBuffer* dataAsArrayBuffer() const { ASSERT(m_dataType == DataTypeArr
ayBuffer); return m_dataAsArrayBuffer.get(); } | 102 DOMArrayBuffer* dataAsArrayBuffer() const { ASSERT(m_dataType == DataTypeArr
ayBuffer); return m_dataAsArrayBuffer.get(); } |
103 | 103 |
104 void setSerializedData(PassRefPtr<SerializedScriptValue> data) | 104 void setSerializedData(PassRefPtr<SerializedScriptValue> data) |
105 { | 105 { |
106 ASSERT(!m_dataAsSerializedScriptValue); | 106 ASSERT(!m_dataAsSerializedScriptValue); |
107 m_dataAsSerializedScriptValue = data; | 107 m_dataAsSerializedScriptValue = data; |
(...skipping 29 matching lines...) Expand all Loading... |
137 // the MessageChannels in a disentangled state. Only one of them can be | 137 // the MessageChannels in a disentangled state. Only one of them can be |
138 // non-empty at a time. entangleMessagePorts() moves between the states. | 138 // non-empty at a time. entangleMessagePorts() moves between the states. |
139 PersistentWillBeMember<MessagePortArray> m_ports; | 139 PersistentWillBeMember<MessagePortArray> m_ports; |
140 OwnPtr<MessagePortChannelArray> m_channels; | 140 OwnPtr<MessagePortChannelArray> m_channels; |
141 String m_suborigin; | 141 String m_suborigin; |
142 }; | 142 }; |
143 | 143 |
144 } // namespace blink | 144 } // namespace blink |
145 | 145 |
146 #endif // MessageEvent_h | 146 #endif // MessageEvent_h |
OLD | NEW |