mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
alloy: Fix extension function registration for print preview dialog (fixes issue #3167)
This commit is contained in:
@ -1518,6 +1518,18 @@ bool AlloyContentBrowserClient::ShouldAllowPluginCreation(
|
|||||||
return true;
|
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(
|
bool AlloyContentBrowserClient::IsFindInPageDisabledForOrigin(
|
||||||
const url::Origin& origin) {
|
const url::Origin& origin) {
|
||||||
// For PDF viewing with the PPAPI-free PDF Viewer, find-in-page should only
|
// 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(
|
bool ShouldAllowPluginCreation(
|
||||||
const url::Origin& embedder_origin,
|
const url::Origin& embedder_origin,
|
||||||
const content::PepperPluginInfo& plugin_info) override;
|
const content::PepperPluginInfo& plugin_info) override;
|
||||||
|
void OnWebContentsCreated(content::WebContents* web_contents) override;
|
||||||
bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override;
|
bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override;
|
||||||
|
|
||||||
CefRefPtr<CefRequestContextImpl> request_context() const;
|
CefRefPtr<CefRequestContextImpl> request_context() const;
|
||||||
|
@ -179,9 +179,6 @@ void CefBrowserPlatformDelegateAlloy::BrowserCreated(
|
|||||||
printing::CefPrintViewManager::CreateForWebContents(web_contents_);
|
printing::CefPrintViewManager::CreateForWebContents(web_contents_);
|
||||||
|
|
||||||
if (extensions::ExtensionsEnabled()) {
|
if (extensions::ExtensionsEnabled()) {
|
||||||
extensions::CefExtensionWebContentsObserver::CreateForWebContents(
|
|
||||||
web_contents_);
|
|
||||||
|
|
||||||
// Used by the tabs extension API.
|
// Used by the tabs extension API.
|
||||||
zoom::ZoomController::CreateForWebContents(web_contents_);
|
zoom::ZoomController::CreateForWebContents(web_contents_);
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,6 @@ void CefExtensionsAPIClient::AttachWebContentsHelpers(
|
|||||||
PrefsTabHelper::CreateForWebContents(web_contents);
|
PrefsTabHelper::CreateForWebContents(web_contents);
|
||||||
printing::CefPrintViewManager::CreateForWebContents(web_contents);
|
printing::CefPrintViewManager::CreateForWebContents(web_contents);
|
||||||
|
|
||||||
CefExtensionWebContentsObserver::CreateForWebContents(web_contents);
|
|
||||||
|
|
||||||
// Used by the PDF extension.
|
// Used by the PDF extension.
|
||||||
pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
|
pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
|
||||||
web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>(
|
web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>(
|
||||||
|
Reference in New Issue
Block a user