| 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 19 matching lines...) Expand all Loading... |
| 30 #include "bindings/core/v8/ScriptWrappable.h" | 30 #include "bindings/core/v8/ScriptWrappable.h" |
| 31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class MessagePort; | 36 class MessagePort; |
| 37 class ExecutionContext; | 37 class ExecutionContext; |
| 38 | 38 |
| 39 class MessageChannel final : public GarbageCollectedFinalized<MessageChannel>, p
ublic ScriptWrappable { | 39 class MessageChannel final : public GarbageCollectedFinalized<MessageChannel>, p
ublic ScriptWrappable { |
| 40 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MessageChannel); | |
| 41 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
| 42 public: | 41 public: |
| 43 static MessageChannel* create(ExecutionContext* context) | 42 static MessageChannel* create(ExecutionContext* context) |
| 44 { | 43 { |
| 45 return new MessageChannel(context); | 44 return new MessageChannel(context); |
| 46 } | 45 } |
| 47 | 46 |
| 48 MessagePort* port1() const { return m_port1; } | 47 MessagePort* port1() const { return m_port1; } |
| 49 MessagePort* port2() const { return m_port2; } | 48 MessagePort* port2() const { return m_port2; } |
| 50 | 49 |
| 51 DECLARE_TRACE(); | 50 DECLARE_TRACE(); |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 explicit MessageChannel(ExecutionContext*); | 53 explicit MessageChannel(ExecutionContext*); |
| 55 | 54 |
| 56 Member<MessagePort> m_port1; | 55 Member<MessagePort> m_port1; |
| 57 Member<MessagePort> m_port2; | 56 Member<MessagePort> m_port2; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace blink | 59 } // namespace blink |
| 61 | 60 |
| 62 #endif // MessageChannel_h | 61 #endif // MessageChannel_h |
| OLD | NEW |