OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // Activates the initiator tab and close the preview tab. | 169 // Activates the initiator tab and close the preview tab. |
170 void ActivateInitiatorTabAndClosePreviewTab(); | 170 void ActivateInitiatorTabAndClosePreviewTab(); |
171 | 171 |
172 // Adds all the recorded stats taken so far to histogram counts. | 172 // Adds all the recorded stats taken so far to histogram counts. |
173 void ReportStats(); | 173 void ReportStats(); |
174 | 174 |
175 // Clears initiator tab details for this preview tab. | 175 // Clears initiator tab details for this preview tab. |
176 void ClearInitiatorTabDetails(); | 176 void ClearInitiatorTabDetails(); |
177 | 177 |
178 // Posts a task to save |data| to pdf at |print_to_pdf_path_|. | 178 // Posts a task to save |data| to pdf at |print_to_pdf_path_|. |
179 void PostPrintToPdfTask(scoped_refptr<base::RefCountedBytes> data); | 179 void PostPrintToPdfTask(base::RefCountedBytes* data); |
180 | 180 |
181 // Populates |settings| according to the current locale. | 181 // Populates |settings| according to the current locale. |
182 void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings); | 182 void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings); |
183 | 183 |
184 static printing::StickySettings* GetStickySettings(); | 184 static printing::StickySettings* GetStickySettings(); |
185 | 185 |
186 // Pointer to current print system. | 186 // Pointer to current print system. |
187 scoped_refptr<printing::PrintBackend> print_backend_; | 187 scoped_refptr<printing::PrintBackend> print_backend_; |
188 | 188 |
189 // The underlying dialog object. | 189 // The underlying dialog object. |
(...skipping 13 matching lines...) Expand all Loading... |
203 bool has_logged_printers_count_; | 203 bool has_logged_printers_count_; |
204 | 204 |
205 // Holds the path to the print to pdf request. It is empty if no such request | 205 // Holds the path to the print to pdf request. It is empty if no such request |
206 // exists. | 206 // exists. |
207 scoped_ptr<FilePath> print_to_pdf_path_; | 207 scoped_ptr<FilePath> print_to_pdf_path_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 209 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
210 }; | 210 }; |
211 | 211 |
212 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 212 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |