Chromium Code Reviews| Index: Source/web/WebLocalFrameImpl.cpp |
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp |
| index c508c7f825670dc38d164d6192373edcbba25fd8..ade203f748b3ad84d83bbdd4342c1380b02d342b 100644 |
| --- a/Source/web/WebLocalFrameImpl.cpp |
| +++ b/Source/web/WebLocalFrameImpl.cpp |
| @@ -205,6 +205,7 @@ |
| #include "web/WebDataSourceImpl.h" |
| #include "web/WebDevToolsAgentPrivate.h" |
| #include "web/WebPluginContainerImpl.h" |
| +#include "web/WebRemoteFrameImpl.h" |
| #include "web/WebViewImpl.h" |
| #include "wtf/CurrentTime.h" |
| #include "wtf/HashMap.h" |
| @@ -1803,6 +1804,18 @@ void WebLocalFrameImpl::loadJavaScriptURL(const KURL& url) |
| frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResult, ownerDocument.get()); |
| } |
| +void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFrame) |
| +{ |
| + Frame* oldFrame = toCoreFrame(oldWebFrame); |
| + m_frame = LocalFrame::create(&m_frameLoaderClientImpl, oldFrame->host(), new PlaceholderFrameOwner()); |
|
dcheng
2014/10/15 21:14:35
Is PlaceholderFrameOwner the right one? Do we not
Nate Chapin
2014/10/15 21:27:31
I don't think we enforce them in the provisional s
Nate Chapin
2014/10/16 21:45:56
This function now creates the LocalFrame with a Pl
|
| + m_frame->tree().setName(oldFrame->tree().name()); |
| + setParent(oldWebFrame->parent()); |
| + // We must call init() after m_frame is assigned because it is referenced |
| + // during init(). Note that this may dispatch JS events; the frame may be |
| + // detached after init() returns. |
| + m_frame->init(); |
| +} |
| + |
| void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destinationURL) |
| { |
| ASSERT(frame()); |