summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.h
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 20:01:27 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 20:01:27 +0000
commitc6321d8e201af8f7b91cd0b134d4ad32844f66c1 (patch)
tree3ed92a2f921e6165692c64bfad0b1582a76aad11 /webkit/glue/webframe_impl.h
parent891acc9b216198f8a143a8b0f1a0dada8d989299 (diff)
downloadchromium_src-c6321d8e201af8f7b91cd0b134d4ad32844f66c1.zip
chromium_src-c6321d8e201af8f7b91cd0b134d4ad32844f66c1.tar.gz
chromium_src-c6321d8e201af8f7b91cd0b134d4ad32844f66c1.tar.bz2
Rev 12100 changed the way that we spool and render printed output, most notably
introducing use of the PrintContext class. The existing PrintContext::spoolPage() method applies a webkit scaling factor before rendering output to the graphics context. ChromePrintContext::spoolPage() (in webframe_impl.cc), which is used by chromium instead of PrintContext::spoolPage(), does not apply this scaling factor, but instead eventually returns the scaling factor via WebFrame::PrintPage(). This is a problem for the Chromium Embedded Framework (CEF) because, unlike chromium, the CEF renders directly to the printer device context. It is therefore important for CEF that we retrieve and apply the webkit scaling factor before calling PrintPage(). In order to support this capability the following adds a WebFrame::GetPrintPageShrink() method. Patch contributed by Marshall Greenblatt <magreenblatt@gmail.com> Review: http://codereview.chromium.org/99058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.h')
-rw-r--r--webkit/glue/webframe_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index 3cf12f1..61162f7 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -179,6 +179,7 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
virtual bool BeginPrint(const WebKit::WebSize& page_size_px,
int* page_count);
+ virtual float GetPrintPageShrink(int page);
virtual float PrintPage(int page, skia::PlatformCanvas* canvas);
virtual void EndPrint();