Fix link navigation from PDF files (fixes issue #2952)

Navigations initiated from a guest view will now be routed to the
OpenURLFromTab callback.
This commit is contained in:
Marshall Greenblatt
2020-07-23 14:41:56 -04:00
parent 99d66db930
commit ac99621829
3 changed files with 56 additions and 21 deletions

View File

@@ -25,6 +25,7 @@ struct WebWindowFeatures;
}
namespace content {
struct OpenURLParams;
struct Referrer;
class RenderFrameHost;
class RenderViewHostDelegateView;
@@ -138,6 +139,13 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
typedef std::list<scoped_refptr<CefBrowserInfo>> BrowserInfoList;
BrowserInfoList GetBrowserInfoList();
// Returns true if the navigation should be allowed to proceed, or false if
// the navigation will instead be sent via OpenURLFromTab. If allowed,
// |browser| will be set to the target browser.
bool MaybeAllowNavigation(content::RenderFrameHost* opener,
const content::OpenURLParams& params,
CefRefPtr<CefBrowserHostImpl>& browser) const;
private:
// RenderProcessHostObserver methods:
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;