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 CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 | 150 |
151 // Adds all the recorded stats taken so far to histogram counts. | 151 // Adds all the recorded stats taken so far to histogram counts. |
152 void ReportStats(); | 152 void ReportStats(); |
153 | 153 |
154 // Hides the preview tab for printing. | 154 // Hides the preview tab for printing. |
155 void HidePreviewTab(); | 155 void HidePreviewTab(); |
156 | 156 |
157 // Clears initiator tab details for this preview tab. | 157 // Clears initiator tab details for this preview tab. |
158 void ClearInitiatorTabDetails(); | 158 void ClearInitiatorTabDetails(); |
159 | 159 |
160 // Posts a task to save to pdf at |path|. |is_pending| is true if the preview | |
161 // tab is hidden at the time the task is posted. | |
162 void PostPrintToPdfTask(FilePath& path, bool is_pending); | |
163 | |
160 // Pointer to current print system. | 164 // Pointer to current print system. |
161 scoped_refptr<printing::PrintBackend> print_backend_; | 165 scoped_refptr<printing::PrintBackend> print_backend_; |
162 | 166 |
163 // The underlying dialog object. | 167 // The underlying dialog object. |
164 scoped_refptr<SelectFileDialog> select_file_dialog_; | 168 scoped_refptr<SelectFileDialog> select_file_dialog_; |
165 | 169 |
166 static FilePath* last_saved_path_; | 170 static FilePath* last_saved_path_; |
167 static std::string* last_used_printer_cloud_print_data_; | 171 static std::string* last_used_printer_cloud_print_data_; |
168 static std::string* last_used_printer_name_; | 172 static std::string* last_used_printer_name_; |
169 static bool last_used_color_setting_; | 173 static bool last_used_color_setting_; |
170 | 174 |
171 // A count of how many requests received to regenerate preview data. | 175 // A count of how many requests received to regenerate preview data. |
172 // Initialized to 0 then incremented and emitted to a histogram. | 176 // Initialized to 0 then incremented and emitted to a histogram. |
173 int regenerate_preview_request_count_; | 177 int regenerate_preview_request_count_; |
174 | 178 |
175 // A count of how many requests received to show manage printers dialog. | 179 // A count of how many requests received to show manage printers dialog. |
176 int manage_printers_dialog_request_count_; | 180 int manage_printers_dialog_request_count_; |
177 | 181 |
178 // Whether we have already logged a failed print preview. | 182 // Whether we have already logged a failed print preview. |
179 bool reported_failed_preview_; | 183 bool reported_failed_preview_; |
180 | 184 |
181 // Whether we have already logged the number of printers this session. | 185 // Whether we have already logged the number of printers this session. |
182 bool has_logged_printers_count_; | 186 bool has_logged_printers_count_; |
183 | 187 |
188 FilePath pending_print_to_pdf_path_; | |
kmadhusu
2011/09/02 21:47:03
Document this variable.
dpapad
2011/09/07 00:46:19
Done.
| |
189 | |
184 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 190 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
185 }; | 191 }; |
186 | 192 |
187 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 193 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |