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_PRINTING_CONTEXT_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_H_ |
6 #define PRINTING_PRINTING_CONTEXT_H_ | 6 #define PRINTING_PRINTING_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 protected: | 103 protected: |
104 explicit PrintingContext(const std::string& app_locale); | 104 explicit PrintingContext(const std::string& app_locale); |
105 | 105 |
106 // Reinitializes the settings for object reuse. | 106 // Reinitializes the settings for object reuse. |
107 void ResetSettings(); | 107 void ResetSettings(); |
108 | 108 |
109 // Does bookkeeping when an error occurs. | 109 // Does bookkeeping when an error occurs. |
110 PrintingContext::Result OnError(); | 110 PrintingContext::Result OnError(); |
111 | 111 |
| 112 // Extracts the header and footer strings into |header_footer_info| if |
| 113 // headers and footers are to be printed. |
| 114 void GetHeaderFooterInfo(const base::DictionaryValue& settings, |
| 115 base::DictionaryValue* header_footer_info); |
| 116 |
112 // Complete print context settings. | 117 // Complete print context settings. |
113 PrintSettings settings_; | 118 PrintSettings settings_; |
114 | 119 |
115 // The dialog box has been dismissed. | 120 // The dialog box has been dismissed. |
116 volatile bool dialog_box_dismissed_; | 121 volatile bool dialog_box_dismissed_; |
117 | 122 |
118 // Is a print job being done. | 123 // Is a print job being done. |
119 volatile bool in_print_job_; | 124 volatile bool in_print_job_; |
120 | 125 |
121 // Did the user cancel the print job. | 126 // Did the user cancel the print job. |
122 volatile bool abort_printing_; | 127 volatile bool abort_printing_; |
123 | 128 |
124 // The application locale. | 129 // The application locale. |
125 std::string app_locale_; | 130 std::string app_locale_; |
126 | 131 |
127 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 132 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
128 }; | 133 }; |
129 | 134 |
130 } // namespace printing | 135 } // namespace printing |
131 | 136 |
132 #endif // PRINTING_PRINTING_CONTEXT_H_ | 137 #endif // PRINTING_PRINTING_CONTEXT_H_ |
OLD | NEW |