Add print preview support (see issue #123)

Pass the `--enable-print-preview` command-line flag to enable. Currently only
supported on Windows and Linux.
This commit is contained in:
Ananyo Maiti
2019-07-17 14:47:27 -04:00
committed by Marshall Greenblatt
parent cf87c88b05
commit 1669c0afbd
49 changed files with 1098 additions and 1425 deletions

View File

@@ -70,8 +70,11 @@ void CefBrowserViewImpl::WebContentsCreated(
root_view()->SetWebContents(web_contents);
}
void CefBrowserViewImpl::BrowserCreated(CefBrowserHostImpl* browser) {
void CefBrowserViewImpl::BrowserCreated(
CefBrowserHostImpl* browser,
base::RepeatingClosure on_bounds_changed) {
browser_ = browser;
on_bounds_changed_ = on_bounds_changed;
}
void CefBrowserViewImpl::BrowserDestroyed(CefBrowserHostImpl* browser) {
@@ -165,6 +168,11 @@ void CefBrowserViewImpl::OnBrowserViewAdded() {
}
}
void CefBrowserViewImpl::OnBoundsChanged() {
if (!on_bounds_changed_.is_null())
on_bounds_changed_.Run();
}
CefBrowserViewImpl::CefBrowserViewImpl(
CefRefPtr<CefBrowserViewDelegate> delegate)
: ParentClass(delegate) {}