Chromium Code Reviews| Index: third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp |
| diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8265b21a7a12807ea206f931361c4a1488b7cae3 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "modules/presentation/PresentationConnectionList.h" |
| + |
| +#include "bindings/core/v8/ScriptPromise.h" |
| +#include "core/dom/DOMException.h" |
| +#include "core/dom/Document.h" |
| +#include "core/dom/ExceptionCode.h" |
| +#include "core/events/Event.h" |
| +#include "core/frame/LocalFrame.h" |
| +#include "modules/EventTargetModules.h" |
| + |
| +namespace blink { |
| + |
| +PresentationConnectionList::PresentationConnectionList(LocalFrame* frame) |
| + : m_frame(frame) |
| +{ |
| +} |
| + |
| +const AtomicString& PresentationConnectionList::interfaceName() const |
| +{ |
| + return EventTargetNames::PresentationConnectionList; |
| +} |
| + |
| +ExecutionContext* PresentationConnectionList::getExecutionContext() const |
| +{ |
| + return m_frame ? m_frame->document() : nullptr; |
|
mark a. foltz
2016/08/23 19:08:49
I note that PresentationConnection also allows a n
|
| +} |
| + |
| +const HeapVector<Member<PresentationConnection>>& PresentationConnectionList::connections() const |
| +{ |
| + return m_connections; |
| +} |
| + |
| +DEFINE_TRACE(PresentationConnectionList) |
| +{ |
| + visitor->trace(m_connections); |
| + visitor->trace(m_frame); |
| + EventTargetWithInlineData::trace(visitor); |
| +} |
| + |
| +} // namespace blink |