mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
alloy: Add support for the new non-PPAPI PDF viewer (see issue #3047)
Enable by passing `--enable-features=PdfUnseasoned` on the command line.
This commit is contained in:
@ -780,11 +780,14 @@ bool AlloyBrowserHostImpl::MaybeAllowNavigation(
|
||||
content::RenderFrameHost* opener,
|
||||
bool is_guest_view,
|
||||
const content::OpenURLParams& params) {
|
||||
if (is_guest_view && !params.url.SchemeIs(extensions::kExtensionScheme) &&
|
||||
if (is_guest_view && !params.is_pdf &&
|
||||
!params.url.SchemeIs(extensions::kExtensionScheme) &&
|
||||
!params.url.SchemeIs(content::kChromeUIScheme)) {
|
||||
// The PDF viewer will load the PDF extension in the guest view, and print
|
||||
// preview will load chrome://print in the guest view. All other navigations
|
||||
// are passed to the owner browser.
|
||||
// preview will load chrome://print in the guest view. The PDF renderer
|
||||
// used with PdfUnseasoned will set |params.is_pdf| when loading the PDF
|
||||
// stream (see PdfNavigationThrottle::WillStartRequest). All other
|
||||
// navigations are passed to the owner browser.
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(
|
||||
base::IgnoreResult(&AlloyBrowserHostImpl::OpenURLFromTab),
|
||||
|
Reference in New Issue
Block a user