OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "modules/navigatorconnect/ServicePortCollection.h" | 6 #include "modules/navigatorconnect/ServicePortCollection.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
9 #include "bindings/core/v8/SerializedScriptValueFactory.h" | 9 #include "bindings/core/v8/SerializedScriptValueFactory.h" |
10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 init.setTargetURL(targetURL.string()); | 156 init.setTargetURL(targetURL.string()); |
157 init.setOrigin(origin); | 157 init.setOrigin(origin); |
158 RefPtrWillBeRawPtr<Event> event = ServicePortConnectEvent::create(EventTypeN
ames::connect, init, observer); | 158 RefPtrWillBeRawPtr<Event> event = ServicePortConnectEvent::create(EventTypeN
ames::connect, init, observer); |
159 dispatchEvent(event.release()); | 159 dispatchEvent(event.release()); |
160 observer->didDispatchEvent(); | 160 observer->didDispatchEvent(); |
161 } | 161 } |
162 | 162 |
163 DEFINE_TRACE(ServicePortCollection) | 163 DEFINE_TRACE(ServicePortCollection) |
164 { | 164 { |
165 visitor->trace(m_ports); | 165 visitor->trace(m_ports); |
166 EventTargetWithInlineData::trace(visitor); | 166 RefCountedGarbageCollectedEventTargetWithInlineData<ServicePortCollection>::
trace(visitor); |
167 ContextLifecycleObserver::trace(visitor); | 167 ContextLifecycleObserver::trace(visitor); |
168 } | 168 } |
169 | 169 |
170 ServicePortCollection::ServicePortCollection(ExecutionContext* context) | 170 ServicePortCollection::ServicePortCollection(ExecutionContext* context) |
171 : ContextLifecycleObserver(context) | 171 : ContextLifecycleObserver(context) |
172 , m_provider(adoptPtr(Platform::current()->createServicePortProvider(this))) | 172 , m_provider(adoptPtr(Platform::current()->createServicePortProvider(this))) |
173 { | 173 { |
174 } | 174 } |
175 | 175 |
176 } // namespace blink | 176 } // namespace blink |
OLD | NEW |