OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 DECLARE_VIRTUAL_TRACE(); | 111 DECLARE_VIRTUAL_TRACE(); |
112 | 112 |
113 protected: | 113 protected: |
114 explicit MessagePort(ExecutionContext&); | 114 explicit MessagePort(ExecutionContext&); |
115 bool tryGetMessage(RefPtr<SerializedScriptValue>& message, OwnPtr<MessagePor
tChannelArray>& channels); | 115 bool tryGetMessage(RefPtr<SerializedScriptValue>& message, OwnPtr<MessagePor
tChannelArray>& channels); |
116 | 116 |
117 private: | 117 private: |
118 // WebMessagePortChannelClient implementation. | 118 // WebMessagePortChannelClient implementation. |
119 void messageAvailable() override; | 119 void messageAvailable() override; |
120 v8::Isolate* scriptIsolate() override; | |
121 v8::Local<v8::Context> scriptContextForMessageConversion() override; | |
122 void dispatchMessages(); | 120 void dispatchMessages(); |
123 | 121 |
124 OwnPtr<WebMessagePortChannel> m_entangledChannel; | 122 OwnPtr<WebMessagePortChannel> m_entangledChannel; |
125 | 123 |
126 bool m_started; | 124 bool m_started; |
127 bool m_closed; | 125 bool m_closed; |
128 | 126 |
129 RefPtr<ScriptState> m_scriptStateForConversion; | 127 RefPtr<ScriptState> m_scriptStateForConversion; |
130 }; | 128 }; |
131 | 129 |
132 } // namespace blink | 130 } // namespace blink |
133 | 131 |
134 #endif // MessagePort_h | 132 #endif // MessagePort_h |
OLD | NEW |