| 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 typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray; | 49 typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray; |
| 50 | 50 |
| 51 class MessagePort : public RefCountedGarbageCollected<MessagePort>, public E
ventTarget { | 51 class MessagePort : public RefCountedGarbageCollected<MessagePort>, public E
ventTarget { |
| 52 DECLARE_GC_INFO | 52 DECLARE_GC_INFO |
| 53 public: | 53 public: |
| 54 static PassRefPtr<MessagePort> create(ScriptExecutionContext* scriptExec
utionContext) { return adoptRef(new MessagePort(scriptExecutionContext)); } | 54 static PassRefPtr<MessagePort> create(ScriptExecutionContext* scriptExec
utionContext) { return adoptRef(new MessagePort(scriptExecutionContext)); } |
| 55 virtual ~MessagePort(); | 55 virtual ~MessagePort(); |
| 56 | 56 |
| 57 virtual void trace(Visitor*) { } | 57 virtual void trace(Visitor*) { } |
| 58 | 58 |
| 59 virtual void visitWith(Visitor* visitor) const OVERRIDE | 59 virtual void adjustAndMark(Visitor* visitor) const OVERRIDE |
| 60 { | 60 { |
| 61 visitor->visit(this); | 61 visitor->mark(this); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void postMessage(PassRefPtr<SerializedScriptValue> message, const Messag
ePortArray*, ExceptionCode&); | 64 void postMessage(PassRefPtr<SerializedScriptValue> message, const Messag
ePortArray*, ExceptionCode&); |
| 65 | 65 |
| 66 void start(); | 66 void start(); |
| 67 void close(); | 67 void close(); |
| 68 | 68 |
| 69 void entangle(PassOwnPtr<MessagePortChannel>); | 69 void entangle(PassOwnPtr<MessagePortChannel>); |
| 70 PassOwnPtr<MessagePortChannel> disentangle(); | 70 PassOwnPtr<MessagePortChannel> disentangle(); |
| 71 | 71 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 // FIXME(oilpan): This should be a weak pointer. | 122 // FIXME(oilpan): This should be a weak pointer. |
| 123 // MessagePort can outlive ScriptExecutionContext. See MessagePort::cont
extDestroyed(). | 123 // MessagePort can outlive ScriptExecutionContext. See MessagePort::cont
extDestroyed(). |
| 124 ScriptExecutionContext* m_scriptExecutionContext; | 124 ScriptExecutionContext* m_scriptExecutionContext; |
| 125 EventTargetData m_eventTargetData; | 125 EventTargetData m_eventTargetData; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace WebCore | 128 } // namespace WebCore |
| 129 | 129 |
| 130 #endif // MessagePort_h | 130 #endif // MessagePort_h |
| OLD | NEW |