mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-09 08:30:14 +01:00
alloy: Fix extension function registration for print preview dialog (fixes issue #3167)
This commit is contained in:
parent
9667789621
commit
4adc23a52a
@ -1518,6 +1518,18 @@ bool AlloyContentBrowserClient::ShouldAllowPluginCreation(
|
||||
return true;
|
||||
}
|
||||
|
||||
void AlloyContentBrowserClient::OnWebContentsCreated(
|
||||
content::WebContents* web_contents) {
|
||||
// Attach universal WebContentsObservers. These are quite rare, and in most
|
||||
// cases CefBrowserPlatformDelegateAlloy::BrowserCreated and/or
|
||||
// CefExtensionsAPIClient::AttachWebContentsHelpers should be used instead.
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
extensions::CefExtensionWebContentsObserver::CreateForWebContents(
|
||||
web_contents);
|
||||
}
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::IsFindInPageDisabledForOrigin(
|
||||
const url::Origin& origin) {
|
||||
// For PDF viewing with the PPAPI-free PDF Viewer, find-in-page should only
|
||||
|
@ -237,6 +237,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool ShouldAllowPluginCreation(
|
||||
const url::Origin& embedder_origin,
|
||||
const content::PepperPluginInfo& plugin_info) override;
|
||||
void OnWebContentsCreated(content::WebContents* web_contents) override;
|
||||
bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override;
|
||||
|
||||
CefRefPtr<CefRequestContextImpl> request_context() const;
|
||||
|
@ -179,9 +179,6 @@ void CefBrowserPlatformDelegateAlloy::BrowserCreated(
|
||||
printing::CefPrintViewManager::CreateForWebContents(web_contents_);
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
extensions::CefExtensionWebContentsObserver::CreateForWebContents(
|
||||
web_contents_);
|
||||
|
||||
// Used by the tabs extension API.
|
||||
zoom::ZoomController::CreateForWebContents(web_contents_);
|
||||
}
|
||||
|
@ -52,8 +52,6 @@ void CefExtensionsAPIClient::AttachWebContentsHelpers(
|
||||
PrefsTabHelper::CreateForWebContents(web_contents);
|
||||
printing::CefPrintViewManager::CreateForWebContents(web_contents);
|
||||
|
||||
CefExtensionWebContentsObserver::CreateForWebContents(web_contents);
|
||||
|
||||
// Used by the PDF extension.
|
||||
pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
|
||||
web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>(
|
||||
|
Loading…
x
Reference in New Issue
Block a user