| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class ScriptState; | 49 class ScriptState; |
| 50 class SerializedScriptValue; | 50 class SerializedScriptValue; |
| 51 | 51 |
| 52 // The overwhelmingly common case is sending a single port, so handle that effic
iently with an inline buffer of size 1. | 52 // The overwhelmingly common case is sending a single port, so handle that effic
iently with an inline buffer of size 1. |
| 53 typedef HeapVector<Member<MessagePort>, 1> MessagePortArray; | 53 typedef HeapVector<Member<MessagePort>, 1> MessagePortArray; |
| 54 | 54 |
| 55 // Not to be confused with WebMessagePortChannelArray; this one uses Vector and
OwnPtr instead of WebVector and raw pointers. | 55 // Not to be confused with WebMessagePortChannelArray; this one uses Vector and
OwnPtr instead of WebVector and raw pointers. |
| 56 typedef Vector<OwnPtr<WebMessagePortChannel>, 1> MessagePortChannelArray; | 56 typedef Vector<OwnPtr<WebMessagePortChannel>, 1> MessagePortChannelArray; |
| 57 | 57 |
| 58 class CORE_EXPORT MessagePort | 58 class CORE_EXPORT MessagePort |
| 59 : public RefCountedGarbageCollectedEventTargetWithInlineData<MessagePort> | 59 : public EventTargetWithInlineData |
| 60 , public ActiveScriptWrappable | 60 , public ActiveScriptWrappable |
| 61 , public ActiveDOMObject | 61 , public ActiveDOMObject |
| 62 , public WebMessagePortChannelClient { | 62 , public WebMessagePortChannelClient { |
| 63 DEFINE_WRAPPERTYPEINFO(); | 63 DEFINE_WRAPPERTYPEINFO(); |
| 64 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MessagePort); | 64 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MessagePort); |
| 65 USING_GARBAGE_COLLECTED_MIXIN(MessagePort); | 65 USING_GARBAGE_COLLECTED_MIXIN(MessagePort); |
| 66 public: | 66 public: |
| 67 static MessagePort* create(ExecutionContext&); | 67 static MessagePort* create(ExecutionContext&); |
| 68 ~MessagePort() override; | 68 ~MessagePort() override; |
| 69 | 69 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 bool m_closed; | 131 bool m_closed; |
| 132 | 132 |
| 133 WeakPtrFactory<MessagePort> m_weakFactory; | 133 WeakPtrFactory<MessagePort> m_weakFactory; |
| 134 | 134 |
| 135 RefPtr<ScriptState> m_scriptStateForConversion; | 135 RefPtr<ScriptState> m_scriptStateForConversion; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace blink | 138 } // namespace blink |
| 139 | 139 |
| 140 #endif // MessagePort_h | 140 #endif // MessagePort_h |
| OLD | NEW |