Chromium Code Reviews| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 // A port gets neutered when it is transferred to a new owner via postMessag e(). | 105 // A port gets neutered when it is transferred to a new owner via postMessag e(). |
| 106 bool isNeutered() const { return !m_entangledChannel; } | 106 bool isNeutered() const { return !m_entangledChannel; } |
| 107 | 107 |
| 108 virtual void trace(Visitor*) override; | 108 virtual void trace(Visitor*) override; |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 explicit MessagePort(ExecutionContext&); | 111 explicit MessagePort(ExecutionContext&); |
| 112 | 112 |
| 113 // WebMessagePortChannelClient implementation. | 113 // WebMessagePortChannelClient implementation. |
| 114 virtual void messageAvailable() override; | 114 virtual void messageAvailable() override; |
| 115 virtual v8::Isolate* scriptIsolate() override; | |
| 116 virtual v8::Handle<v8::Context> scriptContext() override; | |
|
adamk
2015/02/18 02:01:21
Exposing a Context like this through the API worri
| |
| 115 void dispatchMessages(); | 117 void dispatchMessages(); |
| 116 | 118 |
| 117 OwnPtr<WebMessagePortChannel> m_entangledChannel; | 119 OwnPtr<WebMessagePortChannel> m_entangledChannel; |
| 118 | 120 |
| 119 bool m_started; | 121 bool m_started; |
| 120 bool m_closed; | 122 bool m_closed; |
| 121 | 123 |
| 122 WeakPtrFactory<MessagePort> m_weakFactory; | 124 WeakPtrFactory<MessagePort> m_weakFactory; |
| 123 }; | 125 }; |
| 124 | 126 |
| 125 } // namespace blink | 127 } // namespace blink |
| 126 | 128 |
| 127 #endif // MessagePort_h | 129 #endif // MessagePort_h |
| OLD | NEW |