Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1391)

Unified Diff: printing/printed_page.h

Issue 2878022: Add PrintedPage::GetCenteredPageContentRect so Mac and Win can share code. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: remove #include for gtest Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « printing/printed_document_win.cc ('k') | printing/printed_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printed_page.h
diff --git a/printing/printed_page.h b/printing/printed_page.h
index 17181c699a3659120ed0837e3e6d2ebd403dddfb..65df888a89773bcf5cd03a7d79b9ab80b9d88db9 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>;
« no previous file with comments | « printing/printed_document_win.cc ('k') | printing/printed_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698