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 17 matching lines...) Expand all Loading... |
28 #define MessageChannel_h | 28 #define MessageChannel_h |
29 | 29 |
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 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class MessagePort; | 35 class MessagePort; |
36 class ExecutionContext; | 36 class ExecutionContext; |
37 | 37 |
38 class MessageChannel final : public GarbageCollectedFinalized<MessageChannel>, p
ublic ScriptWrappable { | 38 class MessageChannel final : public GarbageCollected<MessageChannel>, public Scr
iptWrappable { |
39 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
40 public: | 40 public: |
41 static MessageChannel* create(ExecutionContext* context) | 41 static MessageChannel* create(ExecutionContext* context) |
42 { | 42 { |
43 return new MessageChannel(context); | 43 return new MessageChannel(context); |
44 } | 44 } |
45 | 45 |
46 MessagePort* port1() const { return m_port1; } | 46 MessagePort* port1() const { return m_port1; } |
47 MessagePort* port2() const { return m_port2; } | 47 MessagePort* port2() const { return m_port2; } |
48 | 48 |
49 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
50 | 50 |
51 private: | 51 private: |
52 explicit MessageChannel(ExecutionContext*); | 52 explicit MessageChannel(ExecutionContext*); |
53 | 53 |
54 Member<MessagePort> m_port1; | 54 Member<MessagePort> m_port1; |
55 Member<MessagePort> m_port2; | 55 Member<MessagePort> m_port2; |
56 }; | 56 }; |
57 | 57 |
58 } // namespace blink | 58 } // namespace blink |
59 | 59 |
60 #endif // MessageChannel_h | 60 #endif // MessageChannel_h |
OLD | NEW |