From a12552b019c9b03162fba54aa9f2f8398f0ea32c Mon Sep 17 00:00:00 2001 From: "hamaji@chromium.org" Date: Mon, 5 Jul 2010 06:45:21 +0000 Subject: 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 --- printing/printed_page.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'printing/printed_page.h') 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 { 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; -- cgit v1.1