| 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" | |
| 11 #include "base/string16.h" | |
| 12 #include "printing/page_range.h" | 10 #include "printing/page_range.h" |
| 13 #include "printing/page_setup.h" | 11 #include "printing/page_setup.h" |
| 14 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
| 15 | 13 |
| 16 namespace printing { | 14 namespace printing { |
| 17 | 15 |
| 18 // OS-independent print settings. | 16 // OS-independent print settings. |
| 19 class PrintSettings { | 17 class PrintSettings { |
| 20 public: | 18 public: |
| 21 PrintSettings(); | 19 PrintSettings(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool use_overlays; | 88 bool use_overlays; |
| 91 | 89 |
| 92 // Cookie generator. It is used to initialize PrintedDocument with its | 90 // Cookie generator. It is used to initialize PrintedDocument with its |
| 93 // associated PrintSettings, to be sure that each generated PrintedPage is | 91 // associated PrintSettings, to be sure that each generated PrintedPage is |
| 94 // correctly associated with its corresponding PrintedDocument. | 92 // correctly associated with its corresponding PrintedDocument. |
| 95 static int NewCookie(); | 93 static int NewCookie(); |
| 96 | 94 |
| 97 // Updates the orientation and flip the page if needed. | 95 // Updates the orientation and flip the page if needed. |
| 98 void SetOrientation(bool landscape); | 96 void SetOrientation(bool landscape); |
| 99 | 97 |
| 100 // Strings to be printed as headers and footers if requested by the user. | |
| 101 string16 date; | |
| 102 string16 title; | |
| 103 string16 url; | |
| 104 | |
| 105 // True if the user wants headers and footers to be displayed. | |
| 106 bool display_header_footer; | |
| 107 | |
| 108 private: | 98 private: |
| 109 ////////////////////////////////////////////////////////////////////////////// | 99 ////////////////////////////////////////////////////////////////////////////// |
| 110 // Settings that can't be changed without side-effects. | 100 // Settings that can't be changed without side-effects. |
| 111 | 101 |
| 112 // Printer name as shown to the user. | 102 // Printer name as shown to the user. |
| 113 std::wstring printer_name_; | 103 std::wstring printer_name_; |
| 114 | 104 |
| 115 // Printer device name as opened by the OS. | 105 // Printer device name as opened by the OS. |
| 116 std::wstring device_name_; | 106 std::wstring device_name_; |
| 117 | 107 |
| 118 // Page setup in device units. | 108 // Page setup in device units. |
| 119 PageSetup page_setup_device_units_; | 109 PageSetup page_setup_device_units_; |
| 120 | 110 |
| 121 // Printer's device effective dots per inch in both axis. | 111 // Printer's device effective dots per inch in both axis. |
| 122 int dpi_; | 112 int dpi_; |
| 123 | 113 |
| 124 // Is the orientation landscape or portrait. | 114 // Is the orientation landscape or portrait. |
| 125 bool landscape_; | 115 bool landscape_; |
| 126 | 116 |
| 127 // True if this printer supports AlphaBlend. | 117 // True if this printer supports AlphaBlend. |
| 128 bool supports_alpha_blend_; | 118 bool supports_alpha_blend_; |
| 129 }; | 119 }; |
| 130 | 120 |
| 131 } // namespace printing | 121 } // namespace printing |
| 132 | 122 |
| 133 #endif // PRINTING_PRINT_SETTINGS_H_ | 123 #endif // PRINTING_PRINT_SETTINGS_H_ |
| OLD | NEW |