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

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: Address nits 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
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | printing/page_setup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/page_setup.h
diff --git a/printing/page_setup.h b/printing/page_setup.h
index 7f338931a62f95f007bfb0b992e9318bd01306f6..ef1552d0e73e1f2188a84f3b3721e4173d6a8d21 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 constraint of |bounds|.
+ void CalculateSizesWithinRect(const gfx::Rect& bounds);
+
// Physical size of the page, including non-printable margins.
gfx::Size physical_size_;
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | printing/page_setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698