| Index: third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| index f7b4cbaf09ce26abe94dad1f992c119304be4fdf..fd03272d5c052b3d00787bd05b2b826bef223e68 100644
|
| --- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| @@ -6,10 +6,9 @@
|
|
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "core/dom/DOMException.h"
|
| -#include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/frame/LocalFrame.h"
|
| -#include "modules/EventTargetModules.h"
|
| +#include "modules/presentation/PresentationConnectionList.h"
|
|
|
| namespace blink {
|
|
|
| @@ -18,29 +17,17 @@ PresentationReceiver::PresentationReceiver(LocalFrame* frame)
|
| {
|
| }
|
|
|
| -const AtomicString& PresentationReceiver::interfaceName() const
|
| +ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState)
|
| {
|
| - return EventTargetNames::PresentationReceiver;
|
| -}
|
| -
|
| -ExecutionContext* PresentationReceiver::getExecutionContext() const
|
| -{
|
| - return frame() ? frame()->document() : nullptr;
|
| -}
|
| + if (!m_connectionListProperty)
|
| + m_connectionListProperty = new ConnectionListProperty(scriptState->getExecutionContext(), this, ConnectionListProperty::Loaded);
|
|
|
| -ScriptPromise PresentationReceiver::getConnection(ScriptState* scriptState)
|
| -{
|
| - return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError, "PresentationReceiver::getConnection() is not implemented yet."));
|
| -}
|
| -
|
| -ScriptPromise PresentationReceiver::getConnections(ScriptState* scriptState)
|
| -{
|
| - return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError, "PresentationReceiver::getConnections() is not implemented yet."));
|
| + return m_connectionListProperty->promise(scriptState->world());
|
| }
|
|
|
| DEFINE_TRACE(PresentationReceiver)
|
| {
|
| - EventTargetWithInlineData::trace(visitor);
|
| + visitor->trace(m_connectionListProperty);
|
| DOMWindowProperty::trace(visitor);
|
| }
|
|
|
|
|