#include "config.h"
#include "web/WebRemoteFrameImpl.h"
-#include "core/frame/FrameOwner.h"
#include "core/frame/FrameView.h"
#include "core/frame/RemoteFrame.h"
#include "core/frame/Settings.h"
return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame));
}
- virtual bool isLocal() const OVERRIDE;
- virtual SandboxFlags sandboxFlags() const OVERRIDE;
- virtual void dispatchLoad() OVERRIDE;
+ virtual bool isLocal() const override;
+ virtual SandboxFlags sandboxFlags() const override;
+ virtual void dispatchLoad() override;
virtual void trace(Visitor*);
// FIXME: Implement. Most likely goes through m_frame->client().
}
-// FIXME: This is just a placeholder frame owner to supply to RemoteFrame when
-// the parent is also a remote frame. Strictly speaking, this shouldn't be
-// necessary, since a remote frame shouldn't ever need to communicate with a
-// remote parent (there are no sandbox flags to retrieve in this case, nor can
-// the RemoteFrame itself load a document). In most circumstances, the check for
-// frame->owner() can be replaced with a check for frame->tree().parent(). Once
-// that's done, this class can be removed.
-class PlaceholderFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<PlaceholderFrameOwner>, public FrameOwner {
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PlaceholderFrameOwner);
-public:
- virtual bool isLocal() const OVERRIDE;
- virtual SandboxFlags sandboxFlags() const OVERRIDE;
- virtual void dispatchLoad() OVERRIDE;
-};
+} // namespace
bool PlaceholderFrameOwner::isLocal() const
{
SandboxFlags PlaceholderFrameOwner::sandboxFlags() const
{
- ASSERT_NOT_REACHED();
return 0;
}
void PlaceholderFrameOwner::dispatchLoad()
{
- ASSERT_NOT_REACHED();
}
-} // namespace
-
WebRemoteFrame* WebRemoteFrame::create(WebRemoteFrameClient* client)
{
WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(client);
{
}
+#if ENABLE(OILPAN)
void WebRemoteFrameImpl::trace(Visitor* visitor)
{
-#if ENABLE(OILPAN)
visitor->trace(m_frame);
visitor->trace(m_ownersForChildren);
-
- WebFrame::traceChildren(visitor, this);
-#endif
+ visitor->registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>(this);
+ WebFrame::traceFrames(visitor, this);
}
+#endif
bool WebRemoteFrameImpl::isWebLocalFrame() const
{
return WebVector<WebIconURL>();
}
-void WebRemoteFrameImpl::setIsRemote(bool)
-{
- ASSERT_NOT_REACHED();
-}
-
void WebRemoteFrameImpl::setRemoteWebLayer(WebLayer* webLayer)
{
if (!frame())
return WebViewImpl::fromPage(frame()->page());
}
-WebViewImpl* WebRemoteFrameImpl::viewImpl() const
-{
- if (!frame())
- return 0;
- return WebViewImpl::fromPage(frame()->page());
-}
-
void WebRemoteFrameImpl::removeChild(WebFrame* frame)
{
WebFrame::removeChild(frame);
{
if (!frame.client())
return 0;
- return static_cast<RemoteFrameClient*>(frame.client())->webFrame();
+ return static_cast<RemoteFrameClientImpl*>(frame.client())->webFrame();
}
void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const