diff options
author | hamaji@chromium.org <hamaji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-05 06:45:21 +0000 |
---|---|---|
committer | hamaji@chromium.org <hamaji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-05 06:45:21 +0000 |
commit | a12552b019c9b03162fba54aa9f2f8398f0ea32c (patch) | |
tree | 64a1b64484b0e1eb68a9c25bf96f502d3ab792f4 /printing/printed_page.h | |
parent | 1322d8777c7c76eae42500407ec55adbc5e5187e (diff) | |
download | chromium_src-a12552b019c9b03162fba54aa9f2f8398f0ea32c.zip chromium_src-a12552b019c9b03162fba54aa9f2f8398f0ea32c.tar.gz chromium_src-a12552b019c9b03162fba54aa9f2f8398f0ea32c.tar.bz2 |
Add PrintedPage::GetCenteredPageContentRect so Mac and Win can share code.
BUG=47277
TEST=printed_page_unittest
Review URL: http://codereview.chromium.org/2878022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printed_page.h')
-rw-r--r-- | printing/printed_page.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/printing/printed_page.h b/printing/printed_page.h index 17181c6..65df888 100644 --- a/printing/printed_page.h +++ b/printing/printed_page.h @@ -34,6 +34,11 @@ class PrintedPage : public base::RefCountedThreadSafe<PrintedPage> { const gfx::Rect& page_content_rect() const { return page_content_rect_; } bool has_visible_overlays() const { return has_visible_overlays_; } + // Get page content rect adjusted based on + // http://dev.w3.org/csswg/css3-page/#positioning-page-box + void GetCenteredPageContentRect(const gfx::Size& paper_size, + gfx::Rect* content_rect) const; + private: friend class base::RefCountedThreadSafe<PrintedPage>; |