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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 // Returns an empty array if the passed array is nullptr/empty. | 82 // Returns an empty array if the passed array is nullptr/empty. |
83 static MessagePortArray* entanglePorts(ExecutionContext&, std::unique_ptr<Me
ssagePortChannelArray>); | 83 static MessagePortArray* entanglePorts(ExecutionContext&, std::unique_ptr<Me
ssagePortChannelArray>); |
84 | 84 |
85 bool started() const { return m_started; } | 85 bool started() const { return m_started; } |
86 | 86 |
87 const AtomicString& interfaceName() const override; | 87 const AtomicString& interfaceName() const override; |
88 ExecutionContext* getExecutionContext() const override { return ActiveDOMObj
ect::getExecutionContext(); } | 88 ExecutionContext* getExecutionContext() const override { return ActiveDOMObj
ect::getExecutionContext(); } |
89 MessagePort* toMessagePort() override { return this; } | 89 MessagePort* toMessagePort() override { return this; } |
90 | 90 |
91 // ActiveScriptWrappable implementation. | 91 // ScriptWrappable implementation. |
92 bool hasPendingActivity() const final; | 92 bool hasPendingActivity() const final; |
93 | 93 |
94 // ActiveDOMObject implementation. | 94 // ActiveDOMObject implementation. |
95 void stop() override { close(); } | 95 void stop() override { close(); } |
96 | 96 |
97 void setOnmessage(EventListener* listener) | 97 void setOnmessage(EventListener* listener) |
98 { | 98 { |
99 setAttributeEventListener(EventTypeNames::message, listener); | 99 setAttributeEventListener(EventTypeNames::message, listener); |
100 start(); | 100 start(); |
101 } | 101 } |
(...skipping 20 matching lines...) Expand all Loading... |
122 | 122 |
123 bool m_started; | 123 bool m_started; |
124 bool m_closed; | 124 bool m_closed; |
125 | 125 |
126 RefPtr<ScriptState> m_scriptStateForConversion; | 126 RefPtr<ScriptState> m_scriptStateForConversion; |
127 }; | 127 }; |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
130 | 130 |
131 #endif // MessagePort_h | 131 #endif // MessagePort_h |
OLD | NEW |