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

Unified Diff: components/plugins/renderer/webview_plugin.cc

Issue 2389493002: Revert of Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: Created 4 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 | « components/plugins/renderer/webview_plugin.h ('k') | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index af1d9199bf4b10412bdc5a4b011f463bfd0f6e60..506bc212263ea289dd7b08aa1724516c709e7596 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -62,12 +62,13 @@
// ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
// consistent view of our preferences.
content::RenderView::ApplyWebPreferences(preferences, web_view_);
- WebLocalFrame* web_frame = WebLocalFrame::create(
+ WebLocalFrame* web_local_frame = WebLocalFrame::create(
blink::WebTreeScopeType::Document, &web_frame_client_);
- web_view_->setMainFrame(web_frame);
+ web_frame_ = web_local_frame;
+ web_view_->setMainFrame(web_frame_);
// TODO(dcheng): The main frame widget currently has a special case.
// Eliminate this once WebView is no longer a WebWidget.
- WebFrameWidget::create(this, web_view_, web_frame);
+ web_frame_widget_ = WebFrameWidget::create(this, web_view_, web_local_frame);
}
// static
@@ -84,7 +85,9 @@
WebViewPlugin::~WebViewPlugin() {
DCHECK(!weak_factory_.HasWeakPtrs());
+ web_frame_widget_->close();
web_view_->close();
+ web_frame_->close();
}
WebPluginContainer* WebViewPlugin::container() const { return container_; }
« no previous file with comments | « components/plugins/renderer/webview_plugin.h ('k') | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698