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

Side by Side Diff: printing/units.cc

Issue 11316066: Merge 167311 - Print headers and footers with WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/units.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/units.h" 5 #include "printing/units.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "printing/print_job_constants.h" 8 #include "printing/print_job_constants.h"
9 9
10 namespace printing { 10 namespace printing {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 double ConvertPixelsToPointDouble(double pixels) { 47 double ConvertPixelsToPointDouble(double pixels) {
48 return ConvertUnitDouble(pixels, kPixelsPerInch, kPointsPerInch); 48 return ConvertUnitDouble(pixels, kPixelsPerInch, kPointsPerInch);
49 } 49 }
50 50
51 double ConvertPointsToPixelDouble(double points) { 51 double ConvertPointsToPixelDouble(double points) {
52 return ConvertUnitDouble(points, kPointsPerInch, kPixelsPerInch); 52 return ConvertUnitDouble(points, kPointsPerInch, kPixelsPerInch);
53 } 53 }
54 54
55 double GetHeaderFooterSegmentWidth(double page_width) {
56 // Interstice is left at both ends of the page as well as between
57 // each region, so 1 is added.
58 double total_interstice_width = (kSettingHeaderFooterHorizontalRegions + 1) *
59 kSettingHeaderFooterInterstice;
60 return (page_width - total_interstice_width) /
61 kSettingHeaderFooterHorizontalRegions;
62 }
63
64 } // namespace printing 55 } // namespace printing
OLDNEW
« no previous file with comments | « printing/units.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698