| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 void SetPrinterPrintableArea(gfx::Size const& physical_size_device_units, | 28 void SetPrinterPrintableArea(gfx::Size const& physical_size_device_units, |
| 29 gfx::Rect const& printable_area_device_units, | 29 gfx::Rect const& printable_area_device_units, |
| 30 int units_per_inch); | 30 int units_per_inch); |
| 31 | 31 |
| 32 // Equality operator. | 32 // Equality operator. |
| 33 // NOTE: printer_name is NOT tested for equality since it doesn't affect the | 33 // NOTE: printer_name is NOT tested for equality since it doesn't affect the |
| 34 // output. | 34 // output. |
| 35 bool Equals(const PrintSettings& rhs) const; | 35 bool Equals(const PrintSettings& rhs) const; |
| 36 | 36 |
| 37 void set_landscape(bool landscape) { landscape_ = landscape; } | 37 void set_landscape(bool landscape) { landscape_ = landscape; } |
| 38 void set_printer_name(const std::wstring& printer_name) { | 38 void set_printer_name(const string16& printer_name) { |
| 39 printer_name_ = printer_name; | 39 printer_name_ = printer_name; |
| 40 } | 40 } |
| 41 const std::wstring& printer_name() const { return printer_name_; } | 41 const string16& printer_name() const { return printer_name_; } |
| 42 void set_device_name(const std::wstring& device_name) { | 42 void set_device_name(const string16& device_name) { |
| 43 device_name_ = device_name; | 43 device_name_ = device_name; |
| 44 } | 44 } |
| 45 const std::wstring& device_name() const { return device_name_; } | 45 const string16& device_name() const { return device_name_; } |
| 46 void set_dpi(int dpi) { dpi_ = dpi; } | 46 void set_dpi(int dpi) { dpi_ = dpi; } |
| 47 int dpi() const { return dpi_; } | 47 int dpi() const { return dpi_; } |
| 48 void set_supports_alpha_blend(bool supports_alpha_blend) { | 48 void set_supports_alpha_blend(bool supports_alpha_blend) { |
| 49 supports_alpha_blend_ = supports_alpha_blend; | 49 supports_alpha_blend_ = supports_alpha_blend; |
| 50 } | 50 } |
| 51 bool supports_alpha_blend() const { return supports_alpha_blend_; } | 51 bool supports_alpha_blend() const { return supports_alpha_blend_; } |
| 52 const PageSetup& page_setup_device_units() const { | 52 const PageSetup& page_setup_device_units() const { |
| 53 return page_setup_device_units_; | 53 return page_setup_device_units_; |
| 54 } | 54 } |
| 55 int device_units_per_inch() const { | 55 int device_units_per_inch() const { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 string16 url; | 103 string16 url; |
| 104 | 104 |
| 105 // True if the user wants headers and footers to be displayed. | 105 // True if the user wants headers and footers to be displayed. |
| 106 bool display_header_footer; | 106 bool display_header_footer; |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 ////////////////////////////////////////////////////////////////////////////// | 109 ////////////////////////////////////////////////////////////////////////////// |
| 110 // Settings that can't be changed without side-effects. | 110 // Settings that can't be changed without side-effects. |
| 111 | 111 |
| 112 // Printer name as shown to the user. | 112 // Printer name as shown to the user. |
| 113 std::wstring printer_name_; | 113 string16 printer_name_; |
| 114 | 114 |
| 115 // Printer device name as opened by the OS. | 115 // Printer device name as opened by the OS. |
| 116 std::wstring device_name_; | 116 string16 device_name_; |
| 117 | 117 |
| 118 // Page setup in device units. | 118 // Page setup in device units. |
| 119 PageSetup page_setup_device_units_; | 119 PageSetup page_setup_device_units_; |
| 120 | 120 |
| 121 // Printer's device effective dots per inch in both axis. | 121 // Printer's device effective dots per inch in both axis. |
| 122 int dpi_; | 122 int dpi_; |
| 123 | 123 |
| 124 // Is the orientation landscape or portrait. | 124 // Is the orientation landscape or portrait. |
| 125 bool landscape_; | 125 bool landscape_; |
| 126 | 126 |
| 127 // True if this printer supports AlphaBlend. | 127 // True if this printer supports AlphaBlend. |
| 128 bool supports_alpha_blend_; | 128 bool supports_alpha_blend_; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace printing | 131 } // namespace printing |
| 132 | 132 |
| 133 #endif // PRINTING_PRINT_SETTINGS_H_ | 133 #endif // PRINTING_PRINT_SETTINGS_H_ |
| OLD | NEW |