| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/presentation/PresentationConnectionList.h" | 5 #include "modules/presentation/PresentationConnectionList.h" |
| 6 | 6 |
| 7 #include "core/frame/UseCounter.h" | 7 #include "core/frame/UseCounter.h" |
| 8 #include "modules/EventTargetModules.h" | 8 #include "modules/EventTargetModules.h" |
| 9 #include "modules/presentation/PresentationConnection.h" | 9 #include "modules/presentation/PresentationConnection.h" |
| 10 #include "modules/presentation/PresentationConnectionAvailableEvent.h" | 10 #include "modules/presentation/PresentationConnectionAvailableEvent.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 PresentationConnectionList::PresentationConnectionList( | 14 PresentationConnectionList::PresentationConnectionList( |
| 15 ExecutionContext* context) | 15 ExecutionContext* context) |
| 16 : m_executionContext(context) {} | 16 : ContextClient(context) {} |
| 17 | 17 |
| 18 const AtomicString& PresentationConnectionList::interfaceName() const { | 18 const AtomicString& PresentationConnectionList::interfaceName() const { |
| 19 return EventTargetNames::PresentationConnectionList; | 19 return EventTargetNames::PresentationConnectionList; |
| 20 } | 20 } |
| 21 | 21 |
| 22 const HeapVector<Member<PresentationConnection>>& | 22 const HeapVector<Member<PresentationConnection>>& |
| 23 PresentationConnectionList::connections() const { | 23 PresentationConnectionList::connections() const { |
| 24 return m_connections; | 24 return m_connections; |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 44 dispatchEvent(PresentationConnectionAvailableEvent::create( | 44 dispatchEvent(PresentationConnectionAvailableEvent::create( |
| 45 EventTypeNames::connectionavailable, connection)); | 45 EventTypeNames::connectionavailable, connection)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool PresentationConnectionList::isEmpty() { | 48 bool PresentationConnectionList::isEmpty() { |
| 49 return m_connections.isEmpty(); | 49 return m_connections.isEmpty(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 DEFINE_TRACE(PresentationConnectionList) { | 52 DEFINE_TRACE(PresentationConnectionList) { |
| 53 visitor->trace(m_connections); | 53 visitor->trace(m_connections); |
| 54 visitor->trace(m_executionContext); | |
| 55 EventTargetWithInlineData::trace(visitor); | 54 EventTargetWithInlineData::trace(visitor); |
| 55 ContextClient::trace(visitor); |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| OLD | NEW |