Add CefPrintHandler::OnPrintStart callback (issue #1736)

This commit is contained in:
Marshall Greenblatt
2015-10-12 16:45:14 -04:00
parent f7d9457c20
commit 1f21fe5412
13 changed files with 143 additions and 9 deletions

View File

@@ -985,15 +985,7 @@ void CefContentBrowserClient::OverrideWebkitPrefs(
base::CommandLine::ForCurrentProcess();
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForHost(rvh);
if (!browser.get() && extensions::ExtensionsEnabled()) {
// Retrieve the owner browser, if any.
content::WebContents* owner = extensions::GetOwnerForGuestContents(
content::WebContents::FromRenderViewHost(rvh));
if (owner)
browser = CefBrowserHostImpl::GetBrowserForContents(owner);
}
extensions::GetOwnerBrowserForHost(rvh);
if (browser.get()) {
// Populate WebPreferences based on CefBrowserSettings.
BrowserToWebSettings(browser->settings(), *prefs);