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_INITIALIZER_H_ | 5 #ifndef PRINTING_PRINT_SETTINGS_CONVERSION_H_ |
6 #define PRINTING_PRINT_SETTINGS_INITIALIZER_H_ | 6 #define PRINTING_PRINT_SETTINGS_CONVERSION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "printing/page_range.h" | 10 #include "printing/page_range.h" |
11 #include "printing/printing_export.h" | 11 #include "printing/printing_export.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class DictionaryValue; | 14 class DictionaryValue; |
15 } | 15 } |
16 | 16 |
17 namespace printing { | 17 namespace printing { |
18 | 18 |
19 class PrintSettings; | 19 class PrintSettings; |
20 | 20 |
21 // Initializes the header footer strings in the PrintSettings object from the | 21 bool PrintSettingsFromJobSettings(const base::DictionaryValue& job_settings, |
22 // provided |job_settings|. | 22 PrintSettings* print_settings); |
23 class PRINTING_EXPORT PrintSettingsInitializer { | |
24 public: | |
25 static bool InitSettings( | |
26 const base::DictionaryValue& job_settings, | |
27 const PageRanges& ranges, | |
28 PrintSettings* print_settings); | |
29 | 23 |
30 private: | 24 // Use for debug only, because output is not completely consistent with format |
31 DISALLOW_IMPLICIT_CONSTRUCTORS(PrintSettingsInitializer); | 25 // of |PrintSettingsFromJobSettings| input. |
32 }; | 26 void PrintSettingsToJobSettingsDebug(const PrintSettings& settings, |
| 27 base::DictionaryValue* job_settings); |
33 | 28 |
34 } // namespace printing | 29 } // namespace printing |
35 | 30 |
36 #endif // PRINTING_PRINT_SETTINGS_INITIALIZER_H_ | 31 #endif // PRINTING_PRINT_SETTINGS_CONVERSION_H_ |
37 | |
OLD | NEW |