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

Side by Side Diff: printing/printing_context.cc

Issue 11818062: Adds option to enable CSS backgrounds for printing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with trunk. Created 7 years, 11 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 unified diff | Download patch
« no previous file with comments | « printing/print_settings.cc ('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/printing_context.h" 5 #include "printing/printing_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "printing/page_setup.h" 9 #include "printing/page_setup.h"
10 #include "printing/page_size_margins.h" 10 #include "printing/page_size_margins.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 margins_in_points.top = page_size_margins.margin_top; 71 margins_in_points.top = page_size_margins.margin_top;
72 margins_in_points.bottom = page_size_margins.margin_bottom; 72 margins_in_points.bottom = page_size_margins.margin_bottom;
73 margins_in_points.left = page_size_margins.margin_left; 73 margins_in_points.left = page_size_margins.margin_left;
74 margins_in_points.right = page_size_margins.margin_right; 74 margins_in_points.right = page_size_margins.margin_right;
75 75
76 settings_.SetCustomMargins(margins_in_points); 76 settings_.SetCustomMargins(margins_in_points);
77 } 77 }
78 78
79 PrintingContext::Result result = UpdatePrinterSettings(job_settings, ranges); 79 PrintingContext::Result result = UpdatePrinterSettings(job_settings, ranges);
80 PrintSettingsInitializer::InitHeaderFooterStrings(job_settings, &settings_); 80 PrintSettingsInitializer::InitHeaderFooterStrings(job_settings, &settings_);
81
82 if (!job_settings.GetBoolean(kSettingShouldPrintBackgrounds,
83 &settings_.should_print_backgrounds)) {
84 NOTREACHED();
85 }
86
81 return result; 87 return result;
82 } 88 }
83 89
84 } // namespace printing 90 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698