OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 // OS-independent print settings. | 29 // OS-independent print settings. |
30 class PRINTING_EXPORT PrintSettings { | 30 class PRINTING_EXPORT PrintSettings { |
31 public: | 31 public: |
32 PrintSettings(); | 32 PrintSettings(); |
33 ~PrintSettings(); | 33 ~PrintSettings(); |
34 | 34 |
35 // Reinitialize the settings to the default values. | 35 // Reinitialize the settings to the default values. |
36 void Clear(); | 36 void Clear(); |
37 | 37 |
38 void SetCustomMargins(const PageMargins& requested_margins_in_points); | 38 void SetCustomMargins(const PageMargins& requested_margins_in_points); |
| 39 const PageMargins& requested_custom_margins_in_points() const { |
| 40 return requested_custom_margins_in_points_; |
| 41 } |
39 void set_margin_type(MarginType margin_type) { margin_type_ = margin_type; } | 42 void set_margin_type(MarginType margin_type) { margin_type_ = margin_type; } |
40 MarginType margin_type() const { return margin_type_; } | 43 MarginType margin_type() const { return margin_type_; } |
41 | 44 |
42 // Updates the orientation and flip the page if needed. | 45 // Updates the orientation and flip the page if needed. |
43 void SetOrientation(bool landscape); | 46 void SetOrientation(bool landscape); |
44 bool landscape() const { return landscape_; } | 47 bool landscape() const { return landscape_; } |
45 | 48 |
46 // Set printer printable area in in device units. | 49 // Set printer printable area in in device units. |
47 // Some platforms already provide flipped area. Set |landscape_needs_flip| | 50 // Some platforms already provide flipped area. Set |landscape_needs_flip| |
48 // to false on those platforms to avoid double flipping. | 51 // to false on those platforms to avoid double flipping. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // True if this printer supports AlphaBlend. | 189 // True if this printer supports AlphaBlend. |
187 bool supports_alpha_blend_; | 190 bool supports_alpha_blend_; |
188 | 191 |
189 // If margin type is custom, this is what was requested. | 192 // If margin type is custom, this is what was requested. |
190 PageMargins requested_custom_margins_in_points_; | 193 PageMargins requested_custom_margins_in_points_; |
191 }; | 194 }; |
192 | 195 |
193 } // namespace printing | 196 } // namespace printing |
194 | 197 |
195 #endif // PRINTING_PRINT_SETTINGS_H_ | 198 #endif // PRINTING_PRINT_SETTINGS_H_ |
OLD | NEW |