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 fa9d7601038597b8aaacb573e1d15af92a3308b4..99a248abfd63f422e93c053c34570d26524f9574 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) : frame_(frame), window_is_closing_(false) {} |
| +DOMWindow::DOMWindow(Frame& frame) |
| + : frame_(frame), |
| + window_proxy_manager_(frame.GetWindowProxyManager()), |
| + window_is_closing_(false) {} |
| DOMWindow::~DOMWindow() { |
| // The frame must be disconnected before finalization. |
| @@ -420,6 +425,11 @@ void DOMWindow::focus(ExecutionContext* context) { |
| true /* notifyEmbedder */); |
| } |
| +v8::Local<v8::Object> DOMWindow::GlobalProxy(DOMWrapperWorld& world) { |
| + return window_proxy_manager_->GetWindowProxy(world) |
| + ->GlobalProxyIfNotDetached(); |
|
haraken
2017/04/14 18:51:50
Shall we add a TODO and mention that this should r
Yuki
2017/04/17 07:15:26
Done.
|
| +} |
| + |
| InputDeviceCapabilitiesConstants* DOMWindow::GetInputDeviceCapabilities() { |
| if (!input_capabilities_) |
| input_capabilities_ = new InputDeviceCapabilitiesConstants; |
| @@ -428,6 +438,7 @@ InputDeviceCapabilitiesConstants* DOMWindow::GetInputDeviceCapabilities() { |
| DEFINE_TRACE(DOMWindow) { |
| visitor->Trace(frame_); |
| + visitor->Trace(window_proxy_manager_); |
| visitor->Trace(input_capabilities_); |
| visitor->Trace(location_); |
| EventTargetWithInlineData::Trace(visitor); |