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

Side by Side Diff: printing/print_settings.h

Issue 2392343003: Fix printing with XPS printers on Windows. (Closed)
Patch Set: memset, buffer size Created 4 years, 2 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 | « chrome/browser/printing/print_view_manager_base.cc ('k') | printing/print_settings.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef PRINTING_PRINT_SETTINGS_H_ 5 #ifndef PRINTING_PRINT_SETTINGS_H_
6 #define PRINTING_PRINT_SETTINGS_H_ 6 #define PRINTING_PRINT_SETTINGS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 int copies() const { return copies_; } 140 int copies() const { return copies_; }
141 141
142 void set_duplex_mode(DuplexMode duplex_mode) { duplex_mode_ = duplex_mode; } 142 void set_duplex_mode(DuplexMode duplex_mode) { duplex_mode_ = duplex_mode; }
143 DuplexMode duplex_mode() const { return duplex_mode_; } 143 DuplexMode duplex_mode() const { return duplex_mode_; }
144 144
145 int desired_dpi() const { return desired_dpi_; } 145 int desired_dpi() const { return desired_dpi_; }
146 146
147 #if defined(OS_WIN) 147 #if defined(OS_WIN)
148 void set_print_text_with_gdi(bool use_gdi) { print_text_with_gdi_ = use_gdi; } 148 void set_print_text_with_gdi(bool use_gdi) { print_text_with_gdi_ = use_gdi; }
149 bool print_text_with_gdi() const { return print_text_with_gdi_; } 149 bool print_text_with_gdi() const { return print_text_with_gdi_; }
150
151 void set_printer_is_xps(bool is_xps) { printer_is_xps_ = is_xps; }
152 bool printer_is_xps() const { return printer_is_xps_; }
150 #endif 153 #endif
151 154
152 // Cookie generator. It is used to initialize PrintedDocument with its 155 // Cookie generator. It is used to initialize PrintedDocument with its
153 // associated PrintSettings, to be sure that each generated PrintedPage is 156 // associated PrintSettings, to be sure that each generated PrintedPage is
154 // correctly associated with its corresponding PrintedDocument. 157 // correctly associated with its corresponding PrintedDocument.
155 static int NewCookie(); 158 static int NewCookie();
156 159
157 private: 160 private:
158 // Multi-page printing. Each PageRange describes a from-to page combination. 161 // Multi-page printing. Each PageRange describes a from-to page combination.
159 // This permits printing selected pages only. 162 // This permits printing selected pages only.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 208
206 // Is the orientation landscape or portrait. 209 // Is the orientation landscape or portrait.
207 bool landscape_; 210 bool landscape_;
208 211
209 // True if this printer supports AlphaBlend. 212 // True if this printer supports AlphaBlend.
210 bool supports_alpha_blend_; 213 bool supports_alpha_blend_;
211 214
212 #if defined(OS_WIN) 215 #if defined(OS_WIN)
213 // True to print text with GDI. 216 // True to print text with GDI.
214 bool print_text_with_gdi_; 217 bool print_text_with_gdi_;
218
219 // True if the printer is an XPS printer.
220 bool printer_is_xps_;
215 #endif 221 #endif
216 222
217 // If margin type is custom, this is what was requested. 223 // If margin type is custom, this is what was requested.
218 PageMargins requested_custom_margins_in_points_; 224 PageMargins requested_custom_margins_in_points_;
219 }; 225 };
220 226
221 } // namespace printing 227 } // namespace printing
222 228
223 #endif // PRINTING_PRINT_SETTINGS_H_ 229 #endif // PRINTING_PRINT_SETTINGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager_base.cc ('k') | printing/print_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698