Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / WebRemoteFrameImpl.cpp
index ff3dad8..8a00aaa 100644 (file)
@@ -5,7 +5,6 @@
 #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"
@@ -37,9 +36,9 @@ public:
         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*);
 
@@ -76,20 +75,7 @@ void RemoteBridgeFrameOwner::dispatchLoad()
     // 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
 {
@@ -98,17 +84,13 @@ 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);
@@ -132,15 +114,15 @@ WebRemoteFrameImpl::~WebRemoteFrameImpl()
 {
 }
 
+#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
 {
@@ -195,11 +177,6 @@ WebVector<WebIconURL> WebRemoteFrameImpl::iconURLs(int iconTypesMask) const
     return WebVector<WebIconURL>();
 }
 
-void WebRemoteFrameImpl::setIsRemote(bool)
-{
-    ASSERT_NOT_REACHED();
-}
-
 void WebRemoteFrameImpl::setRemoteWebLayer(WebLayer* webLayer)
 {
     if (!frame())
@@ -283,13 +260,6 @@ WebView* WebRemoteFrameImpl::view() const
     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);
@@ -867,7 +837,7 @@ WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& 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