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

Unified Diff: printing/print_settings_initializer_gtk.cc

Issue 6544028: Create a Factory for NativeMetafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ARM compile failure fix Created 9 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
« no previous file with comments | « printing/pdf_ps_metafile_cairo_unittest.cc ('k') | printing/printed_document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/print_settings_initializer_gtk.cc
diff --git a/printing/print_settings_initializer_gtk.cc b/printing/print_settings_initializer_gtk.cc
index 60ab530a7cdb4a9549c82ef2d87c1c57e6d95620..8a62929ffb9aa23b74c80172c4169610c950fcc7 100644
--- a/printing/print_settings_initializer_gtk.cc
+++ b/printing/print_settings_initializer_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,7 +9,7 @@
#include "base/string_piece.h"
#include "base/utf_string_conversions.h"
-#include "printing/native_metafile.h"
+#include "printing/pdf_ps_metafile_cairo.h"
#include "printing/print_settings.h"
#include "printing/units.h"
@@ -58,19 +58,19 @@ void PrintSettingsInitializerGtk::InitPrintSettings(
double page_width_in_pixel = 8.5 * dpi;
double page_height_in_pixel = 11.0 * dpi;
physical_size_device_units.SetSize(
- static_cast<int>(page_width_in_pixel),
- static_cast<int>(page_height_in_pixel));
+ static_cast<int>(page_width_in_pixel),
+ static_cast<int>(page_height_in_pixel));
printable_area_device_units.SetRect(
- static_cast<int>(
- NativeMetafile::kLeftMarginInInch * dpi),
- static_cast<int>(
- NativeMetafile::kTopMarginInInch * dpi),
- page_width_in_pixel -
- (NativeMetafile::kLeftMarginInInch +
- NativeMetafile::kRightMarginInInch) * dpi,
- page_height_in_pixel -
- (NativeMetafile::kTopMarginInInch +
- NativeMetafile::kBottomMarginInInch) * dpi);
+ static_cast<int>(
+ PdfPsMetafile::kLeftMarginInInch * dpi),
+ static_cast<int>(
+ PdfPsMetafile::kTopMarginInInch * dpi),
+ page_width_in_pixel -
+ (PdfPsMetafile::kLeftMarginInInch +
+ PdfPsMetafile::kRightMarginInInch) * dpi,
+ page_height_in_pixel -
+ (PdfPsMetafile::kTopMarginInInch +
+ PdfPsMetafile::kBottomMarginInInch) * dpi);
}
print_settings->set_dpi(dpi);
« no previous file with comments | « printing/pdf_ps_metafile_cairo_unittest.cc ('k') | printing/printed_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698