| Index: third_party/WebKit/Source/core/dom/ContextLifecycleObserver.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ContextLifecycleObserver.cpp b/third_party/WebKit/Source/core/dom/ContextLifecycleObserver.cpp
|
| index 829c1c0cc3bd92784cb35a71907eb64849b8e5d9..654398a35b80ae4c3f144b2390a3ead74169e713 100644
|
| --- a/third_party/WebKit/Source/core/dom/ContextLifecycleObserver.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ContextLifecycleObserver.cpp
|
| @@ -5,10 +5,14 @@
|
| #include "core/dom/ContextLifecycleObserver.h"
|
|
|
| #include "core/dom/Document.h"
|
| +#include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
|
|
| namespace blink {
|
|
|
| +ContextClient::ContextClient(ExecutionContext* executionContext)
|
| + : m_executionContext(executionContext) {}
|
| +
|
| ContextClient::ContextClient(LocalFrame* frame)
|
| : m_executionContext(frame ? frame->document() : nullptr) {}
|
|
|
| @@ -33,4 +37,22 @@ LocalFrame* ContextLifecycleObserver::frame() const {
|
| ? toDocument(getExecutionContext())->frame()
|
| : nullptr;
|
| }
|
| +
|
| +DOMWindowClient::DOMWindowClient(LocalDOMWindow* window)
|
| + : m_domWindow(window) {}
|
| +
|
| +DOMWindowClient::DOMWindowClient(LocalFrame* frame)
|
| + : m_domWindow(frame ? frame->domWindow() : nullptr) {}
|
| +
|
| +LocalDOMWindow* DOMWindowClient::domWindow() const {
|
| + return m_domWindow && m_domWindow->frame() ? m_domWindow : nullptr;
|
| +}
|
| +
|
| +LocalFrame* DOMWindowClient::frame() const {
|
| + return m_domWindow ? m_domWindow->frame() : nullptr;
|
| +}
|
| +
|
| +DEFINE_TRACE(DOMWindowClient) {
|
| + visitor->trace(m_domWindow);
|
| +}
|
| }
|
|
|