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

Unified Diff: chrome/browser/printing/print_settings.cc

Issue 21475: Move units to new module printing. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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: chrome/browser/printing/print_settings.cc
===================================================================
--- chrome/browser/printing/print_settings.cc (revision 10032)
+++ chrome/browser/printing/print_settings.cc (working copy)
@@ -6,7 +6,7 @@
#include "base/atomic_sequence_num.h"
#include "base/logging.h"
-#include "chrome/browser/printing/units.h"
+#include "printing/units.h"
brettw 2009/02/20 17:22:05 Move down one.
#include "chrome/common/render_messages.h"
namespace printing {
@@ -65,7 +65,8 @@
GetDeviceCaps(hdc, HORZRES),
GetDeviceCaps(hdc, VERTRES));
// Hard-code text_height = 0.5cm = ~1/5 of inch
- page_setup_pixels_.Init(physical_size_pixels, printable_area_pixels,
+ page_setup_pixels_.Init(physical_size_pixels,
+ printable_area_pixels,
ConvertUnit(500, kHundrethsMMPerInch, dpi_));
// Initialize page_setup_cmm_.
@@ -104,16 +105,21 @@
// Converts the margins in dpi unit and apply those too.
PageMargins pixels_margins;
- pixels_margins.header = ConvertUnit(new_margins.header, kHundrethsMMPerInch,
+ pixels_margins.header = ConvertUnit(new_margins.header,
+ kHundrethsMMPerInch,
dpi_);
- pixels_margins.footer = ConvertUnit(new_margins.footer, kHundrethsMMPerInch,
+ pixels_margins.footer = ConvertUnit(new_margins.footer,
+ kHundrethsMMPerInch,
dpi_);
- pixels_margins.left = ConvertUnit(new_margins.left, kHundrethsMMPerInch,
+ pixels_margins.left = ConvertUnit(new_margins.left,
+ kHundrethsMMPerInch,
dpi_);
pixels_margins.top = ConvertUnit(new_margins.top, kHundrethsMMPerInch, dpi_);
- pixels_margins.right = ConvertUnit(new_margins.right, kHundrethsMMPerInch,
+ pixels_margins.right = ConvertUnit(new_margins.right,
+ kHundrethsMMPerInch,
dpi_);
- pixels_margins.bottom = ConvertUnit(new_margins.bottom, kHundrethsMMPerInch,
+ pixels_margins.bottom = ConvertUnit(new_margins.bottom,
+ kHundrethsMMPerInch,
dpi_);
page_setup_pixels_.SetRequestedMargins(pixels_margins);
}

Powered by Google App Engine
This is Rietveld 408576698