Chromium Code Reviews| Index: components/plugins/renderer/webview_plugin.cc |
| diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc |
| index 3bb9a8acf1222bb36acab4b5ef9dcab588a4066d..43823a2813814d18de746894d3919b865608fd6b 100644 |
| --- a/components/plugins/renderer/webview_plugin.cc |
| +++ b/components/plugins/renderer/webview_plugin.cc |
| @@ -350,6 +350,17 @@ void WebViewPlugin::WebViewHelper::DidClearWindowObject() { |
| plugin_->delegate_->GetV8Handle(isolate)); |
| } |
| +void WebViewPlugin::WebViewHelper::FrameDetached(blink::WebLocalFrame* frame, |
| + DetachType type) { |
| + if (type == DetachType::kRemove && frame->Parent()) |
|
dcheng
2017/05/11 21:17:11
Actually I think this one doesn't need the RemoveC
sashab
2017/05/15 02:18:01
Removed, thanks.
|
| + frame->Parent()->RemoveChild(frame); |
| + |
| + if (frame->FrameWidget()) |
| + frame->FrameWidget()->Close(); |
| + |
| + frame->Close(); |
| +} |
| + |
| void WebViewPlugin::OnZoomLevelChanged() { |
| if (container_) { |
| web_view()->SetZoomLevel( |