Fix crash when using webview

This commit is contained in:
Cheng Zhao 2017-01-25 10:44:58 +09:00 committed by Kevin Sawicki
parent c72438f09f
commit 09fcb7fb27
2 changed files with 15 additions and 0 deletions

View file

@ -151,4 +151,16 @@ gfx::Size WebViewGuestDelegate::GetDefaultSize() const {
}
}
bool WebViewGuestDelegate::CanBeEmbeddedInsideCrossProcessFrames() {
return true;
}
content::RenderWidgetHost* WebViewGuestDelegate::GetOwnerRenderWidgetHost() {
return embedder_web_contents_->GetRenderViewHost()->GetWidget();
}
content::SiteInstance* WebViewGuestDelegate::GetOwnerSiteInstance() {
return embedder_web_contents_->GetSiteInstance();
}
} // namespace atom

View file

@ -59,6 +59,9 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate,
int element_instance_id,
bool is_full_page_plugin,
const base::Closure& completion_callback) final;
bool CanBeEmbeddedInsideCrossProcessFrames() override;
content::RenderWidgetHost* GetOwnerRenderWidgetHost() override;
content::SiteInstance* GetOwnerSiteInstance() override;
private:
// This method is invoked when the contents auto-resized to give the container