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

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: Add WebViewHelper for unittests. 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
Index: Source/web/WebHelperPluginImpl.cpp
diff --git a/Source/web/WebHelperPluginImpl.cpp b/Source/web/WebHelperPluginImpl.cpp
index 8c8197482ffa061298f97bfc5122111cfde9dcba..a6901f75fc2c8927bc88d745c98641dcf667f163 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 = static_cast<WebFrameImpl*>(WebFrame::create(client));
darin (slow to review) 2013/09/13 04:02:47 perhaps this guy should just use WebFrameImpl::cre
awong 2013/09/18 22:04:47 Done.
+ m_mainFrame->initializeAsMainFrame(m_page.get());
}
// Returns a pointer to the WebPlugin by finding the single <object> tag in the page.

Powered by Google App Engine
This is Rietveld 408576698