Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp |
| index 831460a2baca733a3cd921b9204c230d89fc9d23..57f5bc8b0f3ec392836f949e7e984c6a37bd844d 100644 |
| --- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp |
| +++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp |
| @@ -5,6 +5,8 @@ |
| #include "core/frame/DOMWindow.h" |
| #include <memory> |
| + |
| +#include "bindings/core/v8/WindowProxyManager.h" |
| #include "core/dom/Document.h" |
| #include "core/dom/ExecutionContext.h" |
| #include "core/dom/SecurityContext.h" |
| @@ -29,7 +31,10 @@ |
| namespace blink { |
| -DOMWindow::DOMWindow(Frame& frame) : m_frame(frame), m_windowIsClosing(false) {} |
| +DOMWindow::DOMWindow(Frame& frame) |
| + : m_frame(frame), |
| + m_windowProxyManager(frame.getWindowProxyManager()), |
| + m_windowIsClosing(false) {} |
| DOMWindow::~DOMWindow() { |
| // The frame must be disconnected before finalization. |
| @@ -415,6 +420,10 @@ void DOMWindow::focus(ExecutionContext* context) { |
| page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */); |
| } |
| +v8::Local<v8::Object> DOMWindow::globalProxy(DOMWrapperWorld& world) { |
| + return m_windowProxyManager->windowProxy(world)->globalProxyIfNotDetached(); |
|
haraken
2017/04/07 10:08:58
So, are you planning to change this in the future
Yuki
2017/04/07 10:30:44
Yes, I hope that I can make it someday.
|
| +} |
| + |
| InputDeviceCapabilitiesConstants* DOMWindow::getInputDeviceCapabilities() { |
| if (!m_inputCapabilities) |
| m_inputCapabilities = new InputDeviceCapabilitiesConstants; |
| @@ -423,6 +432,7 @@ InputDeviceCapabilitiesConstants* DOMWindow::getInputDeviceCapabilities() { |
| DEFINE_TRACE(DOMWindow) { |
| visitor->trace(m_frame); |
| + visitor->trace(m_windowProxyManager); |
| visitor->trace(m_inputCapabilities); |
| visitor->trace(m_location); |
| EventTargetWithInlineData::trace(visitor); |