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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Returns 0 if there is an exception, or if the passed-in array is 0/empty. | 80 // Returns 0 if there is an exception, or if the passed-in array is 0/empty. |
81 static PassOwnPtr<MessagePortChannelArray> disentanglePorts(ExecutionContext
*, const MessagePortArray*, ExceptionState&); | 81 static PassOwnPtr<MessagePortChannelArray> disentanglePorts(ExecutionContext
*, const MessagePortArray*, ExceptionState&); |
82 | 82 |
83 // Returns 0 if the passed array is 0/empty. | 83 // Returns 0 if the passed array is 0/empty. |
84 static MessagePortArray* entanglePorts(ExecutionContext&, PassOwnPtr<Message
PortChannelArray>); | 84 static MessagePortArray* entanglePorts(ExecutionContext&, PassOwnPtr<Message
PortChannelArray>); |
85 | 85 |
86 bool started() const { return m_started; } | 86 bool started() const { return m_started; } |
87 | 87 |
88 const AtomicString& interfaceName() const override; | 88 const AtomicString& interfaceName() const override; |
89 ExecutionContext* executionContext() const override { return ContextLifecycl
eObserver::executionContext(); } | 89 ExecutionContext* getExecutionContext() const override { return ContextLifec
ycleObserver::getExecutionContext(); } |
90 MessagePort* toMessagePort() override { return this; } | 90 MessagePort* toMessagePort() override { return this; } |
91 | 91 |
92 bool hasPendingActivity() const override; | 92 bool hasPendingActivity() const override; |
93 void contextDestroyed() override { close(); } | 93 void contextDestroyed() override { close(); } |
94 | 94 |
95 void setOnmessage(PassRefPtrWillBeRawPtr<EventListener> listener) | 95 void setOnmessage(PassRefPtrWillBeRawPtr<EventListener> listener) |
96 { | 96 { |
97 setAttributeEventListener(EventTypeNames::message, listener); | 97 setAttributeEventListener(EventTypeNames::message, listener); |
98 start(); | 98 start(); |
99 } | 99 } |
(...skipping 24 matching lines...) Expand all Loading... |
124 bool m_closed; | 124 bool m_closed; |
125 | 125 |
126 WeakPtrFactory<MessagePort> m_weakFactory; | 126 WeakPtrFactory<MessagePort> m_weakFactory; |
127 | 127 |
128 RefPtr<ScriptState> m_scriptStateForConversion; | 128 RefPtr<ScriptState> m_scriptStateForConversion; |
129 }; | 129 }; |
130 | 130 |
131 } // namespace blink | 131 } // namespace blink |
132 | 132 |
133 #endif // MessagePort_h | 133 #endif // MessagePort_h |
OLD | NEW |