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

Side by Side Diff: printing/printing_context.cc

Issue 2458833005: Move printing defines to buildflag system. (Closed)
Patch Set: Merge Created 4 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
« no previous file with comments | « printing/print_job_constants.cc ('k') | printing/printing_context_win.cc » ('j') | 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/features/features.h"
9 #include "printing/page_setup.h" 10 #include "printing/page_setup.h"
10 #include "printing/page_size_margins.h" 11 #include "printing/page_size_margins.h"
11 #include "printing/print_job_constants.h" 12 #include "printing/print_job_constants.h"
12 #include "printing/print_settings_conversion.h" 13 #include "printing/print_settings_conversion.h"
13 #include "printing/units.h" 14 #include "printing/units.h"
14 15
15 namespace printing { 16 namespace printing {
16 17
17 namespace { 18 namespace {
18 const float kCloudPrintMarginInch = 0.25; 19 const float kCloudPrintMarginInch = 0.25;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (print_to_cloud || print_with_privet) { 120 if (print_to_cloud || print_with_privet) {
120 paper_rect.Inset( 121 paper_rect.Inset(
121 kCloudPrintMarginInch * settings_.device_units_per_inch(), 122 kCloudPrintMarginInch * settings_.device_units_per_inch(),
122 kCloudPrintMarginInch * settings_.device_units_per_inch()); 123 kCloudPrintMarginInch * settings_.device_units_per_inch());
123 } 124 }
124 settings_.SetPrinterPrintableArea(paper_size, paper_rect, true); 125 settings_.SetPrinterPrintableArea(paper_size, paper_rect, true);
125 return OK; 126 return OK;
126 } 127 }
127 128
128 bool show_system_dialog = false; 129 bool show_system_dialog = false;
129 #if defined(ENABLE_BASIC_PRINTING) 130 #if BUILDFLAG(ENABLE_BASIC_PRINTING)
130 job_settings.GetBoolean(kSettingShowSystemDialog, &show_system_dialog); 131 job_settings.GetBoolean(kSettingShowSystemDialog, &show_system_dialog);
131 #endif 132 #endif
132 133
133 int page_count = 0; 134 int page_count = 0;
134 job_settings.GetInteger(kSettingPreviewPageCount, &page_count); 135 job_settings.GetInteger(kSettingPreviewPageCount, &page_count);
135 136
136 return UpdatePrinterSettings(open_in_external_preview, show_system_dialog, 137 return UpdatePrinterSettings(open_in_external_preview, show_system_dialog,
137 page_count); 138 page_count);
138 } 139 }
139 140
140 } // namespace printing 141 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_job_constants.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698