| Index: Source/modules/presentation/PresentationSession.cpp
|
| diff --git a/Source/modules/presentation/PresentationSession.cpp b/Source/modules/presentation/PresentationSession.cpp
|
| index a7920a0747f08f762c06e42e10cc656b282f16e3..78d1c804fda6ec64c2e7825fa942aff2877d08b3 100644
|
| --- a/Source/modules/presentation/PresentationSession.cpp
|
| +++ b/Source/modules/presentation/PresentationSession.cpp
|
| @@ -5,12 +5,17 @@
|
| #include "config.h"
|
| #include "modules/presentation/PresentationSession.h"
|
|
|
| +#include "core/dom/Document.h"
|
| +#include "core/frame/LocalFrame.h"
|
| #include "modules/EventTargetModules.h"
|
| +#include "public/platform/WebString.h"
|
|
|
| namespace blink {
|
|
|
| -PresentationSession::PresentationSession(ExecutionContext* executionContext)
|
| - : ContextLifecycleObserver(executionContext)
|
| +PresentationSession::PresentationSession(LocalFrame* frame, const WebString& id)
|
| + : DOMWindowProperty(frame)
|
| + , m_id(id)
|
| + , m_state("disconnected")
|
| {
|
| }
|
|
|
| @@ -19,9 +24,9 @@ PresentationSession::~PresentationSession()
|
| }
|
|
|
| // static
|
| -PresentationSession* PresentationSession::create(ExecutionContext* executionContext)
|
| +PresentationSession* PresentationSession::create(LocalFrame* frame, const WebString& id)
|
| {
|
| - return new PresentationSession(executionContext);
|
| + return new PresentationSession(frame, id);
|
| }
|
|
|
| const AtomicString& PresentationSession::interfaceName() const
|
| @@ -31,13 +36,14 @@ const AtomicString& PresentationSession::interfaceName() const
|
|
|
| ExecutionContext* PresentationSession::executionContext() const
|
| {
|
| - return ContextLifecycleObserver::executionContext();
|
| -}
|
| + if (!frame())
|
| + return nullptr;
|
| + return frame()->document();}
|
|
|
| DEFINE_TRACE(PresentationSession)
|
| {
|
| RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSession>::trace(visitor);
|
| - ContextLifecycleObserver::trace(visitor);
|
| + DOMWindowProperty::trace(visitor);
|
| }
|
|
|
| void PresentationSession::postMessage(const String& message)
|
|
|