Linux: Fix CefPrintHandler callbacks from PDF viewer (fixes issue #2906)

This commit is contained in:
Mike Wiedenbauer 2020-04-02 21:26:14 +00:00 committed by Marshall Greenblatt
parent ea1324a9f1
commit f5c79bf50c
1 changed files with 4 additions and 2 deletions

View File

@ -58,8 +58,10 @@ content::WebContents* GetOwnerForGuestContents(content::WebContents* guest) {
static_cast<content::WebContentsImpl*>(guest); static_cast<content::WebContentsImpl*>(guest);
content::BrowserPluginGuest* plugin_guest = content::BrowserPluginGuest* plugin_guest =
guest_impl->GetBrowserPluginGuest(); guest_impl->GetBrowserPluginGuest();
if (plugin_guest) if (plugin_guest) {
return plugin_guest->embedder_web_contents(); return content::WebContents::FromRenderFrameHost(
plugin_guest->GetEmbedderFrame());
}
// Maybe it's a print preview dialog. // Maybe it's a print preview dialog.
auto print_preview_controller = auto print_preview_controller =