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

Unified Diff: printing/print_settings.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 | « printing/print_dialog_gtk_interface.h ('k') | printing/print_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/print_settings.h
diff --git a/printing/print_settings.h b/printing/print_settings.h
index d73fd661041a3665825af62f9a7b2e8a361e717b..31417de288fbb9c3901578c6c3652407d1e777bb 100644
--- a/printing/print_settings.h
+++ b/printing/print_settings.h
@@ -11,6 +11,7 @@
#include "base/string16.h"
#include "printing/page_range.h"
#include "printing/page_setup.h"
+#include "printing/print_job_constants.h"
#include "printing/printing_export.h"
#include "ui/gfx/rect.h"
@@ -40,6 +41,8 @@ class PRINTING_EXPORT PrintSettings {
gfx::Rect const& printable_area_device_units,
int units_per_inch);
+ void SetCustomMargins(const PageMargins& margins_in_points);
+
// Equality operator.
// NOTE: printer_name is NOT tested for equality since it doesn't affect the
// output.
@@ -95,10 +98,8 @@ class PRINTING_EXPORT PrintSettings {
// Indicates if the user only wants to print the current selection.
bool selection_only;
- // Indicates whether we should use browser-controlled page overlays
- // (header, footer, margins etc). If it is false, the overlays are
- // controlled by the renderer.
- bool use_overlays;
+ // Indicates what kind of margins should be applied to the printable area.
+ MarginType margin_type;
// Cookie generator. It is used to initialize PrintedDocument with its
// associated PrintSettings, to be sure that each generated PrintedPage is
@@ -137,6 +138,9 @@ class PRINTING_EXPORT PrintSettings {
// True if this printer supports AlphaBlend.
bool supports_alpha_blend_;
+
+ // If margin type is custom, these are the margins.
+ PageMargins custom_margins_in_points_;
};
} // namespace printing
« no previous file with comments | « printing/print_dialog_gtk_interface.h ('k') | printing/print_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698