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

Unified Diff: Source/web/WebHelperPluginImpl.cpp

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix lifetime on frame detach Created 7 years, 3 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/WebHelperPluginImpl.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebHelperPluginImpl.cpp
diff --git a/Source/web/WebHelperPluginImpl.cpp b/Source/web/WebHelperPluginImpl.cpp
index 8c8197482ffa061298f97bfc5122111cfde9dcba..50c147ff889d0ebcc73d67ef3e51182a417cdd0f 100644
--- a/Source/web/WebHelperPluginImpl.cpp
+++ b/Source/web/WebHelperPluginImpl.cpp
@@ -109,6 +109,7 @@ private:
WebHelperPluginImpl::WebHelperPluginImpl(WebWidgetClient* client)
: m_widgetClient(client)
, m_webView(0)
+ , m_mainFrame(0)
{
ASSERT(client);
}
@@ -143,13 +144,14 @@ void WebHelperPluginImpl::closeHelperPlugin()
// closeWidgetSoon() will call this->close() later.
m_widgetClient->closeWidgetSoon();
}
+ m_mainFrame->close();
}
void WebHelperPluginImpl::initializeFrame(WebFrameClient* client)
{
ASSERT(m_page);
- RefPtr<WebFrameImpl> frame = WebFrameImpl::create(client);
- frame->initializeAsMainFrame(m_page.get());
+ m_mainFrame = WebFrameImpl::create(client);
+ m_mainFrame->initializeAsMainFrame(m_page.get());
}
// Returns a pointer to the WebPlugin by finding the single <object> tag in the page.
« no previous file with comments | « Source/web/WebHelperPluginImpl.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698