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

Unified Diff: printing/page_setup.h

Issue 8351063: PrintPreview: [LINUX] Update the margin values after flipping the paper orientation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | printing/page_setup.cc » ('j') | printing/page_setup.cc » ('J')
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 91734753acaacda210fd2ee5a248a0ad6b4d3f4b..575dd9e85e6f5874f33c2d1e88b4fe5c494986f4 100644
--- a/printing/page_setup.h
+++ b/printing/page_setup.h
@@ -15,6 +15,9 @@ class PRINTING_EXPORT PageMargins {
public:
PageMargins();
+ // Rotates the margin values in anti-clockwise direction.
+ void Rotate();
+
void Clear();
// Equality operator.
@@ -64,6 +67,9 @@ class PRINTING_EXPORT PageSetup {
}
private:
+ // Store |requested_margins_| and update page setup values.
+ void SetRequestedMarginsAndUpdateValues(const PageMargins& requested_margins);
vandebo (ex-Chrome) 2011/11/03 21:12:57 nit: SetRequestedMarginsAndCalculateSizes
kmadhusu 2011/11/03 22:37:39 Done.
+
// Calculate overlay_area_, effective_margins_, and content_area_, based on
// a constraint of |bounds| and |text_height|.
void CalculateSizesWithinRect(const gfx::Rect& bounds, int text_height);
@@ -87,6 +93,9 @@ class PRINTING_EXPORT PageSetup {
// Requested margins.
PageMargins requested_margins_;
+ // True when |effective_margins_| respects |printable_area_| else false.
+ bool forced_margins_;
+
// Space that must be kept free for the overlays.
int text_height_;
};
« no previous file with comments | « no previous file | printing/page_setup.cc » ('j') | printing/page_setup.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698