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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 338993003: Cleanup various WebView/WebFrame APIs to properly handle remote frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Refine comment Created 6 years, 6 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 | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 6e6900f2a4bea1851a6a13910b57c9c4fa0d138e..baf34014f34a097e8fd3dcd1856d09a68b0f1486 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -656,55 +656,6 @@ void WebLocalFrameImpl::setOpener(WebFrame* opener)
m_frame->document()->initSecurityContext();
}
-// FIXME: These methods should move into WebFrame once FrameTree is no longer
-// dependent on LocalFrame.
-void WebLocalFrameImpl::appendChild(WebFrame* child)
-{
- WebFrame::appendChild(child);
- frame()->tree().invalidateScopedChildCount();
-}
-
-void WebLocalFrameImpl::removeChild(WebFrame* child)
-{
- WebFrame::removeChild(child);
- frame()->tree().invalidateScopedChildCount();
-}
-
-WebFrame* WebLocalFrameImpl::traversePrevious(bool wrap) const
-{
- if (!frame())
- return 0;
- // FIXME: This should move to WebFrame and become local/remote agnostic.
- Frame* prevFrame = frame()->tree().traversePreviousWithWrap(wrap);
- if (!prevFrame || !prevFrame->isLocalFrame())
- return 0;
- return fromFrame(toLocalFrame(prevFrame));
-}
-
-WebFrame* WebLocalFrameImpl::traverseNext(bool wrap) const
-{
- // FIXME: This should move to WebFrame and become local/remote agnostic.
- if (!frame())
- return 0;
- // FIXME: This should move to WebFrame and become local/remote agnostic.
- Frame* nextFrame = frame()->tree().traverseNextWithWrap(wrap);
- if (!nextFrame || !nextFrame->isLocalFrame())
- return 0;
- return fromFrame(toLocalFrame(nextFrame));
-}
-
-WebFrame* WebLocalFrameImpl::findChildByName(const WebString& name) const
-{
- // FIXME: This should move to WebFrame and become local/remote agnostic.
- if (!frame())
- return 0;
- // FIXME: This should move to WebFrame and become local/remote agnostic.
- Frame* child = frame()->tree().child(name);
- if (!child || !child->isLocalFrame())
- return 0;
- return fromFrame(toLocalFrame(child));
-}
-
WebDocument WebLocalFrameImpl::document() const
{
if (!frame() || !frame()->document())
@@ -1726,7 +1677,12 @@ WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame)
{
if (!frame)
return 0;
- FrameLoaderClient* client = frame->loader().client();
+ return fromFrame(*frame);
+}
+
+WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame& frame)
+{
+ FrameLoaderClient* client = frame.loader().client();
if (!client || !client->isFrameLoaderClientImpl())
return 0;
return toFrameLoaderClientImpl(client)->webFrame();
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698