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

Side by Side Diff: printing/print_settings.h

Issue 8342059: Clarify that the custom margin value is not validated and add tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « printing/page_setup_unittest.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) 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 #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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 23 matching lines...) Expand all
34 ~PrintSettings(); 34 ~PrintSettings();
35 35
36 // Reinitialize the settings to the default values. 36 // Reinitialize the settings to the default values.
37 void Clear(); 37 void Clear();
38 38
39 // Set printer printable area in in device units. 39 // Set printer printable area in in device units.
40 void SetPrinterPrintableArea(gfx::Size const& physical_size_device_units, 40 void SetPrinterPrintableArea(gfx::Size const& physical_size_device_units,
41 gfx::Rect const& printable_area_device_units, 41 gfx::Rect const& printable_area_device_units,
42 int units_per_inch); 42 int units_per_inch);
43 43
44 void SetCustomMargins(const PageMargins& margins_in_points); 44 void SetCustomMargins(const PageMargins& requested_margins_in_points);
45 45
46 // Equality operator. 46 // Equality operator.
47 // NOTE: printer_name is NOT tested for equality since it doesn't affect the 47 // NOTE: printer_name is NOT tested for equality since it doesn't affect the
48 // output. 48 // output.
49 bool Equals(const PrintSettings& rhs) const; 49 bool Equals(const PrintSettings& rhs) const;
50 50
51 void set_landscape(bool landscape) { landscape_ = landscape; } 51 void set_landscape(bool landscape) { landscape_ = landscape; }
52 void set_printer_name(const string16& printer_name) { 52 void set_printer_name(const string16& printer_name) {
53 printer_name_ = printer_name; 53 printer_name_ = printer_name;
54 } 54 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 // Printer's device effective dots per inch in both axis. 133 // Printer's device effective dots per inch in both axis.
134 int dpi_; 134 int dpi_;
135 135
136 // Is the orientation landscape or portrait. 136 // Is the orientation landscape or portrait.
137 bool landscape_; 137 bool landscape_;
138 138
139 // True if this printer supports AlphaBlend. 139 // True if this printer supports AlphaBlend.
140 bool supports_alpha_blend_; 140 bool supports_alpha_blend_;
141 141
142 // If margin type is custom, these are the margins. 142 // If margin type is custom, this is what was requested.
143 PageMargins custom_margins_in_points_; 143 PageMargins requested_custom_margins_in_points_;
144 }; 144 };
145 145
146 } // namespace printing 146 } // namespace printing
147 147
148 #endif // PRINTING_PRINT_SETTINGS_H_ 148 #endif // PRINTING_PRINT_SETTINGS_H_
OLDNEW
« no previous file with comments | « printing/page_setup_unittest.cc ('k') | printing/print_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698