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

Unified Diff: printing/page_setup.h

Issue 8201027: Move margin processing code to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issue that turned up on Windows Created 9 years, 2 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
Index: printing/page_setup.h
diff --git a/printing/page_setup.h b/printing/page_setup.h
index 7f338931a62f95f007bfb0b992e9318bd01306f6..3fe6e9e2c00ca53c34468b3a49589e9db6bf1af9 100644
--- a/printing/page_setup.h
+++ b/printing/page_setup.h
@@ -46,8 +46,12 @@ class PRINTING_EXPORT PageSetup {
void Init(const gfx::Size& physical_size, const gfx::Rect& printable_area,
int text_height);
+ // Use |requested_margins| as long as they fall inside the printable area.
void SetRequestedMargins(const PageMargins& requested_margins);
+ // Ignore the printable area, and set the margins to |requested_margins|.
+ void ForceRequestedMargins(const PageMargins& requested_margins);
+
// Flips the orientation of the page and recalculates all page areas.
void FlipOrientation();
@@ -60,6 +64,10 @@ class PRINTING_EXPORT PageSetup {
}
private:
+ // Calculate overlay_area_, effective_margins_, and content_area_, based on
+ // a contstraint of |printable_area|
Lei Zhang 2011/10/15 03:42:19 nit: contstraint -> constraint, printable_area ->
vandebo (ex-Chrome) 2011/10/15 20:52:08 Done.
+ void CalculateSizesWithinRect(const gfx::Rect& bounds);
+
// Physical size of the page, including non-printable margins.
gfx::Size physical_size_;

Powered by Google App Engine
This is Rietveld 408576698