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

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 115293005: Add a layer of indirection between Frame and Page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make GCC happy Created 7 years 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 | « Source/web/WebFrameImpl.h ('k') | Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index b4d57ca2efae612e5e6c6d8348f3aa6753036852..b844995103e3a3cb6a8391b0d2916decec42961b 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -2142,7 +2142,10 @@ void WebFrameImpl::setWebCoreFrame(WebCore::Frame* frame)
void WebFrameImpl::initializeAsMainFrame(WebCore::Page* page)
{
- m_frameInit->setPage(page);
+ // FIXME: This whole function can go away once ownerhip of WebFrame is reversed.
+ // Page should create it's main WebFrame, not have FrameLoader do it only
+ // to have to mark the frame as main later.
+ m_frameInit->setFrameHost(&page->frameHost());
RefPtr<Frame> mainFrame = Frame::create(m_frameInit);
setWebCoreFrame(mainFrame.get());
@@ -2181,7 +2184,7 @@ PassRefPtr<Frame> WebFrameImpl::createChildFrame(const FrameLoadRequest& request
// of this file for more info.
webframe->ref();
- webframe->m_frameInit->setPage(frame()->page());
+ webframe->m_frameInit->setFrameHost(frame()->host());
webframe->m_frameInit->setOwnerElement(ownerElement);
RefPtr<Frame> childFrame = Frame::create(webframe->m_frameInit);
webframe->setWebCoreFrame(childFrame.get());
@@ -2519,8 +2522,9 @@ void WebFrameImpl::loadJavaScriptURL(const KURL& url)
frame()->document()->loader()->replaceDocument(scriptResult, ownerDocument.get());
}
-void WebFrameImpl::willDetachPage()
+void WebFrameImpl::willDetachFrameHost()
{
+ // FIXME: This should never be called if the Frame has already been detached?
if (!frame() || !frame()->page())
return;
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698