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