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

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

Issue 2756383002: Change Frame to store a Page instead of a FrameHost. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 134ddc6cb7a8113a7f35c7aea2e44feb86c1e370..a3d935d830d1188a95059f777c4b59cf84ad33d0 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -63,7 +63,7 @@ Frame::~Frame() {
DEFINE_TRACE(Frame) {
visitor->trace(m_treeNode);
- visitor->trace(m_host);
+ visitor->trace(m_page);
visitor->trace(m_owner);
visitor->trace(m_windowProxyManager);
visitor->trace(m_domWindow);
@@ -78,7 +78,7 @@ void Frame::detach(FrameDetachType type) {
// its owning reference back to our owning LocalFrame.
m_client->detached(type);
m_client = nullptr;
- m_host = nullptr;
+ m_page = nullptr;
}
void Frame::disconnectOwnerElement() {
@@ -95,13 +95,13 @@ void Frame::disconnectOwnerElement() {
}
Page* Frame::page() const {
- if (m_host)
- return &m_host->page();
- return nullptr;
+ return m_page;
}
FrameHost* Frame::host() const {
- return m_host;
+ if (m_page)
+ return &m_page->frameHost();
+ return nullptr;
}
bool Frame::isMainFrame() const {
@@ -419,23 +419,23 @@ bool Frame::isFeatureEnabled(WebFeaturePolicyFeature feature) const {
}
Frame::Frame(FrameClient* client,
- FrameHost* host,
+ Page* page,
FrameOwner* owner,
WindowProxyManager* windowProxyManager)
: m_treeNode(this),
- m_host(host),
+ m_page(page),
m_owner(owner),
m_client(client),
m_windowProxyManager(windowProxyManager),
m_isLoading(false) {
InstanceCounters::incrementCounter(InstanceCounters::FrameCounter);
- ASSERT(page());
+ DCHECK(m_page);
if (m_owner)
m_owner->setContentFrame(*this);
else
- page()->setMainFrame(this);
+ m_page->setMainFrame(this);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698