Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2702273004: bindings: Simplifies WindowProxyManager and its relation to Frame. (Closed)
Patch Set: Addressed review comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index 088d8401f448e15a1ef0f971e51d5bbc7c6bdd70..55fda60cda9be0481854fe1836a74c5d59d4bde5 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -30,6 +30,7 @@
#include "core/frame/Frame.h"
+#include "bindings/core/v8/WindowProxyManager.h"
#include "core/dom/DocumentType.h"
#include "core/events/Event.h"
#include "core/frame/FrameHost.h"
@@ -65,6 +66,7 @@ DEFINE_TRACE(Frame) {
visitor->trace(m_treeNode);
visitor->trace(m_host);
visitor->trace(m_owner);
+ visitor->trace(m_windowProxyManager);
visitor->trace(m_domWindow);
visitor->trace(m_client);
}
@@ -122,6 +124,10 @@ HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const {
: nullptr;
}
+WindowProxy* Frame::windowProxy(DOMWrapperWorld& world) {
+ return m_windowProxyManager->windowProxy(world);
+}
+
static ChromeClient& emptyChromeClient() {
DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create()));
return client;
@@ -404,11 +410,15 @@ void Frame::setDocumentHasReceivedUserGesture() {
parent->setDocumentHasReceivedUserGesture();
}
-Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
+Frame::Frame(FrameClient* client,
+ FrameHost* host,
+ FrameOwner* owner,
+ WindowProxyManager* windowProxyManager)
: m_treeNode(this),
m_host(host),
m_owner(owner),
m_client(client),
+ m_windowProxyManager(windowProxyManager),
m_isLoading(false) {
InstanceCounters::incrementCounter(InstanceCounters::FrameCounter);

Powered by Google App Engine
This is Rietveld 408576698